Commit Graph

35743 Commits

Author SHA1 Message Date
Lars Gustäbel b7a688b3a4 Issue #24514: tarfile now tolerates number fields consisting of only whitespace. 2015-07-02 19:38:38 +02:00
Donald Stufft fe6399e894 Update setuptools to 18.0.1 and pip to 7.1.0 2015-07-01 11:30:50 -04:00
Serhiy Storchaka 05744ac6e0 Issue #19176: Fixed doctype() related bugs in C implementation of ElementTree.
A deprecation warning no longer issued by XMLParser subclass with default
doctype() method.  Direct call of doctype() now issues a warning.  Parser's
doctype() now is not called if target's doctype() is called.  Based on patch
by Martin Panter.
2015-06-29 22:35:58 +03:00
Serhiy Storchaka 7b6e3b91f5 Issue #24467: Fixed possible buffer over-read in bytearray. The bytearray
object now always allocates place for trailing null byte and it's buffer now
is always null-terminated.
2015-06-29 21:14:06 +03:00
Jason R. Coombs 50373e6c21 Issue #20387: Merge 2015-06-28 11:10:29 -04:00
Serhiy Storchaka 449e2be12b Issue #24456: Fixed possible buffer over-read in adpcm2lin() and lin2adpcm()
functions of the audioop module.
2015-06-28 17:52:09 +03:00
Jason R. Coombs 80c29ac1ea Issue #20387: Merge patch and test 2015-06-28 10:23:11 -04:00
Serhiy Storchaka 101ff3541c Issue #24336: The contextmanager decorator now works with functions with
keyword arguments called "func" and "self".  Patch by Martin Panter.
2015-06-28 17:06:07 +03:00
Berker Peksag 89584c97e4 Issue #23684: Clarify the return value of the scheme attribute of ParseResult and SplitResult objects.
Patch by Martin Panter.
2015-06-25 23:38:48 +03:00
Yury Selivanov 339d5e7d85 Fix asyncio unittests in debug mode 2015-06-24 10:45:44 -04:00
Yury Selivanov 29a602a140 Issue #24400: Fix CoroWrapper for 'async def' coroutines 2015-06-24 10:30:14 -04:00
Yury Selivanov dfbd27f0be asyncio: Merge changes from issue #24400. 2015-06-24 09:41:35 -04:00
Antoine Pitrou 6bc217dd3d Issue #24489: ensure a previously set C errno doesn't disturb cmath.polar(). 2015-06-23 14:31:11 +02:00
Dingyuan Wang e411b6629f Issue #20387: Restore retention of indentation during untokenize. 2015-06-22 10:01:12 +08:00
Jason R. Coombs b6d1cdda8e Issue #20387: Correct test to properly capture expectation. 2015-06-25 22:42:24 -04:00
Serhiy Storchaka 753a1dfcc2 Issue #24408: Fixed test for tkinter.Font on OS X.
Based on patch by Martin Panter.
2015-06-21 14:41:44 +03:00
Jason R. Coombs 5713b3c5bf Issue #20387: Add test capturing failure to roundtrip indented code in tokenize module. 2015-06-20 19:52:22 -04:00
Jason R. Coombs 7cf36387e4 Remove unused import and remove doctest-only import into doctests. 2015-06-20 19:13:50 -04:00
Victor Stinner e12e7aa3fd Issue #15745: Rewrite os.utime() tests in test_os
* Don't use the timestamp of an existing file anymore, only use fixed
  timestamp
* Enhance the code checking the resolution of the filesystem timestamps.
* Check timestamps with a resolution of 1 microsecond instead of 1 millisecond
* When os.utime() uses the current system clock, tolerate a delta of 20 ms.
  Before some os.utime() tolerated a different of 10 seconds.
