summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zipimport.py
Commit message (Collapse)AuthorAgeFilesLines
* remove tests for #19081Benjamin Peterson2014-02-161-84/+21
|
* backout #19081 to fix #20621Benjamin Peterson2014-02-161-110/+22
|
* Remove unneeded use of globals() and locals() in test on importsGregory P. Smith2014-01-281-9/+8
| | | | introduced with the issue19081 tests.
* Refactor the new test for issue19081 to exec import statements into aGregory P. Smith2014-01-281-10/+14
| | | | | test_ns dict instead of the actual globals() and locals(). Suggested after review by Thomas Wouters.
* Issue #19081: Remove the zipimporter.files reference as the zip TOCGregory P. Smith2014-01-271-18/+103
| | | | | | | | | | | | | caches are module global in the zip_directory_cache. When it is updated due to a changed zip file, all zipimporter instances need to see the same updates TOC cache. This fixes the bug for the overlooked submodule import case from the earlier round of changes. Includes tests that would fail otherwise. It also refactors zipimporter_init in the process to make it a bit easier to read and understand. Less reuse of the same variable for multiple purposes and the local path buffer is malloc'ed instead of consuming a large MAXPATHLEN+2 chunk stack space.
* normalize whitespace from prior issue19081 fix commit.Gregory P. Smith2014-01-061-3/+3
|
* Fixes issue19081: When a zipimport .zip file in sys.path being importedGregory P. Smith2014-01-061-20/+83
| | | | | | | | | | | | | from is modified during the lifetime of the Python process after zipimport has already opened and cached the zip's table of contents it now fstat's the file after opening it upon every attempt to access anything within and will re-read the table of contents if the .zip file inode, size or mtime have changed. It would've been nicer to hold any .zip file used by zipimport open for the duration of the process but that would be more invasive and add an additional open file descriptor to all zipimport using processes. It also would likely not fix the problem on Windows due to different filesystem semantics.
* Issue #19572: More silently skipped tests explicitly skipped.Zachary Ware2013-12-101-1/+1
|
* Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymoreVictor Stinner2011-05-211-17/+0
| | | | to be able to unload the module.
* Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-27/+27
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
* Fix various missing import/unbound name errors.Georg Brandl2010-02-061-2/+2
|
* use assert[Not]In where appropriateEzio Melotti2010-01-231-1/+1
|
* #6026 - fix tests that failed without zlibEzio Melotti2009-09-121-3/+10
|
* convert usage of fail* to assert*Benjamin Peterson2009-06-301-2/+2
|
* Issue #4512 closeout: Make ZipImport.get_filename() a public methodNick Coghlan2009-02-081-6/+6
|
* Fix several issues relating to access to source code inside zipfiles. ↵Nick Coghlan2008-12-141-8/+24
| | | | Initial work by Alexander Belopolsky. See Misc/NEWS in this checkin for details.
* #1326: document and test zipimporter.archive and zipimporter.prefix.Georg Brandl2008-05-111-0/+32
|
* #1325: Add docs and tests for zipimporter.archive and zipimporter.prefix.Georg Brandl2008-01-061-0/+5
|
* Whitespace normalization.Tim Peters2006-04-111-2/+2
|
* Updated the warnings, linecache, inspect, traceback, site, and doctest modulesPhillip J. Eby2006-04-111-2/+81
| | | | | to work correctly with modules imported from zipfiles or via other PEP 302 __loader__ objects. Tests and doc updates are included.
* Repaired new test failures on Windows:Tim Peters2006-01-231-3/+12
| | | | | | | - The path separator isn't "/" on Windows. - Leaving behind a read-only file causes cascades of bogus failures on Windows.
* Whitespace normalization.Tim Peters2006-01-231-1/+1
|
* Disable this test until I can test on big-endian machines and get passingNeal Norwitz2006-01-231-1/+2
|
* Test zipimporter a bit more. Also get working with -R :: option for finding ↵Neal Norwitz2006-01-231-4/+122
| | | | ref leaks
* Fix for [ 765456 ]: testAFakeZlib failed on platforms that use aJust van Rossum2003-11-181-0/+7
| | | | | statically linked zlib module, but since the problem it tests can't exist on these systems, simply skip it then. Will backport.
* Change the zipimport implementation to accept files containingThomas Heller2003-07-221-1/+20
| | | | | | | | | arbitrary bytes before the actual zip compatible archive. Zipfiles containing comments at the end of the file are still not supported. Add a testcase to test_zipimport, and update NEWS. This closes sf #775637 and sf #669036.
* Patch #734231: Update RiscOS support. In particular, correctMartin v. Löwis2003-05-101-1/+1
| | | | riscospath.extsep, and use os.extsep throughout.
* Combine the functionality of test_support.run_unittest()Walter Dörwald2003-05-011-2/+4
| | | | | | | | | | and test_support.run_classtests() into run_unittest() and use it wherever possible. Also don't use "from test.test_support import ...", but "from test import test_support" in a few spots. From SF patch #662807.
* Whitespace normalization.Tim Peters2003-02-191-5/+5
|
* Use correct function name to PyArg_ParseTuple("is_package").Neal Norwitz2003-02-171-1/+4
| | | | | | | | | | | | Fix off-by-1 error in normalize_line_endings(): when *p == '\0' the NUL was copied into q and q was auto-incremented, the loop was broken out of, then a newline was appended followed by a NUL. So the function, in effect, was strcpy() but added two extra chars which was caught by obmalloc in debug mode, since there was only room for 1 additional newline. Get test working under regrtest (added test_main).
* cleaned up Jack's Mac OS9 changesJust van Rossum2003-01-091-5/+1
|
* Various tweaks to make the test work on the Mac.Jack Jansen2003-01-081-3/+12
|
* Fix for bug #661136Just van Rossum2003-01-031-3/+8
| | | | | | | | | | | | | Lesson learned: kids should not be allowed to use API's starting with an underscore :-/ zipimport in 2.3a1 is even more broken than I thought: I attemped to _PyString_Resize a string created by PyString_FromStringAndSize, which fails for strings with length 0 or 1 since the latter returns an interned string in those cases. This would cause a SystemError with empty source files (and no matching pyc) in the zip archive. I rewrote the offending code to simply allocate a new buffer and avoid _PyString_Resize altogether. Added a test that would've caught the problem.
* Ugh, zipimport is virtually broken in 2.3a1 :-( It worked by accident inJust van Rossum2003-01-021-4/+5
| | | | | | | | | | | | | the test set as it only tested with a zip archive in the current directory, but it doesn't work at all for packages when the zip archive was specified as an absolute path. It's a real embarrassing bug: a strchr call should have been strrchr; fever apparently implies dyslexia. Second stupid bug: the zipimport test failed with a name error __importer__ (which I had renamed to __loader__ everywhere but here). I would've sworn I ran the test after that change but that can't be true. What I don't understand that noone reported a failing test_zipimport.py before the release of 2.3a1.
* PEP 302 + zipimport:Just van Rossum2002-12-301-0/+180
- new import hooks in import.c, exposed in the sys module - new module called 'zipimport' - various changes to allow bootstrapping from zip files I hope I didn't break the Windows build (or anything else for that matter), but then again, it's been sitting on sf long enough... Regarding the latest discussions on python-dev: zipimport sets pkg.__path__ as specified in PEP 273, and likewise, sys.path item such as /path/to/Archive.zip/subdir/ are supported again.