Issue #26754: Undocumented support of general bytes-like objects

as path in compile() and similar functions is now deprecated.
This commit is contained in:
Serhiy Storchaka 2016-08-06 23:29:29 +03:00
parent d73c31899e
commit febc332056
7 changed files with 34 additions and 16 deletions

View file

@ -629,8 +629,10 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase):
zipimport.zipimporter(filename)
zipimport.zipimporter(os.fsencode(filename))
zipimport.zipimporter(bytearray(os.fsencode(filename)))
zipimport.zipimporter(memoryview(os.fsencode(filename)))
with self.assertWarns(DeprecationWarning):
zipimport.zipimporter(bytearray(os.fsencode(filename)))
with self.assertWarns(DeprecationWarning):
zipimport.zipimporter(memoryview(os.fsencode(filename)))
@support.requires_zlib