History log of /external/python/cpython2/Modules/zipimport.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ced27516f5ff24d91382b5e9fb513f0682617a2e 20-Jun-2017 Nan Zhang <nanzhang@google.com> <Hermetic> Implement CPython2 Launcher in C++.

The launcher is actually a wrapper which will statically link Python
interpreter within the .par file. It is used to bootstrap embedded
interpreter.

The next step is to change/integrate with Soong to make this hermetic .par
generation process more automatic.

Bug: b/62380596

Test: The launcher has been tested using real files:
zip -r hermetic.zip entry_point.txt Stdlib/ runfiles/
cat launcher | cat - hermetic.zip > executable && chmod u+x executable

Change-Id: I293cae2fe74d46766044f3e3c4b654a54d319b67
/external/python/cpython2/Modules/zipimport.c
5f75502a2ed490071514ab0361e1b406a7405de1 15-Sep-2016 Martin Panter <vadmium+py@gmail.com> Issue #24366: Fix indentation

Backports changes by Victor Stinner, Hirokazu Yamamoto, li4ick and Benjamin
Peterson.
/external/python/cpython2/Modules/zipimport.c
6507657dddebc629e49f3dc683d89a96a481fb86 07-Sep-2016 Martin Panter <vadmium+py@gmail.com> Issue #27895: Spelling fixes (Contributed by Ville Skyttä).
/external/python/cpython2/Modules/zipimport.c
13ea0c5d9c3d1e88373af65ee11490077cfb2e80 28-Jan-2016 Serhiy Storchaka <storchaka@gmail.com> Fixed an infinite loop in zipimport caused by cebcd2fd3e1f (issue #19883).
/external/python/cpython2/Modules/zipimport.c
c4ef384d1313e0f7b7bb094793f3b9ee495a71fb 28-Jan-2016 Serhiy Storchaka <storchaka@gmail.com> Issue #19883: Fixed possible integer overflows in zipimport.
/external/python/cpython2/Modules/zipimport.c
5640bbb6c5c0c9232fd761ef4544687f9123e43e 22-Jan-2016 Benjamin Peterson <benjamin@python.org> reject negative data_size
/external/python/cpython2/Modules/zipimport.c
64ea192b73e39e877d8b39ce6584fa580eb0e9b4 21-Jan-2016 Benjamin Peterson <benjamin@python.org> prevent buffer overflow in get_data (closes #26171)
/external/python/cpython2/Modules/zipimport.c
e4309f7f14d25227b51f8ac012b2dcbb8da99e9d 21-Jan-2016 Benjamin Peterson <benjamin@python.org> fix refleak in error condition
/external/python/cpython2/Modules/zipimport.c
384e9cb3a12be029f1d4dc4e221c81216f44872d 16-Feb-2014 Benjamin Peterson <benjamin@python.org> finish backing out #19081
/external/python/cpython2/Modules/zipimport.c
e9aab0fb989ceeb7f2f9e899c9d861be0d0923b0 16-Feb-2014 Benjamin Peterson <benjamin@python.org> backout #19081 to fix #20621
/external/python/cpython2/Modules/zipimport.c
aaef0e7821e10c851277efa44022d1b27ec6453f 28-Jan-2014 Gregory P. Smith <greg@krypto.org> Remove inaccurate comment and a the related recently added
Py_VerboseFlag print that can never be triggered.

prefix[0] is always equal to 0 at this point in the code.
/external/python/cpython2/Modules/zipimport.c
027ab390143d9f95c16db19bc66c00bebbb04a96 27-Jan-2014 Gregory P. Smith <greg@krypto.org> Issue #19081: Remove the zipimporter.files reference as the zip TOC
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.
/external/python/cpython2/Modules/zipimport.c
7251fe10ffc168f5cdf31c431d9230ec6f3b51f6 09-Jan-2014 Benjamin Peterson <benjamin@python.org> fix zipimport ref leak
/external/python/cpython2/Modules/zipimport.c
6de726087745468e40c94df71f2b78f04a1bd184 08-Jan-2014 Gregory P. Smith <greg@krypto.org> cleanup for the issue 19081 fix - pull the file open and close outside of the
zip_searchorder scanning loop in get_module_code().
[already done in 3.3 and 3.4]
/external/python/cpython2/Modules/zipimport.c
ad3e72557ce06cd03a2cb573872fd16552bd8201 07-Jan-2014 Gregory P. Smith <greg@krypto.org> Should fix the issue19081 fix on Windows. Don't let the previous
posix module ImportError cause the nt module import to fail.
/external/python/cpython2/Modules/zipimport.c
b48c5d5107245f679b34091e43488f8c1465cb21 06-Jan-2014 Gregory P. Smith <greg@krypto.org> Fixes issue19081: When a zipimport .zip file in sys.path being imported
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.
/external/python/cpython2/Modules/zipimport.c
e884be67bd8437ce24877f1d10ad9f4713ca85d9 03-Oct-2012 Jesus Cea <jcea@jcea.es> Closes #15897: zipimport.c doesn't check return value of fseek()
/external/python/cpython2/Modules/zipimport.c
f58f1c33c115a4f9dfb8ff2b753241d08f46aace 21-May-2011 Victor Stinner <victor.stinner@haypocalc.com> Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymore
to be able to unload the module.
/external/python/cpython2/Modules/zipimport.c
c2077b0d9b5bf99768c6f396bf7ae6c41b682465 15-Mar-2011 Ezio Melotti <ezio.melotti@gmail.com> #11565: Fix several typos. Patch by Piotr Kasprzyk.
/external/python/cpython2/Modules/zipimport.c
24b07bcba350bb86c4d6ca446e1564647a199868 15-Mar-2011 Ezio Melotti <ezio.melotti@gmail.com> #11515: fix several typos. Patch by Piotr Kasprzyk.
/external/python/cpython2/Modules/zipimport.c
13b43e70e2e3659a145b2ce27d424c66d3c1e92e 21-Jul-2010 Brian Curtin <brian.curtin@gmail.com> Fix #9316. if/is grammar corrections.
/external/python/cpython2/Modules/zipimport.c
c83ea137d7e717f764e2f31fc2544f522de7d857 09-May-2010 Antoine Pitrou <solipsis@pitrou.net> Untabify C files. Will watch buildbots.
/external/python/cpython2/Modules/zipimport.c
0194f5bc98d3fb3e7b4aaed874edf2df3a33bfd3 08-Feb-2009 Nick Coghlan <ncoghlan@gmail.com> Issue #4512 closeout: Make ZipImport.get_filename() a public method
/external/python/cpython2/Modules/zipimport.c
a2053475bb8a908e1cc80c765e02c98a6f354b19 14-Dec-2008 Nick Coghlan <ncoghlan@gmail.com> Fix several issues relating to access to source code inside zipfiles. Initial work by Alexander Belopolsky. See Misc/NEWS in this checkin for details.
/external/python/cpython2/Modules/zipimport.c
dd96db63f689e2f0d8ae5a1436b3b3395eec7de5 09-Jun-2008 Gregory P. Smith <greg@mad-scientist.com> This reverts r63675 based on the discussion in this thread:

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.
/external/python/cpython2/Modules/zipimport.c
593daf545bd9b7e7bcb27b498ecc6f36db9ae395 26-May-2008 Christian Heimes <christian@cheimes.de> Renamed PyString to PyBytes
/external/python/cpython2/Modules/zipimport.c
6a57c08dc828ff8512c047c97e7c7edfb0abbc74 11-May-2008 Georg Brandl <georg@python.org> #1326: document and test zipimporter.archive and zipimporter.prefix.
/external/python/cpython2/Modules/zipimport.c
62a8e95fea9b4cb9e4d986aaa554f3e9927d973e 18-Jan-2008 Christian Heimes <christian@cheimes.de> Coverity issue CID #197
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"
/external/python/cpython2/Modules/zipimport.c
000a074c955a1964959ee908300ef49b41170a06 03-Jan-2008 Christian Heimes <christian@cheimes.de> Modified PyImport_Import and PyImport_ImportModule to always use absolute 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
/external/python/cpython2/Modules/zipimport.c
e93237dfcc4ee4feee62adafb4e7899487ca864b 19-Dec-2007 Christian Heimes <christian@cheimes.de> #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available.
/external/python/cpython2/Modules/zipimport.c
6819210b9e4e5719a6f7f9c1725f8fa70a8936f6 21-Jul-2007 Martin v. Löwis <martin@v.loewis.de> PEP 3123: Provide forward compatibility with Python 3.0, while keeping
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
/external/python/cpython2/Modules/zipimport.c
ee7c8f9af80ac2fa76987ca25397624915cbaea4 13-Aug-2006 Neal Norwitz <nnorwitz@gmail.com> It's very unlikely, though possible that source is not a string. Verify
that PyString_AsString() returns a valid pointer. (The problem can
arise when zlib.decompress doesn't return a string.)

Klocwork 346
/external/python/cpython2/Modules/zipimport.c
c6e55068cad6f2178981eec4f0a0a583b8bba21a 15-Apr-2006 Thomas Wouters <thomas@python.org> Use Py_VISIT in all tp_traverse methods, instead of traversing manually or
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
/external/python/cpython2/Modules/zipimport.c
d6495b5944b9fd5ac3c142cf79957084f47a3024 12-Apr-2006 Anthony Baxter <anthonybaxter@gmail.com> remove forward declarations. No constructors to move for these files. Makes
code work with C++ compilers.
/external/python/cpython2/Modules/zipimport.c
4af5c8cee4885df70884a58e2e74c48984bbe7c2 07-Mar-2006 Hye-Shik Chang <hyeshik@gmail.com> SF #1444030: Fix several potential defects found by Coverity.
(reviewed by Neal Norwitz)
/external/python/cpython2/Modules/zipimport.c
e9b1949f70ff985e17e1ce5592b59073d101bbab 19-Feb-2006 Georg Brandl <georg@python.org> Patch #1352711: make zipimport raise a complete IOError
/external/python/cpython2/Modules/zipimport.c
ad0a4629beac0600c4c4c3167b0d68be57ca674e 16-Feb-2006 Martin v. Löwis <martin@v.loewis.de> Use Py_ssize_t for counts and sizes.
/external/python/cpython2/Modules/zipimport.c
18e165558b24d29e7e0ca501842b9236589b012a 15-Feb-2006 Martin v. Löwis <martin@v.loewis.de> Merge ssize_t branch.
/external/python/cpython2/Modules/zipimport.c
b84b35f02a155238570f8955f8a92d43d21707f5 15-Jan-2006 Fredrik Lundh <fredrik@pythonware.com> the implementation uses ZipImportError, not ZipImporterError...
/external/python/cpython2/Modules/zipimport.c
d39d861a36bf2ff7ccbb8248fa7fb81517923877 08-Jan-2006 Neal Norwitz <nnorwitz@gmail.com> Fix icc warnings: strlen() returns size_t
/external/python/cpython2/Modules/zipimport.c
f5b7fd223967e7e6f1d82c0659b2265a05909719 11-Nov-2005 Fred Drake <fdrake@acm.org> update busted comment
/external/python/cpython2/Modules/zipimport.c
ec97a28b60b40d366379d22876baebcdd06a89ad 21-Oct-2005 Jeremy Hylton <jeremy@alum.mit.edu> Fix a bunch of imports to use code.h instead of compile.h.
Remove duplicate declarations from compile.h
/external/python/cpython2/Modules/zipimport.c
02c42871cf73365dc5b6915cac2b017b2b90c81f 26-Aug-2005 Georg Brandl <georg@python.org> Disallow keyword arguments for type constructors that don't use them.
(fixes bug #1119418)
/external/python/cpython2/Modules/zipimport.c
2c45c9ae57e23001c35c791cf7fc68b55f0d78b6 10-Nov-2004 Raymond Hettinger <python@rcn.com> SF patch 1062495: Modules/zipimport.c does not compile on solaris
(Contributed by Niki W. Waibel.)

Simple renaming to avoid a conflict that prevented compilation on Solaris.
/external/python/cpython2/Modules/zipimport.c
ee8f10fa37335cbbb8830c200edefd91605c22ac 07-Sep-2003 Just van Rossum <just@letterror.com> Patch #801349: 64-bit fix for AMD64 from Gwenole Beauchesne.
Classical problem with int vs. long mismatch in varargs.
2.3 backport candidate.
/external/python/cpython2/Modules/zipimport.c
354e3d90d346afdc6c70211b130aa76bb18e19ed 22-Jul-2003 Thomas Heller <theller@ctypes.org> Change the zipimport implementation to accept files containing
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.
/external/python/cpython2/Modules/zipimport.c
032fffefe69a0bb8b45a2efe3ceb5bc59ffb9850 17-Jul-2003 Jeremy Hylton <jeremy@alum.mit.edu> Remove unused variable.
/external/python/cpython2/Modules/zipimport.c
a94568a7535de60f1144e4eea0d027b87017a4b4 10-May-2003 Martin v. Löwis <martin@v.loewis.de> Patch #734231: Update RiscOS support. In particular, correct
riscospath.extsep, and use os.extsep throughout.
/external/python/cpython2/Modules/zipimport.c
547eb42d75c888fa5ac43275d3cf874099ea0d78 08-Apr-2003 Just van Rossum <just@letterror.com> tentative fix for #712322: modification time stamp checking failed
when DST began.
/external/python/cpython2/Modules/zipimport.c
29fd2baf82977e66f3ad3869e3d62f12e2200678 23-Mar-2003 Neal Norwitz <nnorwitz@gmail.com> Make private function and data static.
/external/python/cpython2/Modules/zipimport.c
f4ecc751b1c640ab7932be714b099d2eb326d6b3 28-Feb-2003 Just van Rossum <just@letterror.com> use proper constant instead of comment (noted by nnorwitz)
/external/python/cpython2/Modules/zipimport.c
0c0aad948aa3bc3954514d842d28d08a6cc6112f 18-Feb-2003 Neal Norwitz <nnorwitz@gmail.com> Fix 64-bit problem, ParseTuple("i") needs C ints; ("l") needs C longs.
Use "l" as that *probably* makes more sense (at least to me it does :-)
And the test passes on the alpha.
/external/python/cpython2/Modules/zipimport.c
5c1ba53f8ca219a22d964324abb76a055ad19feb 17-Feb-2003 Neal Norwitz <nnorwitz@gmail.com> Use correct function name to PyArg_ParseTuple("is_package").

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).
/external/python/cpython2/Modules/zipimport.c
9a3129c14866f21ce3cee053c085db374cb61b78 03-Jan-2003 Just van Rossum <just@letterror.com> Fix for bug #661136
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.
/external/python/cpython2/Modules/zipimport.c
d35c6db526a6ce1656de2c9998a866445fdf5fe4 02-Jan-2003 Just van Rossum <just@letterror.com> Ugh, zipimport is virtually broken in 2.3a1 :-( It worked by accident in
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.
/external/python/cpython2/Modules/zipimport.c
3f0b542f2559869715e25164e92e7255220a0ea3 31-Dec-2002 Just van Rossum <just@letterror.com> removed unused get_short() function
/external/python/cpython2/Modules/zipimport.c
f8b6de168bac1a002cf8931d5f601240d5c1b4d4 31-Dec-2002 Just van Rossum <just@letterror.com> - added missing decref
- whitespace normalization
/external/python/cpython2/Modules/zipimport.c
5eaeaf9174b5cbaefd7b36e2c0cb23ddf808c2c0 31-Dec-2002 Jack Jansen <jack.jansen@cwi.nl> Added casts to forestall warnings with MetroWerks.
/external/python/cpython2/Modules/zipimport.c
f271c272a2a98081b787dcd40a973b641fe14ca4 30-Dec-2002 Tim Peters <tim.peters@gmail.com> Squashed compiler wng from MSVC6.
/external/python/cpython2/Modules/zipimport.c
1ea93f2b1d0a165b5f9306c7cb351c595712199e 30-Dec-2002 Tim Peters <tim.peters@gmail.com> Wouldn't compile on Windows; fixed.
/external/python/cpython2/Modules/zipimport.c
52e14d640be3a7fa2c17f5a2a6bc9626d622aa40 30-Dec-2002 Just van Rossum <just@letterror.com> PEP 302 + zipimport:
- 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.
/external/python/cpython2/Modules/zipimport.c