This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vajrasky
Recipients vajrasky
Date 2018-12-17.11:35:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
$ git clone cpython2
$ cd cpython2
$ ./configure --with-pydebug
$ make -j
$ ./python Lib/test/ 
Traceback (most recent call last):
  File "Lib/test/", line 8, in <module>
    import xmlrpc.client as xmlrpclib
  File "/opt/Code/python/cpython2/Lib/xmlrpc/", line 136, in <module>
    import http.client
  File "/opt/Code/python/cpython2/Lib/http/", line 71, in <module>
    import email.parser
  File "/opt/Code/python/cpython2/Lib/email/", line 12, in <module>
    from email.feedparser import FeedParser, BytesFeedParser
  File "/opt/Code/python/cpython2/Lib/email/", line 27, in <module>
    from email._policybase import compat32
  File "/opt/Code/python/cpython2/Lib/email/", line 9, in <module>
    from email.utils import _has_surrogates
  File "/opt/Code/python/cpython2/Lib/email/", line 28, in <module>
    import random
  File "/opt/Code/python/cpython2/Lib/", line 47, in <module>
    import bisect as _bisect
  File "/opt/Code/python/cpython2/Lib/test/", line 27, in <module>
    import tempfile
  File "/opt/Code/python/cpython2/Lib/", line 45, in <module>
    from random import Random as _Random
ImportError: cannot import name 'Random' from 'random' (/opt/Code/python/cpython2/Lib/

I know about running test this way:
$ ./python -m test -v test_xmlrpc

And it works.

I am just wondering whether I should be able to run test this way: ./python Lib/test/

Because running other tests without test module works, for example: ./python Lib/test/ Only test which imports random module fails.
Date User Action Args
2018-12-17 11:35:16vajraskysetrecipients: + vajrasky
2018-12-17 11:35:16vajraskysetmessageid: <>
2018-12-17 11:35:16vajraskylinkissue35519 messages
2018-12-17 11:35:15vajraskycreate