#27086: running servers.tests hangs in parallel mode
-------------------------------+--------------------------------------
Reporter: cjerdonek | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by cjerdonek):
* status: closed => new
* resolution: worksforme =>
Comment:
I was able to get things working by causing Mac OS X's auto-detection of
proxy information to be skipped. This possibility is mentioned
[https://docs.python.org/3/library/urllib.request.html#urllib.request.ProxyHandler
here] in CPython's `urllib.request.ProxyHandler` documentation.
More detailed instructions appear in `urllib.request`'s module docstring.
To disable the auto-detection, I followed the instructions in the above-
mentioned module docstring and modified `LiveServerBase.urlopen()` to look
like the following (this is just a proof of concept):
{{{#!python
def urlopen(self, url):
import urllib.request
# Pass an empty dictionary to disable auto-detecting the proxy.
proxy_support = urllib.request.ProxyHandler({})
opener = urllib.request.build_opener(proxy_support)
urllib.request.install_opener(opener)
return urlopen(self.live_server_url + url)
}}}
After doing this, the following command worked fine:
{{{
$ ./runtests.py servers.tests
}}}
Since this seems like a fundamental bug / limitation on Mac OS X (in at
least some versions), it seems worth considering including Mac-specific
code to enable the parallel running of tests on this platform.
--
Ticket URL: <https://code.djangoproject.com/ticket/27086#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.cdb14ead49879e5e5208bf1622e67898%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.