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.
#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.
R David Murray [Thu, 16 Apr 2015 22:54:56 +0000 (18:54 -0400)]
#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.
R David Murray [Thu, 16 Apr 2015 20:36:18 +0000 (16:36 -0400)]
#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.
Christian Heimes [Thu, 16 Apr 2015 15:25:45 +0000 (17:25 +0200)]
Remove redundant check for tb != NULL to shut up Coverity . It has been set to Py_None a couple of lines earlier.
CID 1291697 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking tb suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
Larry Hastings [Thu, 16 Apr 2015 03:02:12 +0000 (23:02 -0400)]
Issue #23935: Argument Clinic's understanding of format units
accepting bytes, bytearrays, and buffers is now consistent with
both the documentation and the implementation.
Ned Deily [Thu, 16 Apr 2015 00:11:47 +0000 (17:11 -0700)]
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.
- 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.
Gregory P. Smith [Tue, 14 Apr 2015 23:14:25 +0000 (16:14 -0700)]
Add a subprocess.run() function than returns a CalledProcess instance for a
more consistent API than the existing call* functions.
(enhancement from issue 23342)
Antoine Pitrou [Tue, 14 Apr 2015 22:41:29 +0000 (00:41 +0200)]
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.