Nadeem Vawda
7e126205e6
Closes #13989 : Add support for text modes to gzip.open().
...
Also, add tests for gzip.open().
2012-05-06 15:04:01 +02:00
Vinay Sajip
f1b34ee61b
#12660 : Skip test_gdb when run from an installed Python.
2012-05-06 12:03:05 +01:00
Vinay Sajip
73954040f6
Issue #9116 : Allowed test to pass on Windows by adjusting the test condition slightly to allow for a Windows-specific error message.
2012-05-06 11:34:50 +01:00
Vinay Sajip
363712349a
Closes #14729 : Allowed test to pass on Windows by adjusting the test condition slightly to allow for a Windows-specific error message.
2012-05-06 11:28:46 +01:00
Georg Brandl
b4c8902a87
#13183 : backport fixes to test_pdb to 3.2 branch
2012-05-06 11:50:00 +02:00
Larry Hastings
faf91e75ab
Issue #14705 : Add 'p' format character to PyArg_ParseTuple* for bool support.
2012-05-05 16:54:29 -07:00
Richard Oudkerk
7ef909cdd7
Fix for issue 14725 for 3.2 branch
2012-05-05 20:41:23 +01:00
Richard Oudkerk
fdb8dcf675
Fix for Issue 14725 for 3.3 branch.
2012-05-05 19:45:37 +01:00
Lars Gustäbel
7a919e9930
Issue #13815 : TarFile.extractfile() now returns io.BufferedReader objects.
...
The ExFileObject class was removed, some of its code went into _FileInFile.
2012-05-05 18:15:03 +02:00
Antoine Pitrou
f340c21ca9
Fix test connecting to sha256.tbs-internet.com.
...
The certificate has changed and the test now needs SNI to pass.
2012-05-04 16:26:56 +02:00
Antoine Pitrou
16f6f8338b
Fix test connecting to sha256.tbs-internet.com.
...
The certificate has changed and the test now needs SNI to pass.
2012-05-04 16:26:02 +02:00
Richard Oudkerk
009b15e2c3
Give test_multiprocessing better chance of avoiding timeout failures on Windows
2012-05-04 09:44:39 +01:00
Richard Oudkerk
a6becaa9cb
Fix dangling warning for test_multiprocessing
2012-05-03 18:29:02 +01:00
Vinay Sajip
ac20f463da
Merged hanged order of cleanup operations from 3.2.
2012-05-03 12:09:38 +01:00
Vinay Sajip
89282afafb
Changed order of cleanup operations to be more sensible.
2012-05-03 12:06:52 +01:00
Larry Hastings
76ad59b7e8
Issue #14127 : Add ns= parameter to utime, futimes, and lutimes.
...
Removed futimens as it is now redundant.
Changed shutil.copystat to use st_atime_ns and st_mtime_ns from os.stat
and ns= parameter to utime--it once again preserves exact metadata on Linux!
2012-05-03 00:30:07 -07:00
Charles-François Natali
598b2f6bd0
Merge.
2012-05-02 20:51:59 +02:00
Charles-François Natali
360b3c21f5
os.popen().close() returns None on success, not 0...
2012-05-02 20:50:13 +02:00
Charles-François Natali
39687ee9db
os.popen().close() returns None on success, not 0...
2012-05-02 20:49:14 +02:00
Richard Oudkerk
225cb8d077
Make test_multiprocessing cleanup properly
...
Previously, when an error was encountered some processes would not be
stopped until atexit callbacks were run. On Windows that was too late
to prevent a PermissionError when regrtest tried to remove the temp
directory it ran the tests in.
2012-05-02 19:36:11 +01:00
Charles-François Natali
d59240de83
Issue #14698 : Make test_posix more robust when the current UID doesn't have an
...
associated pwd entry.
2012-05-02 20:04:40 +02:00
Charles-François Natali
e8a255a5a2
Issue #14698 : Make test_posix more robust when the current UID doesn't have an
...
associated pwd entry.
2012-05-02 20:01:38 +02:00
Martin v. Löwis
67880cc962
Issue #13183 : Revert 0b53b70a40a0 (reenable test on windows)
2012-05-02 07:41:22 +02:00
Senthil Kumaran
bf6c19598a
fix closes issue13183 - windows test failure
2012-05-02 08:01:02 +08:00
Senthil Kumaran
cb172041d3
fix windows test failure - issue13183
2012-05-02 08:00:22 +08:00
Benjamin Peterson
1c5ae55c85
don't use assertEqual for test for bool equality
2012-05-01 11:14:32 -04:00
Benjamin Peterson
8fbd295458
merge 3.2 ( #14699 )
2012-05-01 09:51:46 -04:00
Benjamin Peterson
7295c6a871
fix calling the classmethod descriptor directly ( closes #14699 )
2012-05-01 09:51:09 -04:00
Benjamin Peterson
49a69e4d48
strip is_ prefixes on clock_info fields
2012-05-01 09:38:34 -04:00
Martin v. Löwis
d099b56be7
Check extract_version when opening a zipfile.
2012-05-01 14:08:22 +02:00
Georg Brandl
b613a3d458
Disable test_13183 temporarily on Windows for 3.3a3 release.
2012-05-01 09:57:34 +02:00
Georg Brandl
4bde9caf74
test_pdb: fix failure of test_issue13183 in debug mode, and make sure files are cleaned up.
2012-05-01 09:21:16 +02:00
Martin v. Löwis
b3260f08cf
Detect unsupported compression types.
2012-05-01 08:38:01 +02:00
Martin v. Löwis
f6b16a4b50
Issue #14371 : Support bzip2 in zipfile module.
...
Patch by Serhiy Storchaka.
2012-05-01 07:58:44 +02:00
Senthil Kumaran
417c3848d5
issue13183 - Fix pdb skipping frames after hitting a breakpoint and running step. Patch by Xavier de Gaye
2012-05-01 10:37:11 +08:00
Senthil Kumaran
42d7081806
issue13183 - Fix pdb skipping frames after hitting a breakpoint and running step. Patch by Xavier de Gaye
2012-05-01 10:07:49 +08:00
Richard Oudkerk
2452419921
Issue #14669 : Skip multiprocessing connection pickling test on MacOSX
...
Passing of fds is unreliable on MacOSX, compare issues #6560 and #12958 .
2012-04-30 14:48:51 +01:00
Richard Oudkerk
4460c3476d
Minor fix for multiprocessing unit test
...
Read from socket might have returned partial message.
2012-04-30 14:48:50 +01:00
Victor Stinner
9a8ad0c5ea
Issue #14428 : Remove test_process_time_threads() from test_time
...
The test is unstable and it's not really interesting to test exactly how
threads are handled.
2012-04-30 01:39:57 +02:00
Victor Stinner
5df72c2c27
Issue #14428 : Make test_process_time_threads() less strict
2012-04-30 00:51:31 +02:00
Alexander Belopolsky
934cb18ef5
merged
2012-04-29 18:20:05 -04:00
Alexander Belopolsky
b8f02b5a5f
fixed test_imaplib failure on Win
2012-04-29 18:16:46 -04:00
Mark Dickinson
57404891a0
Issue #14696 : Merge from 3.2
2012-04-29 22:20:01 +01:00
Mark Dickinson
407b3bd89b
Issue #14696 : Fix parser module to understand 'nonlocal' declarations.
2012-04-29 22:18:31 +01:00
Alexander Belopolsky
5a38f80f9c
Issue #10941 : Fix imaplib.Internaldate2tuple to produce correct result near
...
the DST transition. Patch by Joe Peterson.
2012-04-29 16:12:27 -04:00
Alexander Belopolsky
2420d83158
Issue #10941 : Fix imaplib.Internaldate2tuple to produce correct result near
...
the DST transition. Patch by Joe Peterson.
2012-04-29 15:56:49 -04:00
Mark Dickinson
89e6d3896a
Remove untests for non-existent functionality.
2012-04-29 19:17:05 +01:00
Victor Stinner
1fc3ec91cc
Issue #14428 : Rewrite test_process_time_threads() test
...
time.process_time() is CPU time, not a number of seconds.
2012-04-29 19:46:19 +02:00
Mark Dickinson
b63fd2a408
Issue #9154 : Merge fix from 3.2.
2012-04-29 18:35:56 +01:00
Mark Dickinson
ea7e9f9a83
Issue #9154 : Fix parser module to understand function annotations.
2012-04-29 18:34:40 +01:00
Brett Cannon
acf85cd131
Issue #13959 : Re-implement imp.NullImporter in Lib/imp.py.
2012-04-29 12:50:03 -04:00
Mark Dickinson
e383e82e04
Issue #14521 : Make result of float('nan') and float('-nan') more consistent across platforms. Further, don't rely on Py_HUGE_VAL for float('inf').
2012-04-29 15:31:56 +01:00
Senthil Kumaran
889ad16e54
httplib test for early eof response. related to Issue13684
2012-04-29 10:21:26 +08:00
Senthil Kumaran
9c29f86a81
httplib test for early eof response. related to Issue13684
2012-04-29 10:20:46 +08:00
Victor Stinner
fe98e2fc83
Issue #14428 : Use the new time.perf_counter() and time.process_time() functions
...
* Replace "time.clock on windows, or time.time" with time.perf_counter()
* profile module: only use time.process_time() instead of trying different
functions providing the process time
* timeit module: use time.perf_counter() by default, time.time() and
time.clock() can still be used using --time and --clock options
* pybench program: use time.perf_counter() by default, add support for
the new time.process_time() and time.perf_counter() functions, but stay
backward compatible. Use also time.get_clock_info() to display information
of the timer.
2012-04-29 03:01:20 +02:00
Victor Stinner
ec89539ccc
Issue #14428 , #14397 : Implement the PEP 418
...
* Rename time.steady() to time.monotonic()
* On Windows, time.monotonic() uses GetTickCount/GetTickCount64() instead of
QueryPerformanceCounter()
* time.monotonic() uses CLOCK_HIGHRES if available
* Add time.get_clock_info(), time.perf_counter() and time.process_time()
functions
2012-04-29 02:41:27 +02:00
Antoine Pitrou
92ff4e196b
Issue #14666 : stop multiprocessing's resource-sharing thread after the tests are done.
...
Also, block delivery of signals to that thread. Patch by Richard Oudkerk.
This will hopefully fix sporadic freezes on the FreeBSD 9.0 buildbot.
2012-04-27 23:51:03 +02:00
Brett Cannon
3c6ea1c14d
Issue #14605 : Insert to the front of sys.meta_path, don't append.
2012-04-27 13:52:55 -04:00
Brett Cannon
c8287efed3
Invalidate finder caches after creating a new script.
2012-04-27 13:52:03 -04:00
Jesus Cea
990eff0776
Backing out 86dc014cdd74. Not ready yet
2012-04-26 17:05:31 +02:00
Jesus Cea
2b47f0a23f
Close #10142 : Support for SEEK_HOLE/SEEK_DATA
2012-04-26 16:39:35 +02:00
Brett Cannon
e0d88a173c
Issue #14605 : Make explicit the entries on sys.path_hooks that used to
...
be implicit.
Added a warning for when sys.path_hooks is found to be empty. Also
changed the meaning of None in sys.path_importer_cache to represent
trying sys.path_hooks again (an interpretation of previous semantics).
Also added a warning for when None was found.
The long-term goal is for None in sys.path_importer_cache to represent
the same as imp.NullImporter: no finder found for that sys.path entry.
2012-04-25 20:54:04 -04:00
Brett Cannon
8f79dd5d7c
Silence DeprecationWarning for cgi.escape() usage in test_cgi.
2012-04-25 20:49:19 -04:00
Brett Cannon
5a5d6a1033
Merge
2012-04-25 20:18:24 -04:00
Vinay Sajip
c94871a5c0
Merged fixed test from 3.2.
2012-04-25 10:51:35 +01:00
Vinay Sajip
c2ad0aa9f1
Fixed test to work on Windows.
2012-04-25 10:47:00 +01:00
Brett Cannon
8923a4d4c5
Issue #14605 : Insert to the front of sys.path_hooks instead of appending.
2012-04-24 22:03:46 -04:00
Vinay Sajip
a5798ded26
Issue #14632 : Updated WatchedFileHandler to deal with race condition. Thanks to John Mulligan for the problem report and patch.
2012-04-24 23:33:33 +01:00
Vinay Sajip
66b8b08752
Issue #14632 : Updated WatchedFileHandler to deal with race condition. Thanks to John Mulligan for the problem report and patch.
2012-04-24 23:25:30 +01:00
Antoine Pitrou
5438ed1572
Issue #4892 : multiprocessing Connections can now be transferred over multiprocessing Connections.
...
Patch by Richard Oudkerk (sbt).
2012-04-24 22:56:57 +02:00
Lars Gustäbel
9f478c021d
Merge with 3.2: Issue #14160 : TarFile.extractfile() failed to resolve symbolic
...
links when the links were not located in an archive subdirectory.
2012-04-24 21:09:17 +02:00
Lars Gustäbel
1ef9eda7bc
Issue #14160 : TarFile.extractfile() failed to resolve symbolic links
...
when the links were not located in an archive subdirectory.
2012-04-24 21:04:40 +02:00
Benjamin Peterson
15ee821eb5
distiguish between refusing to creating shared keys and error ( #13903 )
2012-04-24 14:44:18 -04:00
Martin v. Loewis
4f2f3b6217
Account for shared keys in type's __sizeof__ ( #13903 ).
2012-04-24 19:13:57 +02:00
Benjamin Peterson
42f58818d6
merge 3.2 ( #14658 )
2012-04-24 11:09:20 -04:00
Benjamin Peterson
7b1668735a
don't use a slot wrapper from a different special method ( closes #14658 )
...
This also alters the fix to #11603 . Specifically, setting __repr__ to
object.__str__ now raises a recursion RuntimeError when str() or repr() is
called instead of silently bypassing the recursion. I believe this behavior is
more correct.
2012-04-24 11:06:25 -04:00
Antoine Pitrou
01296da8df
Skip long repr tests when the cached pyc file's path length would exceed the maximum Win32 path length.
...
This should fix a failure on one of the XP buildbots.
2012-04-24 13:55:35 +02:00
Victor Stinner
ece58deb9f
Close #14648 : Compute correctly maxchar in str.format() for substrin
2012-04-23 23:36:38 +02:00
Benjamin Peterson
9bc3653083
merge heads
2012-04-23 13:50:05 -04:00
Benjamin Peterson
db780d0d13
fix instance dicts with str subclasses ( #13903 )
2012-04-23 13:44:32 -04:00
R David Murray
a82c960c17
merge #14638 : pydoc now treats non-str __name__ as None instead of raising
...
Original patch by Peter Otten.
2012-04-23 13:26:44 -04:00
R David Murray
c43125a05c
#14638 : pydoc now treats non-str __name__ as None instead of raising
...
Original patch by Peter Otten.
2012-04-23 13:23:57 -04:00
Benjamin Peterson
7d95e40721
Implement PEP 412: Key-sharing dictionaries ( closes #13903 )
...
Patch from Mark Shannon.
2012-04-23 11:24:50 -04:00
Benjamin Peterson
80d07f8251
inherit maxchar of field value where needed ( closes #14648 )
2012-04-23 10:55:29 -04:00
Benjamin Peterson
1cf5aa9106
merge 3.2
2012-04-23 10:08:20 -04:00
Benjamin Peterson
7a436c5a53
sleep here
2012-04-23 10:08:14 -04:00
Brett Cannon
8c5e920ae3
merge
2012-04-22 13:30:07 -04:00
Brett Cannon
410e88d5fc
Change tests for imp.cache_from_source() to follow os.path.join/split
...
semantics.
2012-04-22 13:29:47 -04:00
Vinay Sajip
4c3f47896e
Issue #14644 : Increased default timeout for SMTPHandler. Note: last commit message referred to the wrong issue number.
2012-04-22 18:19:50 +01:00
Nick Coghlan
243994dc21
Resolve #14026 (Merge from 3.2)
2012-04-22 17:16:39 +10:00
Nick Coghlan
37fc401188
Close issue #14026 by better testing sys.argv handling in test_cmd_line_script (patch by Jason Yeo)
2012-04-22 17:11:33 +10:00
Senthil Kumaran
3a441c1bed
Fix Issue2193 - Allow ":" character in Cookie NAME values
2012-04-22 09:19:04 +08:00
Brett Cannon
b8c0206bd4
Issue #14637 : Fix the UNC import test under Windows to actually use
...
the UNC path. Also clean up sys.path and invalidate finder caches.
Thanks to Vinay Sajip for spotting the use of the wrong path.
2012-04-21 19:11:58 -04:00
Brett Cannon
9e924ed1ac
Fix a cleanup.
2012-04-20 17:34:59 -04:00
Brett Cannon
5d5296d36e
Merge
2012-04-20 17:19:14 -04:00
Mark Dickinson
9a359bd97f
Issue #14630 : Merge fix from 3.2.
2012-04-20 21:44:09 +01:00
Mark Dickinson
bcc17eefd2
Issue #14630 : Fix an incorrect access of ob_digit[0] for a zero instance of an int subclass.
2012-04-20 21:42:49 +01:00
Brett Cannon
bbdc9cd3d2
Use a skipUnless decorator instead of conditional renaming.
2012-04-20 16:29:39 -04:00
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
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
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
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
Kristján Valur Jónsson
b2e58185e5
Set a time threshold in test_asyncore.capture_server so that tests don't
...
deadlock if the main thread fails before sending all the data.
2012-04-06 14:37:45 +00:00
R David Murray
3861a322b9
Merge #14492 : fix some bugs in Tools/scripts/pdeps.py.
...
Initial patch by Popa Claudiu.
2012-04-05 23:01:13 -04:00
R David Murray
d3af6344ef
#14492 : fix some bugs in Tools/scripts/pdeps.py.
...
Initial patch by Popa Claudiu.
2012-04-05 22:59:13 -04:00
Stefan Krah
ff3eca0cc3
Allow printing a leading '-' and the maximum number of exponent digits
...
rather than raising RuntimeError (allocated space is sufficient for the
additional character).
2012-04-05 15:46:19 +02:00
Stefan Krah
0774e9b9f5
Raise InvalidOperation if exponents of zeros are clamped during exact
...
conversion in the Decimal constructor. Exact here refers to the
representation and not to the value (clamping does not change the value).
2012-04-05 15:21:58 +02:00
R David Murray
b5ebf271de
Merge: test_tools fix: don't import analyze_dxp if no _thread module
2012-04-04 22:38:26 -04:00
R David Murray
ca60b36735
test_tools fix: don't import analyze_dxp if no _thread module
2012-04-04 22:37:50 -04:00
R David Murray
ce9806215b
Merge #14490 , #14491 : add 'sundry'-style import tests for Tools/scripts.
...
This patch changes a few of the scripts to have __name__=='__main__'
clauses so that they are importable without running. Also fixes the
syntax errors revealed by the tests.
2012-04-04 21:29:03 -04:00
R David Murray
54ac832a24
#14490 , #14491 : add 'sundry'-style import tests for Tools/scripts.
...
This patch changes a few of the scripts to have __name__=='__main__'
clauses so that they are importable without running. Also fixes the
syntax errors revealed by the tests.
2012-04-04 21:28:14 -04:00
Brett Cannon
8ac95ee62a
Fix test_site from modifying sysconfig._CONFIG_VARS.
2012-04-04 17:31:16 -04:00
Eli Bendersky
ebf37a2ffb
Fixes and enhancements to _elementtree:
...
* Fixed refleak problems when GC collection is run (see messages in
issue #14065 )
* Added weakref support to Element objects
2012-04-03 22:02:37 +03:00
Antoine Pitrou
5c73e8eaf4
Issue #14482 : Raise a ValueError, not a NameError, when trying to create
...
a multiprocessing Client or Listener with an AF_UNIX type address under
Windows. Patch by Popa Claudiu.
2012-04-03 20:13:45 +02:00
Antoine Pitrou
6d20cba8d6
Issue #14482 : Raise a ValueError, not a NameError, when trying to create
...
a multiprocessing Client or Listener with an AF_UNIX type address under
Windows. Patch by Popa Claudiu.
2012-04-03 20:12:23 +02:00
Kristján Valur Jónsson
31668b8f7a
Issue #14288 : Serialization support for builtin iterators.
2012-04-03 10:49:41 +00:00
Victor Stinner
30d79471bb
Expose clock_settime() as time.clock_settime()
2012-04-03 00:45:07 +02:00
Benjamin Peterson
cbb290af08
merge 3.2
2012-04-02 14:25:55 -04:00
Benjamin Peterson
6215444a0a
remove uneeded line
2012-04-02 14:22:50 -04:00
Stefan Krah
9d2801095f
Testing the implicit initialization of the thread local context on first
...
access fails (expectedly) if other modules have already used decimal. The
only option is to remove the test.
2012-04-02 19:10:20 +02:00
Benjamin Peterson
dba1b40b60
merge 3.2
2012-04-02 11:28:49 -04:00
Benjamin Peterson
e900096dc4
prevent writing to stderr from messing up the exception state ( closes #14474 )
2012-04-02 11:15:17 -04:00
Stefan Krah
38548ad006
Whitespace.
2012-04-02 15:10:36 +02:00
Stefan Krah
5100171d81
Clear the context flags if a context is initialized from the DefaultContext.
2012-04-02 15:02:21 +02:00
Antoine Pitrou
93bba8fb8a
Issue #14151 : Raise a ValueError, not a NameError, when trying to create
...
a multiprocessing Client or Listener with an AF_PIPE type address under
non-Windows platforms. Patch by Popa Claudiu.
2012-04-01 17:25:49 +02:00
Antoine Pitrou
709176f10c
Issue #14151 : Raise a ValueError, not a NameError, when trying to create
...
a multiprocessing Client or Listener with an AF_PIPE type address under
non-Windows platforms. Patch by Popa Claudiu.
2012-04-01 17:19:09 +02:00
Eli Bendersky
0261d754cd
Removing the test of Element that causes ref-leak in GC (issue #14464 ).
...
I will now continue investigating the cause of the ref-leak, but I wanted
to remove the test so that the refcount test in the buildbots could be clean.
The whole change (adding GC to Element) is not reverted because it improved
the situation (GC works for immediate cycles) and didn't cause regressions
(the test is new and was added together with the fix).
2012-04-01 17:40:17 +03:00
Antoine Pitrou
8315f96764
Issue #13872 : socket.detach() now marks the socket closed (as mirrored in the socket repr()).
...
Patch by Matt Joiner.
2012-04-01 01:00:55 +02:00
Antoine Pitrou
70deb3de39
Issue #13872 : socket.detach() now marks the socket closed (as mirrored in the socket repr()).
...
Patch by Matt Joiner.
2012-04-01 01:00:17 +02:00
Antoine Pitrou
8b34b53c52
Issue #14406 : Fix a race condition when using `concurrent.futures.wait(return_when=ALL_COMPLETED)`.
...
Patch by Matt Joiner.
2012-03-31 20:25:22 +02:00
Antoine Pitrou
f70401e842
Issue #14406 : Fix a race condition when using `concurrent.futures.wait(return_when=ALL_COMPLETED)`.
...
Patch by Matt Joiner.
2012-03-31 20:23:30 +02:00
Eli Bendersky
a5e822045c
Fix the tests of GC collection in ET.Element according to Benjamin's recommendations
2012-03-31 13:55:38 +03:00
Eli Bendersky
0192ba33b4
Issue #14065 : Added cyclic GC support to ET.Element
2012-03-30 16:38:33 +03:00
Ross Lagerwall
86407432d5
Issue #14442 : Add missing errno import in test_smtplib.
2012-03-29 18:08:48 +02:00
Stefan Krah
fe17b2bc77
Raise MemoryError instead of InvalidOperation/MallocError for compatibility
...
with decimal.py. The standard specifies InsufficientStorage (MallocError) as
a sub-condition of InvalidOperation. This allows a calculation to continue
with NaN results when allocation fails.
2012-03-25 18:59:21 +02:00
Charles-François Natali
9384c7ddab
Issue #13902 : Fix a random test_threading failure on FreeBSD 6 buildbots (due
...
to a known bug in pthread implementation on FreeBSD < 7).
2012-03-24 20:37:01 +01:00
Charles-François Natali
8e6fe648cc
Issue #13902 : Fix a random test_threading failure on FreeBSD 6 buildbots (due
...
to a known bug in pthread implementation on FreeBSD < 7).
2012-03-24 20:36:09 +01:00
Charles-François Natali
55bce63ea0
Issue #14154 : Reimplement the bigmem test memory watchdog as a subprocess.
2012-03-24 10:06:23 +01:00
Giampaolo Rodola'
c7ea19fee8
attempt to fix asyncore buildbot failure
2012-03-23 15:09:58 +01:00
Giampaolo Rodola'
a3481e70d1
attempt to fix asyncore buildbot failure
2012-03-23 15:07:07 +01:00
Stefan Krah
b6405efd1b
Use the same exception hierarchy as decimal.py. FloatOperation now also
...
inherits from TypeError. Cleanup in module initialization to make repeated
import failures robust.
2012-03-23 14:46:48 +01:00
Giampaolo Rodola'
4164ac1f27
merge
2012-03-23 13:29:49 +01:00
Giampaolo Rodola'
466a54f4dc
fix failing asyncore test as per http://bugs.python.org/issue10340#msg156586
2012-03-23 13:29:01 +01:00
Eli Bendersky
396e8fcf36
Issue #13782 : streamline argument type-checking in ET.Element
...
append, extend and insert now consistently type-check their argument in both
the C and Python implementations, and raise TypeError for non-Element
argument.
Added tests
2012-03-23 14:24:20 +02:00
R David Murray
42243c4dca
#14380 : Make actual default match docs, fix __init__ order.
...
Éric pointed out that given that the default was documented as None, someone
would reasonably pass that to get the default behavior. In fixing the code to
use None, I noticed that the change to _charset was being done after it had
already been passed to MIMENonMultipart. The change to the test verifies that
the order is now correct.
2012-03-22 22:40:44 -04:00
R David Murray
8680bcc5db
#14380 : Have MIMEText defaults to utf-8 when passed non-ASCII unicode
...
Previously it would just accept the unicode, which would wind up as unicode in
the transfer-encoded message object, which is just wrong.
Patch by Jeff Knupp.
2012-03-22 22:17:51 -04:00
Giampaolo Rodola'
3539ef3d21
merge 79422b3684f1 in 3.3 branch (issue 10340)
2012-03-22 16:19:45 +01:00
Giampaolo Rodola'
350c94b900
fix #10340 : properly handle EINVAL on OSX and also avoid to call handle_connect() in case of a disconnetected socket which is not meant to connect.
2012-03-22 16:17:43 +01:00
Benjamin Peterson
98ba753432
merge 3.2 ( #14378 )
2012-03-22 08:19:50 -04:00
Benjamin Peterson
a4e4e35783
check by equality for __future__ not identity ( closes #14378 )
2012-03-22 08:19:04 -04:00
Antoine Pitrou
d5d17eb653
Issue #14204 : The ssl module now has support for the Next Protocol Negotiation extension, if available in the underlying OpenSSL library.
...
Patch by Colin Marc.
2012-03-22 00:23:03 +01:00
Benjamin Peterson
65e32d1f1a
merge heads
2012-03-21 14:26:09 -04:00
Stefan Krah
1919b7e72b
Issue #7652 : Integrate the decimal floating point libmpdec library to speed
...
up the decimal module. Performance gains of the new C implementation are
between 12x and 80x, depending on the application.
2012-03-21 18:25:23 +01:00
Benjamin Peterson
1b1a8e7cb5
correctly lookup __trunc__ in int() constructor
2012-03-20 23:48:11 -04:00
R David Murray
669b755c92
#14269 : smtpd now conforms to the RFC and requires HELO before MAIL.
...
This is a backward incompatible change, but since it is an RFC conformance bug
and all real mail servers that I know of do conform to the RFC in this regard,
I believe it is an acceptable change for a feature release.
Patch by Jason Killen.
2012-03-20 16:16:29 -04:00
Larry Hastings
83a9f48699
Issue #14328 : Add keyword-only parameters to PyArg_ParseTupleAndKeywords.
...
They're optional-only for now (unlike in pure Python) but that's all
I needed. The syntax can easily be relaxed if we want to support
required keyword-only arguments for extension types in the future.
2012-03-20 20:06:16 +00:00
Benjamin Peterson
4ca5661669
all OSErrors should indicate there are no extended attributes ( closes #14358 )
2012-03-18 22:26:05 -04:00
R David Murray
0863d7106c
Merge #14333 : fix test_queue so it can be run via standard unittest test discovery.
2012-03-17 16:39:44 -04:00
R David Murray
c6bfce9871
#14333 : fix test_queue so it can be run via standard unittest test discovery.
2012-03-17 16:38:39 -04:00
Benjamin Peterson
96384b93aa
make extra arguments to object.__init__/__new__ to errors in most cases (finishes #1683368 )
2012-03-17 00:05:44 -05:00
R David Murray
80e22b56d3
Merge #11686 : add missing entries to email __all__ lists.
...
Original patch by Steffen Daode Nurpmeso
2012-03-16 22:46:14 -04:00
R David Murray
7104c7295c
#12788 : fix error in test_policy when run under refleak detection
2012-03-16 21:39:57 -04:00
Benjamin Peterson
de394543b4
merge 3.2 ( #14334 )
2012-03-16 09:35:38 -05:00
Benjamin Peterson
16d84ac355
check to make sure the attribute is a string ( #14334 )
2012-03-16 09:32:59 -05:00
Eli Bendersky
6e33525098
fix trailing whitespace
2012-03-16 15:32:04 +02:00
Eli Bendersky
2b711409c7
Add a test that makes sure TreeBuilder can be passed element_factory in the
...
constructor. Marked as expectedFailure since it currently fails for the C
implementation.
2012-03-16 15:29:50 +02:00
Senthil Kumaran
209d70e579
closes issue10484 - Fix the http.server's cgi PATH_INFO handling problem
2012-03-16 01:14:51 -07:00
Senthil Kumaran
be3f851411
closes issue10484 - Fix the http.server's cgi PATH_INFO handling problem
2012-03-16 01:13:50 -07:00
Eli Bendersky
5b77d81314
Issue #14207 : the ParseError exception raised by _elementtree was made
...
consistent to the one raised by the Python module (the 'code' attribute
was added).
In addition, the exception is now documented.
Added a test to check that ParseError has the required attributes, and
threw away the equivalent doctest which is no longer required.
2012-03-16 08:20:05 +02:00
Eli Bendersky
f996e775ea
Closes Issue #14246 : _elementtree parser will now handle io.StringIO
2012-03-16 05:53:30 +02:00
Benjamin Peterson
2afe6aeae8
perform yield from delegation by repeating YIELD_FROM opcode ( closes #14230 )
...
This allows generators that are using yield from to be seen by debuggers. It
also kills the f_yieldfrom field on frame objects.
Patch mostly from Mark Shannon with a few tweaks by me.
2012-03-15 15:37:39 -05:00
Vinay Sajip
17160fd6d6
Fixes #14314 : Improved SMTP timeout handling.
2012-03-15 12:02:08 +00:00
Victor Stinner
071eca3f5c
Issue #10278 : Add an optional strict argument to time.steady(), False by default
2012-03-15 01:17:09 +01:00
Victor Stinner
ec919cc74d
Issue #10278 : Drop time.monotonic() function, rename time.wallclock() to time.steady()
...
* On Mac OS X, time.steady() now uses mach_absolute_time(), a monotonic clock
* Optimistic change: bet that CLOCK_MONOTONIC and CLOCK_REALTIME are available
when clock_gettime() is available
* Rewrite time.steady() documentation
2012-03-15 00:58:32 +01:00
Senthil Kumaran
2f9bf35007
Fix the buildbot breakdown - issue 10050
2012-03-14 13:59:56 -07:00
Senthil Kumaran
38b968b913
deprecated the old urllib primitives in 3.3 urllib package - issue 10050
2012-03-14 13:43:53 -07:00
R David Murray
b53319f509
#12818 : remove escaping of () in quoted strings in formataddr
...
The quoting of ()s inside quoted strings is allowed by the RFC, but is not
needed. There seems to be no reason to add needless escapes.
2012-03-14 15:31:47 -04:00
R David Murray
8d8f110492
#14062 : fix BytesParser handling of Header objects
...
This is a different fix than the 3.2 fix, but the new tests are the same.
This also affected smtplib.SMTP.send_message, which calls BytesParser.
2012-03-14 14:24:22 -04:00
R David Murray
e2922835b0
Merge #14291 : if a header has non-ascii unicode, default to CTE using utf-8
...
In Python2, if a unicode string was assigned as the value of a header,
email would automatically CTE encode it using the UTF8 charset.
This capability was lost in the Python3 translation, and this patch
restores it.
Patch by Ali Ikinci, assisted by R. David Murray.
I also added a fix for the mailbox test that was depending (with a comment
that it was a bad idea to so depend) on non-ASCII causing message_from_string
to raise an error. It now uses support.patch to induce an error during
message serialization.
2012-03-14 03:03:27 -04:00
R David Murray
7441a7aedd
#14291 : if a header has non-ascii unicode, default to CTE using utf-8
...
In Python2, if a unicode string was assigned as the value of a header,
email would automatically CTE encode it using the UTF8 charset.
This capability was lost in the Python3 translation, and this patch
restores it.
Patch by Ali Ikinci, assisted by R. David Murray.
I also added a fix for the mailbox test that was depending (with a comment
that it was a bad idea to so depend) on non-ASCII causing message_from_string
to raise an error. It now uses support.patch to induce an error during
message serialization.
2012-03-14 02:59:51 -04:00
Senthil Kumaran
e24f96a059
Issue10050 - urlretrieve uses newer urlopen. reporthook of urlretrieve takes, block number, block read size, file_size
2012-03-13 19:29:33 -07:00
Victor Stinner
8050ca9c6f
Issue #14180 : TestDateTime.test_microsecond_rounding() handles localtime() and
...
gmtime() failure on Windows
2012-03-14 00:17:05 +01:00
R David Murray
910df329fd
#8315 : add automatic unittest test discovery in test.test_email
2012-03-13 18:02:22 -04:00
Victor Stinner
5d272cc6a2
Close #14180 : Factorize code to convert a number of seconds to time_t, timeval or timespec
...
time.ctime(), gmtime(), time.localtime(), datetime.date.fromtimestamp(),
datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now
raises an OverflowError, instead of a ValueError, if the timestamp does not fit
in time_t.
datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now
round microseconds towards zero instead of rounding to nearest with ties going
away from zero.
2012-03-13 13:35:55 +01:00
Senthil Kumaran
19b114b818
merge to 3.3 - Fix closes Issue14281 - Test for cgi.escape by Brian Landers
2012-03-13 01:51:20 -07:00
Senthil Kumaran
47b5ddb9cf
3.2 - Fix closes Issue14281 - Test for cgi.escape by Brian Landers
2012-03-13 01:50:27 -07:00
R David Murray
a9719057a2
#8942 : add test for __path__ contents in zipimport tests
...
Patch by Tatiana Al-Chueyr.
2012-03-12 21:16:33 -04:00
Sean Reifschneider
7b3c975aaf
closes #14259 re.finditer() now takes keyword arguments: pos, endpos.
...
Contrary to the documentation, finditer() did not take pos and endpos
keyword arguments.
2012-03-12 18:22:38 -06:00
Ezio Melotti
cc50ba26bd
#14179 : merge with 3.2.
2012-03-13 01:33:30 +02:00
Ezio Melotti
df723e1e5e
#14179 : add tests for re.compile. Patch by Florian Mladitsch.
2012-03-13 01:29:48 +02:00
Eric V. Smith
97722c4132
str.format_map tests don't do what they say: fix to actually implement the intent of the test. Closes #13450 . Patch by Akira Li.
2012-03-12 15:26:21 -07:00
Eric V. Smith
1d4798cb93
Merge heads.
2012-03-12 15:18:30 -07:00
Eric V. Smith
edbb6ca084
str.format_map tests don't do what they say: fix to actually implement the intent of the test. Closes #13450 .
2012-03-12 15:16:22 -07:00
Ezio Melotti
48d578c02a
#13394 : add more tests for the aifc module and use warnings.warn instead of print. Patch by Oleg Plakhotnyuk.
2012-03-12 23:57:18 +02:00
Ezio Melotti
85769539a3
#13394 : add more tests for the aifc module. Patch by Oleg Plakhotnyuk.
2012-03-12 23:52:40 +02:00
Łukasz Langa
17591c1a1d
Head merge.
2012-03-12 19:59:48 +01:00
Łukasz Langa
f3078fbee2
Fixes #13842 : cannot pickle Ellipsis or NotImplemented.
...
Thanks for James Sanders for the bug report and the patch.
2012-03-12 19:46:12 +01:00
Benjamin Peterson
f28fcff17d
adjust for change in AST type
2012-03-12 11:19:19 -07:00
Benjamin Peterson
7e0dbfbbde
give the AST class a __dict__
2012-03-12 09:46:44 -07:00
Benjamin Peterson
61a4161de4
merge 3.2
2012-03-12 09:43:27 -07:00
Benjamin Peterson
ef87f06798
allow AST objects to be like its subclasses
2012-03-12 09:43:09 -07:00
Benjamin Peterson
6645f7e590
merge heads
2012-03-12 09:28:51 -07:00
Benjamin Peterson
09b4bd03f6
merge 3.2
2012-03-12 09:28:36 -07:00
Benjamin Peterson
d279e286f2
every other ast object has a dict, so I think AST should, too
2012-03-12 09:27:36 -07:00
Eric V. Smith
851cad7616
Make test_logging no longer fail if zlib not present. Closes #14256 . Patch by Pedro Kroger.
2012-03-11 22:46:04 -07:00
Antoine Pitrou
b69ef16fe6
Issue #14252 : Fix subprocess.Popen.terminate() to not raise an error under Windows when the child process has already exited.
2012-03-11 19:33:29 +01:00
Antoine Pitrou
1f9a835400
Issue #14252 : Fix subprocess.Popen.terminate() to not raise an error under Windows when the child process has already exited.
2012-03-11 19:29:12 +01:00
Antoine Pitrou
eab2a50dfc
PEP8-ize test names
2012-03-10 16:34:40 +01:00
Antoine Pitrou
8cd8d5e8f2
Remove useless failOnException() method
2012-03-10 16:20:24 +01:00
Victor Stinner
28393828e2
Issue #14205 : Fix test_dict.test_mutating_lookup()
2012-03-09 22:58:51 +01:00
Antoine Pitrou
3774977de2
Relax timeout tests for weak Windows buildbot
2012-03-09 18:40:15 +01:00
Victor Stinner
63ed5664a1
Issue #14231 : Lib/test/crashers/borrowed_ref_1.py was fixed by ba6376dff6c4.
2012-03-09 13:59:42 +01:00
Eli Bendersky
865756a94c
Issue #14178 : Problem deleting slices with steps != +1 in the _elementtree module.
...
Fixed the problem and added some tests. Closes #14178
2012-03-09 13:38:15 +02:00
Victor Stinner
40c9565bcc
Issue #14211 : Oops, I removed the wrong file :-)
2012-03-09 00:52:07 +01:00
Victor Stinner
2d01dc00bc
Issue #14211 : _PyObject_GenericSetAttrWithDict() keeps a strong reference to
...
the descriptor because it may be destroyed before being used, destroyed during
the update of the dict for example.
2012-03-09 00:44:13 +01:00
Victor Stinner
d74782b0ac
Close #14199 : _PyType_Lookup() and super_getattro() keep a strong reference to
...
the type MRO to avoid a crash if the MRO is changed during the lookup.
2012-03-09 00:39:08 +01:00
Benjamin Peterson
9a6338651e
merge 3.2 (#3787e896dbe9)
2012-03-07 18:52:52 -06:00
Benjamin Peterson
52c424343d
allow cycles throught the __dict__ slot to be cleared ( closes #1469629 )
...
Patch from Armin, test from me.
2012-03-07 18:41:11 -06:00
Benjamin Peterson
099a78fe6d
make delegating generators say they running ( closes #14220 )
2012-03-07 17:57:04 -06:00
Benjamin Peterson
33d21a24fa
merge 3.2 ( #14212 )
2012-03-07 14:59:13 -06:00
Benjamin Peterson
e48944b69c
keep the buffer object around while we're using it ( closes #14212 )
2012-03-07 14:50:25 -06:00
Antoine Pitrou
5bb9a8f237
Remove a couple of local imports.
2012-03-06 13:43:24 +01:00
Antoine Pitrou
6c64cc1973
Reap processes at test end to avoid false positives in reference leak detection.
2012-03-06 13:42:35 +01:00
Victor Stinner
b1f7f6343b
test_pty: fix ResourceWarning warnings
2012-03-06 02:04:58 +01:00
Victor Stinner
198b291df7
Close #14205 : dict lookup raises a RuntimeError if the dict is modified during
...
a lookup.
"if you want to make a sandbox on top of CPython, you have to fix segfaults"
so let's fix segfaults!
2012-03-06 01:03:13 +01:00
Vinay Sajip
b2fcd3a989
Added delay before record creation.
2012-03-05 20:02:53 +00:00
Antoine Pitrou
bdb1cf1ca5
Issue #12328 : Fix multiprocessing's use of overlapped I/O on Windows.
...
Also, add a multiprocessing.connection.wait(rlist, timeout=None) function
for polling multiple objects at once. Patch by sbt.
Complete changelist from sbt's patch:
* Adds a wait(rlist, timeout=None) function for polling multiple
objects at once. On Unix this is just a wrapper for
select(rlist, [], [], timeout=None).
* Removes use of the SentinelReady exception and the sentinels argument
to certain methods. concurrent.futures.process has been changed to
use wait() instead of SentinelReady.
* Fixes bugs concerning PipeConnection.poll() and messages of zero
length.
* Fixes PipeListener.accept() to call ConnectNamedPipe() with
overlapped=True.
* Fixes Queue.empty() and SimpleQueue.empty() so that they are
threadsafe on Windows.
* Now PipeConnection.poll() and wait() will not modify the pipe except
possibly by consuming a zero length message. (Previously poll()
could consume a partial message.)
* All of multiprocesing's pipe related blocking functions/methods are
now interruptible by SIGINT on Windows.
2012-03-05 19:28:37 +01:00
Stefan Krah
1649c1b33a
Issue #14181 : Preserve backwards compatibility for getbufferprocs that a) do
...
not adhere to the new documentation and b) manage to clobber view->obj before
returning failure.
2012-03-05 17:45:17 +01:00
Éric Araujo
420f698d6e
Backport minidom attribute tests from default (73c76466cf44).
...
Some minidom code changed between 3.2 and 3.3, so to be sure to avoid
differenced in behavior I’m backporting these tests added by MvL.
2012-03-05 16:11:41 +01:00
Stefan Krah
bf6c7eca43
Issue #14181 : Test creating memoryviews from a static exporter with both
...
view.obj==NULL and view.obj==base.
2012-03-05 14:37:34 +01:00
Vinay Sajip
8d217c6a71
Issue #12151 : Added more info to diagnostics.
2012-03-05 12:45:51 +00:00
Stefan Krah
49ab14f452
Merge.
2012-03-05 10:50:11 +01:00
Stefan Krah
fcbb4169b9
Issue #10181 : The decision was to raise a buffer error in memory_exit()
...
if the view has exported buffers. Make this official by uncommenting
a test case.
2012-03-05 10:45:31 +01:00
Vinay Sajip
682c979871
Merged upstream changes.
2012-03-05 09:44:25 +00:00
Vinay Sajip
b6f6670d87
Added more diagnostics for diagnosing #12151 .
2012-03-05 09:43:47 +00:00
Florent Xicluna
75b5e7ee15
Issue #14007 : accept incomplete TreeBuilder objects (missing start/end/data/close) for the Python implementation as well. Add disabled tests for the doctype() method.
2012-03-05 10:42:19 +01:00
Stefan Krah
4e99a315b7
Issue #14181 : Allow memoryview construction from an object that uses the
...
getbuffer redirection scheme.
2012-03-05 09:30:47 +01:00
Martin v. Löwis
67245a6ed4
Issue #14168 : Check for presence of _attrs before accessing it.
2012-03-05 07:01:49 +01:00
Meador Inge
f1c42599ba
Issue #14195 : Make WeakSet.__lt__ and WeakSet.__gt__ irreflexive.
2012-03-04 22:40:15 -06:00
Meador Inge
653f932eff
Issue #14195 : Make WeakSet.__lt__ and WeakSet.__gt__ irreflexive.
2012-03-04 22:15:38 -06:00
Antoine Pitrou
5102bf476c
Fix some set algebra methods of WeakSet objects.
2012-03-04 21:16:52 +01:00
Antoine Pitrou
9c47ac05d1
Fix some set algebra methods of WeakSet objects.
2012-03-04 20:47:05 +01:00
Georg Brandl
0b2b583ea2
Fix spelling.
2012-03-04 20:36:28 +01:00
Antoine Pitrou
8d3c290de4
Issue #14166 : Pickler objects now have an optional `dispatch_table` attribute which allows to set custom per-pickler reduction functions.
...
Patch by sbt.
2012-03-04 18:31:48 +01:00
Armin Ronacher
c0eaecafe9
Updated tokenize to support the inverse byte literals new in 3.3
2012-03-04 13:07:57 +00:00
Eli Bendersky
745ccf8b1a
fix trailing whitespace
2012-03-04 07:15:21 +02:00
Eli Bendersky
092af1fc5c
Issue #14128 : Exposing Element as an actual type from _elementtree, rather than a factory function.
...
This makes the C implementation more aligned with the Python implementation.
Also added some tests to ensure that Element is now a type and that it can
be subclassed.
2012-03-04 07:14:03 +02:00
Vinay Sajip
d263d18553
Fixed problem with diagnostic output.
2012-03-03 16:20:37 +00:00
Antoine Pitrou
0d3a003f24
- Issue #14177 : marshal.loads() now raises TypeError when given an unicode
...
string. Patch by Guilherme Gonçalves.
2012-03-03 02:38:37 +01:00
Antoine Pitrou
4a90ef0363
Issue #14177 : marshal.loads() now raises TypeError when given an unicode string.
...
Patch by Guilherme Gonçalves.
2012-03-03 02:35:32 +01:00
Victor Stinner
643cd68ea4
Issue #13964 : signal.sigtimedwait() timeout is now a float instead of a tuple
...
Add a private API to convert an int or float to a C timespec structure.
2012-03-02 22:54:03 +01:00
Antoine Pitrou
b2677c7397
Issue #14172 : Fix reference leak when marshalling a buffer-like object (other than a bytes object).
2012-03-02 18:16:38 +01:00
Antoine Pitrou
679e9d36f7
Issue #14172 : Fix reference leak when marshalling a buffer-like object (other than a bytes object).
2012-03-02 18:12:43 +01:00
Vinay Sajip
2f24d98df0
Closes #14158 : merged test file resilience fix from 3.2.
2012-03-02 01:24:13 +00:00
Vinay Sajip
f959618142
Closes #14158 : improved resilience to test files left behind.
2012-03-02 01:01:13 +00:00
Antoine Pitrou
0836baa46a
Issue #14159 : Fix the len() of weak containers (WeakSet, WeakKeyDictionary, WeakValueDictionary) to return a better approximation when some objects are dead or dying.
...
Moreover, the implementation is now O(1) rather than O(n).
Thanks to Yury Selivanov for reporting.
2012-03-01 16:28:14 +01:00
Antoine Pitrou
bbe2f60b3c
Issue #14159 : Fix the len() of weak containers (WeakSet, WeakKeyDictionary, WeakValueDictionary) to return a better approximation when some objects are dead or dying.
...
Moreover, the implementation is now O(1) rather than O(n).
Thanks to Yury Selivanov for reporting.
2012-03-01 16:26:35 +01:00
Philip Jenvey
d7aff2d696
update skip reason
2012-02-29 16:21:25 -08:00
Philip Jenvey
e308b7c0c0
also skip test_device_encoding when stdin isn't a tty
2012-02-29 16:16:15 -08:00
Brett Cannon
efb00c0cc1
Issue #14153 Create _Py_device_encoding() to prevent _io from having to import
...
the os module.
2012-02-29 18:31:31 -05:00
Ezio Melotti
aba0b13f0a
#14089 : merge with 3.2.
2012-02-29 14:06:56 +02:00
Ezio Melotti
682d37423d
#14089 : increase coverage of the fractions module. Patch by Oleg Plakhotnyuk.
2012-02-29 14:05:53 +02:00
Ezio Melotti
0b8123d8ae
#10713 : merge with 3.2.
2012-02-29 11:49:45 +02:00
Ezio Melotti
5a045b9f54
#10713 : Improve documentation for \b and \B and add a few tests. Initial patch and tests by Martin Pool.
2012-02-29 11:48:44 +02:00
Nadeem Vawda
3692453a2d
Merge: Give better failure messages in test_strptime (cf. issue #14113 ).
2012-02-29 00:24:46 +02:00
Nadeem Vawda
aba2b06001
Give better failure messages in test_strptime (cf. issue #14113 ).
2012-02-29 00:22:09 +02:00
Vinay Sajip
19b1d50732
Added additional diagnostics to help with #12151 .
2012-02-28 19:02:43 +00:00
Antoine Pitrou
9a4d7ddb6c
More debug output
2012-02-27 22:01:25 +01:00
Antoine Pitrou
ffd85c8182
Improve debugging output for test failure
2012-02-27 20:04:05 +01:00
Stefan Krah
0509d9418a
Issue #14113 : Fix a test_strptime failure caused by changes to LC_ALL.
2012-02-27 10:18:51 +01:00
Antoine Pitrou
f12b4475cc
Merge
2012-02-27 01:01:44 +01:00
Antoine Pitrou
70d2717f2e
Issue #13521 : dict.setdefault() now does only one lookup for the given key, making it "atomic" for many purposes.
...
Patch by Filip Gruszczyński.
2012-02-27 00:59:34 +01:00
Antoine Pitrou
e965d97ed1
Issue #13521 : dict.setdefault() now does only one lookup for the given key, making it "atomic" for many purposes.
...
Patch by Filip Gruszczyński.
2012-02-27 00:45:12 +01:00
Nadeem Vawda
05a4dd83af
Issue #13873 : Fix crash in test_zlib when running on a small (<4GB) tmpfs.
2012-02-27 00:42:58 +02:00
Antoine Pitrou
4f92a68a81
Issue #14080 : fix sporadic test_imp failure. Patch by Stefan Krah.
2012-02-26 18:09:50 +01:00
Charles-François Natali
9578757ec4
Issue #14107 : test: Fix a deadlock involving the memory watchdog thread.
2012-02-26 17:27:32 +01:00
Nick Coghlan
ab7bf2143e
Close issue #6210 : Implement PEP 409
2012-02-26 17:49:52 +10:00
Ezio Melotti
cda6b6d60d
#14081 : The sep and maxsplit parameter to str.split, bytes.split, and bytearray.split may now be passed as keyword arguments.
2012-02-26 09:39:55 +02:00
Éric Araujo
f71654521b
Merge from 3.2
2012-02-25 17:26:44 +01:00
Éric Araujo
b46562480b
Add test file for scripts in Tools ( #13447 ).
...
When people find bugs in scripts such as reindent.py, msgfmt.py or
pygettext.py, we have to try to reproduce the bug manually, apply a fix
and test manually again. The alternative is to only read the code and
trust that it works. This test file is a way to stop that
unsatisfactory state of things and write proper unit tests instead.
2012-02-25 16:57:04 +01:00
Nadeem Vawda
afdac030e3
Use assertEqual in test_strptime for better failure messages (cf. issue #14113 ).
2012-02-25 15:58:36 +02:00
Stefan Krah
9a2d99e28a
- Issue #10181 : New memoryview implementation fixes multiple ownership
...
and lifetime issues of dynamically allocated Py_buffer members (#9990 )
as well as crashes (#8305 , #7433 ). Many new features have been added
(See whatsnew/3.3), and the documentation has been updated extensively.
The ndarray test object from _testbuffer.c implements all aspects of
PEP-3118, so further development towards the complete implementation
of the PEP can proceed in a test-driven manner.
Thanks to Nick Coghlan, Antoine Pitrou and Pauli Virtanen for review
and many ideas.
- Issue #12834 : Fix incorrect results of memoryview.tobytes() for
non-contiguous arrays.
- Issue #5231 : Introduce memoryview.cast() method that allows changing
format and shape without making a copy of the underlying memory.
2012-02-25 12:24:21 +01:00
Victor Stinner
6f73874edd
Close #14095 : type.__new__() doesn't remove __qualname__ key from the class
...
dict anymore if the key is present. Reject also non-string qualified names.
And fix reference leaks in type.__new__().
2012-02-25 01:22:36 +01:00
Victor Stinner
abc649ddbe
Issue #14107 : fix bigmem tests on str.capitalize(), str.swapcase() and
...
str.title(). Compute correctly how much memory is required for the test
(memuse).
2012-02-25 00:43:27 +01:00
Victor Stinner
90f50d4df9
Issue #13706 : Fix format(float, "n") for locale with non-ASCII decimal point (e.g. ps_aF)
2012-02-24 01:44:47 +01:00
Victor Stinner
41a863cb81
Issue #13706 : Fix format(int, "n") for locale with non-ASCII thousands separator
...
* Decode thousands separator and decimal point using PyUnicode_DecodeLocale()
(from the locale encoding), instead of decoding them implicitly from latin1
* Remove _PyUnicode_InsertThousandsGroupingLocale(), it was not used
* Change _PyUnicode_InsertThousandsGrouping() API to return the maximum
character if unicode is NULL
* Replace MIN/MAX macros by Py_MIN/Py_MAX
* stringlib/undef.h undefines STRINGLIB_IS_UNICODE
* stringlib/localeutil.h only supports Unicode
2012-02-24 00:37:51 +01:00
Nadeem Vawda
197e22c1d7
Simplify zlib bigmem tests.
2012-02-23 14:23:17 +02:00
Nadeem Vawda
bc8c8175cc
Fix previous fix (for test_zlib) to work on 32-bit systems.
2012-02-23 14:16:15 +02:00
Nadeem Vawda
b063a48406
Issue #13873 : Fix crash in test_zlib on bigmem buildbot.
2012-02-23 13:36:25 +02:00
Ross Lagerwall
e7ad419058
Fix sporadic test_subprocess regression introduced by 834650d63130.
2012-02-22 06:02:07 +02:00
Antoine Pitrou
c09424255a
Fix (presumably) test_hash under big-endian systems (PPC).
2012-02-22 03:33:56 +01:00