Commit Graph

54562 Commits

Author SHA1 Message Date
Charles-François Natali c8ce715a82 Issue #14087: multiprocessing: add Condition.wait_for(). Patch by sbt. 2012-04-17 18:45:57 +02:00
Antoine Pitrou a3f4457b17 Speed up reading of small files. This avoids multiple C read() calls on pyc files. 2012-04-17 13:50:58 +02:00
Ezio Melotti 006917ec7f #14603: use a listcomp in ZipFile.namelist. 2012-04-16 21:34:24 -06:00
Brett Cannon 578393b286 Properly guard against special-casing. 2012-04-16 23:11:28 -04:00
Brett Cannon 16475adcbb Issue #13959: Re-implement imp.load_source() in imp.py. 2012-04-16 22:11:25 -04:00
Brett Cannon 4132368d0a Issue #14599: Fix an import caching race condition. 2012-04-16 20:50:33 -04:00
Brett Cannon ceffda822f Issue #14599: Make test_reprlib robust against import cache race
conditions when regrtest is run with its -j option.
2012-04-16 20:48:50 -04:00
Brett Cannon de10bf4f4d Issue #13959: Fix a logic bug. 2012-04-16 20:44:21 -04:00
Vinay Sajip f138f8c1ab Merged cookbook corrections from 3.2. 2012-04-17 00:41:39 +01:00
Vinay Sajip 62930e1cc5 Corrected version numbers in cookbook example. 2012-04-17 00:40:48 +01:00
Brian Curtin bded894499 Add versionadded tags to newly added ImportError convenience functions. 2012-04-16 18:14:09 -05:00
Brian Curtin c07bda0a5a Correct warnings when building the docs for the nonexistet :arg: role. Changed to asterisks. 2012-04-16 15:24:02 -05:00
Brian Curtin bd43974037 Add documentation for the new PyErr_SetFromImport* functions 2012-04-16 15:14:36 -05:00
Antoine Pitrou 22a1d17bb5 Fix another refleak 2012-04-16 22:06:21 +02:00
Antoine Pitrou 538ba2afb5 Fix a refleak 2012-04-16 21:52:45 +02:00
Antoine Pitrou de3c73b57c pep8-ize test names 2012-04-16 21:29:58 +02:00
Antoine Pitrou 6b64fc6bff Fix refleak in test_gc 2012-04-16 21:29:02 +02:00
Antoine Pitrou 71382cb64b Fix reference loss on Py_None when None is encountered in sys.modules. 2012-04-16 18:48:49 +02:00
Antoine Pitrou a938c74751 Avoid compiler warning due to stray \x00 2012-04-16 18:30:54 +02:00
Antoine Pitrou a49323537b Avoid rebuilding all C files when importlib.h is updated. 2012-04-16 18:29:28 +02:00
Brett Cannon 75babfa886 Add an explicit mention of a backwards-incompatible fix that importlib implicitly fixed. 2012-04-16 11:35:55 -04:00
Vinay Sajip 7706d9ae4f Closes #14452: brought tests in line with removal of BOM insertion code. 2012-04-16 16:22:38 +01:00
Vinay Sajip e8a463d791 Merged tweaks to cookbook example from 3.2. 2012-04-16 15:47:05 +01:00
Vinay Sajip 59b9a79a5a Tweaked format of cookbook example. 2012-04-16 15:46:18 +01:00
Vinay Sajip 1b7101968a Merged cookbook update from 3.2. 2012-04-16 15:29:28 +01:00
Vinay Sajip b00e8f108d Added cookbook example for BOM insertion. 2012-04-16 15:28:50 +01:00
Vinay Sajip b4e59e9dc1 Closes #14452: remove BOM insertion code. 2012-04-16 14:44:31 +01:00
Vinay Sajip ee9e485c21 Closes #14452: remove BOM insertion code. 2012-04-16 14:39:53 +01:00
Brian Curtin b206a80dab Fix #10854. Make use of the new path and name attributes on ImportError
for extension modules on Windows.
2012-04-16 00:10:17 -05:00
Brett Cannon 15439817bf merge 2012-04-15 22:28:45 -04:00
Brett Cannon 2ee61422ed Issue #13959: Re-implement imp.load_package() in imp.py.
Thanks to Eric Snow for helping with imp.load_module() (previous
commit) which led to the removal of a bunch of C code.
2012-04-15 22:28:28 -04:00
Antoine Pitrou d15e6a32c4 Issue #14589: Update certificate chain for sha256.tbs-internet.com, fixing a test failure in test_ssl. 2012-04-16 03:37:35 +02:00
Antoine Pitrou aa292f91bb Issue #14589: Update certificate chain for sha256.tbs-internet.com, fixing a test failure in test_ssl. 2012-04-16 03:34:44 +02:00
Brett Cannon 01a76171a0 Issue #13959: Re-implement imp.load_module() in imp.py. 2012-04-15 20:25:23 -04:00
Brett Cannon 7c3e150d06 merge 2012-04-15 19:06:40 -04:00
Brett Cannon 2fef4d2e6b Consider load_dynamic() something to keep in _imp. 2012-04-15 19:06:23 -04:00
Brett Cannon c1b3f63653 Try to get hg to treat importlib.h as binary. 2012-04-15 19:05:31 -04:00
Victor Stinner 0db176f8f6 Issue #14386: Expose the dict_proxy internal type as types.MappingProxyType 2012-04-16 00:16:30 +02:00
Brett Cannon 8a1d04c643 Issue #13959: Simplify imp.reload() by relying on a module's
__loader__.

