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
Brett Cannon
461c813164
Issue #15111 : When a module was imported using a 'from import'
statement (e.g. ``from distutils import msvc9compiler``) that triggers
an ImportError of its own (e.g. the non-existence of winreg), let that
exception propagate instead of raising a generic ImportError for the
module being requested (e.g. msvc9compiler).
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
Brett Cannon
19a2f5961c
Issue #15056 : imp.cache_from_source() and source_from_cache() raise
NotimplementedError when sys.implementation.cache_tag is None.
Thanks to Pranav Ravichandran for taking an initial stab at the patch.
14 years ago
Amaury Forgeot d'Arc
ae7b8f07c1
Issue #15110 : Also hide importlib frames when importing a builtin module fails.
14 years ago
Benjamin Peterson
8107176f9b
add gc support to the AST base type ( closes #15293 )
14 years ago
Antoine Pitrou
507507473e
Issue #15291 : Fix a memory leak where AST nodes where not properly deallocated.
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
Antoine Pitrou
bc1a7ddc9b
Check-in compiled importlib changes (you must run "make" after modifying the importlib sources).
14 years ago
Antoine Pitrou
01cca5e451
Issue #15020 : The program name used to search for Python's path is now "python3" under Unix, not "python".
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
Brett Cannon
8a250fac15
Comment out a dead increment.
Found by Clang's static analyzer.
14 years ago
Antoine Pitrou
0ab5cf9b46
Issue #15181 : importlib bytecode is unsigned and shouldn't have negative numbers.
This fixes a compiler warning with suncc.
14 years ago
Eric V. Smith
e51a36922f
Fixes issue 15039: namespace packages are no longer imported in preference to modules of the same name.
14 years ago
Antoine Pitrou
edc601855d
Remove outdated statement
14 years ago
Antoine Pitrou
310f95b04d
A better repr() for FileFinder
14 years ago
David Malcolm
49526f48fc
Issue #14785 : Add sys._debugmallocstats() to help debug low-level memory allocation issues
14 years ago
Martin v. Löwis
7800f75827
Issue #15042 : Add PyState_AddModule and PyState_RemoveModule.
Add version guard for Py_LIMITED_API additions.
Issue #15081 : Document PyState_FindModule.
Patch by Robin Schreiber.
14 years ago
doko@ubuntu.com
39378f7f4f
format_obj: make it static
14 years ago
Antoine Pitrou
e67f48ce5e
Issue #14928 : Fix importlib bootstrap issues by using a custom executable (Modules/_freeze_importlib) to build Python/importlib.h.
14 years ago
Kristjan Valur Jonsson
0006aacb9d
Issue #15038 : Document caveats with the emulated condition variables.
14 years ago
Antoine Pitrou
1d25b6f04a
Issue #15103 : remove the NUL character (serving as a Mercurial binary marker) from Python/importlib.h.
Instead the email notification hook uses a configuration option to omit importlib.h diffs.
14 years ago
Kristjan Valur Jonsson
1617077bcc
Issue #15038 :
Fix incorrect test of the condition variable state, spotted by
Richard Oudkerk. This could cause the internal condition variable
to grow without bounds.
14 years ago
Kristján Valur Jónsson
e75ff35af2
Issue #15038 : Optimize python Locks on Windows
Extract cross-platform condition variable support into a separate file and
provide user-mode non-recursive locks for Windows.
14 years ago
Nick Coghlan
c40bc09942
Issue #13783 : the PEP 380 implementation no longer expands the public C API
14 years ago
Antoine Pitrou
2d9db1dfce
Try to fix issue #15086 : build failure on Ubuntu shared buildbot.
14 years ago
Victor Stinner
81c39a88a4
get_sourcefile(): use PyUnicode_READ() to avoid the creation of a temporary
Py_UCS4 buffer
14 years ago
Victor Stinner
c9d369f1bf
Optimize _PyUnicode_FastCopyCharacters() when maxchar(from) > maxchar(to)
14 years ago
Victor Stinner
2b89fdf7eb
PEP 418: Rename adjusted attribute to adjustable in time.get_clock_info() result
Fix also its value on Windows and Linux according to its documentation:
"adjustable" indicates if the clock *can be* adjusted, not if it is or was
adjusted.
In most cases, it is not possible to indicate if a clock is or was adjusted.
14 years ago
Brett Cannon
99d776fdf4
Update importlib.h by touching Lib/importlib/_bootstrap.py.
14 years ago
Kristján Valur Jónsson
187aa54516
Signal condition variables with the mutex held. Destroy condition variables
before their mutexes.
14 years ago
Barry Warsaw
409da157d7
Eric Snow's implementation of PEP 421.
Issue 14673: Add sys.implementation
14 years ago
Benjamin Peterson
8e8fbeae27
don't leak if the __class__ closure is set
14 years ago
Benjamin Peterson
d1ab6089ff
check return for error
14 years ago
Victor Stinner
d3f0882dfb
Issue #14744 : Use the new _PyUnicodeWriter internal API to speed up str%args and str.format(args)
* Formatting string, int, float and complex use the _PyUnicodeWriter API. It
avoids a temporary buffer in most cases.
* Add _PyUnicodeWriter_WriteStr() to restore the PyAccu optimization: just
keep a reference to the string if the output is only composed of one string
* Disable overallocation when formatting the last argument of str%args and
str.format(args)
* Overallocation allocates at least 100 characters: add min_length attribute
to the _PyUnicodeWriter structure
* Add new private functions: _PyUnicode_FastCopyCharacters(),
_PyUnicode_FastFill() and _PyUnicode_FromASCII()
The speed up is around 20% in average.
14 years ago
Victor Stinner
a1b0c9fc4d
PyArg_Parse*("U"): ensure that the Unicode string is ready
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
Nick Coghlan
5c6eba3a93
Tweak importlib._bootstrap to avoid zero-argument super so I can work on issue #14857 without breaking imports
14 years ago
Brett Cannon
d785cb3955
Remove some redundant decorators.
14 years ago
Vinay Sajip
7ded1f0f69
Implemented PEP 405 (Python virtual environments).
14 years ago
Eric V. Smith
984b11f88f
issue 14660: Implement PEP 420, namespace packages.
14 years ago
Martin v. Löwis
ed11a5d018
Issue #8767 : Restore building with --disable-unicode.
Original patch by Stefano Taschini.
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
b84bc7a7ce
Avoid "warning: no newline at end of file" in importlib.h.
14 years ago
Benjamin Peterson
77fa9379e2
use Py_ssize_t for ast sequence lengths
14 years ago
Martin v. Löwis
41829e82c1
Document f4d7ad6c9d6e.
14 years ago