* Merge duplicated tests and simplify the code
2015-06-12 21:58:00 +02:00
Serhiy Storchaka c0ed707b2f Issue #24408: Added more tkinter.Font tests. 2015-06-09 07:18:54 +03:00
Benjamin Peterson 86c3a3b0b7 merge 3.2 2015-05-25 21:24:26 -05:00
Benjamin Peterson b03856ab66 keep distutils version in sync with python version automatically 2015-05-25 21:24:00 -05:00
Benjamin Peterson d504f20e1c merge 3.2 (#22931) 2015-05-23 10:38:48 -05:00
Benjamin Peterson 9bd476ea57 allow square brackets in cookie values (closes #22931) 2015-05-23 10:36:48 -05:00
Benjamin Peterson deff2b76ec be more robust against the filters list changing under us (closes #24096) 2015-05-03 11:23:37 -04:00
Benjamin Peterson 501182a47b just sort the items tuple directly (closes #24094) 2015-05-02 22:28:04 -04:00
Serhiy Storchaka 07c002573a Issue #24299: Fixed test__locale on Solaris. 2015-06-08 18:48:33 +03:00
Donald Stufft 96cf848a8b Upgrade pip to 7.0.3 and setuptools to 17.0 2015-06-02 11:39:31 -04:00
Donald Stufft 71a8589ddc Closes #24267 - Does not check version on ensurepip uninstall
Ensure that the uninstall helper for Windows passes the proper
flags to pip to prevent it from checking PyPI if the pip that
we're currently attempting to uninstall is the latest verison.
2015-06-02 10:37:08 -04:00
Yury Selivanov 70adad2a0e Issue 24017: Fix asyncio.CoroWrapper to support 'async def' coroutines 2015-05-31 21:37:09 -04:00
Yury Selivanov a316085192 Issue 24004: Support Awaitables (pep 492) in @asyncio.coroutine decorator 2015-05-30 21:02:12 -04:00
Serhiy Storchaka f28fa66351 Issue #5633: Fixed timeit when the statement is a string and the setup is not. 2015-05-30 19:38:26 +03:00
Serhiy Storchaka 50451eb912 Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.
Original patch by David Moore.
2015-05-30 00:53:26 +03:00
Yury Selivanov 1ad08a5555 asyncio: Drop some useless code from tasks.py.
See also issue 24017.
2015-05-28 10:52:19 -04:00
Yury Selivanov 46c759d76d Issue 24298: Fix signature() to properly unwrap wrappers around bound methods 2015-05-27 21:56:53 -04:00
Benjamin Peterson 82d8f06fcd merge 3.3 2015-05-25 21:24:48 -05:00
Victor Stinner 387729e183 Issue #23840: tokenize.open() now closes the temporary binary file on error to
fix a resource warning.
2015-05-26 00:43:58 +02:00
Terry Jan Reedy c4dc43eaf4 Update idlelib/NEWS.txt. 2015-05-23 17:23:30 -04:00
Benjamin Peterson c4ae86e477 merge 3.3 (#22931) 2015-05-23 10:40:47 -05:00
Donald Stufft 7bf0d5a759 Upgrade pip to 7.0.1 2015-05-22 20:30:16 -04:00
Serhiy Storchaka 08d230a540 Issue #24257: Fixed incorrect uses of PyObject_IsInstance().
Fixed segmentation fault in sqlite3.Row constructor with faked cursor type.
Fixed system error in the comparison of faked types.SimpleNamespace.
2015-05-22 11:02:49 +03:00
Donald Stufft df9ba3623a Upgrade pip to 7.0 and setuptools to 16.0 2015-05-22 00:39:22 -04:00
Yury Selivanov bf341fb5f6 Issue 23898: Fix inspect.classify_class_attrs() to work with __eq__ 2015-05-21 15:41:57 -04:00
Serhiy Storchaka 4faf5c5655 Issue #23985: Fixed integer overflow in iterator object. Patch by
Clement Rouault.
2015-05-21 20:50:25 +03:00
Serhiy Storchaka cbfe07e06c Issue 24215: Added tests for more builtin types in test_pprint.
Made test_pprint and test_trace discoverable.
2015-05-20 19:37:10 +03:00
Serhiy Storchaka c0e0022f07 Issue #24134: Use assertRaises() in context manager form in test_slice to
avoid passing the test accidently because slice.__hash__ is None.
2015-05-20 18:37:37 +03:00
Serhiy Storchaka ef94869f4f Issue #24245: Eliminated senseless expect clauses that have no any effect in
IDLE.  Patch by Martin Panter.
2015-05-20 16:15:02 +03:00
Serhiy Storchaka 5d6b7b1cb7 Issue #22107: tempfile.gettempdir() and tempfile.mkdtemp() now try again
when a directory with the chosen name already exists on Windows as well as
on Unix.  tempfile.mkstemp() now fails early if parent directory is not
valid (not exists or is a file) on Windows.
2015-05-20 00:11:48 +03:00
Antoine Pitrou 2545411e28 Issue #23985: Fix a possible buffer overrun when deleting a slice from the front of a bytearray and then appending some other bytes data.
Patch by Martin Panter.
2015-05-19 20:52:27 +02:00
R David Murray 6371446036 #24215: also back out changeset that broke test_trace in 3.4.
I missed that this change was applied to both branches.
2015-05-19 08:24:59 -04:00
Serhiy Storchaka ae760c0a2c Issue #6598: Increased time precision and random number range in
email.utils.make_msgid() to strengthen the uniqueness of the message ID.
2015-05-19 10:09:42 +03:00
Serhiy Storchaka 5bf3120e24 Issue #24091: Fixed various crashes in corner cases in C implementation of
ElementTree.
2015-05-18 18:29:33 +03:00
Serhiy Storchaka ca7fecb038 Issue #24102: Fixed exception type checking in standard error handlers. 2015-05-18 16:08:52 +03:00
Raymond Hettinger 610a51f364 Issue #23757: Only call the concrete list API for exact lists. 2015-05-17 14:45:58 -07:00
Terry Jan Reedy 296c66e21c Issue #24199: Make idlever module self updating. Syop using it in aboutDialog. 2015-05-16 19:28:32 -04:00
Terry Jan Reedy a0b8a508c9 Issue #24212: Put reference in idle.__main__ to issue with explanation. 2015-05-16 18:31:15 -04:00
Serhiy Storchaka 5dbb40ff17 Added tests for more builtin types.
Made test_pprint discoverable.
2015-05-16 21:35:24 +03:00
Terry Jan Reedy 031d0640cd Issue #23964: Update idlelib/idle_test/README.txt. first patch by Al Sweigart. 2015-05-16 14:23:39 -04:00
Serhiy Storchaka a7d00c207f Reverted issue #24134 changes (except new tests). 2015-05-16 16:25:43 +03:00
Terry Jan Reedy 75fb816c78 Issue #23184: idle tests, remove unused names and imports. 2015-05-15 23:55:21 -04:00
Terry Jan Reedy 038c16b9a0 Issue #23184: idlelib, remove more unused names and imports. 2015-05-15 23:03:17 -04:00
Terry Jan Reedy 2733618fd9 idlelib: remove unused names and imports (one is a duplicate import). 2015-05-14 18:10:50 -04:00
Yury Selivanov c58cca5951 asyncio: Use 'collections.abc.Coroutine' in asyncio.iscoroutine (in 3.5) 2015-05-13 15:21:41 -04:00
Yury Selivanov d08c363c26 Sync asyncio code from default branch. 2015-05-13 15:15:56 -04:00
Berker Peksag 3a81f9ba46 Issue #22064: Improve the misleading message from 2to3 when skipping optional fixers.
Patch by Vinod Kurup.
2015-05-13 13:39:51 +03:00
Yury Selivanov e8944cb217 asyncio: Make sure sys.set_coroutine_wrapper is called *only* when loop is running.
Previous approach of installing coroutine wrapper in loop.set_debug() and
uninstalling it in loop.close() was very fragile.  Most of asyncio tests
do not call loop.close() at all.  Since coroutine wrapper is a global
setting, we have to make sure that it's only set when the loop is
running, and is automatically unset when it stops running.

Issue #24017.
2015-05-12 11:43:04 -04:00
Berker Peksag ea6d5592f2 Issue #23796: peak and read1 methods of BufferedReader now raise ValueError
if they called on a closed object.

Patch by John Hergenroeder.
2015-05-12 17:13:56 +03:00
Yury Selivanov 1af2bf75a2 asyncio: Support PEP 492. Issue #24017. 2015-05-11 22:27:25 -04:00
Yury Selivanov 59eb9a4da5 asyncio: async() function is deprecated in favour of ensure_future(). 2015-05-11 14:48:38 -04:00
Yury Selivanov 740169cd24 Sync asyncio changes from the main repo. 2015-05-11 14:23:38 -04:00
Benjamin Peterson 65bcdd7195 ensure .keywords is always a dict 2015-05-09 00:25:18 -04:00
Donald Stufft b0fc24bff4 Upgrade setuptools to 15.2 2015-05-08 21:30:04 -04:00
Larry Hastings 7e63b36f7f Issue #21520: test_zipfile no longer fails if the word 'bad' appears
anywhere in the name of the current directory.
2015-05-08 06:54:58 -07:00
Serhiy Storchaka 4b5367c46d Fixed English in error message. 2015-05-06 19:21:00 +03:00
Serhiy Storchaka e130503c7b Issue #24134: assertRaises(), assertRaisesRegex(), assertWarns() and
assertWarnsRegex() checks are not longer successful if the callable is None.

Added tests for assertRaises().
2015-05-06 19:13:11 +03:00
Serhiy Storchaka ab914780ba Issue #24125: Saved error's line and column numbers when an error is occured
during closing expatreader.  Fixed a regression introduced in issue #23865.
2015-05-06 09:36:06 +03:00
Benjamin Peterson 8c59816b70 merge 3.3 (#24096) 2015-05-03 11:28:46 -04:00
Benjamin Peterson 122f4b1bda merge 3.3 (#24094) 2015-05-02 22:36:26 -04:00
Guido van Rossum 0a9933ebf3 Asyncio issue 222 / PR 231 (Victor Stinner) -- fix @coroutine functions without __name__. 2015-05-02 18:38:24 -07:00
Serhiy Storchaka 71f73ca7a9 Issue #23713: Fixed fragility of test_imap_unordered_handle_iterable_exception.
Patch by Davin Potts.
2015-04-23 11:35:59 +03:00
Serhiy Storchaka 3bd66abb94 Use more precise Tcl version checks in tests. 2015-04-23 10:57:40 +03:00
Serhiy Storchaka 3af7a38c61 Issue #16840. Turn off bignum support in tkinter with with Tcl earlier than 8.5.8
(tclTomMath.h was broken) and non-final Tcl 8.6.
2015-04-22 10:53:08 +03:00
Serhiy Storchaka 462c357d70 Fixed full Tcl version parsing in tests for pre-final versions. 2015-04-22 08:36:03 +03:00
Andrew Kuchling 333518e01d #15183: clarify timeit documentation to say that setup statement isn't timed 2015-04-21 19:43:33 -04:00
Serhiy Storchaka b6076fb13c Issue #23008: Fixed resolving attributes with boolean value is False in pydoc. 2015-04-21 21:09:48 +03:00
Benjamin Peterson d73aca769f do not call into python api if an exception is set (#24022) 2015-04-21 12:05:19 -04:00
Guido van Rossum 0bd16bc4cd Fix asyncio issue 235: Queue subclass bug caused by JoinableQueue merge. 2015-04-20 09:24:24 -07:00
Serhiy Storchaka 2b0d2007a1 Issue #23908: os functions now reject paths with embedded null character
on Windows instead of silently truncate them.
2015-04-20 09:53:58 +03:00
Serhiy Storchaka 2ef7c47844 Issue #23728: binascii.crc_hqx() could return an integer outside of the range
0-0xffff for empty data.
2015-04-20 09:26:49 +03:00
Serhiy Storchaka 16b2e4f548 Issue #23842: Added tests for os.major(), os.minor() and os.makedev(). 2015-04-20 09:22:13 +03:00
Serhiy Storchaka 6a69466f61 Backported tests from issue #20175. 2015-04-16 11:54:14 +03:00
R David Murray f4bbc535b9 #23925: stop (eg) PYTHONSTARTUP from causing test_cmd_line failure.
Patch by Jamiel Almeida.
2015-04-14 17:57:41 -04:00
Zachary Ware 50db6acc9b Issue #23956: Fix typo in imp.py docstring.
Patch by Jacinda Shelly.
2015-04-14 15:43:00 -05:00
Berker Peksag 34c9be7ebd Issue #23811: Add missing newline to the PyCompileError error message.
Patch by Alex Shkop.
2015-04-14 18:57:55 +03:00
Andrew Kuchling 8b963c5853 #17898: reset k and v so that the loop doesn't use an old value 2015-04-13 10:38:56 -04:00
Andrew Kuchling 770b08e8e2 #23883: add names missing from __all__ (l*gettext, bind_textdomain_codeset) 2015-04-13 09:58:36 -04:00
Łukasz Langa 5f6684efe0 Issue #23310: Fix MagicMock's initializer to work with __methods__.
Behavior equivalent to m.configure_mock().  Patch by Kasia Jachim.
2015-04-14 00:12:57 -07:00
Berker Peksag 4882cacab6 Issue #23943: Fix typos. Patch by Piotr Kasprzyk. 2015-04-14 09:30:01 +03:00
Benjamin Peterson 52a3b74900 remove useless word (closes #23929) 2015-04-13 20:24:10 -04:00
Antoine Pitrou 85e3ee749c Issue #22982: Improve BOM handling when seeking to multiple positions of a writable text file. 2015-04-13 20:01:21 +02:00
Antoine Pitrou 20d31b5182 Merge 2015-04-13 19:48:52 +02:00
Antoine Pitrou 25f85d4bd5 Issue #23309: Avoid a deadlock at shutdown if a daemon thread is aborted
while it is holding a lock to a buffered I/O object, and the main thread
tries to use the same I/O object (typically stdout or stderr).  A fatal
error is emitted instead.
2015-04-13 19:41:47 +02:00
Zachary Ware 4c9c848159 Issue #17202: Add .bat to .hgeol to force them to CRLF.
Using LF can a script to fail if it tries to use a label that is
split across 512 byte blocks.  Who knows why.
2015-04-13 11:59:54 -05:00
Guido van Rossum e173c07502 Unittest for Issue 21511 by Christie Wilson bobcatfish@gmail.com. 2015-04-11 17:44:01 -04:00
Berker Peksag ecb75e26db Issue #23062: Add a test for suppressing --version with argparse.SUPPRESS.
TestHelpVersionOptional was redundant.
2015-04-10 16:11:12 +03:00
Serhiy Storchaka 7e7a3dba5f Issue #23865: close() methods in multiple modules now are idempotent and more
robust at shutdown. If needs to release multiple resources, they are released
even if errors are occured.
2015-04-10 13:24:41 +03:00
Serhiy Storchaka dee948b359 Issues #23363, #23364, #23365, #23366: Fixed itertools overflow tests.
Used PyMem_New to check overflow.
2015-02-03 01:34:09 +02:00
Benjamin Peterson 1572944499 reduce memory usage of test (closes #23369) 2015-02-02 17:47:07 -05:00
Benjamin Peterson 0eaabf1c05 check for overflows in permutations() and product() (closes #23363, closes #23364) 2015-02-01 21:34:07 -05:00
Benjamin Peterson 6f082297b2 check for overflow in combinations_with_replacement (closes #23365) 2015-02-01 21:10:47 -05:00
Benjamin Peterson 4b40eeb339 detect overflow in combinations (closes #23366) 2015-02-01 20:59:00 -05:00
Benjamin Peterson 68389eaa3f remove extra ws 2015-02-01 18:02:09 -05:00
Benjamin Peterson e3bfe19358 fix possible overflow in encode_basestring_ascii (closes #23369) 2015-02-01 17:53:53 -05:00
Serhiy Storchaka 4dbc305002 Issue #23055: Fixed a buffer overflow in PyUnicode_FromFormatV. Analysis
and fix by Guido Vranken.
2015-01-27 22:18:46 +02:00
Serhiy Storchaka 3f95292be6 Issue #23055: Fixed a buffer overflow in PyUnicode_FromFormatV. Analysis
and fix by Guido Vranken.
2015-01-27 22:18:34 +02:00
Benjamin Peterson 81b7374fbe merge 3.2 (#16043) 2014-12-05 20:30:54 -05:00
Benjamin Peterson 4e9cefaf86 add a default limit for the amount of data xmlrpclib.gzip_decode will return (closes #16043) 2014-12-05 20:15:15 -05:00
Benjamin Peterson e71abcc7bb merge 3.2 2014-11-05 11:29:39 -05:00
Benjamin Peterson 258f3f0dc2 use pythontest.net for url fragment test 2014-11-05 11:27:14 -05:00
Benjamin Peterson 97751fa5c9 merge 3.2 2014-11-03 15:11:53 -05:00
Benjamin Peterson 863c962e68 move idna test domain to pythontest.net 2014-11-03 15:10:47 -05:00
Benjamin Peterson 4d856895bd test is cpython only 2014-10-15 13:39:46 -04:00
Benjamin Peterson e1bd38c03c fix integer overflow in unicode case operations (closes #22643) 2014-10-15 11:47:36 -04:00
Georg Brandl 18e897250a Bump to 3.3.6 2014-10-12 09:03:40 +02:00
Georg Brandl 439d88542e Bump to 3.2.6 2014-10-12 08:50:38 +02:00
Georg Brandl b3ac84322f #16040: fix unlimited read from connection in nntplib. 2014-10-12 08:50:11 +02:00
Georg Brandl e800a0e1c2 Bump to 3.2.6rc1 2014-10-04 14:15:42 +02:00
Georg Brandl 76e73f85a3 Bump to 3.3.6rc1 2014-10-04 14:22:11 +02:00
Georg Brandl 4480d30b8b ref #19855: skip uuid test_find_mac on non-Posix as in later branches 2014-10-01 22:31:04 +02:00
Georg Brandl 51c116223e Issue #19855: uuid.getnode() on Unix now looks on the PATH for the
executables used to find the mac address, with /sbin and /usr/sbin as
fallbacks.

Issue #11508: Fixed uuid.getnode() and uuid.uuid1() on environment with
virtual interface.  Original patch by Kent Frazier.

Issue #18784: The uuid module no more attempts to load libc via ctypes.CDLL,
if all necessary functions are already found in libuuid.
Patch by Evgeny Sologubov.

Issue #16102: Make uuid._netbios_getnode() work again on Python 3.
2014-09-30 19:34:19 +02:00
Georg Brandl 3bc35672a2 Backport b533cc11d114 to fix intermittent test_urllibnet failures. 2014-09-30 17:30:18 +02:00
Georg Brandl 786c8e7dd5 Fix-up for 0f362676460d: add missing size argument to SSLFakeFile.readline(), as in 2.6 backport 8a6def3add5b 2014-09-30 16:31:21 +02:00
Benjamin Peterson bbd0a323ae clear BufferedRWPair weakrefs on deallocation (closes #22517) 2014-09-29 22:46:57 -04:00
Senthil Kumaran e025b52db0 Issue #22419: Limit the length of incoming HTTP request in wsgiref server to 65536 bytes. 2014-09-17 16:29:29 +08:00
Senthil Kumaran 2a42a0bff3 Issue #22421 - Secure pydoc server run. Bind it to localhost instead of all interfaces. 2014-09-17 13:17:58 +08:00
Antoine Pitrou 7d0b8f95e7 Lax cookie parsing in http.cookies could be a security issue when combined
with non-standard cookie handling in some Web browsers.

Reported by Sergey Bobrov.
2014-09-17 00:23:55 +02:00
Ned Deily 217f4cd7ee Issue #21323: Fix http.server to again handle scripts in CGI subdirectories,
broken by the fix for security issue #19435.  Patch by Zach Byrne.
2014-07-12 22:12:39 -07:00
Ned Deily 915a30fb0d Issue #21323: Fix http.server to again handle scripts in CGI subdirectories,
broken by the fix for security issue #19435.  Patch by Zach Byrne.
2014-07-12 22:06:26 -07:00
Benjamin Peterson 0fd3972a3f merge 3.2 2014-06-16 23:16:06 -07:00
Benjamin Peterson 314dc126ce expect the correct platform-dependent linesep 2014-06-16 23:15:50 -07:00
Benjamin Peterson 6cd1954c5c merge 3.2 (#21766) 2014-06-14 18:40:10 -07:00
Benjamin Peterson 73b8b1cdb8 url unquote the path before checking if it refers to a CGI script (closes #21766) 2014-06-14 18:36:29 -07:00
R David Murray 842f00e725 Suppress a couple more DeprecationWarnings in the test suite. 2014-06-11 17:09:43 -04:00
Serhiy Storchaka 93da9b5e57 Use assertRaisesRegex instead of deprecated assertRaisesRegexp. 2015-04-10 12:52:09 +03:00
Berker Peksag 7ecfc82edb Issue #23400: Raise same exception on both Python 2 and 3 if sem_open is not available.
Patch by Davin Potts.
2015-04-08 17:56:30 +03:00
Berker Peksag 52c0c3382d Skip nntplib tests when transient errors captured. 2015-04-08 11:24:27 +03:00
Victor Stinner c9d11c341e Issue #23879, asyncio: SelectorEventLoop.sock_connect() must not call connect()
again if the first call to connect() raises an InterruptedError.

When the C function connect() fails with EINTR, the connection runs in
background. We have to wait until the socket becomes writable to be notified
when the connection succeed or fails.
2015-04-07 21:38:04 +02:00
Benjamin Peterson 033c58ad97 remove smtpd dead code (closes #23873)
Patch by Hoolean.
2015-04-07 11:59:06 -04:00
Donald Stufft b32fb8d274 Update pip to 6.1.1 2015-04-07 07:09:59 -04:00
Victor Stinner 4bea461572 Issue #23881: ftp://gatekeeper.research.compaq.com/ and ftp://ftp.debian.org/
are down, don't use anymore in test_urllib2net
2015-04-07 12:52:50 +02:00
Victor Stinner ab73e65032 Issue #23881: urllib.request.ftpwrapper constructor now closes the socket if
the FTP connection failed to fix a ResourceWarning.
2015-04-07 12:49:27 +02:00
Donald Stufft fe508d1592 Upgrade pip to 6.1.0 and setuptools to 15.0 2015-04-07 01:29:33 -04:00
Serhiy Storchaka 6fbeae406e Issue #22977: Remove unconditional import of ctypes. 2015-04-06 20:37:16 +03:00
Benjamin Peterson 0c803319b0 fix extended command syntax (closes #23872) 2015-04-05 10:01:48 -04:00
Serhiy Storchaka 9a6e201f7d Issue #15133: _tkinter.tkapp.getboolean() now supports Tcl_Obj and always
returns bool.  tkinter.BooleanVar now validates input values (accepted bool,
int, str, and Tcl_Obj).  tkinter.BooleanVar.get() now always returns bool.
2015-04-04 12:43:01 +03:00
Serhiy Storchaka c9ba38c21c Open files in binary mode to avoid newlines transformation. 2015-04-04 10:36:25 +03:00
Serhiy Storchaka 9fa84b202e Issue #23825: Fixed test_idle under -OO. 2015-04-04 09:47:31 +03:00
Serhiy Storchaka 9f8a8910a4 Escaped backslashes in docstrings. 2015-04-03 18:12:41 +03:00
Serhiy Storchaka 807743403d Issue #22351. MockSslTests tests in test_nntplib now are reported if skipped. 2015-04-03 15:02:20 +03:00
Victor Stinner 8c9bba07d4 Issue #22351: Fix test_nntplib if the ssl module is missing
@unittest.skipUnless(ssl, '...') doesn't work because the class body uses the
nntplib.NNTP_SSL attribute which doesn't exist.
2015-04-03 11:06:40 +02:00
Serhiy Storchaka 13e41c516a Issue #10590: Added tests for xml.sax.parse() and xml.sax.parseString(). 2015-04-02 23:05:57 +03:00
Serhiy Storchaka aa9563c1b8 Issue #2175: Added tests for xml.sax.saxutils.prepare_input_source().
Made test XML files non-ASCII.
2015-04-02 20:55:59 +03:00
Serhiy Storchaka 2379d541dd Issue #16840: Fixed test_tcl for Tcl < 8.5. 2015-04-02 20:07:09 +03:00
Serhiy Storchaka a5a4bd76fb Issue #21526: Skip test_booleans on Tcl < 8.5. 2015-04-02 19:57:52 +03:00
Serhiy Storchaka ea134da929 Issue #16840: Tkinter now supports 64-bit integers added in Tcl 8.4 and
arbitrary precision integers added in Tcl 8.5.
2015-04-02 18:46:50 +03:00
Victor Stinner d223fa631d Issue #22977: Fix test_exceptions 2015-04-02 14:17:38 +02:00
Serhiy Storchaka 9171fe5a1d Issue #21526: Fixed the test_booleans test for wantobjects = 0. 2015-04-02 11:46:07 +03:00
Serhiy Storchaka f7de3dd02d Issue #21526: Tkinter now supports new boolean type in Tcl 8.5. 2015-04-02 10:35:57 +03:00
Serhiy Storchaka f41f8f9974 Issue #22977: Fixed formatting Windows error messages on Wine.
Patch by Martin Panter.
2015-04-02 09:47:27 +03:00
Benjamin Peterson a7eaf56a6d replace 512 bit dh key with a 2014 bit one (closes #23844)
Patch by Cédric Krier.
2015-04-02 00:04:06 -04:00
Serhiy Storchaka a16de5dbf5 Issue #23821: Fixed test_pdb failure under -O. 2015-04-01 16:58:19 +03:00
Serhiy Storchaka c512adc90d Issue #23838: linecache now clears the cache and returns an empty result on
MemoryError.
2015-04-01 16:54:05 +03:00
Serhiy Storchaka 263dcd20a3 Issue #23799: Added test.support.start_threads() for running and cleaning up
multiple threads.
2015-04-01 13:01:14 +03:00
Serhiy Storchaka b9100e5d9d Issue #18473: Fixed pickle compatibility tests for optional modules.
Added WindowsError to compatibility mappings.
2015-03-31 16:49:26 +03:00
Serhiy Storchaka bfe1824d08 Issue #18473: Fixed 2to3 and 3to2 compatible pickle mappings.
Fixed ambigious reverse mappings.  Added many new mappings.  Import mapping
is no longer applied to modules already mapped with full name mapping.

Added tests for compatible pickling and unpickling and for consistency of
_compat_pickle mappings.
2015-03-31 13:12:37 +03:00
R David Murray e7f5e147cd #23792: also catch interrupt around pipe.write.
The previous patch only dealt with KeyboardInterrupt when all of the
data had been consumed by the pager.  This deals with the interrupt
when some data is still pending.
2015-03-30 10:14:47 -04:00
R David Murray 7d0325d6c8 #23745: handle duplicate MIME parameter names in new parser.
This mimics get_param's error handling for the most part.  It is slightly
better in some regards as get_param can produce some really weird results for
duplicate *0* parts.  It departs from get_param slightly in that if we have a
mix of non-extended and extended pieces for the same parameter name, the new
parser assumes they were all supposed to be extended and concatenates all the
values, whereas get_param always picks the non-extended parameter value.  All
of this error recovery is pretty much arbitrary decisions...
2015-03-29 21:53:05 -04:00
Serhiy Storchaka a3a100b594 Issue #22390: test.regrtest now emits a warning if temporary files or
directories are left after running a test.
2015-03-30 01:28:02 +03:00
Donald Stufft d90f8d10e0 Closes #23801 - Ignore entire preamble to multipart in cgi.FieldStorage 2015-03-29 16:43:23 -04:00
R David Murray 1058cda38f #23792: Ignore KeyboardInterrupt when the pydoc pager is active.
Previously, if you hit ctl-c while the pager was active, the python that
launched the subprocess for the pager would see the KeyboardInterrupt in the
__exit__ method of the subprocess context manager where it was waiting for the
subprocess to complete, ending the wait.  This would leave the pager running,
while the interactive interpreter, after handling the exception by printing
it, would go back to trying to post a prompt...but the pager would generally
have the terminal in raw mode, and in any case would be still trying to read
from stdin.  On some systems, even exiting python at that point would not
restore the terminal mode.  The problem with raw mode could also happen if
ctl-C was hit when pydoc was called from the shell command line and the pager
was active.

Instead, we now wait on the subprocess in a loop, ignoring KeyboardInterrupt
just like the pager does, until the pager actually exits.

(Note: this was a regression relative to python2...in python2 the pager
is called via system, and system does not return until the pager exits.)
2015-03-29 15:15:40 -04:00
Serhiy Storchaka 48070c1248 Issue #23803: Fixed str.partition() and str.rpartition() when a separator
is wider then partitioned string.
2015-03-29 19:21:02 +03:00
Serhiy Storchaka 9db55004a1 Make some tests more frienly to MemoryError.
Free memory, unlock hanging threads.
2015-03-28 20:38:37 +02:00
Victor Stinner d7aa5248fb Issue #23445: Fix test.support.python_is_optimized() for CFLAGS=-Og
-Og does not optimize the C code, it's just "fast debugging".
2015-03-27 15:36:01 +01:00
Victor Stinner 79fd962652 asyncio: Fix _SelectorTransport.__repr__() if the event loop is closed 2015-03-27 15:20:08 +01:00
Serhiy Storchaka 0b4e355b8e Check that failed writerow() doesn't produce change a file. 2015-03-25 19:16:15 +02:00
Serhiy Storchaka 1b87ae0c91 Issue #23742: ntpath.expandvars() no longer loses unbalanced single quotes. 2015-03-25 16:40:15 +02:00
Serhiy Storchaka b0749ca933 Fixed bytes warnings when run tests with -vv. 2015-03-25 01:33:19 +02:00
Serhiy Storchaka 7665be6087 Issue #21802: The reader in BufferedRWPair now is closed even when closing
writer failed in BufferedRWPair.close().
2015-03-24 23:21:57 +02:00
Serhiy Storchaka 8ffe917cee Issue #23671: string.Template now allows to specify the "self" parameter as
keyword argument.  string.Formatter now allows to specify the "self" and
the "format_string" parameters as keyword arguments.
2015-03-24 22:28:43 +02:00
Serhiy Storchaka be1eb14241 Added tests for mixed kinds of Unicode strings. 2015-03-24 21:48:30 +02:00
Serhiy Storchaka 6c86fe2d4b Issue #23583: Added tests for standard IO streams in IDLE. 2015-03-24 19:46:54 +02:00
Serhiy Storchaka d4c2ac8394 Issue #21560: An attempt to write a data of wrong type no longer cause
GzipFile corruption.  Original patch by Wolfgang Maier.
2015-03-23 15:25:43 +02:00
R David Murray 936da2a796 #23647: Increase imaplib's MAXLINE to accommodate modern mailbox sizes. 2015-03-22 16:17:46 -04:00
R David Murray beed8402ca #23539: Set Content-Length to 0 for PUT, POST, and PATCH if body is None.
Some http servers will reject PUT, POST, and PATCH requests if they
do not have a Content-Length header.

Patch by James Rutherford, with additional cleaning up of the
'request' documentation by me.
2015-03-22 15:18:23 -04:00
R David Murray 75ed90a4cf #23700: fix/improve comment 2015-03-22 12:33:46 -04:00
Ned Deily ce8f5ded65 Issue #22289: Prevent test_urllib2net failures due to ftp connection timeout. 2015-03-22 01:14:48 -07:00
Serhiy Storchaka 52027c301a Issue #22351: The nntplib.NNTP constructor no longer leaves the connection
and socket open until the garbage collector cleans them up.  Patch by
Martin Panter.
2015-03-21 09:40:26 +02:00
Serhiy Storchaka 74a49ac3f5 Issue #23681: Fixed Python 2 to 3 poring bugs.
Indexing bytes retiurns an integer, not bytes.
2015-03-20 16:46:19 +02:00
Serhiy Storchaka d83b7c2df4 Issue #23700: NamedTemporaryFile iterator closed underlied file object in
some circunstances while NamedTemporaryFile object was living.  This causes
failing test_csv.  Changed the implementation of NamedTemporaryFile.__iter__
to make tests passed.
2015-03-20 16:11:20 +02:00
Serhiy Storchaka 423feea01e Issue #23136: _strptime now uniformly handles all days in week 0, including
Jan 30 of previous year.  Based on patch by Jim Carroll.
2015-03-19 19:13:37 +02:00
Serhiy Storchaka 56cefa69ee Issue #23700: Iterator of NamedTemporaryFile now keeps a reference to
NamedTemporaryFile instance.  Patch by Bohuslav Kabrda.
2015-03-19 15:23:15 +02:00
Benjamin Peterson 86fdbf3152 wrap properly 2015-03-18 21:35:38 -05:00
Ethan Furman 482fe0477e issue23673
add private method to enum to support replacing global constants with Enum members:
- search for candidate constants via supplied filter
- create new enum class and members
- insert enum class and replace constants with members via supplied module name
- replace __reduce_ex__ with function that returns member name, so previous Python versions can unpickle
modify IntEnum classes to use new method
2015-03-18 18:19:30 -07:00
Antoine Pitrou d833779cea Issue #22903: The fake test case created by unittest.loader when it fails importing a test module is now picklable. 2015-03-18 23:56:46 +01:00
Antoine Pitrou c4c19b3938 Issue #23353: improve exceptions tests for generators 2015-03-18 22:22:46 +01:00
Victor Stinner 376658fa13 Issue #11726: Fix linecache example in the doc
Use a Python source file (linecache.__file__) instead of /etc/passwd.

Modify also linecache docstrings to clarify the linecache is written to cache
Python source files, not any text files.
2015-03-18 14:16:50 +01:00
Victor Stinner d6dc7bdaf9 Issue #23456: Add missing @coroutine decorators in asyncio 2015-03-18 11:37:42 +01:00
Vinay Sajip d55436ace3 Issue #23207: Improved kwarg validation. 2015-03-18 08:47:58 +00:00
Ned Deily ab6b9f8a5b Issue #22585: make URandomFDTests test case actually run 2015-03-17 04:30:08 -07:00
Serhiy Storchaka 05d54730da Use non-zero and non-last positions in error handler tests. 2015-03-16 08:29:47 +02:00
Serhiy Storchaka 98d156b2b2 Increased coverage of standard codec error handlers. 2015-03-15 23:41:37 +02:00
Berker Peksag a785dece57 Issue #23568: Add rdivmod support to MagicMock() objects.
Patch by Håkan Lövdahl.
2015-03-15 01:51:56 +02:00
Serhiy Storchaka 577fc4e87f Issue #23138: Fixed parsing cookies with absent keys or values in cookiejar.
Patch by Demian Brecht.
2015-03-13 09:05:01 +02:00
Serhiy Storchaka 79fbeee237 Issue #23051: multiprocessing.Pool methods imap() and imap_unordered() now
handle exceptions raised by an iterator.  Patch by Alon Diamant and Davin
Potts.
2015-03-13 08:25:26 +02:00
Serhiy Storchaka a60c2fe480 Issue #23641: Cleaned out legacy dunder names from tests and docs.
Fixed 2 to 3 porting bug in pynche.ColorDB.
2015-03-12 21:56:08 +02:00
Berker Peksag 18987a11ce Issue #20617: Remove unused import in test_ssl.
Patch by Mark Lawrence.
2015-03-12 18:50:49 +02:00
Victor Stinner 0561c53d78 Issue #23605: Refactor os.walk() tests to also run them on os.fwalk() 2015-03-12 10:28:24 +01:00
Serhiy Storchaka a112a8ae47 Issue #22928: Disabled HTTP header injections in http.client.
Original patch by Demian Brecht.
2015-03-12 11:13:36 +02:00
Serhiy Storchaka c775ad615a Issue #23192: Fixed generator lambdas. Patch by Bruno Cauet. 2015-03-11 18:20:35 +02:00
Serhiy Storchaka cf4a2f29ad Issue #23615: Modules bz2, tarfile and tokenize now can be reloaded with
imp.reload().  Patch by Thomas Kluyver.
2015-03-11 17:18:03 +02:00
Antoine Pitrou a654510150 Issue #23629: Fix the default __sizeof__ implementation for variable-sized objects. 2015-03-10 22:32:00 +01:00
Steve Dower ebb8c2d528 Issue #22028: Ensure mimetypes will not open registry keys with embedded nulls 2015-03-10 13:17:21 -07:00
Victor Stinner 7a82afee70 asyncio: Fix repr(BaseSubprocessTransport) if it didn't start yet
Replace "running" with "not started" and don't show the pid if the subprocess
didn't start yet.
2015-03-10 16:32:29 +01:00
Benjamin Peterson 101447b3fe fix up import style 2015-03-09 10:37:50 -04:00
Serhiy Storchaka f87afb0381 Issue #21619: Cleaned up test_broken_pipe_cleanup.
Patch by Martin Panter.
2015-03-08 09:16:40 +02:00
Antoine Pitrou e3207fe86b Issue #20876: correctly close temporary file in test.support.fs_is_case_insensitive() 2015-03-08 00:15:05 +01:00
Serhiy Storchaka f8904e99c7 Issue #22853: Added regression test for using multiprocessing.Queue at import
time.  Patch by Davin Potts.
2015-03-06 23:32:54 +02:00
Benjamin Peterson c19ed37579 remove redundant test 2015-03-06 09:10:26 -05:00
Benjamin Peterson a915723dc7 fix potential refleak in PyFloat_AsDouble (closes #23590) 2015-03-06 09:08:44 -05:00
Benjamin Peterson 7bcf9a5588 use _import_symbols to import VERIFY_* constants 2015-03-04 23:18:57 -05:00
Benjamin Peterson c3d9c5ca0a adjust test_crl_check for trusted first being default 2015-03-04 23:18:48 -05:00
Benjamin Peterson 990fcaac3c expose X509_V_FLAG_TRUSTED_FIRST 2015-03-04 22:49:41 -05:00
Victor Stinner 20f4bd4a04 Issue #21619: Try to fix test_broken_pipe_cleanup() 2015-03-05 02:38:41 +01:00
Serhiy Storchaka 7beb4f96dc Issue #23504: Added an __all__ to the types module. 2015-03-04 09:43:27 +02:00
Steve Dower 3f9e381030 Issue #18382: Zero-length messages are consumed by ReadFile on Windows 8 and later 2015-03-02 08:05:27 -08:00
Serhiy Storchaka 9270be7662 Added more tests for urllib.parse utility functions.
These functions are not documented but used in third-party code.
2015-03-02 16:32:29 +02:00
Berker Peksag ed0392ae06 Issue #23527: Update Gmail port number for STARTTLS to 587.
Patch by Alex Shkop.
2015-03-02 07:40:36 +02:00
Berker Peksag 659f631a5e Issue #23477: Improve test coverage of wsgiref.simple_server.
The test checks that the environ argument contains correct headers,
querystring and path information.

Patch by Alex Shkop.
2015-03-02 06:53:33 +02:00
Berker Peksag bcdfc6a1fa Issue #23387: Skip test_issue16464 if it raises an 5xx error.
Also, remove support.run_doctest() since there is no doctests in
test_urllib2 and urllib.request.
2015-03-02 06:01:01 +02:00
Serhiy Storchaka 4c094e5fd5 Fixed pydoc tests when run with -OO. 2015-03-01 15:31:36 +02:00
Alexander Belopolsky 24d3deefcf Fixes #23521: Corrected pure python implementation of timedelta division.
* Eliminated OverflowError from timedelta * float for some floats;
 * Corrected rounding in timedlta true division.
2015-02-28 10:41:57 -05:00
Serhiy Storchaka cf265fd02a Fixed a test for issue #21619 on Windows.
On Windows an OSError with errno=EINVAL is raised.
2015-02-28 13:27:54 +02:00
Serhiy Storchaka ab900c21fc Issue #21619: Popen objects no longer leave a zombie after exit in the with
statement if the pipe was broken.  Patch by Martin Panter.
2015-02-28 12:43:08 +02:00
Victor Stinner ce8c7682d6 Issue #23537: Remove 2 unused private methods of asyncio.BaseSubprocessTransport
Methods only raise NotImplementedError and are never used.
2015-02-27 17:49:09 +01:00
Victor Stinner b389b48265 Issue #23526: Fix ResourceWarning in test_httplib. Patch written by Alex Shkop. 2015-02-27 17:47:23 +01:00
Larry Hastings 8c3ec536e9 Merge 3.4.3 release engineering changes back into 3.4. 2015-02-26 05:58:48 -08:00
Benjamin Peterson ed135f46ec remove unused import 2015-02-25 16:47:14 -05:00
Larry Hastings fc8eda5ad8 Release bump for 3.4.3 final. 2015-02-22 23:55:39 -08:00
Larry Hastings e1642419b1 Doc updates for 3.4.3 final. 2015-02-22 23:54:38 -08:00
Serhiy Storchaka c26a1a490f Broke reference loops in tests added in issue #5700. 2015-02-23 00:28:38 +02:00