Commit graph

10178 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Victor Stinner
0db176f8f6 Issue #14386: Expose the dict_proxy internal type as types.MappingProxyType 2012-04-16 00:16:30 +02: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
Kristján Valur Jónsson
69c635266e Issue #10576: Add a progress callback to gcmodule 2012-04-15 11:41:32 +00:00
Brett Cannon
afbdc13c1b Fix an import race condition. 2012-04-14 15:06:17 -04:00
Brett Cannon
73def61edd Try to fix a sporadic test failure from what is probably a caching race condition. 2012-04-14 14:38:19 -04:00
Brett Cannon
fd0741555b 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__().
2012-04-14 14:10:13 -04:00
Brett Cannon
79ec55e980 Issue #1559549: Add 'name' and 'path' attributes to ImportError.
Currently import does not use these attributes as they are planned
for use by importlib (which will be another commit).

Thanks to Filip Gruszczyński for the initial patch and Brian Curtin
for refining it.
2012-04-12 20:24:54 -04:00
R David Murray
f50b38a11f Merge #14399: zipfile now correctly handles comments added to empty zipfiles.
Patch by Serhiy Storchaka.

This also moves the TypeError that results from trying to use a unicode
comment from the 'close' step to the point at which the comment is added to
the zipfile.
2012-04-12 18:44:58 -04:00
R David Murray
51804e9725 #14399: zipfile now correctly handles comments added to empty zipfiles.
Patch by Serhiy Storchaka.

This also moves the TypeError that results from trying to use a unicode
comment from the 'close' step to the point at which the comment is added to
the zipfile.
2012-04-12 18:44:42 -04:00
Senthil Kumaran
80a133b91c code improvement. 'as cm' not required when not used. Review comment by Georg Brandl 2012-04-12 19:28:07 +08:00
R David Murray
ea169801e1 #14508: make gprof2html script runnable under python3
Not that I haven't tested it to make sure it works, just that it
can run against an empty source file.

Initial patch by Popa.Claudiu.

Here we also add a test (which uses mock, which is why I didn't
check it in on 3.2).
2012-04-11 15:17:37 -04:00
Senthil Kumaran
690598aba2 merge to default - Issue 10484 - Incorporate improvements to CGI module - Suggested by Glenn Linderman. Refactor code and tests 2012-04-12 02:37:11 +08:00
Senthil Kumaran
d70846b1b1 3.2 - Issue 10484 - Incorporate improvements to CGI module - Suggested by Glenn Linderman. Refactor code and tests 2012-04-12 02:34:32 +08:00
Senthil Kumaran
08bd4aaaf9 use assertWarns instead of check_warnings - Issue14341 2012-04-11 23:05:49 +08:00
Senthil Kumaran
d05853da97 merge - fix the incorrect changes made for PATH_INFO value - Issue10484 2012-04-11 03:16:16 +08:00
Senthil Kumaran
dbb369d0ef 3.2- fix the incorrect changes made for PATH_INFO value - Issue10484 2012-04-11 03:15:28 +08:00
R David Murray
75d9aca97a Rename test_ file that is really a support file to remove test_ prefix.
I thought I had run the full test suite before the last checkin, but
obviously I didn't.  test_multibytecodec_support.py isn't really a test file,
it is a support file that contains a base test class.  Rename it to
multibytecodec_support so that regrtest test discovery doesn't think it is a
test file that should be run.
2012-04-09 09:37:52 -04:00
R David Murray
78fc25c77f #14533: if a test has no test_main, use loadTestsFromModule.
This moves us further in the direction of using normal unittest facilities
instead of specialized regrtest ones.  Any test module that can be correctly
run currently using 'python unittest -m test.test_xxx' can now be converted to
use normal unittest test loading by simply deleting its test_main, thus no
longer requiring manual maintenance of the list of tests to run.  (Not all
tests can be converted that easily, since test_main sometimes does some
additional things (such as reap_children or reap_threads).  In those cases the
extra code may be moved to setUpModule/tearDownModule methods, or perhaps the
same ends can be achieved in a different way, such as moving the decorators to
the test classes that need them, etc.)

I don't advocate going through and making this change wholesale, but any time
a list of tests in test_main would otherwise need to be updated, consideration
should instead be given to deleting test_main.
2012-04-09 08:55:42 -04:00
R David Murray
b019ee752a #12537: in mailbox avoid depending on knowledge of email package internals
Previously mailbox was copying a list of attributes from one message object to
another in order to "copy the message data".  This means that any time new
attributes were added to email.message.Message, mailbox broke.  Now instead it
copies all attributes from the source object to the target object, skipping
any mailbox-object-specific attributes to produce the same clean initial
state it was previously getting by copying only the "known" attributes.

David Lam assisted in the development of this patch.
2012-04-08 22:36:07 -04:00
R David Murray
c988e24240 Remove redundancy in listing of all mailbox classes in test_mailbox. 2012-04-08 21:00:27 -04:00
Antoine Pitrou
c0aa9eeb90 Fix the patch for issue #7978: select() raises select.error before 3.3, not OSError. 2012-04-09 01:37:19 +02:00
Antoine Pitrou
0ec2c075a2 Fix flakiness in test_socketserver 2012-04-09 01:18:07 +02:00
Antoine Pitrou
f18d6f3f44 Fix flakiness in test_socketserver 2012-04-09 01:16:47 +02:00
Antoine Pitrou
c9e8e3c4dd Issue #7978: socketserver now restarts the select() call when EINTR is returned.
This avoids crashing the server loop when a signal is received.
Patch by Jerzy Kozera.
2012-04-09 00:49:17 +02:00
Antoine Pitrou
b0a9c66a49 Issue #7978: socketserver now restarts the select() call when EINTR is returned.
This avoids crashing the server loop when a signal is received.
Patch by Jerzy Kozera.
2012-04-09 00:47:24 +02:00
R David Murray
f998810deb Merge: Make test_mailbox runnable via python -m unittest. 2012-04-08 18:35:35 -04:00
R David Murray
317c8d257e Make test_mailbox runnable via python -m unittest. 2012-04-08 16:46:18 -04:00
Kristján Valur Jónsson
52a11f1f46 Issue #14310: Catch testing errors when trying to create unsupported socket
types on some platforms.
2012-04-07 20:38:44 +00:00
Kristján Valur Jónsson
10f383a937 Issue #14310: inter-process socket duplication for windows 2012-04-07 11:23:31 +00:00
Brett Cannon
83c02ee8e8 merge 2012-04-06 12:54:57 -04:00