Commit graph

53852 commits

Author SHA1 Message Date
Michael Foord
ebff097937 And another one... mock import fix. 2012-03-14 13:01:31 -07:00
Michael Foord
be55566c25 Merge 2012-03-14 12:59:08 -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
Andrew Svetlov
c5ceb0aaaf Revert the patch for issue 3835 because failed on Windows buildbot
Windows build is compiled with no-threaded tcl/tk by default
2012-03-14 09:39:36 -07:00
Georg Brandl
846acf5c0c #14289: merge with 3.2 2012-03-14 08:18:59 +01:00
Georg Brandl
525fd5447d Closes #14289: put a link to the CHM download page on the docs download page. 2012-03-14 08:18:47 +01:00
Georg Brandl
5cd2767144 #14283: merge with 3.2 2012-03-14 08:07:29 +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
Georg Brandl
69c7a69cbe Closes #14283: match() and search() are regex methods, not match methods. 2012-03-14 08:02:43 +01: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
Georg Brandl
b20a019d46 Closes #14298: update section about dict implementation. 2012-03-14 07:50:17 +01:00
Gregory P. Smith
db66eba288 Avoid main_window unused compiler warning. 2012-03-13 23:21:53 -07:00
Senthil Kumaran
1725feabd0 default: closes Issue12365 - Add an example explaining the context manager use case of urllib.urlopen 2012-03-13 19:48:37 -07:00
Senthil Kumaran
21c71bac5f closes Issue12365 - Add an example explaining the context manager use case of urllib.urlopen 2012-03-13 19:47:51 -07: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
30c825c751 What's New in Python 3.3: Repeat the dict lookup change in Porting section 2012-03-14 00:40:57 +01:00
Victor Stinner
ecc6e6613f Fix doc of datetime.date*.*fromtimestamp() methods 2012-03-14 00:39:29 +01:00
Victor Stinner
b2a3773301 Issue #14180: Fix the select module to handle correctly the Windows timeval
structure. timeval.tv_sec is a long on Windows, not time_t.
2012-03-14 00:20:51 +01: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
Victor Stinner
21f5893571 Issue #14180: datetime.date.fromtimestamp(), datetime.datetime.fromtimestamp()
and datetime.datetime.utcfromtimestamp() now raise an OSError instead of
ValueError if localtime() or gmtime() failed.
2012-03-14 00:15:40 +01:00
R David Murray
910df329fd #8315: add automatic unittest test discovery in test.test_email 2012-03-13 18:02:22 -04:00
Benjamin Peterson
d2edfd64ba merge 3.2 2012-03-13 16:49:36 -05:00
Benjamin Peterson
817dd91595 merge heads 2012-03-13 16:46:35 -05:00
Benjamin Peterson
0442f56c4a merge heads 2012-03-13 16:46:09 -05:00
Martin v. Löwis
f423a79685 Merge 3.2 2012-03-13 14:34:04 -07: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
Benjamin Peterson
7d74b70e51 merge 3.2 2012-03-13 16:13:35 -05:00
Benjamin Peterson
47930016ff merge heads 2012-03-13 16:13:21 -05:00
Benjamin Peterson
2354a7593f fix indentation 2012-03-13 16:13:09 -05:00
Martin v. Löwis
df50cebbed Issue #3835: Refuse to use unthreaded Tcl in threaded Python.
Patch by Guilherme Polo and Andrew Svetlov.
2012-03-13 13:59:15 -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
Ned Deily
577c830531 Issue #14184: merge 2012-03-13 11:31:36 -07:00
Ned Deily
7ca97d5208 Issue #14184: Increase the default stack size for secondary threads on
Mac OS X to prevent interpreter crashes when compiled on 10.7.
2012-03-13 11:18:18 -07:00
Victor Stinner
bd273c1ec3 Issue #14180: Fix an invalid rounding when compiler optimization are enabled
Use volatile keyword to disable localy unsafe float optimizations.
2012-03-13 19:12:23 +01:00
Victor Stinner
87adda502a Issue #14180: Fix pythoncore.vcproj, Modules/_time.[ch] have been removed 2012-03-13 17:42:18 +01:00
Victor Stinner
d528b01a71 Issue #14180: Fix another typo in kqueue_queue_control() 2012-03-13 16:25:35 +01:00
Victor Stinner
d327f9de1f Issue #14180: Fix select.select() compilation on BSD and a typo in kqueue_queue_control() 2012-03-13 15:29:08 +01:00
Victor Stinner
3a31dd407a Issue #14180: Remove commented code 2012-03-13 13:50:34 +01: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