summaryrefslogtreecommitdiffstats
path: root/Modules/zipimport.c
Commit message (Collapse)AuthorAgeFilesLines
* Drop unused variable.Martin v. Löwis2011-10-311-1/+0
|
* Fix typo.Martin v. Löwis2011-10-311-3/+2
|
* Replace Py_UCS4_ API with Unicode API.Martin v. Löwis2011-10-311-130/+90
|
* Rename _Py_identifier to _Py_IDENTIFIER.Martin v. Löwis2011-10-141-1/+1
|
* Fix a compiler warning in zipimportVictor Stinner2011-10-111-1/+1
|
* Use identifier API for PyObject_GetAttrString.Martin v. Löwis2011-10-101-2/+3
|
* Rename new macros to conform to naming rules (function macros have "Py" ↵Georg Brandl2011-09-281-4/+4
| | | | prefix, not "PY").
* Implement PEP 393.Martin v. Löwis2011-09-281-52/+89
|
* zipimport: initialize fullpath to NULLVictor Stinner2011-05-261-1/+1
| | | | | In some cases, fullpath value is used whereas fullpath was not always initialized. Warning found by the Clang Static Analyzer.
* avoid a compiler warning. the compiler doesn't know that the staticGregory P. Smith2011-05-211-1/+1
| | | | struct guarantees the loop will always be run once to initialize code.
* (Merge 3.2) Issue #12124: zipimport doesn't keep a reference toVictor Stinner2011-05-191-24/+23
|\ | | | | | | zlib.decompress() anymore to be able to unload the module.
| * (Merge 3.1) Issue #12124: zipimport doesn't keep a reference toVictor Stinner2011-05-191-24/+23
| |\ | | | | | | | | | zlib.decompress() anymore to be able to unload the module.
| | * Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymoreVictor Stinner2011-05-191-24/+23
| | | | | | | | | | | | to be able to unload the module.
* | | Issue #3080: zipimport has a full unicode suppportVictor Stinner2011-03-151-135/+168
|/ / | | | | | | | | | | | | | | - Use Unicode for module paths and names, self->archive and self->prefix - Format module names and paths use %R instead of '%U' to escape surrogate characters (PEP 383) - Use PyImport_ExecCodeModuleObject() instead of PyImport_ExecCodeModuleEx() - Use PyImport_AddModuleObject() instead of PyImport_AddModule()
* | #11565: Merge with 3.1.Ezio Melotti2011-03-161-1/+1
|\ \ | |/
| * #11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-161-1/+1
| |
* | #11515: Merge with 3.1.Ezio Melotti2011-03-151-1/+1
|\ \ | |/
| * #11515: fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-151-1/+1
| |
| * Merged revisions 83009 via svnmerge fromBrian Curtin2010-07-211-3/+3
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83009 | brian.curtin | 2010-07-20 20:44:19 -0500 (Tue, 20 Jul 2010) | 2 lines Fix #9316. if/is grammar corrections. ........
| * Recorded merge of revisions 81032 via svnmerge fromAntoine Pitrou2010-05-091-868/+868
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines Recorded merge of revisions 81029 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........ ................
| * Merged revisions 78875 via svnmerge fromVictor Stinner2010-03-211-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r78875 | victor.stinner | 2010-03-12 18:00:41 +0100 (ven., 12 mars 2010) | 5 lines Issue #6697: use %U format instead of _PyUnicode_AsString(), because _PyUnicode_AsString() was not checked for error (NULL). The unicode string is no more truncated to 200 or 400 *bytes*. ........
* | Issue #10955: zipimport uses ASCII at bootstrapVictor Stinner2011-01-221-1/+19
| | | | | | | | | | | | | | zipimport uses ASCII encoding instead of cp497 to decode filenames, at bootstrap, if the codec registry is not ready yet. It is still possible to have non-ASCII filenames using the Unicode flag (UTF-8 encoding) for file entries in the ZIP file.
* | zipimport: remove arbitrary length limit from message formatsVictor Stinner2010-10-181-14/+9
| | | | | | | | | | PyErr_Format() and PyUnicode_FromFormat() are able to allocate the right buffer size and to catch memory allocation failures.
* | zipimport: document archive encoding; fix indentationVictor Stinner2010-10-181-3/+4
| |
* | Revert r85699 and r85701 (zipimport): fullname is a module name, not a pathVictor Stinner2010-10-181-42/+18
| | | | | | | | UTF-8 is just fine for module names.
* | zipimport: fix "can't find module ..." error messageVictor Stinner2010-10-181-4/+16
| | | | | | | | | | | | I cannot use %U: fullname is a bytes object, not an unicode object. %A format cannot be used, it adds 'b' (bytes) prefix. So create cant_find_module() function to decode the filename and raise the error message.
* | zipimport: find_module(), is_package() and get_source() supports surrogatesVictor Stinner2010-10-181-16/+28
| | | | | | | | Use PyUnicode_FSConverter to support surrogates in the full name.
* | zipimport: pass path size to make_filename()Victor Stinner2010-10-181-5/+5
| | | | | | | | Don't hardcode path size in make_filename().
* | get_code_from_data() uses the filesystem encoding to encode the module path,Victor Stinner2010-10-181-8/+7
| | | | | | | | instead of utf-8.
* | zipimport: read_directory() uses cp437 or utf-8 (in strict mode), depending onVictor Stinner2010-10-181-2/+9
| | | | | | | | | | the unicode flag, to decode the filename, instead of the filesystem encoding. Use the same choice than the zipfile module.
* | zipimport: get_module_code() returns modpath as a Unicode objectVictor Stinner2010-10-181-12/+23
| | | | | | | | | | ... instead of a char*. Encode the module path to the fileystem encoding (for PyImport_ExecCodeModuleEx) instead of utf-8.
* | zipimporter_load_module() doesn't destroy mod on errorVictor Stinner2010-10-181-9/+9
| | | | | | | | | | PyImport_AddModule() returns a borrowed reference. Don't display "import ... # loaded from Zip ..." on error.
* | zipimport: encode the prefix to the fileystem encodingVictor Stinner2010-10-181-8/+15
| |
* | zipimport, get_module_code(): avoid useless _PyUnicode_AsString()Victor Stinner2010-10-181-3/+2
| |
* | zipimport: fix indentationVictor Stinner2010-10-181-4/+5
| |
* | zipimport: catch _PyUnicode_AsString() failure in get_code_from_data()Victor Stinner2010-10-161-0/+4
| | | | | | | | It occurs if the path contains surrogates.
* | Issue #9425: zipimporter_repr() uses unicodeVictor Stinner2010-08-171-12/+7
| |
* | Issue #9425: get_data() uses an unicode pathVictor Stinner2010-08-161-29/+39
| |
* | Issue #9425: read_directory() is fully unicode compliantVictor Stinner2010-08-161-21/+28
| | | | | | | | zipimport is now able to load a module with an unencodable filename.
* | Issue #9425: zipimporter_init() is fully unicode compliantVictor Stinner2010-08-141-37/+53
| |
* | Fix #9316. if/is grammar corrections.Brian Curtin2010-07-211-3/+3
| |
* | Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-868/+868
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* | Issue #6697: use %U format instead of _PyUnicode_AsString(), becauseVictor Stinner2010-03-121-6/+3
|/ | | | | | _PyUnicode_AsString() was not checked for error (NULL). The unicode string is no more truncated to 200 or 400 *bytes*.
* Fix a warning.Georg Brandl2009-05-171-1/+1
|
* Merged revisions 69425 via svnmerge fromNick Coghlan2009-02-081-3/+3
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r69425 | nick.coghlan | 2009-02-08 13:17:00 +1000 (Sun, 08 Feb 2009) | 1 line Issue #4512 closeout: Make ZipImport.get_filename() a public method ........
* Issue #1717: rename tp_compare to tp_reserved. I'll change theMark Dickinson2009-02-021-1/+1
| | | | | type of tp_compare in a separate commit, for ease of reversion should things go wrong.
* Merged revisions 67750-67751 via svnmerge fromNick Coghlan2008-12-141-0/+31
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r67750 | nick.coghlan | 2008-12-14 20:54:50 +1000 (Sun, 14 Dec 2008) | 1 line Fix several issues relating to access to source code inside zipfiles. Initial work by Alexander Belopolsky. See Misc/NEWS in this checkin for details. ........ r67751 | nick.coghlan | 2008-12-14 21:09:40 +1000 (Sun, 14 Dec 2008) | 1 line Add file that was missed from r67750 ........
* Fixes release blocker issue #3492 and #3790.Gregory P. Smith2008-09-061-11/+11
| | | | | Make zlib and zipimport to return bytes instead of bytearray and use bytes rather than bytearray for their internal leftover data storages.
* Rename PyUnicode_AsString -> _PyUnicode_AsString andMarc-André Lemburg2008-08-071-13/+13
| | | | | | | | | PyUnicode_AsStringAndSize -> _PyUnicode_AsStringAndSize to mark them for interpreter internal use only. We'll have to rework these APIs or create new ones for the purpose of accessing the UTF-8 representation of Unicode objects for 3.1.
* Implement PEP 3121: new module initialization and finalization API.Martin v. Löwis2008-06-111-10/+22
|