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 11:16:21 +0000 (12:16 +0100)]
co_lnotab supports negative line number delta
Issue #26107: The format of the co_lnotab attribute of code objects changes to
support negative line number delta.
Changes:
* assemble_lnotab(): if line number delta is less than -128 or greater than
127, emit multiple (offset_delta, lineno_delta) in co_lnotab
* update functions decoding co_lnotab to use signed 8-bit integers
* update lnotab_notes.txt
* increase importlib MAGIC_NUMBER to 3361
* document the change in What's New in Python 3.6
* cleanup also PyCode_Optimize() to use better variable names
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.
Victor Stinner [Mon, 18 Jan 2016 11:15:08 +0000 (12:15 +0100)]
subprocess._optim_args_from_interpreter_flags()
Issue #26100:
* Add subprocess._optim_args_from_interpreter_flags()
* Add test.support.optim_args_from_interpreter_flags()
* Use new functions in distutils, test_cmd_line_script, test_compileall and
test_inspect
The change enables test_details() test of test_inspect when -O or -OO command
line option is used.
Victor Stinner [Mon, 18 Jan 2016 10:25:50 +0000 (11:25 +0100)]
Fix test_compilepath() of test_compileall
Issue #26101: Exclude Lib/test/ from sys.path in test_compilepath(). The
directory contains invalid Python files like Lib/test/badsyntax_pep3120.py,
whereas the test ensures that all files can be compiled.
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:42 +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: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.
Ethan Furman [Fri, 15 Jan 2016 23:01:33 +0000 (15:01 -0800)]
revert change 87a9dff5106c: pure Enum members again evaluate to True;
update Finer Points section of docs to cover boolean evaluation;
add more tests for pure and mixed boolean evaluation
Brett Cannon [Fri, 15 Jan 2016 21:33:03 +0000 (13:33 -0800)]
Issue #25791: Raise an ImportWarning when __spec__ or __package__ are
not defined for a relative import.
This is the start of work to try and clean up import semantics to rely
more on a module's spec than on the myriad attributes that get set on
a module. Thanks to Rose Ames for the patch.
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.