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 Oren Milman
Recipients Oren Milman
Date 2017-08-28.08:44:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1503909866.45.0.325412617055.issue31291@psf.upfronthosting.co.za>
In-reply-to
Content
on Windows, assuming the file 'foo.zip' exists, the following would cause an
assertion failure in Modules/zipimport.c in zipimport_zipimporter_get_data_impl():

import zipimport

class BadStr(str):
    def replace(self, old, new):
        return 42

zipimport.zipimporter('foo.zip').get_data(BadStr('bar'))


this is because zipimport_zipimporter_get_data_impl() assumes that
BadStr('bar').replace('/', '\\') is a string.
History
Date User Action Args
2017-08-28 08:44:26Oren Milmansetrecipients: + Oren Milman
2017-08-28 08:44:26Oren Milmansetmessageid: <1503909866.45.0.325412617055.issue31291@psf.upfronthosting.co.za>
2017-08-28 08:44:26Oren Milmanlinkissue31291 messages
2017-08-28 08:44:26Oren Milmancreate