Commit Graph

5785 Commits

Author SHA1 Message Date
Benjamin Peterson 1a5e5de818 remove get_prefix and set_prefix (#13248) 2012-03-14 17:41:15 -05:00
Gregory P. Smith 70c9c4dca6 Fixes Issue #14234: CVE-2012-0876: Randomize hashes of xml attributes
in the hash table internal to the pyexpat module's copy of the expat
library to avoid a denial of service due to hash collisions.
Patch by David Malcolm with some modifications by the expat project.
2012-03-14 15:00:39 -07:00
Gregory P. Smith 373c740924 Fixes Issue #14234: CVE-2012-0876: Randomize hashes of xml attributes
in the hash table internal to the pyexpat module's copy of the expat
library to avoid a denial of service due to hash collisions.
Patch by David Malcolm with some modifications by the expat project.
2012-03-14 14:41:00 -07:00
Gregory P. Smith 8e91cf6a5e Fixes issue #14234: CVE-2012-0876: Randomize hashes of xml attributes
in the hash table internal to the pyexpat module's copy of the expat
library to avoid a denial of service due to hash collisions.
Patch by David Malcolm with some modifications by the expat project.
2012-03-14 14:26:55 -07:00
Andrew Svetlov b53da6e374 Merge from tip 2012-03-14 13:44:02 -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
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
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
Andrew Svetlov a2251aadaa Issue #989712: Support using Tk without a mainloop. 2012-03-13 18:36:13 -07: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
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 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 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
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
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
Victor Stinner a8ec5ea923 Issue #14104: Implement time.monotonic() on Mac OS X,
patch written by Nicholas Riley.
2012-03-13 00:25:42 +01: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
Benjamin Peterson 7e0dbfbbde give the AST class a __dict__ 2012-03-12 09:46:44 -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
Victor Stinner 8f40860944 Close #14223: curses.addch() is no more limited to the range 0-255 when the
Python curses is not linked to libncursesw. It was a regression introduced in
Python 3.3a1.
2012-03-08 02:08:48 +01:00
Benjamin Peterson 9a6338651e merge 3.2 (#3787e896dbe9) 2012-03-07 18:52:52 -06:00
Benjamin Peterson dae9f8334e this stuff will actually be new in 3.2.4 2012-03-07 18:49:43 -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 a420c820fe Backout buggy patch committed for #13719 2012-03-07 20:48:55 +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
Martin v. Löwis b2c7cca0cf Move entry to right section. Mention minidom. 2012-03-05 22:02:28 +01:00
Antoine Pitrou bdb1cf1ca5 Issue #12328: Fix multiprocessing's use of overlapped I/O on Windows.
Also, add a multiprocessing.connection.wait(rlist, timeout=None) function
for polling multiple objects at once.  Patch by sbt.

Complete changelist from sbt's patch:

* Adds a wait(rlist, timeout=None) function for polling multiple
  objects at once.  On Unix this is just a wrapper for
  select(rlist, [], [], timeout=None).

* Removes use of the SentinelReady exception and the sentinels argument
  to certain methods.  concurrent.futures.process has been changed to
  use wait() instead of SentinelReady.

* Fixes bugs concerning PipeConnection.poll() and messages of zero
  length.

* Fixes PipeListener.accept() to call ConnectNamedPipe() with
  overlapped=True.

* Fixes Queue.empty() and SimpleQueue.empty() so that they are
  threadsafe on Windows.

* Now PipeConnection.poll() and wait() will not modify the pipe except
  possibly by consuming a zero length message.  (Previously poll()
  could consume a partial message.)

* All of multiprocesing's pipe related blocking functions/methods are
  now interruptible by SIGINT on Windows.
2012-03-05 19:28:37 +01:00
Éric Araujo b8e280d225 Make packaging’ upload command work with bdist_msi products (#13719) 2012-03-05 17:04:07 +01:00
Éric Araujo 6a59b70cba Merge 3.2 2012-03-05 16:24:07 +01:00
Éric Araujo e413c06f35 Make distutils’ upload command work with bdist_msi products (#13719).
Patch by Ralf Schmitt.
2012-03-05 16:09:29 +01:00
Florent Xicluna 75b5e7ee15 Issue #14007: accept incomplete TreeBuilder objects (missing start/end/data/close) for the Python implementation as well. Add disabled tests for the doctype() method. 2012-03-05 10:42:19 +01:00
Georg Brandl ab8f392ff0 3.3.0a1 is done. 2012-03-05 08:54:46 +01:00