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
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
Martin v. Löwis
cc10a37ef0
Widen ASDL sequences to Py_ssize_t lengths to better match PEP 353.
14 years ago
Benjamin Peterson
6ecf8ce364
apparently importlib.h wants to be updated
14 years ago
Benjamin Peterson
d5a1c44455
PEP 415: Implement suppression of __context__ display with an exception attribute
This replaces the original PEP 409 implementation. See #14133 .
14 years ago
Brian Curtin
401f9f3d32
Fix #13210 . Port the Windows build from VS2008 to VS2010.
14 years ago
Brett Cannon
c049952de7
Issue #13959 : Have
importlib.abc.FileLoader.load_module()/get_filename() and
importlib.machinery.ExtensionFileLoader.load_module() have their
single argument be optional as the loader's constructor has all the
ncessary information.
This allows for the deprecation of
imp.load_source()/load_compile()/load_package().
14 years ago
Brett Cannon
44ec91f6a5
Update importlib.h
14 years ago
Antoine Pitrou
d576c711a5
Issue #14761 : Fix potential leak on an error case in the import machinery.
14 years ago
Larry Hastings
a34790104c
Issue #14746 : Remove redundant paragraphs from skipitem() in Python/getargs.c.
14 years ago
Larry Hastings
d9e4a414d7
Issue #14749 : Add support for 'Z' to skipitem() in Python/getargs.c.
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
Larry Hastings
10ba07a39e
Issue #14705 : Added support for the new 'p' format unit to skipitem().
14 years ago
Antoine Pitrou
b78174c010
Fix too early decrefs.
14 years ago
Larry Hastings
faf91e75ab
Issue #14705 : Add 'p' format character to PyArg_ParseTuple* for bool support.
14 years ago
Nadeem Vawda
8f46d655b9
Fix typo in changeset eb5c5c23ca9b.
14 years ago
Brett Cannon
feccc09952
Clean up a docstring.
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
a6685e8d36
update importlib.h
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
Larry Hastings
76ad59b7e8
Issue #14127 : Add ns= parameter to utime, futimes, and lutimes.
Removed futimens as it is now redundant.
Changed shutil.copystat to use st_atime_ns and st_mtime_ns from os.stat
and ns= parameter to utime--it once again preserves exact metadata on Linux!
14 years ago
Benjamin Peterson
49a69e4d48
strip is_ prefixes on clock_info fields
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
Mark Dickinson
e383e82e04
Issue #14521 : Make result of float('nan') and float('-nan') more consistent across platforms. Further, don't rely on Py_HUGE_VAL for float('inf').
14 years ago
Victor Stinner
ec89539ccc
Issue #14428 , #14397 : Implement the PEP 418
* Rename time.steady() to time.monotonic()
* On Windows, time.monotonic() uses GetTickCount/GetTickCount64() instead of
QueryPerformanceCounter()
* time.monotonic() uses CLOCK_HIGHRES if available
* Add time.get_clock_info(), time.perf_counter() and time.process_time()
functions
14 years ago
Brett Cannon
efad00d520
Issue #14646 : __import__() now sets __loader__ if need be.
importlib.util.module_for_loader also will set __loader__ along with
__package__. This is in conjunction to a forthcoming update to PEP 302
which will make these two attributes required for loaders to set.
14 years ago
Brett Cannon
fea73efc9e
Issue #14605 : Don't error out if get_importer() returns None.
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
Brett Cannon
ce418b448f
Issue #14605 : Stop having implicit entries for sys.meta_path.
ImportWarning is raised if sys.meta_path is found to be empty.
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
Benjamin Peterson
1138944888
only incref when using borrowing functions
14 years ago
Brett Cannon
e0d88a173c
Issue #14605 : Make explicit the entries on sys.path_hooks that used to
be implicit.
Added a warning for when sys.path_hooks is found to be empty. Also
changed the meaning of None in sys.path_importer_cache to represent
trying sys.path_hooks again (an interpretation of previous semantics).
Also added a warning for when None was found.
The long-term goal is for None in sys.path_importer_cache to represent
the same as imp.NullImporter: no finder found for that sys.path entry.
14 years ago
Brett Cannon
f96bb2f9af
Update importlib.h
14 years ago
Marc-Andre Lemburg
7541c8ea37
Issue #14605 and #14642 :
Issue a warning in case Python\importlib.h needs to be rebuilt,
but there's no Python interpreter around to freeze the bootstrap
script.
14 years ago
Brett Cannon
8923a4d4c5
Issue #14605 : Insert to the front of sys.path_hooks instead of appending.
14 years ago
Marc-Andre Lemburg
4fe29c9657
Issue #14605 : Rename _SourcelessFileLoader to SourcelessFileLoader.
This time also recreating the Python/importlib.h file to make
make happy. See the ticket for details.
14 years ago
Victor Stinner
ece58deb9f
Close #14648 : Compute correctly maxchar in str.format() for substrin
14 years ago
Benjamin Peterson
7d95e40721
Implement PEP 412: Key-sharing dictionaries ( closes #13903 )
Patch from Mark Shannon.
14 years ago
Benjamin Peterson
80d07f8251
inherit maxchar of field value where needed ( closes #14648 )
14 years ago