Nick Coghlan
e27b3608ef
Merge from 3.2
2012-04-19 22:22:37 +10:00
Nick Coghlan
10ac77d2d8
Close #14032 : fix incorrect variable reference in test_cmd_line_script
2012-04-19 22:19:36 +10:00
Ezio Melotti
dea6c21a9c
#14538 : merge with 3.2.
2012-04-18 19:36:03 -06:00
Ezio Melotti
0780b6bc58
#14538 : HTMLParser can now parse correctly start tags that contain a bare /.
2012-04-18 19:18:22 -06:00
Victor Stinner
b0b224233e
Issue #14385 : Support other types than dict for __builtins__
...
It is now possible to use a custom type for the __builtins__ namespace, instead
of a dict. It can be used for sandboxing for example. Raise also a NameError
instead of ImportError if __build_class__ name if not found in __builtins__.
2012-04-19 00:57:45 +02:00
Ned Deily
05fac022ec
Remove webbrowser doc reference to the previously removed internet-config option.
2012-04-18 12:55:57 -07:00
Ned Deily
cc19140607
Remove webbrowser doc reference to the previously removed internet-config option.
2012-04-18 12:48:52 -07:00
Benjamin Peterson
665c3b3eec
update importlib...
2012-04-18 15:29:52 -04:00
Benjamin Peterson
2a481e58ff
don't bother keeping a set we'll never use
2012-04-18 15:25:50 -04:00
Antoine Pitrou
23bba4ca39
Issue #11750 : The Windows API functions scattered in the _subprocess and
...
_multiprocessing.win32 modules now live in a single module "_winapi".
Patch by sbt.
2012-04-18 20:51:15 +02:00
Stefan Krah
c51b7fd65b
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).
2012-04-18 19:27:32 +02:00
Stefan Krah
5d0d2e2b04
Explain the strategy to avoid huge alignment shifts in _mpd_qadd() in detail.
2012-04-18 18:59:56 +02:00
Stefan Krah
ed4b21ff4f
Cosmetic change: initialize digits to 1 (redundant).
2012-04-18 18:45:22 +02:00
Stefan Krah
bc771e9b19
Remove redundant finalization of the result.
2012-04-18 18:25:37 +02:00
Stefan Krah
aecaf0b663
Fix comments and whitespace.
2012-04-18 18:08:20 +02:00
Stefan Krah
6369f77d20
Support mythical ones' complement machines.
2012-04-18 17:57:56 +02:00
Stefan Krah
140893cbaa
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.
2012-04-18 17:48:34 +02:00
Benjamin Peterson
447f0cc386
merge 3.2
2012-04-18 11:26:02 -04:00
Benjamin Peterson
2c1414661d
improve
2012-04-18 11:25:12 -04:00
Benjamin Peterson
6e3358a1d5
merge 3.2 ( #14612 )
2012-04-18 11:19:00 -04:00
Benjamin Peterson
e42fb307ed
SETUP_WITH acts like SETUP_FINALLY for the purposes of setting f_lineno ( closes #14612 )
2012-04-18 11:14:31 -04:00
Antoine Pitrou
eca851815d
Merge heads
2012-04-18 16:59:52 +02:00
Antoine Pitrou
ec9bac4226
Fix it for good :-)
2012-04-18 16:57:54 +02:00
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.
2012-04-18 10:55:43 -04:00
Benjamin Peterson
da20cd2b6b
fix refcnt/style/debuging oversights
2012-04-18 10:48:00 -04:00
Brian Curtin
94c001b503
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.
2012-04-18 08:30:51 -05:00
Brett Cannon
03c7ed1580
Merge
2012-04-17 21:42:07 -04:00
Brett Cannon
7bd329d800
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.
2012-04-17 21:41:35 -04:00
Benjamin Peterson
2a1fdc4c76
merge 3.2 ( #14607 )
2012-04-17 19:54:35 -04:00
Benjamin Peterson
32c59b6fc1
mangle keyword-only argname when loading defaults ( closes #14607 )
2012-04-17 19:53:21 -04:00
Brett Cannon
64befe939c
Issue #13959 : Re-implement imp.load_compiled() in imp.py.
2012-04-17 19:14:26 -04:00
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.
2012-04-17 19:05:11 -04:00
Brian Curtin
09b86d1196
Fix #14600 . Correct reference handling and naming of ImportError convenience function
2012-04-17 16:57:09 -05:00
Charles-François Natali
fba807ac44
Issue #5113 : Fix a test_posix failure on HP-UX, where non-root users can
...
chown() to root under certain circumstances.
2012-04-17 19:58:50 +02:00
Charles-François Natali
ab2d58eefa
Issue #5113 : Fix a test_posix failure on HP-UX, where non-root users can
...
chown() to root under certain circumstances.
2012-04-17 19:48:35 +02:00
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