Commit Graph

20845 Commits

Author SHA1 Message Date
Yury Selivanov 5bb1afb332 asyncio: Add Transport.is_closing()
See https://github.com/python/asyncio/pull/291 for details.
2015-11-16 12:43:21 -05:00
Martin Panter 42347100bf Issue #20220: Merge time zone workaround from 3.4 into 3.5 2015-11-16 09:42:41 +00:00
Serhiy Storchaka f242aebbd3 Issue #9051: Added tests for pickling and copying the timezone objects. 2015-11-16 11:19:31 +02:00
Serhiy Storchaka e28209f251 Issue #9051: Added tests for pickling and copying the timezone objects. 2015-11-16 11:12:58 +02:00
Martin Panter 6e0889f0c7 Issue #20220: Add DST rules to work around glibc quirk
This was triggering intermittent failures in unrelated tests.
2015-11-16 07:21:38 +00:00
Gregory P. Smith d0a5b1c343 Fixes #23564: Fix a partially broken sanity check in the _posixsubprocess
internals regarding how fds_to_pass were passed to the child.  The bug
had no actual impact as subprocess.py already avoided it.
2015-11-15 21:15:26 -08:00
Serhiy Storchaka 7e2b870b85 Issue #25388: Fixed tokenizer crash when processing undecodable source code
with a null byte.
2015-11-14 15:11:17 +02:00
Serhiy Storchaka 0d441119f5 Issue #25388: Fixed tokenizer crash when processing undecodable source code
with a null byte.
2015-11-14 15:10:35 +02:00
Martin Panter 32acc16cda Merge typo and grammar fixes from 3.4 into 3.5 2015-11-14 01:14:25 +00:00
Martin Panter 2e4571a456 Fix a few grammar problems in the documentation and comments 2015-11-14 01:07:43 +00:00
Martin Panter fa9ea04673 Issue #25590: Merge rlcompleter change from 3.4 into 3.5 2015-11-13 23:10:39 +00:00
Martin Panter 06622ead80 Issue #25590: Make rlcompleter only call getattr() once per attribute
Previously it was called another time via hasattr(), and both calls were
made once for dir(f) and again for dir(f.__class__).  This includes a
backport of changing from a list to a set from revision 4dbb315fe667.
2015-11-13 22:47:00 +00:00
Yury Selivanov c73771afd8 Merge 3.4 2015-11-13 12:29:03 -05:00
Yury Selivanov abe9625eeb asyncio: Fix sporadic failing unittests in debug mode 2015-11-13 12:28:48 -05:00
Serhiy Storchaka 2f85555531 Issue #25607: Restore old distutils logging threshold after running tests that
parse command line arguments.
2015-11-12 19:47:14 +02:00
Serhiy Storchaka 84023247b4 Issue #25607: Restore old distutils logging threshold after running tests that
parse command line arguments.
2015-11-12 19:46:23 +02:00
Serhiy Storchaka 609a2e17ad Issue #22995: Default implementation of __reduce__ and __reduce_ex__ now
rejects builtin types with not defined __new__.
Added tests for non-pickleable types.
2015-11-12 11:31:51 +02:00
Serhiy Storchaka d7a4415599 Issue #22995: Default implementation of __reduce__ and __reduce_ex__ now
rejects builtin types with not defined __new__.
Added tests for non-pickleable types.
2015-11-12 11:23:04 +02:00
Benjamin Peterson 45bde5d2ee merge 3.4 (#25530) 2015-11-11 22:45:22 -08:00
Benjamin Peterson a9dcdabccb always set OP_NO_SSLv3 by default (closes #25530) 2015-11-11 22:38:41 -08:00
Serhiy Storchaka 35abe19c24 Issue #25595: Fixed test_deleted_cwd in test_importlib on AIX. 2015-11-11 08:26:59 +02:00
Serhiy Storchaka c6ce13d910 Issue #6598: Avoid clock wrapping around in test_make_msgid_collisions.
Use time.monotonic instead of time.clock.
2015-11-10 19:51:56 +02:00
Serhiy Storchaka e1dc3d47e0 Issue #6598: Avoid clock wrapping around in test_make_msgid_collisions.
Use time.monotonic or time.time instead of time.clock.
2015-11-10 19:50:14 +02:00
Stefan Krah 0ce5b6e268 Iaaue #25598: Fix memory_hex from #9951 for non-contiguous buffers. 2015-11-10 18:17:22 +01:00
Serhiy Storchaka 735b790fed Issue #25584: Fixed recursive glob() with patterns starting with '**'. 2015-11-09 23:12:07 +02:00
Serhiy Storchaka 411dfd871c Issue #22643: Skip test_case_operation_overflow on computers with low memory. 2015-11-07 16:54:48 +02:00
Serhiy Storchaka 608c213530 Issue #892902: Added new tests for pickling recursive collections. 2015-11-07 11:16:10 +02:00
Martin Panter eeb896c411 Issue #24802: Copy bytes-like objects to null-terminated buffers if necessary
This avoids possible buffer overreads when int(), float(), compile(), exec()
and eval() are passed bytes-like objects. Similar code is removed from the
complex() constructor, where it was not reachable.

Patch by John Leitch, Serhiy Storchaka and Martin Panter.
2015-11-07 02:32:21 +00:00
Martin Panter d61d860ed3 Issue #24802: Update test case for ValueError in 3.5 2015-11-08 11:09:13 +00:00
R David Murray b0deeb47d8 #25446: Fix regression in smtplib's AUTH LOGIN support.
The auth method tests simply weren't adequate because of the fact that
smtpd doesn't support authentication.  I borrowed some of Milan's
code for that from issue #21935 and added it to the smtplib tests.
Also discovered that the direct test for the 'auth' method wasn't actually
testing anything and fixed it.

The fix makes the new authobject mechanism work the way it is
documented...the problem was that wasn't checking for a 334 return code
if an initial-response was provided, which works fine for auth plain
and cram-md5, but not for auth login.
2015-11-08 01:03:52 -05:00
Serhiy Storchaka 3d717d05de Issue #22643: Skip test_case_operation_overflow on computers with low memory. 2015-11-07 16:55:16 +02:00
Serhiy Storchaka 838b7cc0e7 Issue #892902: Added new tests for pickling recursive collections. 2015-11-07 11:17:02 +02:00
Martin Panter 61d6e4ae9d Issue #24802: Merge null termination fixes from 3.4 into 3.5 2015-11-07 02:56:11 +00:00
Martin Panter 98da9d0e0d Issue #18010: Merge pydoc web search fix from 3.4 into 3.5 2015-11-06 00:51:38 +00:00
Martin Panter 9ad0aae656 Issue #18010: Fix pydoc web server search to handle package exceptions
Implementation by Antoine Pitrou.
2015-11-06 00:27:14 +00:00
Yury Selivanov 7931be403d Merge 3.4 2015-11-05 14:29:19 -05:00
Yury Selivanov ade0412613 asyncio: Optimize asyncio.sleep(0) 2015-11-05 14:29:04 -05:00
Serhiy Storchaka 710cd34bdb Issue #25449: Fixed a crash and leaking NULL in repr() of OrderedDict that
was mutated by direct calls of dict methods.
2015-11-04 22:33:07 +02:00
Serhiy Storchaka b45b7b2137 Issue #25449: Iterating OrderedDict with keys with unstable hash now raises
KeyError in C implementations as well as in Python implementation.

Added tests for OrderedDict subclasses.
2015-11-04 22:05:38 +02:00
Serhiy Storchaka f51d715845 Issue #25523: Further a-to-an corrections new in 3.5. 2015-11-02 14:40:41 +02:00
Serhiy Storchaka a84f6c3dd3 Issue #25523: Merge a-to-an corrections from 3.4. 2015-11-02 14:39:05 +02:00
Serhiy Storchaka d65c9496da Issue #25523: Further a-to-an corrections. 2015-11-02 14:10:23 +02:00
Martin Panter 2eb819f7a8 Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5 2015-11-02 04:04:57 +00:00
Martin Panter 7462b64911 Issue #25523: Correct "a" article to "an" article
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
or edited some other way to fix the grammar.
2015-11-02 03:37:02 +00:00
Serhiy Storchaka 56275dc1e2 Issue #25510: fileinput.FileInput.readline() now returns b'' instead of ''
at the end if the FileInput was opened with binary mode.
Patch by Ryosuke Ito.
2015-11-01 16:45:26 +02:00
Serhiy Storchaka 314464d0ab Issue #25510: fileinput.FileInput.readline() now returns b'' instead of ''
at the end if the FileInput was opened with binary mode.
Patch by Ryosuke Ito.
2015-11-01 16:43:58 +02:00
Serhiy Storchaka 14eefe353e Issue #25395: Fixed crash when highly nested OrderedDict structures were
garbage collected.
2015-11-01 16:12:34 +02:00
Serhiy Storchaka 265cee0480 Issue25506: Fixed a copy-pasting error in test_pprint.
Patch by John Mark Vandenberg.
2015-10-29 09:52:20 +02:00
Serhiy Storchaka ac4bdcc80e Issue #25503: Fixed inspect.getdoc() for inherited docstrings of properties.
Original patch by John Mark Vandenberg.
2015-10-29 08:15:50 +02:00
Serhiy Storchaka f8152c67f5 Issue #21827: Fixed textwrap.dedent() for the case when largest common
whitespace is a substring of smallest leading whitespace.
Based on patch by Robert Li.
2015-10-28 21:43:12 +02:00
Serhiy Storchaka ea4cb63e68 Issue #21827: Fixed textwrap.dedent() for the case when largest common
whitespace is a substring of smallest leading whitespace.
Based on patch by Robert Li.
2015-10-28 21:39:36 +02:00
Martin Panter 084b368825 Issue #23391: Merge OSError doc from 3.4 into 3.5 2015-10-26 23:35:07 +00:00
Martin Panter 5487c13e44 Issue #23391: Restore OSError constructor argument documentation
This restores details lost in revision 097f4fda61a4 (since Python 3.3,
related to the new OSError subclasses). Further additions:

* Markup for attributes and constructor signature
* Explain "winerror" and "filename2"
* Extend test to check for filename2 defaulting to None
* Clarify that the constructor can return a subclass

I have intentionally left out any details of allowing more than five
arguments, or how the "args" attribute is set for four or more arguments.
These details seem to be dependent on the Python version and platform.
2015-10-26 11:05:42 +00:00
Zachary Ware f085a16f55 Issue #25456: Fix test_idle when Tcl/Tk DLLs are loaded from python.exe's home
rather than from elsewhere on PATH.
2015-10-24 23:22:16 -05:00
Benjamin Peterson 2775d85d55 merge 3.4 (#25471) 2015-10-24 20:07:08 -07:00
Benjamin Peterson d9dbf49383 accepted sockets shouldn't inherit the SOCK_NONBLOCK flag (closes #25471) 2015-10-24 20:06:04 -07:00
Serhiy Storchaka 45120f272b Issue #25447: The lru_cache() wrapper objects now can be copied and pickled
(by returning the original object unchanged).
2015-10-24 09:49:56 +03:00
Berker Peksag 33a7fcc066 Issue #23981: Update test_unicodedata to use script_helpers
Patch by Christie.
2015-10-22 03:29:10 +03:00
Guido van Rossum ca636eac88 Issue #25390: typing: Don't crash on Union[str, Pattern]. 2015-10-19 14:55:47 -07:00
Guido van Rossum 25c578d0a6 Fix whitespace. 2015-10-19 12:00:25 -07:00
Guido van Rossum 06d48dbea8 Fix whitespace. 2015-10-19 12:00:04 -07:00
Guido van Rossum 030f489df7 Issue #25441: asyncio: Raise error from drain() when socket is closed. (Merge 3.4->3.5) 2015-10-19 11:54:04 -07:00
Guido van Rossum c44ecdf687 Issue #25441: asyncio: Raise error from drain() when socket is closed. 2015-10-19 11:49:30 -07:00
Vinay Sajip 3f445f799a Closes #25411: Merged fix from 3.4. 2015-10-17 16:17:52 +01:00
Vinay Sajip 277640af0f Closes #25411: Improved Unicode support in SMTPHandler. 2015-10-17 16:13:10 +01:00
Serhiy Storchaka 992ec46acc Issue #25406: Fixed a bug in C implementation of OrderedDict.move_to_end()
that caused segmentation fault or hang in iterating after moving several
items to the start of ordered dict.
2015-10-14 19:21:24 +03:00
Zachary Ware fa10f61ee5 Issue #25093: Merge with 3.4 2015-10-12 23:30:15 -05:00
Zachary Ware 83fd0a81a4 Issue #25093: Fix test_tcl's testloadWithUNC for paths with spaces
Patch by Serhiy Storchaka.
2015-10-12 23:27:58 -05:00
Victor Stinner 50856d5ae7 sys.setrecursionlimit() now raises RecursionError
Issue #25274: sys.setrecursionlimit() now raises a RecursionError if the new
recursion limit is too low depending at the current recursion depth. Modify
also the "lower-water mark" formula to make it monotonic. This mark is used to
decide when the overflowed flag of the thread state is reset.
2015-10-13 00:11:21 +02:00
Victor Stinner 60f26691f5 Issue #25277: Use a longer sleep in test_eintr to reduce the risk of race
condition in test_eintr.
2015-10-12 23:37:02 +02:00
Serhiy Storchaka 9c8213fbc1 No longer skip tests for classes with __getnewargs_ex__. The copy module
already supports reduce protocol 4 (issue #20289).
2015-10-11 17:48:28 +03:00
Serhiy Storchaka 1ddbb8cf47 Cleanup test_descr: remove C8 that is the same as C3. 2015-10-11 17:43:12 +03:00
Serhiy Storchaka 1fdc80b55f Cleanup test_descr: remove C8 that is the same as C3. 2015-10-11 17:42:39 +03:00
Victor Stinner 718c984e6e Close #25367: Fix test_coroutines()
Fix usage of support.import_module('asyncio'): store the result in an 'asyncio'
variable.
2015-10-11 10:53:15 +02:00
Victor Stinner 0c886f740b lose #25373: Fix regrtest --slow with interrupted test 2015-10-11 10:39:56 +02:00
Victor Stinner b45c0f7e48 Close #25367: Fix test_coroutines with no thread support
Skip test_asyncio_1() when the asyncio module cannot be imported because
CPython is compiled with no thread support.
2015-10-11 10:10:31 +02:00
Serhiy Storchaka 456a27013e Issue #25365: test_pickle now works in threads disabled builds. 2015-10-10 20:10:54 +03:00
Serhiy Storchaka 7b2cfc4465 Issue #25365: test_pickle now works in threads disabled builds. 2015-10-10 20:10:07 +03:00
Martin Panter 05da525e55 Issue #25322: Merge contextlib.suppress test fix from 3.4 into 3.5 2015-10-10 11:05:47 +00:00
Martin Panter 7c6420a552 Issue #25322: Fix test for nested contextlib.suppress 2015-10-10 11:04:44 +00:00
Martin Panter 3cae757772 Issue #24402: Merge potential test fix from 3.4 into 3.5 2015-10-10 05:28:17 +00:00
Martin Panter e44dba3b4f Issue #24402: Factor out PtyTests.run_child() in input() tests
This reuses existing code to hopefully make the new test_input_no_stdout_
fileno() test work. It is hanging Free BSD 9 and OS X Tiger buildbots, and I
don't know why.
2015-10-10 05:27:15 +00:00
Martin Panter e02f8fc44d Issue #24402: Merge input() fix from 3.4 into 3.5 2015-10-10 01:55:23 +00:00
Martin Panter c9a6ab56cf Issue #24402: Fix input() when stdout.fileno() fails; diagnosed by Eryksun
Also factored out some test cases into a new PtyTests class.
2015-10-10 01:25:38 +00:00
Brett Cannon 89065d9fc7 Issue #25099: Skip relevant tests in test_compileall when an entry on
sys.path has an unwritable __pycache__ directory.

This typically comes up when someone runs the test suite from an
administrative install of Python on Windows where the user does not
have write permissions to the stdlib's directory.

Thanks to Zachary Ware and Matthias Klose for reporting bugs related
to this issue.
(grafted from 34bbd537b3e688dfbb6498e9083445a6a72fc4b1)
2015-10-09 15:09:43 -07:00
Brett Cannon 65ed750375 Issue #25099: Skip relevant tests in test_compileall when an entry on
sys.path has an unwritable __pycache__ directory.

This typically comes up when someone runs the test suite from an
administrative install of Python on Windows where the user does not
have write permissions to the stdlib's directory.

Thanks to Zachary Ware and Matthias Klose for reporting bugs related
to this issue.
2015-10-09 15:09:43 -07:00
R David Murray 1a815389cc #25328: add missing raise keyword in decode_data+SMTPUTF8 check.
This is a relatively benign bug, since having both be true was correctly
rejected at in SMTPServer even before this patch.

Patch by Xiang Zhang.
2015-10-09 10:19:33 -04:00
Steve Dower 12ee7448f8 Issue #23919: Prevents assert dialogs appearing in the test suite. 2015-10-08 08:56:06 -07:00
Martin Panter ec1aa5c2a1 More typos in 3.5 documentation and comments 2015-10-07 11:03:53 +00:00
Benjamin Peterson 59dc696821 merge 3.4 (#24806) 2015-10-06 19:42:02 -07:00
Benjamin Peterson bd6c41a185 prevent unacceptable bases from becoming bases through multiple inheritance (#24806) 2015-10-06 19:36:54 -07:00
Zachary Ware 479ac6654c Issue #25097: Merge with 3.4 2015-10-06 15:28:56 -05:00
Zachary Ware 106ddf07b3 Issue #25097: Re-raise any other pywin32 error 2015-10-06 15:28:43 -05:00
Zachary Ware af34b248d1 Issue #25097: Merge with 3.4 2015-10-06 15:22:41 -05:00
Zachary Ware 22226c5595 Issue #25097: fix Windows error number access 2015-10-06 15:22:13 -05:00
Serhiy Storchaka 85a0e5f498 Merge heads 2015-10-06 18:39:58 +03:00
Serhiy Storchaka a6d04cf4e6 Merge heads 2015-10-06 18:38:25 +03:00
Guido van Rossum 609081186d Issue #23972: Fix tests for Windows and Debian. (Merge 3.4->3.5) 2015-10-06 08:24:44 -07:00
Guido van Rossum 36bbd0f239 Issue #23972: Fix tests for Windows and Debian. 2015-10-06 08:24:10 -07:00
Serhiy Storchaka 6f5175de15 Issue #25317: Converted doctests in test_tokenize to unittests.
Made test_tokenize discoverable.
2015-10-06 18:23:12 +03:00