Commit Graph

20420 Commits

Author SHA1 Message Date
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