Fix IPC tests and documentation#147
Fix IPC tests and documentation#147Flood1993 wants to merge 3 commits intoopensistemas-hub:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #147 +/- ##
=========================================
- Coverage 98.87% 98.77% -0.1%
=========================================
Files 25 25
Lines 3196 3195 -1
Branches 241 241
=========================================
- Hits 3160 3156 -4
- Misses 24 27 +3
Partials 12 12
Continue to review full report at Codecov.
|
8304d30 to
eaa4373
Compare
5ff7050 to
d226b97
Compare
d226b97 to
bbdeb97
Compare
bbdeb97 to
2f30667
Compare
|
Let us keep an eye on irmen/Pyro4#179. That may help us fixing serialization problems in Windows. |
2f30667 to
b1ebec7
Compare
|
Can you interactively rebase your 2 commits onto #146 again? |
|
Once you do that, could you check if #172 helps with those serialization problems you were having? If it does not, do you have a reproducible test case that we can share with |
|
#196 is needed before trying anything, as many things were added/fixed in cloudpickle 0.4.0. |
b1ebec7 to
6fc1f83
Compare
6fc1f83 to
d5f3be3
Compare
|
Turns out the cause of all of these serialization problems is the way Windows creates new processes. Instead of forking (like *nix systems do), Windows spawns a new process and passes a bunch of information to it, which requires all the local objects to be picklable. Since we use a lot of nested classes for these tests, and nested classes can't be pickled, a pickling error will be raised for every single test that uses one. Since the errors are raised from the standard multiprocessing module, there's not much we can control about this. The way I see it we have two options:
@Peque thoughts? |
|
@Peque By the way, this seems like it's exceeding the purpose of this PR. Should I create a new one to discuss all of this? |
|
@ocaballeror So basically it is failing due to the arguments passed to
I think we can discuss everything in this PR. The idea is, somehow, to end up with AppVeyor in green here. 😄 |
|
PS: we probably only need to serialize |
|
@Peque that sounds much simpler 😄 I'm currently testing that solution and it seems to work just fine 👍 . I haven't finished with all the tests, though, but most of them are passing right now, which is more than I could say an hour ago. |
|
UPDATE: After multiple hours of testing, it turns out Windows behaves strangely (I know, shocker!) when dealing with socket addresses, and lets you bind multiple sockets to the same address and have them all listen at the same time. According to Microsoft's documentation, instead of raising an error, this setup will have "undefined behavior". This seems to be the problem behind most of the currently failing tests, so I'll have to investigate how to work around this. |
|
Some documentation to back up my claims: https://msdn.microsoft.com/en-us/library/windows/desktop/ms740621(v=vs.85).aspx It would be nice if there was even a mention to this in the python documentation |
|
@ocaballeror Can you update the PR with the changes you have made so far? (at least those that seem to improve things). In example: serialization of the base class, separation of IPC tests to avoid executing them in AppVeyor... |
|
@Peque This is not my PR, so I guess I'll have to create a new one. |
|
@ocaballeror Try first, just in case... 😊 In my case, for example, I have GitHub configured so that people reviewing my PRs can push commits to it. |
|
@ocaballeror But yeah, if you cannot, just open a new one (and close this). |
|
Continues on #252 |
No description provided.