Commit Graph

18675 Commits

Author SHA1 Message Date
Antoine Pitrou cc7715f8ae Merge heads 2012-11-11 19:40:38 +01:00
Antoine Pitrou e11fecb5a9 Issue #16453: Fix equality testing of dead weakref objects.
Also add tests for ordering and hashing.
2012-11-11 19:36:51 +01:00
Gregory P. Smith e27faac45f Refactor test_preexec_errpipe to not create an uncollectable reference cycle. 2012-11-11 09:59:27 -08:00
Nadeem Vawda 19e568d254 Issue #15677: Document that zlib and gzip accept a compression level of 0 to mean 'no compression'.
Patch by Brian Brazil.
2012-11-11 14:04:14 +01:00
Gregory P. Smith 12489d98e6 Fixes issue #16140: The subprocess module no longer double closes its
child subprocess.PIPE parent file descriptors on child error prior to
exec().

This would lead to race conditions in multithreaded programs where
another thread opened a file reusing the fd which was then closed out
from beneath it by the errant second close.
2012-11-11 01:37:02 -08:00
Gregory P. Smith 3aee222122 Remove the subprocess "bad exception data" warning (formerly a print!)
all together and just include the repr of the data in the exception
itself instead of the useless string "Unknown".

This code path is unlikely to even be possible to take given the
nature of the pipe it gets subprocess data from.
2012-11-11 00:04:13 -08:00
Gregory P. Smith f44c9da166 Rename a local variable for readability and change a "this can't
happen" print() call into a RuntimeWarning as it should've been in the
first place.  Because nothing should ever cause unexpected stdout output.
2012-11-10 23:33:17 -08:00
Gregory P. Smith 3d8e776cd9 Fixes issue #16327: The subprocess module no longer leaks file descriptors
used for stdin/stdout/stderr pipes to the child when fork() fails.
2012-11-10 22:32:22 -08:00
Gregory P. Smith 2ec82331b2 Fixes issue #14396: Handle the odd rare case of waitpid returning 0 when
not expected in subprocess.Popen.wait().
2012-11-10 20:52:29 -08:00
Nadeem Vawda 7ee955550b Issue #16411: Fix a bug where zlib.decompressobj().flush() might try to access previously-freed memory.
Patch by Serhiy Storchaka.
2012-11-11 03:15:32 +01:00
Nadeem Vawda ee7889dec3 Issue #16350, part 2: Set unused_data (and unconsumed_tail) correctly in decompressobj().flush().
Additionally, fix a bug where a MemoryError in allocating a bytes object could
leave the decompressor object in an invalid state (with its unconsumed_tail
member being NULL).

Patch by Serhiy Storchaka.
2012-11-11 02:14:36 +01:00
Antoine Pitrou 5c89b4ec55 Issue #16357: fix calling accept() on a SSLSocket created through SSLContext.wrap_socket().
Original patch by Jeff McNeil.
2012-11-11 01:25:36 +01:00
Ezio Melotti 90eea97a33 #16433: fix docstring of assertNotEqual. 2012-11-08 11:08:39 +02:00
Hynek Schlawack 5c6b3e214c Issue #15001: fix segfault on "del sys.module['__main__']"
Patch by Victor Stinner.
2012-11-07 09:02:24 +01:00
Nick Coghlan 692b023f77 Record a known crasher from #6717 2012-11-05 21:26:57 +10:00
Nadeem Vawda 39079946a2 Issue #16350: Fix zlib decompressor handling of unused_data with multiple calls to decompress() after EOF.
Patch by Serhiy Storchaka.
2012-11-05 00:37:42 +01:00
Ezio Melotti 6c5f5210be #5057: the peepholer no longer optimizes subscription on unicode literals (e.g. u"foo"[0]) in order to produce compatible pyc files between narrow and wide builds. 2012-11-05 00:06:32 +02:00
Mark Dickinson 8cd1c7681d Issue #16402: In range slicing, fix shadowing of exceptions from __index__ method. 2012-11-04 11:46:17 +00:00
Ezio Melotti 540da76115 #16336: fix input checking in the surrogatepass error handler. Patch by Serhiy Storchaka. 2012-11-03 23:03:39 +02:00
Ezio Melotti c64bcbec4b #8401: assigning an int to a bytearray slice (e.g. b[3:4] = 5) now raises an error. 2012-11-03 21:19:06 +02:00
Ezio Melotti 0941d9fc64 #12759: sre_parse now raises a proper error when the name of the group is missing. Initial patch by Serhiy Storchaka. 2012-11-03 20:33:08 +02:00
Ezio Melotti 2cc3b4ba9f #16152: fix tokenize to ignore whitespace at the end of the code when no newline is found. Patch by Ned Batchelder. 2012-11-03 17:38:43 +02:00
Andrew Svetlov d183767ca4 Issue #1207589: Add Cut/Copy/Paste items to IDLE right click Context Menu
Patch by Todd Rovito.
2012-11-01 22:41:19 +02:00
Antoine Pitrou e4ad37e50e Issue #16230: Fix a crash in select.select() when one the lists changes size while iterated on.
Patch by Serhiy Storchaka.
2012-11-01 20:13:54 +01:00
Antoine Pitrou 9f69e79c45 Issue #16228: Fix a crash in the json module where a list changes size while it is being encoded.
Patch by Serhiy Storchaka.
2012-11-01 19:52:06 +01:00
Andrew Svetlov 42d5c41522 Change docstring for xdrlib.Error to use new style exceptions. 2012-11-01 13:43:06 +02:00
Andrew Svetlov bcac6ad1f3 Issue #16373: Prevent infinite recursion for ABC Set class operations. 2012-11-01 13:28:54 +02:00
Andrew Svetlov eda1f4cf07 Issue #16377: Fix bisect unittest.
Patch by Yury Selivanov.
2012-10-31 22:37:50 +02:00
Benjamin Peterson d1f2cb37a2 only fast-path fromkeys() when the constructor returns a empty dict (closes #16345) 2012-10-31 14:05:55 -04:00
Nadeem Vawda a1952d4120 Add test for BZ2Decompressor.decompress("") after end of stream. 2012-10-28 15:20:48 +01:00
Andrew Svetlov 21b102481b merge heads 2012-10-28 14:12:50 +02:00
Andrew Svetlov 2ec53be2e2 Issue #14570: Document json sort_keys parameter properly.
Patch by Chris Rebert.
2012-10-28 14:10:30 +02:00
Mark Dickinson fb90c0934c Issue #14700: Fix buggy overflow checks for large precision and width in new-style and old-style formatting. 2012-10-28 10:18:03 +00:00
Georg Brandl 579d5cd643 changeset: 80007:49e4541f2aef
parent: 80003:be83cbf4a789
parent: 80006:32df036e6b75
user: Georg Brandl <georg@python.org>
date: Sun Oct 28 10:50:11 2012 +0100
summary: merge with 3.3
2012-10-28 10:51:35 +01:00
R David Murray c3bf78a212 #15889: make regrtest --start succeed in more cases.
Patch by Chris Jerdonek.
2012-10-27 17:07:05 -04:00
R David Murray 252cd0e4e0 #12890: don't emit <p> tags in text mode when logdir specified.
Patch by Jeff McNeil.
2012-10-27 14:42:47 -04:00
R David Murray f9333026f7 #15043: Improve test_gdb support of gdb >= 7.4.
Instead of requiring the tester to manually add the path to the python-gdb.py
file in the checkout to their .gdbinit file, add it automatically when
invoking gdb in the test.
2012-10-27 13:22:41 -04:00
Senthil Kumaran cad7b31467 Issue #16250: Fix URLError invocation with proper args. 2012-10-27 02:26:46 -07:00
Philip Jenvey 45c41494bf bounds check for bad data (thanks amaury) 2012-10-26 17:01:53 -07:00
Ned Deily fdf0f274e6 Issue #15853: Prevent IDLE crash on OS X when opening Preferences menu
with certain versions of Tk 8.5.  Initial patch by Kevin Walzer.
2012-10-22 15:14:31 -07:00
Nadeem Vawda 5f8f0d6777 Issue #14398: Fix size truncation and overflow bugs in bz2 module. 2012-10-21 21:13:27 +02:00
Antoine Pitrou 66510fedb4 Fix whacky spacking in test_wsgiref 2012-10-21 14:13:32 +02:00
Antoine Pitrou ae247a5ff6 Issue #16220: wsgiref now always calls close() on an iterable response.
Patch by Brent Tubbs.
2012-10-21 14:09:05 +02:00
Ned Deily 2778d0d147 Issue #10405: Document IDLE context menus in Standard Library document
and IDLE Help file.  (Thanks to Nick ODell and Todd Rovito for suggestions.)
Update Debug menu options in docs to match current code plus various other
minor IDLE doc and help edits.
2012-10-20 13:25:34 -07:00
Nick Coghlan 62b4136277 Fix broken test and replace redundant generator with a tuple 2012-10-20 00:03:46 +10:00
Nick Coghlan c71b4c7198 Issue #6074: Actually delete the source file in the test as intended 2012-10-19 23:38:36 +10:00
Nick Coghlan 34937ce249 Issue #6074: Forward port Windows read-only source file fix from 2.7 2012-10-19 22:38:14 +10:00
Giampaolo Rodola' 2d51f687e1 Fix issue #16270: urllib may hang when used for retrieving files via FTP by using a context manager. 2012-10-19 13:40:28 +02:00
Trent Nelson 45bb613e25 Issue #16257: make test_create_connection() handle ENETUNREACH. 2012-10-17 06:15:15 -04:00
Antoine Pitrou 3ed2cb5520 Also add tests for TextIOWrapper.writelines() (issue #15744). 2012-10-16 23:02:27 +02:00
Antoine Pitrou 131a489903 Add tests for the writelines() method of file objects.
Original patch by Felipe Cruz.
2012-10-16 22:57:11 +02:00
Vinay Sajip ee892b9226 Issue #16244: Remove file mode overrides. 2012-10-16 10:28:31 +01:00
Benjamin Peterson 7a9953edfb skip if __doc__ is gone 2012-10-12 11:44:19 -04:00
Benjamin Peterson 951a9e381b fix to work if __doc__ is removed 2012-10-12 11:44:10 -04:00
Brian Curtin 0b960f5a58 Fix #16176. Properly identify Windows 8 via platform.platform()
Add handling of the 6.2 release line, aka Windows 8 and Windows 2012 Server.
2012-10-11 16:07:52 -05:00
Gregory P. Smith 5591b02a4c Fixes Issue #16114: The subprocess module no longer provides a
misleading error message stating that args[0] did not exist when
either the cwd or executable keyword arguments specified a path that
did not exist.

It now keeps track of if the child got as far as preexec and reports it if
not back to the parent via a special "noexec" error message value in
the error pipe so that the cwd can be blamed for a failed chdir
instead of the exec of the executable being blamed instead.

The executable is also always reported accurately when exec fails.

Unittests enhanced to cover these cases.
2012-10-10 03:34:47 -07:00
Vinay Sajip b5ca932be2 Issue #16168: Use specified socket type for domain sockets in SysLogHandler. 2012-10-09 08:19:25 +01:00
Andrew Svetlov c3e5b10ae7 Issue #14900: Add aliases for sorting params for pstat to follow column names from pstat output.
Patch by Arne Babenhauserheide.
2012-10-07 19:18:39 +03:00
Andrew Svetlov 2ef4584e6d Issue #14900: Distuguish call count and primitive call count in pstat output.
Patch by Arne Babenhauserheide.
2012-10-07 18:58:42 +03:00
Andrew Svetlov b2209ccfa0 revert accidental inclusion of subprocess tests 2012-10-06 18:45:24 +03:00
Andrew Svetlov afbf90c993 Issue #16025: Minor corrections to the zipfile documentation.
Patch by Serhiy Storchaka.
2012-10-06 18:02:05 +03:00
Jesus Cea 685fffa8f4 #16112: platform.architecture does not correctly escape argument to /usr/bin/file. Fix original patch 2012-10-05 05:21:42 +02:00
Jesus Cea adc8211e00 #16112: platform.architecture does not correctly escape argument to /usr/bin/file. Use 'communicate()' and decode the bytes 2012-10-05 04:58:38 +02:00
Andrew Svetlov 4ca222d4d5 Issue #14997: disable <F5> in idle shell window.
Thanks to Roger Serwy for patch.
2012-10-04 22:48:34 +03:00
Jesus Cea fc990e942f Closes #16112: platform.architecture does not correctly escape argument to /usr/bin/file 2012-10-04 13:51:43 +02:00
Chris Jerdonek c2cd626497 Issue #15533: Skip test_cwd_with_relative_*() tests on Windows pending resolution of issue. 2012-09-30 09:45:00 -07:00
Chris Jerdonek ec3ea94251 Issue #15533: Clarify docs and add tests for subprocess.Popen()'s cwd argument. 2012-09-30 00:10:28 -07:00
Antoine Pitrou f727082b71 Speed up test_httpservers by avoiding a one-second cleanup wait after each test case. 2012-09-30 01:05:30 +02:00
Gregory P. Smith 3905171f1e Fixes issue #15756: subprocess.poll() now properly handles errno.ECHILD
to return a returncode of 0 when the child has already exited or cannot
be waited on.
2012-09-29 11:40:38 -07:00
Michael Foord 7a1901f861 Closes issue #12376 : Pass on parameters in unittest.TextTestResult.__init__ super call 2012-09-28 14:14:03 +01:00
Petri Lehtinen f39884bb5a #15222: Insert blank line after each message in mbox mailboxes 2012-09-25 22:02:06 +03:00
Petri Lehtinen 468091954f #15222: test_mailbox: End message template in a newline 2012-09-25 21:58:51 +03:00
Benjamin Peterson 1654d74e9a switch assertion to an explicit ValueError 2012-09-25 11:48:50 -04:00
Benjamin Peterson a820c7ca70 fix test_compileall when run with -O[O] 2012-09-25 11:42:35 -04:00
Benjamin Peterson d388c4e02f use modern conditional syntax 2012-09-25 11:01:41 -04:00
Senthil Kumaran 67b7b98a47 Issue #16013: Fix CSV Reader parsing issue with ending quote characters. Patch by Serhiy Storchaka. 2012-09-25 02:30:27 -07:00
Christian Heimes e26d3af7ee Issue #16012: Fix a regression in pyexpat. The parser's UseForeignDTD()
method doesn't require an argument again.
2012-09-24 13:17:08 +02:00
Antoine Pitrou 6f80f5d444 Issue #15379: Fix passing of non-BMP characters as integers for the charmap decoder (already working as unicode strings).
Patch by Serhiy Storchaka.
2012-09-23 19:55:21 +02:00
Ezio Melotti 85710a40e7 #15421: fix an OverflowError in Calendar.itermonthdates() after datetime.MAXYEAR. Patch by Cédric Krier. 2012-09-21 17:26:35 +03:00
Ezio Melotti e418d76089 #15304: fix wrong warning message in test.support.temp_cwd(). 2012-09-21 16:48:12 +03:00
Ezio Melotti 0847db7c01 #15980: properly escape newlines in docstrings. Patch by Serhiy Storchaka. 2012-09-21 16:30:22 +03:00
Benjamin Peterson f8a9a837c4 remove gdb noise about linux-vdso 2012-09-20 23:48:23 -04:00
Alexander Belopolsky 3ec153681e Issue #15973: Fixed segmentation fault on timezone comparison to other types. 2012-09-20 16:39:33 -04:00
Ezio Melotti c90111f9ab #15970: xml.etree.ElementTree now serializes correctly the empty HTML elements "meta" and "param". 2012-09-19 08:19:12 +03:00
Antoine Pitrou 8a53dbeb7a Issue #15526: try to fix test_startfile's inability to clean up after itself in time.
Patch by Jeremy Kloth.
2012-09-16 00:12:50 +02:00
Antoine Pitrou 1e7ee9dfa0 Issue #15842: the SocketIO.{readable,writable,seekable} methods now raise ValueError when the file-like object is closed.
Patch by Alessandro Moura.
2012-09-14 17:28:10 +02:00
Barry Warsaw 2dceb359cb Update merge from 2.7: s/basetring/str 2012-09-12 14:42:34 -04:00
Barry Warsaw eaae1b76ae A follow up for issue #15906: change the test for calling the type conversion
on the action's default, reverting it back to previous behavior.  Conversion
is only done on string defaults.

Add a test for this and another test that ensures such type conversions are
only called once.
2012-09-12 14:34:50 -04:00
Barry Warsaw 4b2f9e914d - Issue #15906: Fix a regression in argparse caused by the preceding change,
when action='append', type='str' and default=[].
2012-09-11 22:38:47 -04:00
Jesus Cea c8754a13e6 Closes #15793: Stack corruption in ssl.RAND_egd() 2012-09-11 02:00:58 +02:00
Jesus Cea 1f2799bef4 #15676: mmap: add empty file check prior to offset check <- Previous patch was incomplete 2012-09-10 22:49:50 +02:00
R David Murray 5abd76a75d #14649: clarify DocTestSuite error when there are no docstrings.
Also adds tests to verify the documented behavior (which is probably a bug, as
indicated in the added comments).

Patch by Chris Jerdonek.
2012-09-10 10:15:58 -04:00
doko@ubuntu.com 01beb69c7d backport from the trunk, to fix test_tools with srcdir != builddir
changeset:   77827:c23b442b5d5e
	user:        Antoine Pitrou <solipsis@pitrou.net>
	date:        Thu Jun 28 01:20:26 2012 +0200
	summary:     Avoid using scrdir, it's broken.

	changeset:   77826:f0e58e778215
	user:        Neil Schemenauer <nas@arctrix.com>
	date:        Wed Jun 27 15:58:37 2012 -0600
	summary:     Fix bug in test_tools that prevented building is separate directory.
2012-09-10 14:19:42 +02:00
Jesus Cea 941bfcc537 Closes #15676: mmap: add empty file check prior to offset check 2012-09-10 00:27:55 +02:00
Alexander Belopolsky 5bedef3e64 Issue #15881: Fixed 3.2 backport. 2012-09-09 13:31:08 -04:00
Alexander Belopolsky 36351564a2 Fixed whitespace 2012-09-09 13:22:45 -04:00
Alexander Belopolsky 59fb38b582 Issue #15881: Fixed atexit hook in multiprocessing. 2012-09-09 13:16:15 -04:00
Ned Deily 47bcfff26b Issue #15822: Fix installation of lib2to3 grammar pickles to ensure
they are created in the install locations and with the proper timestamp.
(Solution suggested by MvL)
2012-09-08 18:50:56 -07:00
R David Murray 1585b70813 #15510: clarify textwrap's handling of whitespace, and add confirming tests.
Patch by Chris Jerdonek.
2012-09-08 13:13:25 -04:00
R David Murray b522828d2a #15847: allow args to be a tuple in parse_args
This fixes a regression introduced by the fix for issue #13922.  Although args
is not documented as being allowed to be a tuple, previously this worked and
so naturally there are programs in the field that depend on it.

Patch by Zbyszek Jędrzejewski-Szmek.
2012-09-08 12:08:01 -04:00