Commit Graph

20239 Commits

Author SHA1 Message Date
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
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
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
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
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
Serhiy Storchaka 6a69466f61 Backported tests from issue #20175. 2015-04-16 11:54:14 +03: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 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