summaryrefslogtreecommitdiffstats
path: root/Modules/zipimport.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #24366: Fix indentationMartin Panter2016-09-151-4/+4
| | | | | Backports changes by Victor Stinner, Hirokazu Yamamoto, li4ick and Benjamin Peterson.
* Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Martin Panter2016-09-071-1/+1
|
* Fixed an infinite loop in zipimport caused by cebcd2fd3e1f (issue #19883).Serhiy Storchaka2016-01-281-4/+3
|
* Issue #19883: Fixed possible integer overflows in zipimport.Serhiy Storchaka2016-01-281-131/+214
|
* reject negative data_sizeBenjamin Peterson2016-01-221-0/+4
|
* prevent buffer overflow in get_data (closes #26171)Benjamin Peterson2016-01-211-0/+5
|
* fix refleak in error conditionBenjamin Peterson2016-01-211-0/+1
|
* finish backing out #19081Benjamin Peterson2014-02-161-241/+53
|
* backout #19081 to fix #20621Benjamin Peterson2014-02-161-102/+66
|
* Remove inaccurate comment and a the related recently addedGregory P. Smith2014-01-281-7/+0
| | | | | | Py_VerboseFlag print that can never be triggered. prefix[0] is always equal to 0 at this point in the code.
* Issue #19081: Remove the zipimporter.files reference as the zip TOCGregory P. Smith2014-01-271-55/+97
| | | | | | | | | | | | | 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.
* fix zipimport ref leakBenjamin Peterson2014-01-091-3/+1
|
* cleanup for the issue 19081 fix - pull the file open and close outside of theGregory P. Smith2014-01-081-8/+8
| | | | | zip_searchorder scanning loop in get_module_code(). [already done in 3.3 and 3.4]
* Should fix the issue19081 fix on Windows. Don't let the previousGregory P. Smith2014-01-071-1/+4
| | | | posix module ImportError cause the nt module import to fail.
* Fixes issue19081: When a zipimport .zip file in sys.path being importedGregory P. Smith2014-01-061-53/+241
| | | | | | | | | | | | | 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.
* Closes #15897: zipimport.c doesn't check return value of fseek()Jesus Cea2012-10-031-7/+35
|
* Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymoreVictor Stinner2011-05-211-24/+23
| | | | to be able to unload the module.
* #11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-161-1/+1
|
* #11515: fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-151-1/+1
|
* Fix #9316. if/is grammar corrections.Brian Curtin2010-07-211-3/+3
|
* Untabify C files. Will watch buildbots.Antoine Pitrou2010-05-091-860/+860
|
* Issue #4512 closeout: Make ZipImport.get_filename() a public methodNick Coghlan2009-02-081-3/+3
|
* Fix several issues relating to access to source code inside zipfiles. ↵Nick Coghlan2008-12-141-0/+31
| | | | Initial work by Alexander Belopolsky. See Misc/NEWS in this checkin for details.
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-29/+29
| | | | | | | http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
* Renamed PyString to PyBytesChristian Heimes2008-05-261-29/+29
|
* #1326: document and test zipimporter.archive and zipimporter.prefix.Georg Brandl2008-05-111-2/+9
|
* Coverity issue CID #197Christian Heimes2008-01-181-0/+2
| | | | | var_decl: Declared variable "stm" without initializer ninit_use_in_call: Using uninitialized value "stm" (field "stm".tm_zone uninitialized) in call to function "mktime"
* Modified PyImport_Import and PyImport_ImportModule to always use absolute ↵Christian Heimes2008-01-031-1/+1
| | | | | | imports by calling __import__ with an explicit level of 0 Added a new API function PyImport_ImportModuleNoBlock. It solves the problem with dead locks when mixing threads and imports
* #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and ↵Christian Heimes2007-12-191-1/+1
| | | | Py_REFCNT. Macros for b/w compatibility are available.
* PEP 3123: Provide forward compatibility with Python 3.0, while keepingMartin v. Löwis2007-07-211-3/+2
| | | | | backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
* It's very unlikely, though possible that source is not a string. VerifyNeal Norwitz2006-08-131-0/+3
| | | | | | | that PyString_AsString() returns a valid pointer. (The problem can arise when zlib.decompress doesn't return a string.) Klocwork 346
* Use Py_VISIT in all tp_traverse methods, instead of traversing manually orThomas Wouters2006-04-151-7/+1
| | | | | | | | using a custom, nearly-identical macro. This probably changes how some of these functions are compiled, which may result in fractionally slower (or faster) execution. Considering the nature of traversal, visiting much of the address space in unpredictable patterns, I'd argue the code readability and maintainability is well worth it ;P
* remove forward declarations. No constructors to move for these files. MakesAnthony Baxter2006-04-121-2/+1
| | | | code work with C++ compilers.
* SF #1444030: Fix several potential defects found by Coverity.Hye-Shik Chang2006-03-071-0/+2
| | | | (reviewed by Neal Norwitz)
* Patch #1352711: make zipimport raise a complete IOErrorGeorg Brandl2006-02-191-2/+1
|
* Use Py_ssize_t for counts and sizes.Martin v. Löwis2006-02-161-2/+2
|
* Merge ssize_t branch.Martin v. Löwis2006-02-151-2/+4
|
* the implementation uses ZipImportError, not ZipImporterError...Fredrik Lundh2006-01-151-1/+1
|
* Fix icc warnings: strlen() returns size_tNeal Norwitz2006-01-081-4/+5
|
* update busted commentFred Drake2005-11-111-1/+2
|
* Fix a bunch of imports to use code.h instead of compile.h.Jeremy Hylton2005-10-211-1/+0
| | | | Remove duplicate declarations from compile.h
* Disallow keyword arguments for type constructors that don't use them.Georg Brandl2005-08-261-0/+3
| | | | (fixes bug #1119418)
* SF patch 1062495: Modules/zipimport.c does not compile on solarisRaymond Hettinger2004-11-101-5/+5
| | | | | | (Contributed by Niki W. Waibel.) Simple renaming to avoid a conflict that prevented compilation on Solaris.
* Patch #801349: 64-bit fix for AMD64 from Gwenole Beauchesne.Just van Rossum2003-09-071-1/+1
| | | | | Classical problem with int vs. long mismatch in varargs. 2.3 backport candidate.
* Change the zipimport implementation to accept files containingThomas Heller2003-07-221-2/+7
| | | | | | | | | 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.
* Remove unused variable.Jeremy Hylton2003-07-171-2/+1
|
* Patch #734231: Update RiscOS support. In particular, correctMartin v. Löwis2003-05-101-0/+10
| | | | riscospath.extsep, and use os.extsep throughout.
* tentative fix for #712322: modification time stamp checking failedJust van Rossum2003-04-081-1/+1
| | | | when DST began.
* Make private function and data static.Neal Norwitz2003-03-231-2/+3
|
* use proper constant instead of comment (noted by nnorwitz)Just van Rossum2003-02-281-1/+1
|