Commit Graph

37297 Commits

Author SHA1 Message Date
Larry Hastings 8093254597 Merge from 3.4. 2015-05-08 06:58:56 -07: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 fe373a5425 Fixed English in error message. 2015-05-06 19:22:55 +03:00
Serhiy Storchaka 4b5367c46d Fixed English in error message. 2015-05-06 19:21:00 +03:00
Serhiy Storchaka 24d3b7f9df 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:14:47 +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 645058d11a Issue #23880: Tkinter's getint() and getdouble() now support Tcl_Obj.
Tkinter's getdouble() now supports any numbers (in particular int).
2015-05-06 14:00:04 +03:00
Serhiy Storchaka 9749b5a6a3 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:38:22 +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
Berker Peksag 076dbd0560 Fix remaining tests and remove an unused import. 2015-05-06 07:01:52 +03:00
Berker Peksag ce643913a9 Issue #9517: Move script_helper to the support package.
Patch by Christie Wilson.
2015-05-06 06:33:17 +03:00
Benjamin Peterson 025e9ebd0a PEP 448: additional unpacking generalizations (closes #2292)
Patch by Neil Girdhar.
2015-05-05 20:16:41 -04:00
Raymond Hettinger ad17be7682 Issue #24113: Remove unreachable code in shlex. 2015-05-04 22:45:47 -04:00
Eric Snow 00607e91bd Issue #23911: Fix mixed bytes/strings. 2015-05-04 11:48:39 -06:00
Benjamin Peterson 63a6a6fd41 merge 3.4 (#24096) 2015-05-03 11:29:58 -04:00
Benjamin Peterson 8c59816b70 merge 3.3 (#24096) 2015-05-03 11:28:46 -04:00
Benjamin Peterson deff2b76ec be more robust against the filters list changing under us (closes #24096) 2015-05-03 11:23:37 -04:00
Serhiy Storchaka 24559e4834 Issue #22619: Added negative limit support in the traceback module.
Based on patch by Dmitry Kazakov.
2015-05-03 13:19:46 +03:00
Benjamin Peterson 88abdef02b merge 3.4 (#24094) 2015-05-02 22:37:13 -04:00
Benjamin Peterson 122f4b1bda merge 3.3 (#24094) 2015-05-02 22:36:26 -04:00
Benjamin Peterson 501182a47b just sort the items tuple directly (closes #24094) 2015-05-02 22:28:04 -04:00
Guido van Rossum 97bd4b0cd9 Asyncio issue 222 / PR 231 (Victor Stinner) -- fix @coroutine functions without __name__. (Merged from 3.4 branch.) 2015-05-02 18:45:51 -07: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
Eric Snow 32439d6eb6 Issue #23911: Move path-based bootstrap code to a separate frozen module. 2015-05-02 19:15:18 -06:00
Benjamin Peterson 1dfd247c1b remove the concept of an unoptimized function scope from the compiler, since it can't happen anymore 2015-04-27 21:44:22 -04:00
Gregory P. Smith 32d34bcf1d Use assertEqual rather than assertEquals to avoid the deprecation warning. 2015-04-26 05:05:53 +00:00
Gregory P. Smith 8cb6569fe1 Implements issue #9951: Adds a hex() method to bytes, bytearray, & memoryview.
Also updates a few internal implementations of the same thing to use the
new built-in code.

Contributed by Arnon Yaari.
2015-04-25 23:22:26 +00:00
Serhiy Storchaka 84de1bf281 Issue #23713: Fixed fragility of test_imap_unordered_handle_iterable_exception.
Patch by Davin Potts.
2015-04-23 11:36:40 +03: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 f28d54d3b9 Use more precise Tcl version checks in tests. 2015-04-23 10:58:15 +03:00
Serhiy Storchaka 3bd66abb94 Use more precise Tcl version checks in tests. 2015-04-23 10:57:40 +03:00
Facundo Batista 244afcf26c Issue #23887: urllib.error.HTTPError now has a proper repr() representation. 2015-04-22 18:35:54 -03:00
Berker Peksag 30912f3db0 Issue #21483: Skip test_timestamp_overflow on NFS.
Patch by Isaac Schwabacher.
2015-04-22 11:32:19 +03:00
Serhiy Storchaka 949c416dc6 Merge heads 2015-04-22 11:01:38 +03:00
Serhiy Storchaka 71b49dde3a 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.
Removed TK_VERSION_HEX.
2015-04-22 10:59:32 +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
Berker Peksag d86ef05a02 Issue #23917: Fall back to sequential compilation when ProcessPoolExecutor doesn't exist.
Patch by Claudiu Popa.
2015-04-22 09:39:19 +03:00
Serhiy Storchaka aec0509193 Fixed full Tcl version parsing in tests for pre-final versions. 2015-04-22 08:36:41 +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 c3a7f18100 Merge from 3.4 2015-04-21 19:44:54 -04: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 f5e8540e1b Issue #23008: Fixed resolving attributes with boolean value is False in pydoc. 2015-04-21 21:11:13 +03: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 273a720f87 merge 3.4 (#24022) 2015-04-21 12:07:06 -04:00
Benjamin Peterson d73aca769f do not call into python api if an exception is set (#24022) 2015-04-21 12:05:19 -04:00
Greg Ward 4d9d2563f5 #17445: difflib: add diff_bytes(), to compare bytes rather than str
Some applications (e.g. traditional Unix diff, version control
systems) neither know nor care about the encodings of the files they
are comparing. They are textual, but to the diff utility they are just
bytes. This worked fine under Python 2, because all of the hardcoded
strings in difflib.py are ASCII, so could safely be combined with
old-style u'' strings. But it stopped working in 3.x.

The solution is to use surrogate escapes for a lossless
bytes->str->bytes roundtrip. That means {unified,context}_diff() can
continue to just handle strings without worrying about bytes. Callers
who have to deal with bytes will need to change to using diff_bytes().

Use case: Mercurial's test runner uses difflib to compare current hg
output with known good output. But Mercurial's output is just bytes,
since it can contain:
  * file contents (arbitrary unknown encoding)
  * filenames (arbitrary unknown encoding)
  * usernames and commit messages (usually UTF-8, but not guaranteed
    because old versions of Mercurial did not enforce it)
  * user messages (locale encoding)

Since the output of any given hg command can include text in multiple
encodings, it is hopeless to try to treat it as decodable Unicode
text. It's just bytes, all the way down.

This is an elaboration of a patch by Terry Reedy.
2015-04-20 20:21:21 -04:00
Guido van Rossum f75d4a7ad0 Fix asyncio issue 235 (merge from 3.4). 2015-04-20 09:29:57 -07:00
Guido van Rossum 0bd16bc4cd Fix asyncio issue 235: Queue subclass bug caused by JoinableQueue merge. 2015-04-20 09:24:24 -07:00
Larry Hastings 1acdb95965 Merge Python 3.5.0a4 release engineering commits. 2015-04-20 01:19:55 -07:00
Serhiy Storchaka 7e9d1d1a1b Issue #23908: os functions now reject paths with embedded null character
on Windows instead of silently truncate them.

Removed no longer used _PyUnicode_HasNULChars().
2015-04-20 10:12:28 +03: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 e3037e1145 Issue #23728: binascii.crc_hqx() could return an integer outside of the range
0-0xffff for empty data.
2015-04-20 09:31:51 +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 c74bb9d350 Issue #23842: Added tests for os.major(), os.minor() and os.makedev(). 2015-04-20 09:23:21 +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
Larry Hastings 55907f45bb Version number bump for Python 3.5.0a4. 2015-04-19 13:51:40 -07:00
Larry Hastings 770ce204ee Regenerated pydoc-topics and fixed bad/suspicious doc markup for Python 3.5.0a4. 2015-04-19 13:50:12 -07:00
R David Murray 37f1ba915b #16914: fix test errors under -W error::BytesWarning.
There are doubtless other debug messages in smtplib that would trigger an
error if they were tested, but this fixes the things we do now test,
which is good enough for now.
2015-04-16 18:54:56 -04:00
R David Murray 0c49b896e6 #16914: add timestamps to smtplib debugging output via new debuglevel 2.
Patch by Gavin Chappell and Maciej Szulik.
2015-04-16 17:14:42 -04:00
R David Murray 4c7f995e80 #7159: generalize urllib prior auth support.
This fix is a superset of the functionality introduced by the issue #19494
enhancement, and supersedes that fix.  Instead of a new handler, we have a new
password manager that tracks whether we should send the auth for a given uri.
This allows us to say "always send", satisfying #19494, or track that we've
succeeded in auth and send the creds right away on every *subsequent* request.
The support for using the password manager is added to AbstractBasicAuth,
which means the proxy handler also now can handle prior auth if passed
the new password manager.

Patch by Akshit Khurana, docs mostly by me.
2015-04-16 16:36:18 -04:00
R David Murray 2b78129b3a #18128: use standard +NNNN timezone format in POT-Creation-Date header.
Patch by Michael McFadden, with a few small style tweaks.
2015-04-16 12:15:09 -04:00
Serhiy Storchaka 6a69466f61 Backported tests from issue #20175. 2015-04-16 11:54:14 +03:00
Serhiy Storchaka f24131ff31 Issue #20175: Converted the _io module to Argument Clinic. 2015-04-16 11:19:43 +03:00
Ned Deily 3b8124884c Issues #22980, 23969: For OS X, use PEP 3149-style file names for extension
module binaries, with a platform triple of just "darwin", resulting in
file names like:

    _ssl.cpython-35m-darwin.so

rather than just _ssl.so as previously.

Instead of attempting to encode differences in CPU architecture and OS X
deployment targets in the file name as is done on other platforms,
these continue to be managed by the use of Apple multi-architecture
("fat") files, by the system dynamic loader, and by logic in higher-levels
like sysconfig.get_platform() and pip.
2015-04-15 17:11:47 -07:00
Berker Peksag 20416f7994 Issue #23703: Fix a regression in urljoin() introduced in 901e4e52b20a.
Patch by Demian Brecht.
2015-04-16 02:31:14 +03:00
Steve Dower d2bc389e55 Issue #4254: Adds _curses.update_lines_cols() Patch by Arnon Yaari 2015-04-15 18:06:05 -04:00
R David Murray 4171bbe687 #23949: Improve tuple unpacking error messages.
Patch by Arnon Yaari.
2015-04-15 17:08:45 -04:00
Steve Dower cb39d1f466 Issue 19933: Provide default argument for ndigits in round. Patch by Vajrasky Kok. 2015-04-15 16:10:59 -04:00
doko@ubuntu.com 807b80d4ec - #22980: fix typo in Lib/test/test_sysconfig.py triplet test 2015-04-15 20:52:39 +02:00
doko@ubuntu.com d3899c1a96 - Issue #22980: Under Linux, GNU/KFreeBSD and the Hurd, C extensions now include
the architecture triplet in the extension name, to make it easy to test builds
  for different ABIs in the same working tree.
2015-04-15 20:23:14 +02:00
Eric V. Smith 7a80389ce5 Issue 23193: Add numeric_owner to tarfile.TarFile.extract() and tarfile.TarFile.extractall(). 2015-04-15 10:27:58 -04:00
Gregory P. Smith 6e73000723 Add a subprocess.run() function than returns a CalledProcess instance for a
more consistent API than the existing call* functions.
(enhancement from issue 23342)
2015-04-14 16:14:25 -07:00
Antoine Pitrou a8723a02ea Issue #21217: inspect.getsourcelines() now tries to compute the start and
end lines from the code object, fixing an issue when a lambda function is
used as decorator argument.  Patch by Thomas Ballinger.
2015-04-15 00:41:29 +02:00
R David Murray 687592def9 Merge: #23925: stop (eg) PYTHONSTARTUP from causing test_cmd_line failure. 2015-04-14 17:58:40 -04: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
Gregory P. Smith 14a88abfcc issue9859: Use an expected failure rather than a skip. 2015-04-14 13:54:09 -07:00
Zachary Ware cadbab295d Closes #23956: Merge with 3.4 2015-04-14 15:46:22 -05:00
Zachary Ware 50db6acc9b Issue #23956: Fix typo in imp.py docstring.
Patch by Jacinda Shelly.
2015-04-14 15:43:00 -05:00
Gregory P. Smith 4e72cceb62 issue9859: Document test.support.detect_api_mismatch() and simplify its test. 2015-04-14 13:26:06 -07:00
Gregory P. Smith 1bef9075b8 issue9859: rename CPyMatchTest to APIMismatchTest and add @support.cpython_only. 2015-04-14 13:24:34 -07:00
Gregory P. Smith 054b065f6c issue9859: Adds a CPyMatchTest test case to compare the exposed APIs
of the Python io module and the C io module.  They do not currently
match so the failing test is marked with @unittest.skip.
2015-04-14 12:58:05 -07:00
Gregory P. Smith e334e3ff71 issue9859: Adds a test.support.detect_api_mismatch function useful to
compare the public APIs of two modules or classes.
2015-04-14 12:56:53 -07:00
Berker Peksag 012e287081 Issue #23811: Add missing newline to the PyCompileError error message.
Patch by Alex Shkop.
2015-04-14 18:58:45 +03: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 19ddaf6d40 Merge from 3.4 2015-04-14 10:35:43 -04:00
Andrew Kuchling 467a546b5e Merge from 3.4 2015-04-14 09:59:09 -04:00
Berker Peksag dfa4e045a3 Issue #23943: Fix typos. Patch by Piotr Kasprzyk. 2015-04-14 09:35:51 +03:00
Berker Peksag 4882cacab6 Issue #23943: Fix typos. Patch by Piotr Kasprzyk. 2015-04-14 09:30:01 +03:00
Łukasz Langa a468db9b0b Issue #23310: Fix MagicMock's initializer to work with __methods__.
Behavior equivalent to m.configure_mock().  Patch by Kasia Jachim.
2015-04-13 23:12:42 -07:00
Benjamin Peterson cd1aa9158e merge 3.4 (#23929) 2015-04-13 20:25:11 -04:00
Benjamin Peterson 52a3b74900 remove useless word (closes #23929) 2015-04-13 20:24:10 -04:00
R David Murray 0a8f43e85a #11754: test contents of string module attributes.
As noted in the comment, while the order of the items in the attributes is not
technically guaranteed, after all this time there is almost certainly user
code out there that relies on it, so we might as well test for it.

Patch by Chalmer Lowe.
2015-04-13 20:04:29 -04:00
Zachary Ware 8ef887ce47 Issue #20586: Argument Clinic now ensures signatures on functions without docstrings. 2015-04-13 18:22:35 -05:00
Brett Cannon 9d2a01fb2b Issue #23822: Fix test_py_compile to not fail under -O. 2015-04-13 16:28:11 -04:00
Zachary Ware 38c707e7e0 Issue #21741: Update 147 test modules to use test discovery.
I have compared output between pre- and post-patch runs of these tests
to make sure there's nothing missing and nothing broken, on both
Windows and Linux.  The only differences I found were actually tests
that were previously *not* run.
2015-04-13 15:00:43 -05:00
Antoine Pitrou d5aec7ba48 Issue #21116: Avoid blowing memory when allocating a multiprocessing shared
array that's larger than 50% of the available RAM.

Patch by Médéric Boquien.
2015-04-13 20:53:43 +02:00
Brett Cannon f299abdafa Issue #23731: Implement PEP 488.
The concept of .pyo files no longer exists. Now .pyc files have an
optional `opt-` tag which specifies if any extra optimizations beyond
the peepholer were applied.
2015-04-13 14:21:02 -04:00
Antoine Pitrou a63cc21234 Issue #23726: Don't enable GC for user subclasses of non-GC types that don't add any new fields.
Patch by Eugene Toder.
2015-04-13 20:10:06 +02:00
Antoine Pitrou 56452eea39 Issue #22982: Improve BOM handling when seeking to multiple positions of a writable text file. 2015-04-13 20:02:33 +02: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 0f164c606a Merge 2015-04-13 19:49:04 +02:00
Antoine Pitrou 20d31b5182 Merge 2015-04-13 19:48:52 +02:00
Antoine Pitrou cb46f0ecb0 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:48:19 +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 774ac377da Closes #17202: Merge with 3.4 2015-04-13 12:11:40 -05: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
Nick Coghlan 9c680b0728 Actually run the builtins Argument Clinic test 2015-04-13 12:54:54 -04: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
R David Murray e81a773352 #23464: remove JoinableQueue that was deprecated in 3.4.4.
Patch by A. Jesse Jiryu Davis.
2015-04-12 18:47:56 -04:00
Ethan Furman 48a724fa33 Close issue23900: add default __doc__ to new enumerations that do not specify one. 2015-04-11 23:23:06 -07: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
doko@ubuntu.com f172caeb8b - fix file permission for Lib/test/test_script_helper.py 2015-04-12 02:03:50 +02:00
Guido van Rossum 0ac8aa7ff3 Unittest for Issue 21511 by Christie Wilson bobcatfish@gmail.com (merge from 3.4). 2015-04-11 17:45:56 -04:00
Ethan Furman 3323da92e7 Issue23826: fix doc test for -OO runs 2015-04-11 09:39:59 -07:00
Antoine Pitrou 2dbc6e6bce Issue #23529: Limit the size of decompressed data when reading from
GzipFile, BZ2File or LZMAFile.  This defeats denial of service attacks
using compressed bombs (i.e. compressed payloads which decompress to a huge
size).

Patch by Martin Panter and Nikolaus Rath.
2015-04-11 00:31:01 +02:00
Serhiy Storchaka 056eb967ee Merge heads 2015-04-10 16:18:58 +03:00
Serhiy Storchaka 71fd224af0 Issue #21859: Added Python implementation of io.FileIO. 2015-04-10 16:16:16 +03:00
Berker Peksag 82c920c59e Issue #23062: Add a test for suppressing --version with argparse.SUPPRESS.
TestHelpVersionOptional was redundant.
2015-04-10 16:11:45 +03:00
Serhiy Storchaka 2116b12da5 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:29:28 +03:00
Serhiy Storchaka 1c5e281df8 Use assertRaisesRegex instead of deprecated assertRaisesRegexp. 2015-04-10 12:54:19 +03: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
Berker Peksag 291d7b0284 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:57:44 +03:00
Berker Peksag b8e973f937 Issue #23027: test_warnings now passes all tests when run it with -Werror. 2015-04-08 17:38:39 +03:00
Berker Peksag d09620839c Skip nntplib tests when transient errors captured. 2015-04-08 11:24:51 +03:00
Berker Peksag 716b3d3e91 Issue #23883: Add missing entries to traceback.__all__. 2015-04-08 09:47:14 +03:00
Gregory P. Smith cb6fdf2c63 issue10838: Rename the subprocess.mswindows internal global to _mswindows.
It is internal only, not a documented API.
2015-04-07 16:11:33 -07:00
Gregory P. Smith ace55865c5 Addresses Issue #10838: The subprocess now module includes
SubprocessError and TimeoutError in its list of exported names for the
users wild enough to use "from subprocess import *".

MAXFD, mswindows and list2cmdline should be dealt with (renamed or
moved) in separate commits.

Committed at 35,000ft.  Thanks chromebook free gogo wifi passes!
2015-04-07 15:57:54 -07:00
Victor Stinner 3c28878e40 Merge 3.4 (asyncio) 2015-04-07 21:38:36 +02:00
Serhiy Storchaka 1515450440 Issue #23411: Added DefragResult, ParseResult, SplitResult, DefragResultBytes,
ParseResultBytes, and SplitResultBytes to urllib.parse.__all__.
Patch by Martin Panter.
2015-04-07 19:09:01 +03:00
Benjamin Peterson 43a1bed3d2 merge 3.4 (#23873) 2015-04-07 12:00:37 -04:00
Donald Stufft 62f5278854 update pip to 6.1.1 2015-04-07 07:10:38 -04:00
Victor Stinner 388bf30fe8 Merge 3.4 (test_urllib2net) 2015-04-07 12:53:07 +02:00
Victor Stinner a9dd680d23 (Merge 3.4) Issue #23881: urllib.request.ftpwrapper constructor now closes the
socket if the FTP connection failed to fix a ResourceWarning.
2015-04-07 12:50:24 +02:00
Donald Stufft 9bcbdb40da Merged update of pip to 6.1.0 and setuptools to 15.0 2015-04-07 01:30:33 -04:00
Serhiy Storchaka 62aa7dc7c9 Issue #22721: An order of multiline pprint output of set or dict containing
orderable and non-orderable elements no longer depends on iteration order of
set or dict.
2015-04-06 22:52:44 +03:00
Serhiy Storchaka 01362da7d0 Issue #22977: Remove unconditional import of ctypes. 2015-04-06 20:37:34 +03:00
R David Murray cae7bdb424 #3566: Clean up handling of remote server disconnects.
This changeset does two things: introduces a new RemoteDisconnected exception
(that subclasses ConnectionResetError and BadStatusLine) so that a remote
server disconnection can be detected by client code (and provides a better
error message for debugging purposes), and ensures that the client socket is
closed if a ConnectionError happens, so that the automatic re-connection code
can work if the application handles the error and continues on.

Tests are added that confirm that a connection is re-used or not re-used
as appropriate to the various combinations of protocol version and headers.

Patch by Martin Panter, reviewed by Demian Brecht.  (Tweaked only slightly by
me.)
2015-04-05 19:26:29 -04:00
Benjamin Peterson 142bf565b4 merge 3.4 (#23872) 2015-04-05 10:03:23 -04:00
Benjamin Peterson 0c803319b0 fix extended command syntax (closes #23872) 2015-04-05 10:01:48 -04:00
Serhiy Storchaka de1c27feaa Issue #23466: Fixed expected error message in test_format. 2015-04-04 17:29:28 +03:00
Serhiy Storchaka b599ca8cff Fixed test_enum for issue #15582. 2015-04-04 12:48:04 +03:00
Serhiy Storchaka 06e66108c6 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:44:30 +03: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 46ba6c8563 Issue #22831: Use "with" to avoid possible fd leaks. 2015-04-04 11:01:02 +03:00
Serhiy Storchaka ae2d667ae8 Open files in binary mode to avoid newlines transformation. 2015-04-04 10:36:50 +03:00
Serhiy Storchaka c9ba38c21c Open files in binary mode to avoid newlines transformation. 2015-04-04 10:36:25 +03:00
Serhiy Storchaka 778db289b5 Issue #10590: xml.sax.parseString() now supports string argument. 2015-04-04 10:12:26 +03:00
Serhiy Storchaka a110eb4331 Issue #23825: Fixed test_idle under -OO. 2015-04-04 09:48:17 +03:00
Serhiy Storchaka 9fa84b202e Issue #23825: Fixed test_idle under -OO. 2015-04-04 09:47:31 +03:00
Serhiy Storchaka 5cf2b7253d Issue #15582: inspect.getdoc() now follows inheritance chains. 2015-04-03 22:38:53 +03:00
Serhiy Storchaka 41525e31a5 Issue #23466: Raised OverflowError if %c argument is out of range. 2015-04-03 20:53:46 +03:00
Serhiy Storchaka 50ef0f41af Escaped backslashes in docstrings. 2015-04-03 18:13:23 +03:00
Serhiy Storchaka 9f8a8910a4 Escaped backslashes in docstrings. 2015-04-03 18:12:41 +03:00
Serhiy Storchaka 4deb950e2b Issue #22351. MockSslTests tests in test_nntplib now are reported if skipped. 2015-04-03 15:02:40 +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
Victor Stinner 13019fdef3 Issue #22117: Add a new _PyTime_FromSeconds() function
Fix also _Py_InitializeEx_Private(): initialize time before initializing
import, import_init() uses the _PyTime API (for thread locks).
2015-04-03 13:10:54 +02:00
Victor Stinner 21dfffa218 Merge 3.4 (test_nntplib) 2015-04-03 11:09:08 +02:00
Serhiy Storchaka f1468eb44c Issue #10590: Added tests for xml.sax.parse() and xml.sax.parseString(). 2015-04-02 23:07:19 +03:00
Serhiy Storchaka 61de087f0f Issue #2175: SAX parsers now support a character stream of InputSource object. 2015-04-02 21:00:13 +03:00
Serhiy Storchaka 278ba2690c Issue #2175: Added tests for xml.sax.saxutils.prepare_input_source().
Made test XML files non-ASCII.
2015-04-02 20:57:20 +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 b162914158 Issue #16840: Fixed test_tcl for Tcl < 8.5. 2015-04-02 20:07:24 +03:00
Serhiy Storchaka 2379d541dd Issue #16840: Fixed test_tcl for Tcl < 8.5. 2015-04-02 20:07:09 +03:00
Serhiy Storchaka 9fe562b499 Issue #21526: Skip test_booleans on Tcl < 8.5. 2015-04-02 19:59:34 +03:00
Serhiy Storchaka a5a4bd76fb Issue #21526: Skip test_booleans on Tcl < 8.5. 2015-04-02 19:57:52 +03:00
Serhiy Storchaka 4c7dc48ea5 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:49:14 +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 39c0721d7b Merge 3.4 (test_exceptions) 2015-04-02 14:22:44 +02:00
Victor Stinner d223fa631d Issue #22977: Fix test_exceptions 2015-04-02 14:17:38 +02:00
Serhiy Storchaka b7616621db Issue #21526: Fixed the test_booleans test for wantobjects = 0. 2015-04-02 11:47:51 +03:00
Serhiy Storchaka 9171fe5a1d Issue #21526: Fixed the test_booleans test for wantobjects = 0. 2015-04-02 11:46:07 +03:00
Serhiy Storchaka b452f41cc8 Issue #21526: Fixed support of new boolean type in Tcl 8.5. 2015-04-02 10:58:40 +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 1399a01b90 Issue #22977: Fixed formatting Windows error messages on Wine.
Patch by Martin Panter.
2015-04-02 09:50:06 +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 4b9df0d33b merge 3.4 (#23844) 2015-04-02 00:08:10 -04: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
Victor Stinner 62d1c70eff Issue #22117, issue #23485: Fix _PyTime_AsMilliseconds() and
_PyTime_AsMicroseconds() rounding.

Add also unit tests.
2015-04-01 17:47:07 +02:00
Raymond Hettinger 067bbba7a4 Check deques against common sequence tests (except for slicing). 2015-04-01 08:11:09 -07:00
Serhiy Storchaka c19c3960bb Issue #23821: Fixed test_pdb failure under -O. 2015-04-01 16:58:39 +03:00
Serhiy Storchaka a16de5dbf5 Issue #23821: Fixed test_pdb failure under -O. 2015-04-01 16:58:19 +03:00
Serhiy Storchaka 05ddbf0875 Issue #23838: linecache now clears the cache and returns an empty result on
MemoryError.
2015-04-01 16:56:13 +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 c05e260ecb Issue #23799: Added test.support.start_threads() for running and cleaning up
multiple threads.
2015-04-01 13:06:18 +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
Raymond Hettinger 41290a68ba Issue 23793: Add deque support for __add__(), __mul__(), and __imul__(). 2015-03-31 08:12:23 -07:00
Serhiy Storchaka e50e780234 Issue #23611: Fixed enums pickling tests. Now all picklings work with all
protocols.
2015-03-31 16:56:49 +03:00
Serhiy Storchaka 5236e318a5 Issue #18473: Fixed pickle compatibility tests for optional modules.
Added WindowsError to compatibility mappings.
2015-03-31 16:49:48 +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 3822093143 Issue #10395: Added os.path.commonpath(). Implemented in posixpath and ntpath.
Based on patch by Rafik Draoui.
2015-03-31 15:31:53 +03:00
Serhiy Storchaka 58e4134a1c Issue #23611: Serializing more "lookupable" objects (such as unbound methods
or nested classes) now are supported with pickle protocols < 4.
2015-03-31 14:07:24 +03:00
Serhiy Storchaka 72e731cc03 Issue #13583: sqlite3.Row now supports slice indexing.
Tests by Jessica McKellar.
2015-03-31 13:33:11 +03:00
Serhiy Storchaka 80d84c89ee Merge heads 2015-03-31 13:18:35 +03:00
Serhiy Storchaka d5d818d40b 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:17:10 +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
Victor Stinner b310173319 Issue #23485: Enhance and update selectors doc and test_selectors
Selector.select() is now retried with the recomputed timeout when interrupted
by a signal.

Write an unit test with a signal handler raising an exception, and a unit with
a signal handler which does not raise an exception (it does nothing).
2015-03-31 12:08:09 +02:00
Victor Stinner 45ca48b03d Issue #23485: select.devpoll.poll() is now retried when interrupted by a signal 2015-03-31 12:10:33 +02:00
Victor Stinner 4448c08451 Issue #23485: select.kqueue.control() is now retried when interrupted by a signal 2015-03-31 11:48:34 +02:00
Victor Stinner 41eba224de Issue #23485: select.epoll.poll() is now retried when interrupted by a signal 2015-03-30 21:59:21 +02:00
Victor Stinner 3c7d6e0693 Issue #23485: select.poll.poll() is now retried when interrupted by a signal 2015-03-30 21:38:00 +02:00
Victor Stinner 749a6a85c6 Issue #23485: Fix test_signal, select.select() now retries the syscall if the
signal handler does not raise an exception
2015-03-30 22:09:14 +02:00
Victor Stinner f70e1ca0fc Issue #23485: select.select() is now retried automatically with the recomputed
timeout when interrupted by a signal, except if the signal handler raises an
exception. This change is part of the PEP 475.

The asyncore and selectors module doesn't catch the InterruptedError exception
anymore when calling select.select(), since this function should not raise
InterruptedError anymore.
2015-03-30 21:16:11 +02:00
Serhiy Storchaka 3f5d48bead Partially revert 3603bae63c13 (issue23326) for asyncio. 2015-03-30 22:25:16 +03:00
R David Murray c156e51668 Merge: #23792: also catch interrupt around pipe.write. 2015-03-30 10:15:22 -04: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
Victor Stinner 5fdde71cce Issue #23605: Fix typo in an os.walk() comment
Thanks Ben Hoyt for the report.
2015-03-30 11:54:05 +02:00
Larry Hastings 09dab7a87e Merge 3.5.0a3 release engineering changes back into trunk. 2015-03-30 01:50:00 -07:00
Serhiy Storchaka 2c7b5a9d0d Issue #23466: %c, %o, %x, and %X in bytes formatting now raise TypeError on
non-integer input.
2015-03-30 09:19:08 +03:00
Serhiy Storchaka 7901b48a1f Issue #23171: csv.Writer.writerow() now supports arbitrary iterables. 2015-03-30 09:09:54 +03:00
Victor Stinner a695f83f0d Issue #22117: Remove _PyTime_ROUND_DOWN and _PyTime_ROUND_UP rounding methods
Use _PyTime_ROUND_FLOOR and _PyTime_ROUND_CEILING instead.
2015-03-30 03:57:14 +02: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
Victor Stinner bcdd777d3c Issue #22117: Add _PyTime_ROUND_CEILING rounding method for timestamps
Add also more tests for ROUNd_FLOOR.
2015-03-30 03:52:49 +02:00
R David Murray c4bb599be0 Merge: #23745: handle duplicate MIME parameter names in new parser. 2015-03-29 21:54:27 -04:00
Victor Stinner f81f0f9c63 Issue #22117: Fix rounding and implement _PyTime_ROUND_FLOOR in:
- _PyTime_ObjectToTime_t()
- _PyTime_ObjectToTimespec()
- _PyTime_ObjectToTimeval()
2015-03-30 00:44:06 +02:00
Larry Hastings 02d1db9f46 Release bump for Python 3.5.0a3. 2015-03-29 15:34:26 -07:00
Larry Hastings b2c2dc3643 Regenerated pydoc topics and minor doc fixes for 3.5.0a3. 2015-03-29 15:32:55 -07: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
Serhiy Storchaka 10915aa85c Issue #22390: test.regrtest now emits a warning if temporary files or
directories are left after running a test.
2015-03-30 01:30:22 +03:00
Serhiy Storchaka 07360df481 Issue #14260: The groupindex attribute of regular expression pattern object
now is non-modifiable mapping.
2015-03-30 01:01:48 +03:00
R David Murray 1813c1701f #2211: properly document the Morsel behavior changes.
Also deprecate the undocumented set argument instead of removing
it already in 3.5.

Initial patch by Demian Brecht.
2015-03-29 17:09:21 -04:00
Benjamin Peterson 0deefd5a94 merge 3.4 (#23801) 2015-03-29 16:45:19 -04: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 f375b0a4d5 Merge: #23792: Ignore KeyboardInterrupt when the pydoc pager is active. 2015-03-29 15:19:13 -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 1b74d630da Added explicit tests for issue #23803. 2015-03-29 19:23:27 +03: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 bfbfc8deb2 Removed unintentional trailing spaces in text files. 2015-03-29 19:12:58 +03:00
Serhiy Storchaka 1770fde94c Make some tests more frienly to MemoryError.
Free memory, unlock hanging threads.
2015-03-28 20:39:51 +02: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 02937aab13 Issue #22117: Add the new _PyTime_ROUND_FLOOR rounding method for the datetime
module. time.clock_settime() now uses this rounding method instead of
_PyTime_ROUND_DOWN to handle correctly dates before 1970.
2015-03-28 05:02:39 +01:00
Victor Stinner 95e9cef6f0 Issue #22117: Write unit tests for _PyTime_AsTimeval()
* _PyTime_AsTimeval() now ensures that tv_usec is always positive
* _PyTime_AsTimespec() now ensures that tv_nsec is always positive
* _PyTime_AsTimeval() now returns an integer on overflow instead of raising an
  exception
2015-03-28 01:26:47 +01:00
Victor Stinner 34dc0f46ae Issue #22117: The signal modules uses the new _PyTime_t API
* Add _PyTime_AsTimespec()
* Add unit tests for _PyTime_AsTimespec()
2015-03-27 18:19:03 +01:00
Victor Stinner 4bfb460d88 Issue #22117: time.monotonic() now uses the new _PyTime_t API
* Add _PyTime_FromNanoseconds()
* Add _PyTime_AsSecondsDouble()
* Add unit tests for _PyTime_AsSecondsDouble()
2015-03-27 22:27:24 +01:00
Brett Cannon ac9591a44a Remove a dead test for a never-launched API 2015-03-27 14:21:26 -04:00
Brett Cannon ff7f428b38 Merge 2015-03-27 12:57:16 -04:00
Brett Cannon 781692ff6a Fix module deprecation warnings to have a useful stacklevel 2015-03-27 12:56:57 -04:00
Victor Stinner 992c43fec9 Issue #22117: Fix rounding in _PyTime_FromSecondsObject()
* Rename _PyTime_FromObject() to _PyTime_FromSecondsObject()
* Add _PyTime_AsNanosecondsObject() and _testcapi.pytime_fromsecondsobject()
* Add unit tests
2015-03-27 17:12:45 +01:00
Victor Stinner 79644f9c83 Issue #22117: Fix test_gdb for the new time.sleep()
Use time.gmtime() instead of time.sleep(), because time.sleep() is no more
declared with METH_VARARGS but with METH_O. time.gmtime() is still declared
with METH_VARARGS and so it is called with PyCFunction_Call() which is the
target of the test_gdb unit test.
2015-03-27 15:42:37 +01:00
Victor Stinner ba508d5dd2 Merge 3.4 (test.support) 2015-03-27 15:36:15 +01: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 6b3af083ca Merge 3.4 (asyncio) 2015-03-27 15:20:37 +01:00
Victor Stinner 79fd962652 asyncio: Fix _SelectorTransport.__repr__() if the event loop is closed 2015-03-27 15:20:08 +01:00
Victor Stinner 59f6342c97 Issue #23715: Fix test_sigtimedwait() of test_eintr
sigtimedwait([], timeout) fails with OSError(EINVAL) on OpenIndiana, wait for a
signal which will never be received instead.
2015-03-27 14:32:22 +01:00
Serhiy Storchaka aa4c36fbbb Issue #23775: pprint() of OrderedDict now outputs the same representation
as repr().
2015-03-26 08:51:33 +02:00
Serhiy Storchaka f3fa308817 Issue #23776: Removed asserts from pprint.PrettyPrinter constructor. 2015-03-26 08:43:21 +02:00
Steve Dower e6bb7eb27b Issue #23765: Removed IsBadStringPtr calls in ctypes 2015-03-25 21:58:36 -07:00
Serhiy Storchaka 632a77e6a3 Issue #22364: Improved some re error messages using regex for hints. 2015-03-25 21:03:47 +02:00
Serhiy Storchaka 7c316a181a Check that failed writerow() doesn't produce change a file. 2015-03-25 19:16:54 +02:00
Serhiy Storchaka 0b4e355b8e Check that failed writerow() doesn't produce change a file. 2015-03-25 19:16:15 +02:00
Serhiy Storchaka b20f905f6d Issue #23742: ntpath.expandvars() no longer loses unbalanced single quotes. 2015-03-25 16:41: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 764fc9bfac Issue #21717: The zipfile.ZipFile.open function now supports 'x' (exclusive
creation) mode.
2015-03-25 10:09:41 +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 09ce2786e4 Fixed bytes warnings when run tests with -vv. 2015-03-25 01:34:03 +02:00
Serhiy Storchaka 15fa1c4ade Fixed using deprecated escaping in regular expression in _strptime.py (issue23622). 2015-03-25 01:21:50 +02:00
Serhiy Storchaka 8be6be427d Issue #21802: The reader in BufferedRWPair now is closed even when closing
writer failed in BufferedRWPair.close().
2015-03-24 23:23:28 +02:00
Serhiy Storchaka a54aae0683 Issue #23622: Unknown escapes in regular expressions that consist of ``'\'``
and ASCII letter now raise a deprecation warning and will be forbidden in
Python 3.6.
2015-03-24 22:58:14 +02:00
Serhiy Storchaka b876df4cbb 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:30:46 +02:00
Serhiy Storchaka f7ef47583e Added tests for mixed kinds of Unicode strings. 2015-03-24 21:49:53 +02:00
Serhiy Storchaka 520e00dd92 Issue #23583: Added tests for standard IO streams in IDLE. 2015-03-24 19:49:23 +02:00
Serhiy Storchaka 87eb482e30 Issue #23502: The pprint module now supports mapping proxies.
In particular the __dict__ attributes of building types.
2015-03-24 19:31:50 +02:00
Serhiy Storchaka 022f20376a Issue #17530: pprint now wraps long bytes objects and bytearrays. 2015-03-24 19:22:37 +02:00
Serhiy Storchaka 8e2aa88a40 Issue #23741: Slightly refactor the pprint module to make it a little more
extesible.  No public API is added.
2015-03-24 18:45:23 +02:00
Serhiy Storchaka 72bd327db0 Issue #22687: Fixed some corner cases in breaking words in tetxtwrap.
Got rid of quadratic complexity in breaking long words.
2015-03-24 18:32:27 +02:00
Serhiy Storchaka 32af7549a7 Issue #20289: The copy module now uses pickle protocol 4 (PEP 3154) and
supports copying of instances of classes whose __new__ method takes
keyword-only arguments.
2015-03-24 18:06:42 +02:00
Victor Stinner 944fbcc478 Issue #23571: Enhance _Py_CheckFunctionResult()
Too bad, sometimes Py_FatalError() is unable to write the exception into
sys.stderr (on "AMD64 OpenIndiana 3.x" buildbot, the buildbot was probably out
of memory).

Call Py_FatalError() with a different message for the two cases (result+error,
or no result and no error).
2015-03-24 16:28:52 +01:00
Victor Stinner 381a9bce97 Issue #23571: Update test_capi 2015-03-24 14:01:32 +01:00
Serhiy Storchaka bca63b362d Issue #23688: Added support of arbitrary bytes-like objects and avoided
unnecessary copying of memoryview in gzip.GzipFile.write().
Original patch by Wolfgang Maier.
2015-03-23 14:59:48 +02:00
Serhiy Storchaka 77d899726f Issue #23252: Added support for writing ZIP files to unseekable streams. 2015-03-23 01:09:35 +02:00
R David Murray 94a6448956 Merge: #23647: Increase imaplib's MAXLINE to accommodate modern mailbox sizes. 2015-03-22 16:18:59 -04:00
R David Murray 0a0d20edfb Merge: #23539: Set Content-Length to 0 for PUT, POST, and PATCH if body is None. 2015-03-22 15:19:01 -04:00
R David Murray 5d06c74f41 Merge: #23700: fix/improve comment 2015-03-22 12:34:50 -04:00
Paul Moore a4d4dd3a9d #23657 Don't explicitly do an isinstance check for str in zipapp
As a result, explicitly support pathlib.Path objects as arguments.
Also added tests for the CLI interface.
2015-03-22 15:32:36 +00:00
Ned Deily 2f7bf23925 Issue #22289: merge from 3.4 2015-03-22 01:19:10 -07:00
Victor Stinner 4f0efb0522 Issue #23571: Fix test_capi 2015-03-21 17:24:50 +01:00