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
Can't import xmlrpclib, DocXMLRPCServer and SimpleXMLRPCServer when zlib is not available #50748
Comments
I'm working on bpo-6026 and I noticed that the patch for bpo-6267 introduced xmlrpclib should check if the "import gzip" fails and disable the new I don't know if this check can be moved directly on gzip but it seems |
I thought zlib was a builtin module? Why isn't it available? |
I don't know why it's not installed here, but I didn't remove it When I compiled Python I got this message, so I think that Python |
Kristján, zlib is only built when the required development headers (.h |
submitted revision 74098 and revision 74099 which should fix your issue. |
Thanks, now all the tests pass. $ ./python Lib/test/regrtest.py -v test_docxmlrpc
test_docxmlrpc
test_autolink_dotted_methods (test.test_docxmlrpc.DocXMLRPCHTTPGETServer)
Test that selfdot values are made strong automatically in the ... ok
test_autolinking (test.test_docxmlrpc.DocXMLRPCHTTPGETServer)
Test that the server correctly automatically wraps references to PEPS ... ok
test_invalid_get_response (test.test_docxmlrpc.DocXMLRPCHTTPGETServer)
... ok
test_lambda (test.test_docxmlrpc.DocXMLRPCHTTPGETServer)
Test that lambda functionality stays the same. The output produced ... ok
test_system_methods (test.test_docxmlrpc.DocXMLRPCHTTPGETServer)
Test the precense of three consecutive system.* methods. ... ok
test_valid_get_response (test.test_docxmlrpc.DocXMLRPCHTTPGETServer) ... ok Ran 6 tests in 0.392s OK Original exception was: |
I found one problem in test_docxmlrpc.py, a missing "import socket" at But there seems to be a problem with the error handing in your build. But to short circuit that, |
sys.stderr looks ok, I tried what you said and I also tried to put some |
Well, I think the only way to move forward with this is to try to |
Same message in the terminal and nothing in the file. Can you reproduce it if you run the test several times? Some times I |
I can't reproduce this, no. I only have access to a windows machine Try adding something like this into the file, after the except |
I tried that too, with no results. However using advanced debugging techniques I found something new. I I'm not 100% sure but at some point I think I saw the third message |
I tried to remove the first two prints (I reverted the file and the only $ ./python Lib/test/regrtest.py -v test_docxmlrpc
test_docxmlrpc
test_valid_get_response (test.test_docxmlrpc.DocXMLRPCHTTPGETServer) ... ok Ran 1 test in 0.063s OK
1 test OK.
Exception in thread Thread-1 (most likely raised during interpreter
shutdown):
Traceback (most recent call last):
File "/home/wolf/python-trunk/Lib/threading.py", line 524, in
__bootstrap_inner
File "/home/wolf/python-trunk/Lib/threading.py", line 477, in run
File "/home/wolf/python-trunk/Lib/test/test_docxmlrpc.py", line 55, in
server
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute
'write'
Unhandled exception in thread started by
Error in sys.excepthook: Original exception was: |
Ah, so this is an interpreter shutdown issue, it seems. |
No, sorry. You have just introduced the race condition by putting a print In fact, this is probably the reason why we didn't get any sensible error |
Any news on this? |
Not yet, the machine I was using to work on this is currently broken and |
I fixed the machine and tried the file that you uploaded, but nothing
Original exception was: Original exception was: |
Ok, this means that the exception is raised after the finally, when the Now, lines 452-455 don't produce any output. For starters, try to |
Ezio, the original problem this ticket was opened for appears to be |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: