Commit Graph

21805 Commits

Author SHA1 Message Date
Benjamin Peterson 3331a20464 merge 3.2 2012-09-25 11:53:30 -04: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 0beb4d28d0 don't depend on __debug__ because it's baked in at freeze time (issue #16046) 2012-09-25 11:22:59 -04:00
Benjamin Peterson feaa54f537 don't depend on __debug__ because it's baked in at freeze time (issue #16046) 2012-09-25 11:22:59 -04:00
Benjamin Peterson d79ac0fad7 merge 3.2 2012-09-25 11:03:27 -04:00
Benjamin Peterson d388c4e02f use modern conditional syntax 2012-09-25 11:01:41 -04:00
Senthil Kumaran 49d130227b merge 3.2: Issue #16013: Fix CSV Reader parsing issue with ending quote characters. Patch by Serhiy Storchaka. 2012-09-25 02:37:20 -07: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 22340be15e Issue #16012: Fix a regression in pyexpat. The parser's UseForeignDTD()
method doesn't require an argument again.
2012-09-24 13:27:28 +02: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
Georg Brandl b5f91d7eb7 Merge with 3.3.0 release clone. 2012-09-24 07:46:35 +02:00
Antoine Pitrou a1f7655fa7 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 20:00:04 +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
Georg Brandl 8506d3591c Bump to 3.3.0rc3. 2012-09-23 17:15:21 +02:00
Victor Stinner a3ff101e6a Issue #5969: faulthandler module: rename dump_tracebacks_later() to
dump_traceback_later() and cancel_dump_tracebacks_later() to
cancel_dump_traceback_later().
2012-09-23 11:06:21 +02:00
R David Murray 752a2241ea #15925: fix regression: return None for null and non-date strings.
Since the logic for null detection had to move into the _parseaddr
functions, I removed the wrappers from email.utils and just import the
_parseaddr functions directly.
2012-09-22 09:59:51 -04:00
Ezio Melotti f82b9371f5 #15421: merge with 3.2. 2012-09-21 17:29:20 +03: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 050a61f838 #15304: merge with 3.2. 2012-09-21 16:53:07 +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 8b15ee0d6e #15980: merge with 3.2. 2012-09-21 16:31:24 +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 61cdcf5d7e merge 3.2 2012-09-20 23:49:33 -04:00
Benjamin Peterson f8a9a837c4 remove gdb noise about linux-vdso 2012-09-20 23:48:23 -04:00
Alexander Belopolsky 9b9ed867bc merged 3.2 2012-09-20 16:42:34 -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 ab9b661fdd #15970: merge with 3.2. 2012-09-19 08:25:01 +03: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 07085332cf Issue #15526: try to fix test_startfile's inability to clean up after itself in time.
Patch by Jeremy Kloth.
2012-09-16 00:13:10 +02: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 9b1c84b586 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:30:31 +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
Richard Oudkerk e8cd6bb127 Issue #15881: Clarify comment in exit function 2012-09-13 17:27:15 +01:00
Stefan Krah 0b90d66342 Issue #15599: FreeBSD on KVM cannot handle a very low switch interval. 2012-09-12 21:30:09 +02:00
Barry Warsaw d89774e158 Merge 3.2 fix updates and tests for issue #15906. 2012-09-12 15:31:38 -04: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 0ae066b281 - Issue #15906: Fix a regression in argparse caused by the preceding change,
when action='append', type='str' and default=[].
2012-09-12 00:12:29 -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 b7a2800831 MERGE: Closes #15793: Stack corruption in ssl.RAND_egd() 2012-09-11 02:08:48 +02:00
Jesus Cea c8754a13e6 Closes #15793: Stack corruption in ssl.RAND_egd() 2012-09-11 02:00:58 +02:00
Jesus Cea 4886d5b338 #15676: mmap: add empty file check prior to offset check <- Previous patch was incomplete 2012-09-10 22:50:21 +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
Stefan Krah 76e12179c5 Issue #15882: Change _decimal to accept any coefficient tuple when
constructing infinities. This is done for backwards compatibility
with decimal.py: Infinity coefficients are undefined in _decimal
(in accordance with the specification).
2012-09-10 19:34:58 +02:00
R David Murray c3bfb01a95 Merge #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:16:46 -04: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
Christian Heimes 7b648753ab Added test for 85cb90f79cbf and see how the code handles all flags at once 2012-09-10 14:48:43 +02: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
Georg Brandl 0085a24075 Closes #15973: fix a segmentation fault when comparing timezone objects. 2012-09-22 09:23:12 +02:00
Georg Brandl 1aca31e8f3 Closes #15925: fix regression in parsedate() and parsedate_tz() that should return None if unable to parse the argument. 2012-09-22 09:03:56 +02:00
Georg Brandl deb92b5b1b Closes #15969: rename new API to have consistent names in the faulthandler module. 2012-09-22 08:58:55 +02:00
Stefan Krah dbcf103be0 Issue #15882: Change _decimal to accept any coefficient tuple when
constructing infinities. This is done for backwards compatibility
with decimal.py: Infinity coefficients are undefined in _decimal
(in accordance with the specification).
2012-09-10 19:34:58 +02:00
Jesus Cea 1b3f3b0316 Closes #15676: mmap: add empty file check prior to offset check 2012-09-10 01:23:05 +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 7f704c11db Fixed whitespace 2012-09-09 13:25:06 -04:00
Alexander Belopolsky 36351564a2 Fixed whitespace 2012-09-09 13:22:45 -04:00
Alexander Belopolsky f36c49d124 Issue #15881: Fixed atexit hook in multiprocessing. 2012-09-09 13:20:58 -04:00
Alexander Belopolsky 59fb38b582 Issue #15881: Fixed atexit hook in multiprocessing. 2012-09-09 13:16:15 -04:00
Georg Brandl 5497295917 Merge in changes from 3.3.0rc2 release clone. 2012-09-09 11:19:17 +02:00
Ned Deily 4725b13ab3 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 19:04:47 -07: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 0fbbce99c3 Merge #15510: clarify textwrap's handling of whitespace, and add confirming tests.
Patch by Chris Jerdonek.
2012-09-08 13:14:58 -04: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 63755f3bd9 merge #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:14: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
Antoine Pitrou 5b4faae307 Issue #13992: The trashcan mechanism is now thread-safe. This eliminates
sporadic crashes in multi-thread programs when several long deallocator
chains ran concurrently and involved subclasses of built-in container
types.

Note that the trashcan functions are part of the stable ABI, therefore
they have to be kept around for binary compatibility of extensions.
2012-09-06 01:17:42 +02:00
Antoine Pitrou 56cd62c04a Issue #13992: The trashcan mechanism is now thread-safe. This eliminates
sporadic crashes in multi-thread programs when several long deallocator
chains ran concurrently and involved subclasses of built-in container
types.

Because of this change, a couple extension modules compiled for 3.2.4
(those which use the trashcan mechanism, despite it being undocumented)
will not be loadable by 3.2.3 and earlier. However, extension modules
compiled for 3.2.3 and earlier will be loadable by 3.2.4.
2012-09-06 00:59:49 +02:00
Antoine Pitrou 11946fbe80 Issue #15841: The readable(), writable() and seekable() methods of BytesIO
and StringIO objects now raise ValueError when the object has been closed.
Patch by Alessandro Moura.
2012-09-05 20:13:48 +02:00
Antoine Pitrou 1d857453b7 Issue #15841: The readable(), writable() and seekable() methods of BytesIO
and StringIO objects now raise ValueError when the object has been closed.
Patch by Alessandro Moura.
2012-09-05 20:11:49 +02:00
R David Murray 3561901cd9 #15557,#15447,#15509: webbrowser test suite added.
Initial patch by Anton Barkovsky, refined a bit by me to further subdivide the
test methods.  Provides tests for the previous two bug fix commits.
2012-09-03 12:52:08 -04:00
R David Murray 02ca144b92 #15447: Use subprocess.DEVNULL in webbrowser, instead of opening
This eliminates a ResourceWarning, since before webbrowser was
explicitly opening os.devnull and then leaving it open.  Tests
to follow.

Patch by Anton Barkovsky.
2012-09-03 12:44:29 -04:00
R David Murray d674a770e9 Merge #15509: If %action substitution produces a null string, drop it.
Patch by Anton Barkovsky, comment addition by me.

This shows up as a bug in 3.3 because the definition for Chrome
produces such an empty string.  Tests will follow.
2012-09-03 12:37:59 -04:00
R David Murray 94dd7cb0c7 #15509: If %action substitution produces a null string, drop it.
Patch by Anton Barkovsky, comment addition by me.

This showed up as a bug in 3.3 because the definition for Chrome
produced such an empty string.  This fix is tested in 3.3+;
backporting the new test suite is more trouble than it is worth.
2012-09-03 12:30:12 -04:00
Benjamin Peterson bd0df50fb6 get rid of ast_error_finish by passing the compiling struct to ast_error 2012-09-02 15:04:51 -04:00
Benjamin Peterson c7f447c89f merge 3.2 (#15846) 2012-09-02 14:24:44 -04:00
Benjamin Peterson 2e2c903700 prevert ast errors from being normalized before ast_error_finish is called (closes #15846) 2012-09-02 14:23:15 -04:00
Georg Brandl 02f66cbe87 Bump to 3.3.0rc2. 2012-09-09 08:56:46 +02:00
Ned Deily 24ec054ea1 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 19:04:47 -07:00
Antoine Pitrou 2b0218a259 Issue #13992: The trashcan mechanism is now thread-safe. This eliminates
sporadic crashes in multi-thread programs when several long deallocator
chains ran concurrently and involved subclasses of built-in container
types.

Because of this change, a couple extension modules compiled for 3.2.4
(those which use the trashcan mechanism, despite it being undocumented)
will not be loadable by 3.2.3 and earlier. However, extension modules
compiled for 3.2.3 and earlier will be loadable by 3.2.4.
2012-09-06 00:59:49 +02:00
Zbigniew Jędrzejewski-Szmek 55c206ab2f Fix bug with argparse.Parser.parse_args(*args) 2012-09-02 14:59:19 +02:00
Benjamin Peterson 6a42bd67d7 Make super() internal errors RuntimeError instead of SystemError (closes #15839) 2012-09-01 23:04:38 -04:00
Petri Lehtinen 6f858a2eea #15802: Fix test logic in TestMaildir.test_create_tmp 2012-09-01 14:27:24 +03:00
Petri Lehtinen 1c371b255f #15802: Fix test logic in TestMaildir.test_create_tmp 2012-09-01 14:22:36 +03:00
R David Murray 64b0ef1509 Merge #12776,#11839: call argparse type function only once.
Before, the type function was called twice in the case where the default
was specified and the argument was given as well.  This was especially
problematic for the FileType type, as a default file would always be
opened, even if a file argument was specified on the command line.

Patch by Arnaud Fontaine, with additional test by Mike Meyer.
2012-08-31 23:09:34 -04:00
R David Murray 6fb8fb17bf #12776,#11839: call argparse type function only once.
Before, the type function was called twice in the case where the default
was specified and the argument was given as well.  This was especially
problematic for the FileType type, as a default file would always be
opened, even if a file argument was specified on the command line.

Patch by Arnaud Fontaine, with additional test by Mike Meyer.
2012-08-31 22:45:20 -04:00
Brett Cannon f7d176efe9 Issue #15828: Don't try to close a file if imp.find_module() doesn't
return one.
2012-08-31 11:31:20 -04:00
Nick Coghlan 5d0612411e Issue #15828: Restore support for C extension modules in imp.load_module() 2012-09-01 00:13:45 +10:00
Brett Cannon 848cdfdf97 Issue #15828: Don't try to close a file if imp.find_module() doesn't
return one.
2012-08-31 11:31:20 -04:00
Nick Coghlan 91b9f139bc Issue #15828: Restore support for C extension modules in imp.load_module() 2012-09-01 00:13:45 +10:00
Antoine Pitrou 2a021c80ce Issue #15800: fix the closing of input / output files when gzip is used as a script. 2012-08-30 00:30:14 +02:00
Antoine Pitrou ecc4757b79 Issue #15800: fix the closing of input / output files when gzip is used as a script. 2012-08-30 00:29:24 +02:00
Victor Stinner 1d39cde50c Issue #15785: Modify window.get_wch() API of the curses module: return a
character for most keys, and an integer for special keys, instead of always
returning an integer. So it is now possible to distinguish special keys like
keypad keys.
2012-08-29 01:40:57 +02:00
Benjamin Peterson 4e07a8c9aa merge heads 2012-08-28 18:02:18 -04:00
Benjamin Peterson 59043f96ea merge 3.2 (#15801) 2012-08-28 18:01:45 -04:00
Benjamin Peterson 28a6cfaefc use the stricter PyMapping_Check (closes #15801) 2012-08-28 17:55:35 -04:00
Richard Oudkerk ea62bd50a3 Issue #15784: Modify OSError.__str__() to better distinguish between
errno error numbers and Windows error numbers.
2012-08-28 19:33:26 +01:00
Antoine Pitrou 5b9eccb383 Issue #15794: Relax a test case due to the deadlock detection's conservativeness. 2012-08-28 20:10:18 +02:00
Antoine Pitrou 0398985920 Issue #15781: Fix two small race conditions in import's module locking. 2012-08-28 00:24:52 +02:00