Victor Stinner [Sat, 23 Jan 2016 11:55:11 +0000 (12:55 +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.
Gregory P. Smith [Fri, 22 Jan 2016 21:17:41 +0000 (13:17 -0800)]
Per issue21949 and issue1629: Document the Py_SIZE, Py_TYPE, Py_REFCNT macros.
This was already done in the 3.5 branch; this just does the same in the 2.7
branch.
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.
Martin Panter [Sat, 16 Jan 2016 05:07:35 +0000 (05:07 +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.
Martin Panter [Fri, 15 Jan 2016 00:25:29 +0000 (00:25 +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.
Added the new self-signed certificate to capath with the following commands:
Gregory P. Smith [Mon, 11 Jan 2016 21:56:42 +0000 (13:56 -0800)]
Fixes issue #26083: Workaround a subprocess bug that raised an incorrect
"ValueError: insecure string pickle" exception instead of the actual exception
on some platforms such as Mac OS X when an exception raised in the forked child
process prior to the exec() was large enough that it overflowed the internal
errpipe_read pipe buffer.
Barry Warsaw [Mon, 11 Jan 2016 19:44:59 +0000 (14:44 -0500)]
Comment out two tests that won't pass now after reverting the typeobject.c
change. Also, as per further discussion, we'll just remove the regressing
code in typeobject.c
Serhiy Storchaka [Wed, 30 Dec 2015 18:43:29 +0000 (20:43 +0200)]
Issue #22995: Instances of extension types with a state that aren't
subclasses of list or dict and haven't implemented any pickle-related
methods (__reduce__, __reduce_ex__, __getnewargs__, __getnewargs_ex__,
or __getstate__), can no longer be pickled. Including memoryview.
Serhiy Storchaka [Sat, 19 Dec 2015 18:07:48 +0000 (20:07 +0200)]
Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size.
This allows sys.getsize() to work correctly with their subclasses with
__slots__ defined.
Gregory P. Smith [Sun, 13 Dec 2015 21:57:50 +0000 (13:57 -0800)]
Fixes issue #20954: _args_from_interpreter_flags used by multiprocessing
and some tests no longer behaves incorrectly in the presence of the
PYTHONHASHSEED environment variable.
Martin Panter [Thu, 3 Dec 2015 01:23:10 +0000 (01:23 +0000)]
Issue #14285: Do not catch ImportError from __init__.py in runpy
Initialize package before calling get_loader() for __main__, so that we do
not incorrectly handle ImportError from __init__.py. When runpy is used from
the Python CLI, use an internal exception rather than ImportError, to avoid
catching an unexpected ImportError.
Also simplify message formatting: str() is redundant with %s.
Also fix test_dash_m_error_code_is_one() in test_cmd_line_script, which was
failing because the test package was not in the current directlry, rather
the desired ValueError.