Commit graph

20674 commits

Author SHA1 Message Date
Brett Cannon
1032af95ff Issue #14585: test_import now runs all tests under
importlib.test.import_ using builtins.__import__() instead of just the
relative import tests.
2012-04-20 15:52:17 -04:00
Brett Cannon
f0434e647a Issue #14599: Generalize a test for ImportError.path and add support
in Python/dynload_shlibs.c.

This should fix the remaining importlib test failure on Windows.
Support in AIX and HP-UX will be in a separate checkin.
2012-04-20 15:22:50 -04:00
Brett Cannon
a2898c1d79 Try to debug a Windows failure on the buildbots. 2012-04-20 13:34:35 -04:00
Brett Cannon
c33f3f2339 Issue #14629: Mention the filename in SyntaxError exceptions from
tokenizer.detect_encoding() (when available).
2012-04-20 13:23:54 -04:00
Brett Cannon
dd9a56953e Issue #14633: Simplify imp.find_modue() test after fixes from issue
#14629 changed the message.
2012-04-20 12:59:59 -04:00
Brett Cannon
8ff6baf25b Issue #14581: Windows users are allowed to import modules w/o taking
the file suffix's case into account, even when doing a case-sensitive
import.
2012-04-20 12:53:14 -04:00
Brett Cannon
91900eaf96 Have importlib.test.regrtest clear sys.path_importer_cache to make
sure finders from importlib are used instead of _frozen_importlib.
2012-04-20 12:51:44 -04:00
Martin v. Löwis
63c39fe38e merge 3.2: issue 14629 2012-04-20 14:37:17 +02:00
Martin v. Löwis
63674f4b52 Issue #14629: Raise SyntaxError in tokenizer.detect_encoding
if the first two lines have non-UTF-8 characters without an encoding declaration.
2012-04-20 14:36:47 +02:00
Victor Stinner
7b17a4e117 Close #14386: Register types.MappingProxyType as a Mapping 2012-04-20 01:41:36 +02:00
Larry Hastings
6fe20b3aee Issue #14127: Add st_{cma}time_ns fields to os.stat() result object. 2012-04-19 15:07:49 -07:00
Antoine Pitrou
dd5aa36f17 Issue #14308: Fix an exception when a dummy thread is in the threading module's active list after a fork(). 2012-04-20 00:05:17 +02:00
Antoine Pitrou
8e6e0fdb7f Issue #14308: Fix an exception when a "dummy" thread is in the threading module's active list after a fork(). 2012-04-19 23:55:01 +02:00
Martin v. Löwis
aa2efcb0bc Issue #14098: New functions PyErr_GetExcInfo and PyErr_SetExcInfo.
Patch by Stefan Behnel.
2012-04-19 14:33:43 +02:00
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
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
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
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
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
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
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
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
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
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