Since import now sets __loader__ on all modules it creates and
imp.reload() already relied on the attribute for modules that import
didn't create, the only potential compatibility issue is if people
were deleting the attribute on modules and expecting imp.reload() to
continue to work.
2012-04-15 17:56:09 -04:00
Brett Cannon 7ceedb8c1e Update importlib.h 2012-04-15 17:47:19 -04:00
Brett Cannon 6f44d66bc4 Issue #13959: Rename imp to _imp and add Lib/imp.py and begin
rewriting functionality in pure Python.

To start, imp.new_module() has been rewritten in pure Python, put into
importlib (privately) and then publicly exposed in imp.
2012-04-15 16:08:47 -04:00
Brett Cannon 7788838473 merge 2012-04-15 15:25:10 -04:00
Brett Cannon 881535b726 Issue #14582: Import returns the module returned by a loader instead
of sys.modules when possible.

This is being done for two reasons. One is to gain a little bit of
performance by skipping an unnecessary dict lookup in sys.modules. But
the other (and main) reason is to be a little bit more clear in how
things should work from the perspective of import's interactions with
loaders. Otherwise loaders can easily forget to return the module even
though PEP 302 explicitly states they are expected to return the module
they loaded.
2012-04-15 15:24:04 -04:00
Philip Jenvey f8f3190d32 utilize startswith(tuple) 2012-04-15 12:21:32 -07:00
Brett Cannon 27fc52877c Set ImportError.name when raising the exception in the case of None
found in sys.modules.
2012-04-15 14:15:31 -04:00
Mark Dickinson da4210f77d Issue #13496: Merge from 3.2 2012-04-15 16:32:04 +01:00
Mark Dickinson a13b109bc0 Issue 13496: Fix bisect.bisect overflow bug for large collections. 2012-04-15 16:30:35 +01:00
Mark Dickinson b0f00476a0 Issue #13889: Merge fix from 3.2. 2012-04-15 15:12:37 +01:00
Mark Dickinson 18e3d81f96 Issue #13889: On MSVC builds, set FPU control word at runtime for all string <-> float conversions. Patch by Samuel Iseli and Stefan Krah. 2012-04-15 15:10:56 +01:00
Kristján Valur Jónsson 69c635266e Issue #10576: Add a progress callback to gcmodule 2012-04-15 11:41:32 +00:00