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 jaraco
Recipients brett.cannon, jaraco, ned.deily
Date 2016-09-13.16:19:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Grabbing the recently released Python 3.6.0b1, I tried running one of my test suites, but found that some assertions were failing to assert when the package was loaded as a zip file (such as with pytest-runner installed dependencies). I distilled the issue to this:

$ cat >
def test(val):
$ zip
updating: (deflated 20%)
$ rm
$ python
Python 3.6.0b1 (v3.6.0b1:5b0ca4ed5e2f, Sep 12 2016, 09:24:46) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path.append('')
>>> import mod
>>> mod.test(False)
>>> mod.__loader__
<zipimporter object "">
>>> sys.flags.optimize

I would have expected the call to mod.test to have raised an AssertionError, and on Python 3.5 it does.

I searched the what's new and didn't see anything advertising this change, so I suspect it's an unintentional regression.

I'm including Brett for his familiarity with importlib, but welcome re-assignment.

If I can do more to help, let me know.
Date User Action Args
2016-09-13 16:19:15jaracosetrecipients: + jaraco, brett.cannon, ned.deily
2016-09-13 16:19:15jaracosetmessageid: <>
2016-09-13 16:19:15jaracolinkissue28131 messages
2016-09-13 16:19:15jaracocreate