Serhiy Storchaka
505ff755d7
Issue #20437 : Fixed 21 potential bugs when deleting objects references.
12 years ago
Christian Heimes
09ca794afe
Add missing check of PyDict_SetItem()'s return value in _PyImport_FindExtensionObject()
CID 486649
13 years ago
Benjamin Peterson
7d110042c5
raise an ImportError (rather than fatal) when __import__ is not found in __builtins__ ( closes #17867 )
13 years ago
Mark Dickinson
9fade768c8
Issue #13863 : fix incorrect .pyc timestamps on Windows / NTFS (apparently due to buggy fstat)
13 years ago
Antoine Pitrou
202b60640b
Add sanity assertions in some import lock code (issue #15599 ).
13 years ago
Nick Coghlan
557c76c136
Fix compilation on Windows
13 years ago
Nick Coghlan
34937ce249
Issue #6074 : Forward port Windows read-only source file fix from 2.7
13 years ago
Nick Coghlan
b48c028ca7
Issue #6074 : Restore the long-broken support for running with read-only source files on Windows
13 years ago
Antoine Pitrou
0398985920
Issue #15781 : Fix two small race conditions in import's module locking.
14 years ago
Antoine Pitrou
4f0338cab7
Issue #15781 : Fix two small race conditions in import's module locking.
14 years ago
Antoine Pitrou
6f430e4963
Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly.
Patch by Serhiy Storchaka.
14 years ago
Antoine Pitrou
c5bef75c77
Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly.
Patch by Serhiy Storchaka.
14 years ago
Matthias Klose
92636bf243
- Issue #15647 : Make isdir static for windows and posix
14 years ago
Brett Cannon
ecfefb7956
Fix a spelling mistake in a comment.
14 years ago
Antoine Pitrou
c4d974d3fa
Remove unused variable `trim_get_code`.
14 years ago
Nick Coghlan
42c0766a53
Close #15486 : Simplify the mechanism used to remove importlib frames from tracebacks when they just introduce irrelevant noise
14 years ago
Nick Coghlan
5ee9892406
Close #15425 : Eliminate more importlib related traceback noise
14 years ago
Brett Cannon
a6473f9cfd
Issues #15169 , #14599 : Make PyImport_ExecCodeModuleWithPathnames() use
Lib/imp.py for imp.source_from_cache() instead of its own C version.
Also change PyImport_ExecCodeModuleObject() to not infer the source
path from the bytecode path like
PyImport_ExecCodeModuleWithPathnames() does. This makes the function
less magical.
This also has the side-effect of removing all uses of MAXPATHLEN in
Python/import.c which can cause failures on really long filenames.
14 years ago
Antoine Pitrou
44b4b6a9a5
Fix compilation under Windows
14 years ago
Benjamin Peterson
66f3659c9e
fix refleak
14 years ago
Benjamin Peterson
fa873704a4
initialize variable for compiler happiness
14 years ago
Brett Cannon
77b2abd094
Issue #15167 (as part of #13959 ): imp.get_magic() is no implemented in
Lib/imp.py.
14 years ago
Brett Cannon
3adc7b75a5
Issue #15242 : Have PyImport_GetMagicTag() return a const char *
defined in sysmodule.c instead of straight out of a Unicode object.
Thanks to Amaury Forgeot d'Arc for noticing the bug and Eric Snow for
writing the patch.
14 years ago
Antoine Pitrou
bc07a5c913
Issue #15110 : Fix the tracebacks generated by "import xxx" to not show the importlib stack frames.
14 years ago
Brett Cannon
98979b85e7
Issue #15166 : Re-implement imp.get_tag() using sys.implementation.
Also eliminates some C code in Python/import.c as well.
Patch by Eric Snow with verification by comparing against another
patch from Jeff Knupp.
14 years ago
Victor Stinner
81c39a88a4
get_sourcefile(): use PyUnicode_READ() to avoid the creation of a temporary
Py_UCS4 buffer
14 years ago
Nick Coghlan
0b43bcf528
Close #14857 : fix regression in references to PEP 3135 implicit __class__ closure variable. Reopens issue #12370 , but also updates unittest.mock to workaround that issue
14 years ago
Antoine Pitrou
ea3eb88bca
Issue #9260 : A finer-grained import lock.
Most of the import sequence now uses per-module locks rather than the
global import lock, eliminating well-known issues with threads and imports.
14 years ago
Antoine Pitrou
d576c711a5
Issue #14761 : Fix potential leak on an error case in the import machinery.
14 years ago
Antoine Pitrou
284fa08eb7
Issue #14761 : Fix potential leak on an error case in the import machinery.
14 years ago
Antoine Pitrou
6efa50a384
Issue #14583 : Fix importlib bug when a package's __init__.py would first import one of its modules then raise an error.
14 years ago
Antoine Pitrou
b78174c010
Fix too early decrefs.
14 years ago
Nadeem Vawda
8f46d655b9
Fix typo in changeset eb5c5c23ca9b.
14 years ago
Antoine Pitrou
f3a42dee9a
Simplify code for load_dynamic()
14 years ago
Brett Cannon
0429e1a57d
Issue #13959 : Move module type constants to Lib/imp.py.
14 years ago
Brett Cannon
6b9b727695
Remove dead Windows code which no longer will compile.
14 years ago
Brett Cannon
2657df4744
Issue #13959 : Re-implement imp.get_suffixes() in Lib/imp.py.
This introduces a new function, imp.extension_suffixes(), which is
currently undocumented. That is forthcoming once issue #14657 is
resolved and how to expose file suffixes is decided.
14 years ago
Brett Cannon
62228dbd6c
Issues #13959 , 14647: Re-implement imp.reload() in Lib/imp.py.
Thanks to Eric Snow for the patch.
14 years ago
Brett Cannon
acf85cd131
Issue #13959 : Re-implement imp.NullImporter in Lib/imp.py.
14 years ago
Brett Cannon
aa93642a35
Issue #14605 : Use None in sys.path_importer_cache to represent no
finder instead of using some (now non-existent) implicit finder.
14 years ago
Victor Stinner
8f825060f1
Check newly created consistency using _PyUnicode_CheckConsistency(str, 1)
* In debug mode, fill the string data with invalid characters
* Simplify also reference counting in PyCodec_BackslashReplaceErrors()
and PyCodec_XMLCharRefReplaceError()
14 years ago
Brett Cannon
8923a4d4c5
Issue #14605 : Insert to the front of sys.path_hooks instead of appending.
14 years ago
Brett Cannon
e69f0df45b
Issue #13959 : Re-implement imp.find_module() in Lib/imp.py.
Thanks to Eric Snow for taking an initial stab at the implementation.
14 years ago
Brett Cannon
a64faf0771
Issue #13959 : Re-implement imp.source_from_cache() in Lib/imp.py.
14 years ago
Brett Cannon
ea59dbff16
Issue #13959 : Re-implement imp.cache_from_source() in Lib/imp.py.
14 years ago
Gregory P. Smith
a72aa843b6
Fix compiler warning related to issue #14331 . harmless.
14 years ago
Benjamin Peterson
d76bc7abac
rollback 005fd1fe31ab (see #14609 and #14582 )
Being able to overload a sys.module entry during import of a module was broken
by this changeset.
14 years ago
Brett Cannon
64befe939c
Issue #13959 : Re-implement imp.load_compiled() in imp.py.
14 years ago
Brett Cannon
273323cf68
Issue #14592 : A relative import will raise a KeyError if __package__
or __name__ are not set in globals.
Thanks to Stefan Behnel for the bug report.
14 years ago
Brian Curtin
09b86d1196
Fix #14600 . Correct reference handling and naming of ImportError convenience function
14 years ago