-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
windows: Implement socket/ssl modules #12810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #12810 +/- ##
=======================================
Coverage 98.43% 98.43%
=======================================
Files 163 163
Lines 21290 21290
=======================================
Hits 20956 20956
Misses 334 334 ☔ View full report in Codecov by Sentry. |
This is an automated heads-up that we've just merged a Pull Request See #13763 A search suggests this PR might apply the STATIC macro to some C code. If it Although this is an automated message, feel free to @-reply to me directly if |
Code size report:
|
0aae1b9
to
dc44e7c
Compare
Apart from the |
Fix in #14188 |
Note these are mostly the 'bare' socket tests, not the ssl/tls ones for instance: most of these don't run on CPython because of incompatible wrap_socket() arguments. The change mostly consists of checking the WSA error codes next to the errno ones and these are written as numeric values because the names (like WSAEAGAIN) are only available in CPython and not in micropython. Signed-off-by: stijn <stijn@ignitron.net>
Signed-off-by: stijn <stijn@ignitron.net>
Upcoming commits are going to port this file to work with sockets on windows so prepare for that with the platform-specific bits. Signed-off-by: stijn <stijn@ignitron.net>
Signed-off-by: stijn <stijn@ignitron.net>
Signed-off-by: stijn <stijn@ignitron.net>
This is more consistent with the Makefile/CMake-based builds. Signed-off-by: stijn <stijn@ignitron.net>
This is consistent with extmod.mk's split between SRC_EXTMOD_C and SRC_THIRDPARTY_C, the latter specifying source files which get compiled but not included in qstr generation. Signed-off-by: stijn <stijn@ignitron.net>
Supports preprocessor definitions like /Dval="quotedvalue" by turning that into /Dval=\"quotedvalue\". Signed-off-by: stijn <stijn@ignitron.net>
Signed-off-by: stijn <stijn@ignitron.net>
Socket module is enabled for mingw and msvc builds, mbedtls only for the former; for no particular reason, I can add it there as well if that makes more sense.
As for testing I manually ran the relevant multi_net/net_inet/net_hosted tests and tried the requests module both with and without SSL, and all of that works fine so it's likely that everything is done correctly.
The new multi_net/tcp_recv_timeout.py fails sometimes on ci, likely because one of the recv() calls errors out because the remote disconnected already, which I thought
multitest.next()
would make sure didn't happen but I probably misunderstood what it does. Someone has an idea for that? I just want the recv calls on both ends to time out.The test fixes with the numeric values I'm not super happy about, but the only proper way of doing this is to provide common functions to check these errors in a test_helpers module or something like that, and then perhaps implementing a complete errno module for windows which does include all WSAXXX error code, which is a bit much maybe?