Commit Graph

34191 Commits

Author SHA1 Message Date
Terry Jan Reedy 5e6db31368 Untokenize: An logically incorrect assert tested user input validity.
Replace it with correct logic that raises ValueError for bad input.
Issues #8478 and #12691 reported the incorrect logic.
Add an Untokenize test case and an initial test method.
2014-02-17 16:45:48 -05:00
Victor Stinner 3c1b379ebd Issue #20320: select.select() and select.kqueue.control() now round the timeout
aways from zero, instead of rounding towards zero.

It should make test_asyncio more reliable, especially test_timeout_rounding() test.
2014-02-17 00:02:43 +01:00
Victor Stinner 23f628de4a Issue #20616: Add a format() method to tracemalloc.Traceback. 2014-02-16 23:53:38 +01:00
Benjamin Peterson f617fa88de merge 3.3 2014-02-16 14:53:55 -05:00
Benjamin Peterson cf62603276 backout fafac90b69c4 2014-02-16 14:52:01 -05:00
Benjamin Peterson ec91cd6040 merge backout for #20621 2014-02-16 14:17:28 -05:00
Benjamin Peterson eb43736de2 backout 2807a5f011e4 for causing #20621 2014-02-16 14:12:57 -05:00
Benjamin Peterson e686c5c3e8 look up __getnewargs__ and __getnewargs_ex__ on the object type (#16251) 2014-02-16 13:49:16 -05:00
Benjamin Peterson 5ef48d9c79 merge 3.3 (#20080) 2014-02-15 13:20:28 -05:00
Benjamin Peterson 29352c436c add missing test assertion (closes #20080)
Patch by Vajrasky Kok.
2014-02-15 13:19:59 -05:00
Ezio Melotti 48eabbeffd #20634: merge with 3.3. 2014-02-15 13:01:41 +02:00
Ezio Melotti f4e998364e #20634: fix typo in IDLE README noticed by Saimadhav Heblikar. 2014-02-15 13:01:08 +02:00
Nick Coghlan e2df5cfcbd Issue #19744: Handle missing SSL/TLS in ensurepip
- now also allows POSIX installation with SSL/TLS missing
- a goal for pip 1.6 is to allow local use without SSL/TLS
2014-02-15 09:14:54 +10:00
Ned Deily b7bb675d3c Issue #20605: Make test_socket getaddrinfo OS X segfault test more robust. 2014-02-13 22:53:42 -08:00
Ned Deily b24f481ab4 Issue #20605: Make test_socket getaddrinfo OS X segfault test more robust. 2014-02-13 22:50:42 -08:00
Benjamin Peterson 0714b8b6ab set line and column numbers for keyword-only arg nodes (closes #20619) 2014-02-13 19:22:14 -05:00
Victor Stinner 15054c16c8 Issue #20526, #19466: Revert changes of issue #19466 which introduces a
regression: don't clear anymore the state of Python threads early during the
Python shutdown.
2014-02-13 12:48:54 +01:00
Victor Stinner e755fba2d1 Issue #20599: Don't clear environment in test_cleanup() of test_builtin 2014-02-13 10:54:32 +01:00
Victor Stinner 1ff0ee0be2 Fix test_asyncio/test_events.py: skip IPv6 if IPv6 is disabled on the host 2014-02-13 10:46:05 +01:00
Serhiy Storchaka 422794767b Merge heads 2014-02-13 10:49:30 +02:00
Serhiy Storchaka 1392f68e0e Fixed typo in previous commit (issue #6815). 2014-02-13 10:45:48 +02:00
Serhiy Storchaka ffadbb7ee7 Fixed typo in previous commit (issue #6815). 2014-02-13 10:45:14 +02:00
Victor Stinner 28773465e6 ayncio, Tulip issue 129: BaseEventLoop.sock_connect() now raises an error if
the address is not resolved (hostname instead of an IP address) for AF_INET and
AF_INET6 address families.
2014-02-13 09:24:37 +01:00
Serhiy Storchaka 7dfaa27fdd Issue #6815: os.path.expandvars() now supports non-ASCII environment
variables names and values.
2014-02-13 10:14:48 +02:00
Serhiy Storchaka dbb101909d Issue #6815: os.path.expandvars() now supports non-ASCII environment
variables names and values.
2014-02-13 10:13:53 +02:00
Guido van Rossum b58f053e48 asyncio: Change as_completed() to use a Queue, to avoid O(N**2) behavior. Fixes issue #20566. 2014-02-12 17:58:19 -08:00
Yury Selivanov ee6dc425c8 asyncio.events: Use __slots__ in Handle and TimerHandle 2014-02-12 17:01:52 -05:00
Victor Stinner 8da4fb5a1c Issue #20599: Force ASCII encoding for stdout in test_cleanup() of test_builtin
On Windows, the codec of sys.stdout is implemented in Python. At exit, the
codec may be unloaded before the destructor tries to write something to
sys.stdout.
2014-02-12 18:27:55 +01:00
Serhiy Storchaka 76a6326068 Try to fix test_cleanup (issue #20599). 2014-02-12 12:40:22 +02:00
Serhiy Storchaka 5bdfc51950 Issue #17671: Fixed a crash when use non-initialized io.BufferedRWPair.
Based on patch by Stephen Tu.
2014-02-12 10:55:07 +02:00
Serhiy Storchaka 61e2493b83 Issue #17671: Fixed a crash when use non-initialized io.BufferedRWPair.
Based on patch by Stephen Tu.
2014-02-12 10:52:35 +02:00
Victor Stinner 13b493e8a7 Issue #20495: Skip test_read_pty_output() of test_asyncio on FreeBSD older than
FreeBSD 8
2014-02-11 18:40:56 +01:00
Victor Stinner 2371e25517 Issue #20505: Remove debug code 2014-02-11 17:53:47 +01:00
Victor Stinner eb74876e99 asyncio, Tulip issue 131: as_completed() and wait() now raises a TypeError if
the list of futures is not a list but a Future, Task or coroutine object
2014-02-11 11:54:08 +01:00
Victor Stinner 4e8d2f25e2 asyncio, Tulip issue 130: Add more checks on subprocess_exec/subprocess_shell
parameters
2014-02-11 11:44:56 +01:00
Victor Stinner a125497ea3 asyncio, Tulip issue 126: call_soon(), call_soon_threadsafe(), call_later(),
call_at() and run_in_executor() now raise a TypeError if the callback is a
coroutine function.
2014-02-11 11:34:30 +01:00
Victor Stinner 1db2ba3a92 Issue #20505: use also the monotonic time to decide if asyncio debug traces
should be printed
2014-02-11 10:26:53 +01:00
Victor Stinner 5d1ea04b06 Issue #20505: Oops, only print debug info if selector.select(timeout) took less
than timeout
2014-02-11 10:10:41 +01:00
Victor Stinner 7bff8e1e2b Issue #20505: Improve debug info in asyncio event loop 2014-02-11 10:08:08 +01:00
Serhiy Storchaka fea7e7336f Merge heads 2014-02-11 10:38:44 +02:00
Serhiy Storchaka 6a45021084 Issue #19856: shutil.move() failed to move a directory to other directory
on Windows if source name ends with os.altsep.
2014-02-11 10:32:41 +02:00
Serhiy Storchaka 3a308b9f37 Issue #19856: shutil.move() failed to move a directory to other directory
on Windows if source name ends with os.altsep.
2014-02-11 10:30:59 +02:00
Larry Hastings 3f99504c08 Merge Python 3.4.0rc1 release branch. 2014-02-11 00:15:46 -08:00
Victor Stinner 06847d9c8c Issue #20505: Fix TestLoop, set the clock resolution 2014-02-11 09:03:47 +01:00
Larry Hastings e9f73ac1fd Python 3.4.0rc1: Version bump. 2014-02-10 14:45:05 -08:00
Victor Stinner 6cf5c96630 Issue #20505: BaseEventLoop uses again the resolution of the clock to decide if
scheduled tasks should be executed or not.
2014-02-10 23:42:32 +01:00
Terry Jan Reedy b825a3937c Issue #20167: Add missing else: break in 3 places as noticed by Serhiy. 2014-02-10 16:46:28 -05:00
Georg Brandl d8413bab22 merge with 3.3 2014-02-10 22:11:21 +01:00
Georg Brandl f0560d9592 Fix trailing whitespace. 2014-02-10 22:05:16 +01:00
Georg Brandl 8f9c20b8ff merge with 3.3.4 releasing repo 2014-02-10 22:04:20 +01:00
Victor Stinner cf736f4e98 Issue #20505: Use even shorter sleep in test_timeout_rounding() to make the
test more reliable (= fail more often on Windows with HPET enabled).
2014-02-10 19:17:46 +01:00
Serhiy Storchaka 580e007860 issue12085: Use more Pythonic way to check _child_created.
_active shouldn't be cached, it set to None on shutdown.
2014-02-10 19:21:25 +02:00
Serhiy Storchaka 72e7761301 issue12085: Use more Pythonic way to check _child_created.
_active shouldn't be cached, it set to None on shutdown.
2014-02-10 19:20:22 +02:00
Serhiy Storchaka d667d72cb7 Temporary silence test broken by issue19255.
Remove unused variables.
2014-02-10 19:09:19 +02:00
Serhiy Storchaka 87a5c515d0 Issue #19255: The builtins module is restored to initial value before
cleaning other modules.  The sys and builtins modules are cleaned last.
2014-02-10 18:21:34 +02:00
Larry Hastings ad88d7a26b Python 3.4.0rc1 release: Updated pydoc topics, fixed suspicious markup errors. 2014-02-10 04:26:10 -08:00
Victor Stinner 1c143b19c8 Issue #20505: Add debug info to analyze sporaric failures of
test_timeout_rounding() on Windows XP buildbots.
2014-02-10 11:47:50 +01:00
Larry Hastings b082731fbb Issue #20517: Functions in the os module that accept two filenames
now register both filenames in the exception on failure.
This required adding new C API functions allowing OSError exceptions
to reference two filenames instead of one.
2014-02-09 22:05:19 -08:00
Victor Stinner dc62b7e261 asyncio: Tulip issue 112: Inline make_handle() into Handle constructor 2014-02-10 00:45:44 +01:00
Victor Stinner 3633ce3301 Issue #20571: skip test_readline() of test_codecs for Windows code page 65001.
The decoder does not support partial decoding yet for this code page.
2014-02-09 13:11:53 +01:00
Larry Hastings 2623c8c23c Issue #20530: Argument Clinic's signature format has been revised again.
The new syntax is highly human readable while still preventing false
positives.  The syntax also extends Python syntax to denote "self" and
positional-only parameters, allowing inspect.Signature objects to be
totally accurate for all supported builtins in Python 3.4.
2014-02-08 22:15:29 -08:00
Guido van Rossum 09f08fe248 asyncio: Remove more relics of resolution/granularity. 2014-02-08 19:44:02 -08:00
Victor Stinner 0c3949c963 asyncio: Remove Process.subprocess attribute; it's too easy to get inconsistent
Process and Popen objects
2014-02-09 02:51:40 +01:00
Guido van Rossum 313f829ce8 asyncio: Test fix. 2014-02-08 17:35:09 -08:00
Nick Coghlan d979e4335d Close #20500: Don't trigger PyObject_Str assertion at shutdown 2014-02-09 10:43:21 +10:00
Victor Stinner 87bf2772be asyncio tests: Remove scories of resolution/granularity 2014-02-09 01:25:52 +01:00
R David Murray 66c3d18af1 Merge: #14983: always add a line end after a MIME boundary marker. 2014-02-08 17:56:17 -05:00
R David Murray e9c31470e1 #14983: always add a line end after a MIME boundary marker.
This is more RFC compliant (see issue) and fixes a problem with
signature verifiers rejecting the part when signed.  There is some
amount of backward compatibility concern here since it changes
the output, but the RFC issue coupled with fixing the problem
with signature verifiers seems worth the small risk of breaking
code that depends on the current incorrect output.
2014-02-08 17:54:56 -05:00
Antoine Pitrou b7d6d2ac6e Issue #20540: Fix a performance regression (vs. Python 3.2) when layering a multiprocessing Connection over a TCP socket.
For small payloads, Nagle's algorithm would introduce idle delays before the entire transmission of a message.
2014-02-08 23:03:56 +01:00
Antoine Pitrou 0c1e31ab1e Issue #20540: Fix a performance regression (vs. Python 3.2) when layering a multiprocessing Connection over a TCP socket.
For small payloads, Nagle's algorithm would introduce idle delays before the entire transmission of a message.
2014-02-08 23:05:52 +01:00
Ethan Furman ca1b794dac Close issue20534: all pickle protocols now supported. 2014-02-08 11:36:27 -08:00
R David Murray 01e46ee7e2 Merge: #16983: Apply postel's law to encoded words inside quoted strings. 2014-02-08 13:13:01 -05:00
R David Murray 0400d33928 #16983: Apply postel's law to encoded words inside quoted strings.
This applies only to the new parser.  The old parser decodes encoded words
inside quoted strings already, although it gets the whitespace wrong
when it does so.

This version of the patch only handles the most common case (a single encoded
word surrounded by quotes), but I haven't seen any other variations of this in
the wild yet, so its good enough for now.
2014-02-08 13:12:00 -05:00
R David Murray ff9616bbf7 Merge #19772: Do not mutate message when downcoding to 7bit. 2014-02-08 11:51:18 -05:00
R David Murray 905c8c3d8d #19772: Do not mutate message when downcoding to 7bit.
This is a bit of an ugly hack because of the way generator pieces together the
output message.  The deepcopys aren't too expensive, though, because we know it
is only called on messages that are not multiparts, and the payload (the thing
that could be large) is an immutable object.

Test and preliminary work on patch by Vajrasky Kok.
2014-02-08 11:48:20 -05:00
Serhiy Storchaka 99b1f2b3bb Issue #20553. Use specific asserts in ipaddress tests. 2014-02-08 16:39:51 +02:00
Serhiy Storchaka 7c389e2404 Issue #20553. Use specific asserts in ipaddress tests. 2014-02-08 16:38:35 +02:00
Terry Jan Reedy c03027054d Issue #20406: Use Python application icons for Idle window title bars.
Patch mostly by Serhiy Storchaka.
2014-02-08 09:05:20 -05:00
Terry Jan Reedy a7c07d320b Issue #20406: Use Python application icons for Idle window title bars.
Patch mostly by Serhiy Storchaka.
2014-02-08 09:02:26 -05:00
Nick Coghlan 4a7668adca Close #20536: correctly handle Decimal exponents in statistics 2014-02-08 23:55:14 +10:00
Nick Coghlan aad0ea0b59 Merge fix for #18805 from 3.3 2014-02-08 23:20:58 +10:00
Nick Coghlan 932346f572 Issue #18805: better netmask validation in ipaddress 2014-02-08 23:17:36 +10:00
Serhiy Storchaka 1ff23d7542 Issue #20549: Use specific asserts in mailbox, smtplib and poplib tests. 2014-02-08 15:06:43 +02:00
Serhiy Storchaka 578c6777aa Issue #20549: Use specific asserts in mailbox, smtplib and poplib tests. 2014-02-08 15:06:08 +02:00
Serhiy Storchaka d3e1207191 Issue #20555: Use specific asserts in urllib, httplib, ftplib, cgi, wsgiref tests. 2014-02-08 14:51:10 +02:00
Serhiy Storchaka 25d8aeac7c Issue #20555: Use specific asserts in urllib, httplib, ftplib, cgi, wsgiref tests. 2014-02-08 14:50:08 +02:00
Serhiy Storchaka 6c9678e1a5 Issue #20546: Use specific asserts in int tests. 2014-02-08 14:29:36 +02:00
Serhiy Storchaka 3a20a5dead Issue #20546: Use specific asserts in int tests. 2014-02-08 14:28:33 +02:00
Serhiy Storchaka 6cbf151032 Issue #20538: UTF-7 incremental decoder produced inconsistant string when
input was truncated in BASE64 section.
2014-02-08 14:06:33 +02:00
Serhiy Storchaka 016a3f33a5 Issue #20538: UTF-7 incremental decoder produced inconsistant string when
input was truncated in BASE64 section.
2014-02-08 14:01:29 +02:00
Nick Coghlan 73afe2a972 Close #20481: Disallow mixed type input in statistics
The most appropriate coercion rules are not yet clear, so simply
disallowing mixed type input for 3.4.

(Committed on Steven's behalf)
2014-02-08 19:58:04 +10:00
Terry Jan Reedy 57e4127781 Issue #20167: Suppress 3.4 specific 'Exception ignored' messages.
Original patch by Tal Einat.
2014-02-08 04:47:29 -05:00
Nick Coghlan bfd68bf4ac Issue #20478: avoid special casing Counter in statistics
Passing Counter objects to the Counter constructor is
special cased, going through iter() firsts ensures they
are handled the same way as any other iterable.

(Committing on Steven's behalf as I don't believe his
SSH key is registered yet)
2014-02-08 19:44:16 +10:00
Victor Stinner 85310a50a9 Issue #20505: Remove resolution and _granularity from selectors and asyncio
* Remove selectors.BaseSelector.resolution attribute
* Remove asyncio.BaseEventLoop._granularity attribute
2014-02-07 23:34:58 +01:00
R David Murray c489e83432 Merge: #17369: Improve handling of broken RFC2231 values in get_filename. 2014-02-07 15:04:26 -05:00
R David Murray 1e949890f6 #17369: Improve handling of broken RFC2231 values in get_filename.
This fixes a regression relative to python2.
2014-02-07 15:02:19 -05:00
R David Murray bd3a11ba34 #20013: don't raise socket error when selected mailbox deleted.
I'm checking this in without a test because not much of this code
is tested and I don't have time to work up the necessary extensions
to the existing test framework.

The patch itself was tested by the person who reported the bug.
2014-02-07 13:47:40 -05:00
R David Murray 95ff7239bd #20013: don't raise socket error when selected mailbox deleted.
I'm checking this in without a test because not much of this code
is tested and I don't have time to work up the necessary extensions
to the existing test framework.

The patch itself was tested by the person who reported the bug.
2014-02-07 13:44:57 -05:00
R David Murray feb68522fd Merge: #19063: the unicode-in-set_payload problem isn't getting fixed in 3.4. 2014-02-07 13:04:18 -05:00
R David Murray fcc0072380 #19063: the unicode-in-set_payload problem isn't getting fixed in 3.4. 2014-02-07 13:03:08 -05:00