Commit Graph

20480 Commits

Author SHA1 Message Date
Senthil Kumaran e53d977e80 Explain the use of charset parameter with Content-Type header: issue11082 2012-03-15 18:15:34 -07:00
Senthil Kumaran 6b3434ae04 Explain the use of charset parameter with Content-Type header. Issue11082 2012-03-15 18:11:16 -07: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
Senthil Kumaran 3270d11d8a port from 3.2 - Fix the urllib closing issue which hangs on particular ftp urls/ftp servers. closes issue11199 2012-03-15 13:28:27 -07:00
Senthil Kumaran 73277fe0eb closes Issue #11199: Fix the with urllib which hangs on particular ftp urls. 2012-03-15 13:26:12 -07:00
Giampaolo Rodola' a4e018889a (sched) when run() is invoked with blocking=False return the deadline of the next scheduled call in the scheduler; this use case was suggested in http://bugs.python.org/issue1641#msg149453 2012-03-15 13:05:41 +01:00
Vinay Sajip 17160fd6d6 Fixes #14314: Improved SMTP timeout handling. 2012-03-15 12:02:08 +00:00
Victor Stinner 3d7c878fe3 Issue #14222: Use the new time.steady() function instead of time.time() for
timeout in queue and threading modules to not be affected of system time
update.
2012-03-15 01:22:16 +01: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
Benjamin Peterson 1a5e5de818 remove get_prefix and set_prefix (#13248) 2012-03-14 17:41:15 -05:00
Michael Foord d7c65e2807 Removed XXX from unittest.mock docstring and switch to a nicer try...except...finally 2012-03-14 14:56:54 -07:00
Michael Foord a74b3aa0cc Remove more Python 2 compatibility cruft from unittest.mock 2012-03-14 14:40:22 -07:00
Senthil Kumaran e7c8fdee18 merge heads 2012-03-14 14:00:31 -07:00
Senthil Kumaran 2f9bf35007 Fix the buildbot breakdown - issue 10050 2012-03-14 13:59:56 -07:00
Andrew Svetlov 8247b188f3 Megre from tip 2012-03-14 13:46:08 -07:00
Andrew Svetlov b53da6e374 Merge from tip 2012-03-14 13:44:02 -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
Michael Foord c17adf4151 Remove Python 2 compatibility cruft from unittest.mock 2012-03-14 13:30:29 -07:00
Andrew Svetlov 05bab93339 Issue #14200: Idle shell crash on printing non-BMP unicode character.
UnicodeEncodeError is raised for strings contains non-BMP characters.
For eval results unicode escaping is used, print() calls display
exception with traceback as usual.
2012-03-14 13:22:12 -07:00
Michael Foord ebff097937 And another one... mock import fix. 2012-03-14 13:01:31 -07:00
Michael Foord 83a16856ee Fix another mock import 2012-03-14 12:58:46 -07:00
Michael Foord 0ca9acd1dd Fix import failure in mock test 2012-03-14 12:38:06 -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
Michael Foord 345266aa7e PEP 417: Adding unittest.mock 2012-03-14 12:24:34 -07: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 9fd170e2d0 #14062: fix BytesParser handling of linesep for Header objects
This also affected smtplib.SMTP.send_message, which calls BytesParser.
2012-03-14 14:05:03 -04:00
Antoine Pitrou 9d8c186650 Issue #13839: When invoked on the command-line, the pstats module now accepts several filenames of profile stat files and merges them all.
Patch by Matt Joiner.
2012-03-14 17:47:11 +01: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
Andrew Svetlov a2251aadaa Issue #989712: Support using Tk without a mainloop. 2012-03-13 18:36:13 -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
Martin v. Löwis eb945a938d Issue #5219: Prevent event handler cascade in IDLE.
Patch by Roger Serwy.
2012-03-13 14:32:29 -07:00
Martin v. Löwis ee381a0c36 Issue #5219: Prevent event handler cascade in IDLE.
Patch by Roger Serwy.
2012-03-13 14:18:36 -07:00
Martin v. Löwis 5c3c424237 Issue #2843: Add new Tk API to Tkinter.
Patch by Guilherme Polo and Andrew Svetlov.
2012-03-13 13:40:42 -07: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
Vinay Sajip 69437da15f Merged upstream change. 2012-03-13 12:18:19 +00:00
Vinay Sajip 3cac309939 Merged upstream change. 2012-03-13 12:15:46 +00:00
Vinay Sajip 0f15181d39 Closes #14267: Merged fix from 3.2. 2012-03-13 12:15:09 +00:00
Vinay Sajip 27f48979ca Closes #14267: Corrected computation of rollover filename. 2012-03-13 12:10:33 +00: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
Michael Foord 5738e4f3df Merge 2012-03-13 00:14:19 -07:00
Michael Foord e01c62cd6b Fix unittest test discovery for Jython 2012-03-13 00:09:54 -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
Martin v. Löwis 2b695a4678 Issue #1178863: Separate initialisation from setting when initializing
Tkinter.Variables; harmonize exceptions to ValueError; only delete variables
that have not been deleted; assert that variable names are strings
Patch by Andrew Svetlov.
2012-03-12 17:47:35 -07: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 f2bb8898ea Merge heads. 2012-03-12 15:29:06 -07: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
Michael Foord 56bac7b9e1 Merge 2012-03-12 15:25:12 -07:00
Michael Foord b36c70c9ff Move adding unittest test discovery command line options into their own method. 2012-03-12 15:24:46 -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
Michael Foord c1f5d8af57 Merge 2012-03-12 13:54:03 -07:00
Michael Foord 5f99ced092 Refactor unittest command line handling to always use optparse 2012-03-12 13:53:04 -07: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
Georg Brandl 4c7c3c58be Close #14210: add command argument completion to pdb: complete file names, global/local variables, aliases 2012-03-10 22:36:48 +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
Georg Brandl 6aacc14e29 Merge with 3.2. 2012-03-10 09:27:30 +01:00
Georg Brandl e144c74e02 Closes #14244: add info about capturing groups and maxsplit to the docstring of re.split(). 2012-03-10 09:26:53 +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 1ae230aa1a merge heads 2012-03-07 14:50:35 -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
Éric Araujo 2fa0cbc9ae Remove buggy change for #13719 in packaging 2012-03-07 20:56:18 +01:00
Éric Araujo 00b41fc828 Merge 3.2 2012-03-07 20:50:06 +01:00
Éric Araujo a420c820fe Backout buggy patch committed for #13719 2012-03-07 20:48:55 +01:00
Brett Cannon f67e494ca8 merge 2012-03-06 15:33:24 -05: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