Martin Panter [Sat, 30 Jan 2016 03:41:43 +0000 (03:41 +0000)]
Issue #26173: Fix test_ssl confusion with non-existing cert and wrongcert.pem
Testing for a non-existing certificate file is already done in test_errors().
Copy wrongcert.pem from Python 2 and use it to test the behaviour with a
mismatched certificate.
Victor Stinner [Thu, 28 Jan 2016 17:13:45 +0000 (18:13 +0100)]
Backport fixes on test_eintr
* Issue #25234: Skip test_eintr.test_open() under OS X to avoid hanging
* Issue #25868: Try to make test_eintr.test_sigwaitinfo() more reliable
especially on slow buildbots. Use a pipe to synchronize the parent and the
child processes.
Victor Stinner [Thu, 28 Jan 2016 14:41:01 +0000 (15:41 +0100)]
Windows: Decode hostname from ANSI code page
Issue #26227: On Windows, getnameinfo(), gethostbyaddr() and gethostbyname_ex()
functions of the socket module now decode the hostname from the ANSI code page
rather than UTF-8.
Victor Stinner [Wed, 27 Jan 2016 15:56:53 +0000 (16:56 +0100)]
Fix resize_compact()
Issue #26217: resize_compact() must set wstr_length to 0 after freeing the wstr
string. Otherwise, an assertion fails in _PyUnicode_CheckConsistency().
Victor Stinner [Fri, 22 Jan 2016 17:00:05 +0000 (18:00 +0100)]
doc: i18n HTML templates
Issue #25907: Use {% trans %} tags in HTML templates to ease the translation of
the documentation. The tag comes from Jinja templating system, used by Sphinx.
Victor Stinner [Fri, 22 Jan 2016 11:33:12 +0000 (12:33 +0100)]
code_richcompare() now uses the constants types
Issue #25843: When compiling code, don't merge constants if they are equal but
have a different types. For example, "f1, f2 = lambda: 1, lambda: 1.0" is now
correctly compiled to two different functions: f1() returns 1 (int) and f2()
returns 1.0 (int), even if 1 and 1.0 are equal.
Victor Stinner [Thu, 21 Jan 2016 07:56:00 +0000 (08:56 +0100)]
Issue #26106: doc: Move text of licenses to parsed literal block
This change helps to ignore text of PSF, BEOPEN.com and CNRI licenses when
translating the documentation. Patch written by Julien Palard who is
translating Python 3.5 doc to french. Text of other licenses already used
preformatted format.
Victor Stinner [Wed, 20 Jan 2016 10:12:38 +0000 (11:12 +0100)]
Add _PyThreadState_UncheckedGet()
Issue #26154: Add a new private _PyThreadState_UncheckedGet() function which
gets the current thread state, but don't call Py_FatalError() if it is NULL.
Python 3.5.1 removed the _PyThreadState_Current symbol from the Python C API to
no more expose complex and private atomic types. Atomic types depends on the
compiler or can even depend on compiler options. The new function
_PyThreadState_UncheckedGet() allows to get the variable value without having
to care of the exact implementation of atomic types.
Changes:
* Replace direct usage of the _PyThreadState_Current variable with a call to
_PyThreadState_UncheckedGet().
* In pystate.c, replace direct usage of the _PyThreadState_Current variable
with the PyThreadState_GET() macro for readability.
* Document also PyThreadState_Get() in pystate.h
Martin Panter [Tue, 19 Jan 2016 01:10:58 +0000 (01:10 +0000)]
Issue #25859: Reimplement NNTP test_starttls() using local server
The previous test relied on a remote server, which currently seems to be
shutting the connection down once TLS has been set up, causing an EOFError.
Now the test is implemented using a minimal NNTP server running in a
background thread.
Martin Panter [Sat, 16 Jan 2016 05:18:47 +0000 (05:18 +0000)]
Issue #14771: Redirect GDB's stdin to avoid messing the terminal settings
Otherwise, GDB seems to affect the terminal's foreground process group,
interfering with test_ioctl, which does not expect the foreground process to
change during the test. This change also solves the problem of the tests
being stopped in the shell if test_gdb is run twice in parallel.
Gregory P. Smith [Sat, 16 Jan 2016 01:30:24 +0000 (17:30 -0800)]
Make the error message regex more lenient so that it matches both
"certificate verify failed " and "CERTIFICATE_VERIFY_FAILED " as
some SSL libraries use different text than OpenSSL.
Gregory P. Smith [Sat, 16 Jan 2016 01:29:45 +0000 (17:29 -0800)]
Make the error message regex more lenient so that it matches both
"certificate verify failed " and "CERTIFICATE_VERIFY_FAILED " as
some SSL libraries use different text than OpenSSL.
Brett Cannon [Fri, 15 Jan 2016 17:38:24 +0000 (09:38 -0800)]
Issue #26114: Remove a reference to 'Numerical Recipes'.
While no copyright violation occurred, the license which
'Numerical Recipes' operates under is not amenable to Python,
so to prevent confusion it's easier to simply remove its mention.
Martin Panter [Thu, 14 Jan 2016 09:36:00 +0000 (09:36 +0000)]
Issue #25940: Use self-signed.pythontest.net in SSL tests
This is instead of svn.python.org, whose certificate recently expired, and
whose new certificate uses a different root certificate.
The certificate used at the pythontest server was modifed to set the "basic
constraints" CA flag. This flag seems to be required for test_get_ca_certs_
capath() to work (in Python 3.4+).
Added the new self-signed certificate to capath with the following commands:
Barry Warsaw [Mon, 11 Jan 2016 20:14:53 +0000 (15:14 -0500)]
Comment out some tests that won't pass now that we've reverted the
picklability regression. Also, as per further discussion, remove the
regressing code.