]>
granicus.if.org Git - python/log
Antoine Pitrou [Wed, 18 Apr 2012 18:51:15 +0000 (20:51 +0200)]
Issue #11750: The Windows API functions scattered in the _subprocess and
_multiprocessing.win32 modules now live in a single module "_winapi".
Patch by sbt.
Stefan Krah [Wed, 18 Apr 2012 17:27:32 +0000 (19:27 +0200)]
1) Simplify comment -- one has to read the complete proof (available in ACL2)
in order to understand the algorithm anyway.
2) v->exp == -v->digits may be assumed.
3) Fix comment (v always shares data with a).
Stefan Krah [Wed, 18 Apr 2012 16:59:56 +0000 (18:59 +0200)]
Explain the strategy to avoid huge alignment shifts in _mpd_qadd() in detail.
Stefan Krah [Wed, 18 Apr 2012 16:45:22 +0000 (18:45 +0200)]
Cosmetic change: initialize digits to 1 (redundant).
Stefan Krah [Wed, 18 Apr 2012 16:25:37 +0000 (18:25 +0200)]
Remove redundant finalization of the result.
Stefan Krah [Wed, 18 Apr 2012 16:08:20 +0000 (18:08 +0200)]
Fix comments and whitespace.
Stefan Krah [Wed, 18 Apr 2012 15:57:56 +0000 (17:57 +0200)]
Support mythical ones' complement machines.
Stefan Krah [Wed, 18 Apr 2012 15:48:34 +0000 (17:48 +0200)]
The previous code is correct, but hard to verify: The libmpdec documentation
rightfully states that an mpd_t with a coefficient flagged as MPD_CONST_DATA
must not be in the position of the result operand. In this particular case
several assumptions guarantee that a resize will never occur in all possible
code paths, which was the reason for using MPD_CONST_DATA and saving an
instruction by omitting the initialization of tmp.alloc.
For readability, tmp is now flagged as MPD_STATIC_DATA and tmp.alloc
is initialized.
Benjamin Peterson [Wed, 18 Apr 2012 15:26:02 +0000 (11:26 -0400)]
merge 3.2
Benjamin Peterson [Wed, 18 Apr 2012 15:25:12 +0000 (11:25 -0400)]
improve
Benjamin Peterson [Wed, 18 Apr 2012 15:19:00 +0000 (11:19 -0400)]
merge 3.2 (#14612)
Benjamin Peterson [Wed, 18 Apr 2012 15:14:31 +0000 (11:14 -0400)]
SETUP_WITH acts like SETUP_FINALLY for the purposes of setting f_lineno (closes #14612)
Antoine Pitrou [Wed, 18 Apr 2012 14:59:52 +0000 (16:59 +0200)]
Merge heads
Antoine Pitrou [Wed, 18 Apr 2012 14:57:54 +0000 (16:57 +0200)]
Fix it for good :-)
Benjamin Peterson [Wed, 18 Apr 2012 14:55:43 +0000 (10:55 -0400)]
rollback
005fd1fe31ab (see #14609 and #14582)
Being able to overload a sys.module entry during import of a module was broken
by this changeset.
Benjamin Peterson [Wed, 18 Apr 2012 14:48:00 +0000 (10:48 -0400)]
fix refcnt/style/debuging oversights
Brian Curtin [Wed, 18 Apr 2012 13:30:51 +0000 (08:30 -0500)]
Fix email post-commit review comments.
Add INCREFs, fix args->kwargs, and a second args==NULL check was removed,
left over from a merger with another function. Instead, checking msg==NULL
does what that used to do in a roundabout way.
Brett Cannon [Wed, 18 Apr 2012 01:42:07 +0000 (21:42 -0400)]
Merge
Brett Cannon [Wed, 18 Apr 2012 01:41:35 +0000 (21:41 -0400)]
Issue #12599: Be more strict in accepting None vs. a false-like object
in importlib.
Thanks to PJE for pointing out the issue and Nick Coghlan for filing
the bug.
Benjamin Peterson [Tue, 17 Apr 2012 23:54:35 +0000 (19:54 -0400)]
merge 3.2 (#14607)
Benjamin Peterson [Tue, 17 Apr 2012 23:53:21 +0000 (19:53 -0400)]
mangle keyword-only argname when loading defaults (closes #14607)
Brett Cannon [Tue, 17 Apr 2012 23:14:26 +0000 (19:14 -0400)]
Issue #13959: Re-implement imp.load_compiled() in imp.py.
Brett Cannon [Tue, 17 Apr 2012 23:05:11 +0000 (19:05 -0400)]
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.
Brian Curtin [Tue, 17 Apr 2012 21:57:09 +0000 (16:57 -0500)]
Fix #14600. Correct reference handling and naming of ImportError convenience function
Charles-François Natali [Tue, 17 Apr 2012 17:58:50 +0000 (19:58 +0200)]
Issue #5113: Fix a test_posix failure on HP-UX, where non-root users can
chown() to root under certain circumstances.
Charles-François Natali [Tue, 17 Apr 2012 17:48:35 +0000 (19:48 +0200)]
Issue #5113: Fix a test_posix failure on HP-UX, where non-root users can
chown() to root under certain circumstances.
Charles-François Natali [Tue, 17 Apr 2012 16:45:57 +0000 (18:45 +0200)]
Issue #14087: multiprocessing: add Condition.wait_for(). Patch by sbt.
Antoine Pitrou [Tue, 17 Apr 2012 11:50:58 +0000 (13:50 +0200)]
Speed up reading of small files. This avoids multiple C read() calls on pyc files.
Ezio Melotti [Tue, 17 Apr 2012 03:34:24 +0000 (21:34 -0600)]
#14603: use a listcomp in ZipFile.namelist.
Brett Cannon [Tue, 17 Apr 2012 03:11:28 +0000 (23:11 -0400)]
Properly guard against special-casing.
Brett Cannon [Tue, 17 Apr 2012 02:11:25 +0000 (22:11 -0400)]
Issue #13959: Re-implement imp.load_source() in imp.py.
Brett Cannon [Tue, 17 Apr 2012 00:50:33 +0000 (20:50 -0400)]
Issue #14599: Fix an import caching race condition.
Brett Cannon [Tue, 17 Apr 2012 00:48:50 +0000 (20:48 -0400)]
Issue #14599: Make test_reprlib robust against import cache race
conditions when regrtest is run with its -j option.
Brett Cannon [Tue, 17 Apr 2012 00:44:21 +0000 (20:44 -0400)]
Issue #13959: Fix a logic bug.
Vinay Sajip [Mon, 16 Apr 2012 23:41:39 +0000 (00:41 +0100)]
Merged cookbook corrections from 3.2.
Vinay Sajip [Mon, 16 Apr 2012 23:40:48 +0000 (00:40 +0100)]
Corrected version numbers in cookbook example.
Brian Curtin [Mon, 16 Apr 2012 23:14:09 +0000 (18:14 -0500)]
Add versionadded tags to newly added ImportError convenience functions.
Brian Curtin [Mon, 16 Apr 2012 20:24:02 +0000 (15:24 -0500)]
Correct warnings when building the docs for the nonexistet :arg: role. Changed to asterisks.
Brian Curtin [Mon, 16 Apr 2012 20:14:36 +0000 (15:14 -0500)]
Add documentation for the new PyErr_SetFromImport* functions
Antoine Pitrou [Mon, 16 Apr 2012 20:06:21 +0000 (22:06 +0200)]
Fix another refleak
Antoine Pitrou [Mon, 16 Apr 2012 19:52:45 +0000 (21:52 +0200)]
Fix a refleak
Antoine Pitrou [Mon, 16 Apr 2012 19:29:58 +0000 (21:29 +0200)]
pep8-ize test names
Antoine Pitrou [Mon, 16 Apr 2012 19:29:02 +0000 (21:29 +0200)]
Fix refleak in test_gc
Antoine Pitrou [Mon, 16 Apr 2012 16:48:49 +0000 (18:48 +0200)]
Fix reference loss on Py_None when None is encountered in sys.modules.
Antoine Pitrou [Mon, 16 Apr 2012 16:30:54 +0000 (18:30 +0200)]
Avoid compiler warning due to stray \x00
Antoine Pitrou [Mon, 16 Apr 2012 16:29:28 +0000 (18:29 +0200)]
Avoid rebuilding all C files when importlib.h is updated.
Brett Cannon [Mon, 16 Apr 2012 15:35:55 +0000 (11:35 -0400)]
Add an explicit mention of a backwards-incompatible fix that importlib implicitly fixed.
Vinay Sajip [Mon, 16 Apr 2012 15:22:38 +0000 (16:22 +0100)]
Closes #14452: brought tests in line with removal of BOM insertion code.
Vinay Sajip [Mon, 16 Apr 2012 14:47:05 +0000 (15:47 +0100)]
Merged tweaks to cookbook example from 3.2.
Vinay Sajip [Mon, 16 Apr 2012 14:46:18 +0000 (15:46 +0100)]
Tweaked format of cookbook example.
Vinay Sajip [Mon, 16 Apr 2012 14:29:28 +0000 (15:29 +0100)]
Merged cookbook update from 3.2.
Vinay Sajip [Mon, 16 Apr 2012 14:28:50 +0000 (15:28 +0100)]
Added cookbook example for BOM insertion.
Vinay Sajip [Mon, 16 Apr 2012 13:44:31 +0000 (14:44 +0100)]
Closes #14452: remove BOM insertion code.
Vinay Sajip [Mon, 16 Apr 2012 13:39:53 +0000 (14:39 +0100)]
Closes #14452: remove BOM insertion code.
Brian Curtin [Mon, 16 Apr 2012 05:10:17 +0000 (00:10 -0500)]
Fix #10854. Make use of the new path and name attributes on ImportError
for extension modules on Windows.
Brett Cannon [Mon, 16 Apr 2012 02:28:45 +0000 (22:28 -0400)]
merge
Brett Cannon [Mon, 16 Apr 2012 02:28:28 +0000 (22:28 -0400)]
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.
Antoine Pitrou [Mon, 16 Apr 2012 01:37:35 +0000 (03:37 +0200)]
Issue #14589: Update certificate chain for sha256.tbs-internet.com, fixing a test failure in test_ssl.
Antoine Pitrou [Mon, 16 Apr 2012 01:34:44 +0000 (03:34 +0200)]
Issue #14589: Update certificate chain for sha256.tbs-internet.com, fixing a test failure in test_ssl.
Brett Cannon [Mon, 16 Apr 2012 00:25:23 +0000 (20:25 -0400)]
Issue #13959: Re-implement imp.load_module() in imp.py.
Brett Cannon [Sun, 15 Apr 2012 23:06:40 +0000 (19:06 -0400)]
merge
Brett Cannon [Sun, 15 Apr 2012 23:06:23 +0000 (19:06 -0400)]
Consider load_dynamic() something to keep in _imp.
Brett Cannon [Sun, 15 Apr 2012 23:05:31 +0000 (19:05 -0400)]
Try to get hg to treat importlib.h as binary.
Victor Stinner [Sun, 15 Apr 2012 22:16:30 +0000 (00:16 +0200)]
Issue #14386: Expose the dict_proxy internal type as types.MappingProxyType
Brett Cannon [Sun, 15 Apr 2012 21:56:09 +0000 (17:56 -0400)]
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.
Brett Cannon [Sun, 15 Apr 2012 21:47:19 +0000 (17:47 -0400)]
Update importlib.h
Brett Cannon [Sun, 15 Apr 2012 20:08:47 +0000 (16:08 -0400)]
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.
Brett Cannon [Sun, 15 Apr 2012 19:25:10 +0000 (15:25 -0400)]
merge
Brett Cannon [Sun, 15 Apr 2012 19:24:04 +0000 (15:24 -0400)]
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.
Philip Jenvey [Sun, 15 Apr 2012 19:21:32 +0000 (12:21 -0700)]
utilize startswith(tuple)
Brett Cannon [Sun, 15 Apr 2012 18:15:31 +0000 (14:15 -0400)]
Set ImportError.name when raising the exception in the case of None
found in sys.modules.
Mark Dickinson [Sun, 15 Apr 2012 15:32:04 +0000 (16:32 +0100)]
Issue #13496: Merge from 3.2
Mark Dickinson [Sun, 15 Apr 2012 15:30:35 +0000 (16:30 +0100)]
Issue 13496: Fix bisect.bisect overflow bug for large collections.
Mark Dickinson [Sun, 15 Apr 2012 14:12:37 +0000 (15:12 +0100)]
Issue #13889: Merge fix from 3.2.
Mark Dickinson [Sun, 15 Apr 2012 14:10:56 +0000 (15:10 +0100)]
Issue #13889: On MSVC builds, set FPU control word at runtime for all string <-> float conversions. Patch by Samuel Iseli and Stefan Krah.
Kristján Valur Jónsson [Sun, 15 Apr 2012 11:41:32 +0000 (11:41 +0000)]
Issue #10576: Add a progress callback to gcmodule
Kristján Valur Jónsson [Sun, 15 Apr 2012 11:14:46 +0000 (11:14 +0000)]
Merge with 3.2: use ws2_32.lib rather than wsock32.lib on windows.
Kristján Valur Jónsson [Sun, 15 Apr 2012 11:12:57 +0000 (11:12 +0000)]
Make all socket related modules link with ws2_32.lib on windows, like
_socket does. Some were using the older wsock32.lib.
Ross Lagerwall [Sun, 15 Apr 2012 06:23:09 +0000 (08:23 +0200)]
Merge with remote.
Ross Lagerwall [Sun, 15 Apr 2012 06:19:35 +0000 (08:19 +0200)]
Be less verbose when building dbm.
Brett Cannon [Sun, 15 Apr 2012 05:35:05 +0000 (01:35 -0400)]
Plug a refleak.
Brett Cannon [Sun, 15 Apr 2012 01:58:33 +0000 (21:58 -0400)]
Clarify that one should not use __import__() directly. Also mention
PEP 328 in explaining how 'index' works.
Brett Cannon [Sun, 15 Apr 2012 01:50:00 +0000 (21:50 -0400)]
Handle importing pkg.mod by executing
__import__('mod', {'__packaging__': 'pkg', level=1) w/o properly (and
thus not segfaulting).
Brett Cannon [Sun, 15 Apr 2012 01:18:48 +0000 (21:18 -0400)]
Rebuild importlib.h to incorporate added comments.
Brett Cannon [Sun, 15 Apr 2012 00:44:23 +0000 (20:44 -0400)]
IDLE was relying on implicit relative imports which have gone away in
Python 3.3 thanks to importlib finishing the work in PEP 328 that
accidently got carried forward.
Brett Cannon [Sat, 14 Apr 2012 22:37:07 +0000 (18:37 -0400)]
Add some comments.
Brian Curtin [Sat, 14 Apr 2012 19:20:29 +0000 (14:20 -0500)]
merge with the tip
Brian Curtin [Sat, 14 Apr 2012 19:19:33 +0000 (14:19 -0500)]
Fix Windows build
Brett Cannon [Sat, 14 Apr 2012 19:06:17 +0000 (15:06 -0400)]
Fix an import race condition.
Brett Cannon [Sat, 14 Apr 2012 18:38:19 +0000 (14:38 -0400)]
Try to fix a sporadic test failure from what is probably a caching race condition.
Brett Cannon [Sat, 14 Apr 2012 18:23:49 +0000 (14:23 -0400)]
Undo a C99 idiom.
Brett Cannon [Sat, 14 Apr 2012 18:10:13 +0000 (14:10 -0400)]
Issue #2377: Make importlib the implementation of __import__().
importlib._bootstrap is now frozen into Python/importlib.h and stored
as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen
code along with sys and imp and then uses _frozen_importlib._install()
to set builtins.__import__() w/ _frozen_importlib.__import__().
Sandro Tosi [Sat, 14 Apr 2012 14:01:49 +0000 (16:01 +0200)]
merge with 3.2
Sandro Tosi [Sat, 14 Apr 2012 14:01:17 +0000 (16:01 +0200)]
fix typo; thanks to Jérôme Mainka from docs@
Ezio Melotti [Sat, 14 Apr 2012 03:05:36 +0000 (21:05 -0600)]
Merge highlight and spacing fixes in json example with 3.2.
Ezio Melotti [Sat, 14 Apr 2012 03:02:18 +0000 (21:02 -0600)]
Fix highlight and spacing in json example.
Ezio Melotti [Sat, 14 Apr 2012 02:52:29 +0000 (20:52 -0600)]
#14535: merge with 3.2.
Ezio Melotti [Sat, 14 Apr 2012 02:50:48 +0000 (20:50 -0600)]
#14535: fix code highlight in multiprocessing examples. Patch by Tshepang Lekhonkhobe.
R David Murray [Sat, 14 Apr 2012 01:27:19 +0000 (21:27 -0400)]
Merge #14399: corrected news item
R David Murray [Sat, 14 Apr 2012 01:24:27 +0000 (21:24 -0400)]
#14399: corrected news item