]> granicus.if.org Git - python/log
python
7 years ago[2.7] bpo-30964: Mention ensurepip in package installation docs (GH-2795)
Nicholas [Fri, 21 Jul 2017 06:29:44 +0000 (23:29 -0700)]
[2.7] bpo-30964: Mention ensurepip in package installation docs (GH-2795)

Adds a new 'Pip not installed' section that covers
running `ensurepip` manually, and also references
the relevant section of the Python Packaging User
Guide.

(cherry picked from commit b3527bfefd7a0188d43a2d7515ac6addd97a8202)

7 years agobpo-30822: regrtest: fix -u extralargefile (#2788)
Victor Stinner [Fri, 21 Jul 2017 00:12:14 +0000 (02:12 +0200)]
bpo-30822: regrtest: fix -u extralargefile (#2788)

Fix also regrtest command line parser to allow passing -u
extralargefile to run test_zipfile64.

7 years ago[2.7] Fix typo in Turtle Docs: yingyang -> yinyang (GH-2770) (GH-2780)
Mariatta [Thu, 20 Jul 2017 14:14:46 +0000 (07:14 -0700)]
[2.7] Fix typo in Turtle Docs: yingyang -> yinyang (GH-2770) (GH-2780)

(cherry picked from commit fff2a21057b98732562098e3bdd65980551f0135)

7 years agoUpdate doc download files size estimates. (#2774)
Ned Deily [Thu, 20 Jul 2017 08:45:42 +0000 (04:45 -0400)]
Update doc download files size estimates. (#2774)

7 years ago[2.7] bpo-30883: Use pythontest.net instead of debian.org in test_urllib2net (GH...
Ammar Askar [Wed, 19 Jul 2017 04:07:49 +0000 (21:07 -0700)]
[2.7] bpo-30883: Use pythontest.net instead of debian.org in test_urllib2net (GH-2755)

7 years ago[2.7] bpo-30911: Add tests for bad boolean arguments for accelerated json (GH-2690...
Serhiy Storchaka [Sun, 16 Jul 2017 04:51:03 +0000 (07:51 +0300)]
[2.7] bpo-30911: Add tests for bad boolean arguments for accelerated json (GH-2690) (#2729)

encoder and decoder.
(cherry picked from commit d3aaa2f1496aae0809c9ec9623fa528d3a2c16c2)

7 years agobpo-30939: Avoid Sphinx deprecation warning in docs build. (#2721) (#2725)
Ned Deily [Sun, 16 Jul 2017 03:06:57 +0000 (23:06 -0400)]
bpo-30939: Avoid Sphinx deprecation warning in docs build. (#2721) (#2725)

(cherry picked from commit 50f58163a69abe2f35e91044d1df165ee7bdbb42)

7 years ago[2.7] bpo-30911: Add tests for bad boolean arguments for accelerated json (GH-2690...
Serhiy Storchaka [Thu, 13 Jul 2017 09:03:18 +0000 (12:03 +0300)]
[2.7] bpo-30911: Add tests for bad boolean arguments for accelerated json (GH-2690) (#2694)

encoder and decoder..
(cherry picked from commit d3aaa2f1496aae0809c9ec9623fa528d3a2c16c2)

7 years agoAdd a missing asterisk in traceback doc to complete formatting (#2675)
Xiang Zhang [Wed, 12 Jul 2017 03:41:33 +0000 (11:41 +0800)]
Add a missing asterisk in traceback doc to complete formatting (#2675)

7 years ago[2.7] bpo-30797: Avoid _GNU_SOURCE redefined warning in xmlparse.c (GH-2670) (#2672)
Segev Finer [Tue, 11 Jul 2017 22:16:28 +0000 (01:16 +0300)]
[2.7] bpo-30797: Avoid _GNU_SOURCE redefined warning in xmlparse.c (GH-2670) (#2672)

* [2.7] Avoid _GNU_SOURCE redefined warning in xmlparse.c (GH-2670)
(cherry picked from commit f52325598e7a9683787d76a42009fc16790a0089)

* [2.7] Avoid _GNU_SOURCE redefined warning in xmlparse.c (GH-2670).
(cherry picked from commit f52325598e7a9683787d76a42009fc16790a0089)

7 years ago[2.7] bpo-29854: Fix segfault in call_readline() (GH-728)
Nir Soffer [Mon, 10 Jul 2017 21:06:57 +0000 (00:06 +0300)]
[2.7] bpo-29854: Fix segfault in call_readline() (GH-728)

If history-length is set in .inputrc, and the history file is double the
history size (or more), history_get(N) returns NULL, and python
segfaults. Fix that by checking for NULL return value.

It seems that the root cause is incorrect handling of bigger history in
readline, but Python should not segfault even if readline returns
unexpected value.

This issue affects only GNU readline. When using libedit emulation
system history size option does not work.

This is a backport of the actual fix from master without the test, since
the test depends on new run_pty() helper which is not available in 2.7.

7 years agojson Docs: Trivial update to the code example (GH-2465)
Kit Sunde [Mon, 10 Jul 2017 20:05:25 +0000 (04:05 +0800)]
json Docs: Trivial update to the code example (GH-2465)

Replace `dumps` with `json.dumps`

8 years ago[2.7] bpo-30855: Trying to fix test_use on Windows. (#2586)
Victor Stinner [Thu, 6 Jul 2017 08:22:50 +0000 (10:22 +0200)]
[2.7] bpo-30855: Trying to fix test_use on Windows. (#2586)

* bpo-30855: Trying to fix test_use on Windows.

Avoid possible weird behavior of WideInt convertion.
"winfo id" always returns string hexadecimal representation.

(cherry picked from commit b9d672491d5082c541bf267eb7bb99fdc6529324)

* bpo-30855: Trying to fix test_use on Windows.

(cherry picked from commit 29a2f7c6b38e5a6ed891aa72af38974a1ff2d372)
(subTest() removed since it was introduced in Python 3)

8 years agoFix trivial typo in json module docstring (GH-2274) (GH-2432)
Mariatta [Thu, 6 Jul 2017 03:55:30 +0000 (20:55 -0700)]
Fix trivial typo in json module docstring (GH-2274) (GH-2432)

(cherry picked from commit 76c567ee27342d76f631a35c8291b715b2a61f3e)

8 years agobpo-30850: Use specialized assert methods in bsddb tests. (#2584)
Serhiy Storchaka [Wed, 5 Jul 2017 12:09:36 +0000 (15:09 +0300)]
bpo-30850: Use specialized assert methods in bsddb tests. (#2584)

This provides more information on test failures.

8 years agobpo-30759: regrtest: list_cases() now unload modules (#2582)
Victor Stinner [Wed, 5 Jul 2017 08:52:06 +0000 (10:52 +0200)]
bpo-30759: regrtest: list_cases() now unload modules (#2582)

list_cases() now unload modules, as the test runner does, to prevent
a failure in test_xpickle about test.pickletester loaded after
loading test_cpickle:

./python -m test --list-cases test_cpickle test_xpickle

8 years agobpo-30759: Copy test_robotparser from master (#2546)
Victor Stinner [Wed, 5 Jul 2017 08:00:33 +0000 (10:00 +0200)]
bpo-30759: Copy test_robotparser from master (#2546)

Copy Lib/test/test_robotparser.py from master to 2.7 and adapt it for
Python 2.7:

* Replace urllib.robotparser with robotparser
* Adjust HTTPServer import
* Replace io.StringIO with StringIO.StringIO
* Remove tests on crawl_delay() and request_rate() since these
  methods were added to Python 3
* Remove subTest()
* Add test_main() which explicitly lists all test cases

Patch based on the commit 4da0fd06ce49132d5c2e0525c4a31f807690a9ed
written by Berker Peksag.

Co-Authored-By: Berker Peksag <berker.peksag@gmail.com>
8 years agobpo-30843: regrtest fixes sys.path, restore test.bisect (#2567)
Victor Stinner [Wed, 5 Jul 2017 07:16:47 +0000 (09:16 +0200)]
bpo-30843: regrtest fixes sys.path, restore test.bisect (#2567)

* Rename again Lib/test/bisectcmd.py to Lib/test/bisect.py
* regrtest now removes '' and Lib/test/ from sys.path
* Use absolute import in test_bisect

8 years agobpo-30726: Add _CRT_SECURE_NO_WARNINGS to _elementtree and pyexpat projects (#2572)
Segev Finer [Tue, 4 Jul 2017 18:40:04 +0000 (21:40 +0300)]
bpo-30726: Add _CRT_SECURE_NO_WARNINGS to _elementtree and pyexpat projects (#2572)

8 years agobpo-30843: Rename Lib/test/bisect.py to Lib/test/bisectcmd.py (#2563)
Victor Stinner [Tue, 4 Jul 2017 09:45:04 +0000 (11:45 +0200)]
bpo-30843: Rename Lib/test/bisect.py to Lib/test/bisectcmd.py (#2563)

Revert test_bisect.py change:
remove "from __future__ import absolute_import".

8 years agobpo-29796: test_weakref: Fix collect_in_thread() on Windows (#2553)
Victor Stinner [Tue, 4 Jul 2017 09:36:16 +0000 (11:36 +0200)]
bpo-29796: test_weakref: Fix collect_in_thread() on Windows (#2553)

Sleep 1 ms instead of 0.1 ms to workaround a rounding issue on
Windows. On Windows, time.sleep(0.0001) sleeps 0 ms, so
collect_in_thread() calls gc.collect() in a loop and tests using this
thread takes too long. Sleep 1 ms so time.sleep() sleeps 15.6 ms on
Windows.

8 years agoRemove outdated FOX from GUI FAQ (GH-2538)
Berker Peksag [Tue, 4 Jul 2017 06:27:48 +0000 (09:27 +0300)]
Remove outdated FOX from GUI FAQ (GH-2538)

FXpy doesn't have a Python 3 port and it only
supports Python 2.2 and older versions.

Reported by Alex Walters on docs@p.o.

(cherry picked from commit d3ed2877a798d07df75422afe136b4727e500c99)

8 years agoTools/buildbot/test.bat: add --slowest option (#2552)
Victor Stinner [Mon, 3 Jul 2017 21:37:14 +0000 (23:37 +0200)]
Tools/buildbot/test.bat: add --slowest option (#2552)

8 years agoregrtest: fix --list-cases --verbose (#2547)
Victor Stinner [Mon, 3 Jul 2017 20:18:28 +0000 (22:18 +0200)]
regrtest: fix --list-cases --verbose (#2547)

Write header and "Using seed ..." after checking for --list-cases and
--list-tests.

8 years ago[2.7] Rename test_ file that is really a support file to remove test_ prefix. (#2548)
Serhiy Storchaka [Mon, 3 Jul 2017 20:01:57 +0000 (23:01 +0300)]
[2.7] Rename test_ file that is really a support file to remove test_ prefix. (#2548)

I thought I had run the full test suite before the last checkin, but
obviously I didn't.  test_multibytecodec_support.py isn't really a test file,
it is a support file that contains a base test class.  Rename it to
multibytecodec_support so that regrtest test discovery doesn't think it is a
test file that should be run..
(cherry picked from commit 75d9aca97ad3c3d823d2f2211f579454b3216f51)

8 years ago[2.7] bpo-29512, bpo-30764: Backport regrtest enhancements from 3.5 to 2.7 (#2541)
Victor Stinner [Mon, 3 Jul 2017 13:07:53 +0000 (15:07 +0200)]
[2.7] bpo-29512, bpo-30764: Backport regrtest enhancements from 3.5 to 2.7 (#2541)

* bpo-29512, bpo-30764: Backport regrtest enhancements from 3.5 to 2.7

* bpo-29512: Add test.bisect, bisect failing tests (#2452)

Add a new "python3 -m test.bisect" tool to bisect failing tests.

It can be used to find which test method(s) leak references, leak
files, etc.

* bpo-30764: Fix regrtest --fail-env-changed --forever (#2536) (#2539)

--forever now stops if a fail changes the environment.

* Fix test_bisect: use absolute import

8 years agobpo-30448: Fix support.SuppressCrashReport on macOS (#2515)
Victor Stinner [Fri, 30 Jun 2017 23:01:28 +0000 (01:01 +0200)]
bpo-30448: Fix support.SuppressCrashReport on macOS (#2515)

Add missing "import subprocess".

8 years ago[2.7] Docs: fixed placement of .. _func-list: in functions.rst (#2520)
Dmitry Tokarev [Fri, 30 Jun 2017 19:35:44 +0000 (12:35 -0700)]
[2.7] Docs: fixed placement of .. _func-list: in functions.rst (#2520)

Oh, this is my fault too. I missed this mistake. Thank you for the correction.

8 years agoFixed 2.7 docs - links to list, backported from python3.x (#2518)
Dmitry Tokarev [Fri, 30 Jun 2017 19:02:59 +0000 (12:02 -0700)]
Fixed 2.7 docs - links to list, backported from python3.x (#2518)

8 years ago[2.7] bpo-30807: signal.setitimer() may disable the timer by mistake (GH-2493) (...
Antoine Pitrou [Fri, 30 Jun 2017 08:54:54 +0000 (10:54 +0200)]
[2.7] bpo-30807: signal.setitimer() may disable the timer by mistake (GH-2493) (#2499)

* bpo-30807: signal.setitimer() may disable the timer by mistake

* Add NEWS blurb.
(cherry picked from commit 729780a810bbcb12b245a1b652302a601fc9f6fd)

8 years ago[2.7] Clear potential ref cycle between Process and Process target (GH-2470) (#2473)
Antoine Pitrou [Wed, 28 Jun 2017 11:48:38 +0000 (13:48 +0200)]
[2.7] Clear potential ref cycle between Process and Process target (GH-2470) (#2473)

* Clear potential ref cycle between Process and Process target

Besides Process.join() not being called, this was an indirect cause of bpo-30775.
The threading module already does this.

* Add issue reference.
(cherry picked from commit 79d37ae979a65ada0b2ac820279ccc3b1cd41ba6)

8 years agoClarification to the `break` statement (GH-2453) (GH-2459)
regexaurus [Wed, 28 Jun 2017 02:36:15 +0000 (22:36 -0400)]
Clarification to the `break` statement (GH-2453) (GH-2459)

Clarify that the break statement breaks out of the innermost enclosing for or while loop.
(cherry picked from commit 36fc896740319d2c03aa2054a90a999c162517ef)

8 years ago[2.7] bpo-30523, bpo-30764, bpo-30776: Sync regrtest from master (#2444)
Victor Stinner [Tue, 27 Jun 2017 14:56:43 +0000 (16:56 +0200)]
[2.7] bpo-30523, bpo-30764, bpo-30776: Sync regrtest from master (#2444)

* bpo-30523: regrtest --list-cases --match (#2401)

* regrtest --list-cases now supports --match and --match-file options.
  Example: ./python -m test --list-cases -m FileTests test_os
* --list-cases now also sets support.verbose to False to prevent
  messages to stdout when loading test modules.
* Add support._match_test() private function.
(cherry picked from commit ace56d583664f855d89d1219ece7c21c2fddcf30)

(cherry picked from commit 36946c06a3bdb1104c53f0fe535086572ffbdd9e)

* bpo-30764: regrtest: add --fail-env-changed option (#2402)

* bpo-30764: regrtest: change exit code on failure

* Exit code 2 if failed tests ("bad")
* Exit code 3 if interrupted

* bpo-30764: regrtest: add --fail-env-changed option

If the option is set, mark a test as failed if it alters the
environment, for example if it creates a file without removing it.

(cherry picked from commit 63f54c68936d648c70ca411661e4208329edcf26)
(cherry picked from commit 1f33857a3677de84bdc6d80c39f577eb081ed85d)

* bpo-30776: reduce regrtest -R false positives (#2422)

* Change the regrtest --huntrleaks checker to decide if a test file
  leaks or not. Require that each run leaks at least 1 reference.
* Warmup runs are now completely ignored: ignored in the checker test
  and not used anymore to compute the sum.
* Add an unit test for a reference leak.

Example of reference differences previously considered a failure
(leak) and now considered as success (success, no leak):

    [3, 0, 0]
    [0, 1, 0]
    [8, -8, 1]
(cherry picked from commit 48b5c422ffb03affb00c184b9a99e5537be92732)

(cherry picked from commit e0f8b43a46850aa5e5992465cab684496f102fe5)

8 years agobpo-30705: Fix test_regrtest.test_crashed() (#2439)
Victor Stinner [Tue, 27 Jun 2017 13:37:19 +0000 (15:37 +0200)]
bpo-30705: Fix test_regrtest.test_crashed() (#2439)

* Add test.support._crash_python() which triggers a crash but uses
  test.support.SuppressCrashReport() to prevent a crash report from
  popping up.
* Modify test_child_terminated_in_stopped_state() of test_subprocess
  and test_crashed() of test_regrtest to use _crash_python().

8 years agobpo-30764: Windows support.SuppressCrashReport (#2423)
Victor Stinner [Tue, 27 Jun 2017 12:31:40 +0000 (14:31 +0200)]
bpo-30764: Windows support.SuppressCrashReport (#2423)

* Add Windows support to test.support.SuppressCrashReport: call
  SetErrorMode() and CrtSetReportMode().
* _testcapi: add CrtSetReportMode() and CrtSetReportFile() functions
  and CRT_xxx and CRTDBG_xxx constants needed by SuppressCrashReport.

8 years agobpo-30283: Add NEWS entry for backported regrtest (#2398)
Victor Stinner [Tue, 27 Jun 2017 06:42:01 +0000 (08:42 +0200)]
bpo-30283: Add NEWS entry for backported regrtest (#2398)

8 years ago[2.7] bpo-30764: test_subprocess uses SuppressCrashReport (#2405) (#2412)
Victor Stinner [Mon, 26 Jun 2017 22:00:51 +0000 (00:00 +0200)]
[2.7] bpo-30764: test_subprocess uses SuppressCrashReport (#2405) (#2412)

* bpo-30764: Backport support.SuppressCrashReport

Backport test.support.SuppressCrashReport context-manager from
master. Drop the Windows implementation since it depends on
msvcrt.CrtSetReportMode() which isn't available on Python 2.7.

* bpo-30764: test_subprocess uses SuppressCrashReport (#2405)

bpo-30764, bpo-29335: test_child_terminated_in_stopped_state() of
test_subprocess now uses support.SuppressCrashReport() to prevent the
creation of a core dump on FreeBSD.
(cherry picked from commit cdee3f14f7f4c995e7eedb0bf6a67e260c739f7d)

8 years ago[2.7] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (GH...
Antoine Pitrou [Mon, 26 Jun 2017 20:13:39 +0000 (22:13 +0200)]
[2.7] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (GH-2403) (#2420)

* [2.7] bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (GH-2403)

* bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to lock

This is especially important if PyThread_acquire_lock() is called reentrantly
(for example from a signal handler).

* Update 2017-06-26-14-29-50.bpo-30765.Q5iBmf.rst

* Avoid core logic when taking the mutex failed.
(cherry picked from commit f84ac420c2af98339678744953869cad3c253281)

* Remove test undef

8 years ago[2.7] bpo-30746: Prohibited the '=' character in environment variable names (GH-2382...
Serhiy Storchaka [Sun, 25 Jun 2017 06:50:00 +0000 (09:50 +0300)]
[2.7] bpo-30746: Prohibited the '=' character in environment variable names (GH-2382) (#2393)

in `os.putenv()` and `os.spawn*()`..
(cherry picked from commit 77703942c5997dff00c48f10df1b29b11645624c)

8 years ago[2.7] bpo-30730: Prevent environment variables injection in subprocess on Windows...
Serhiy Storchaka [Sat, 24 Jun 2017 08:49:00 +0000 (11:49 +0300)]
[2.7] bpo-30730: Prevent environment variables injection in subprocess on Windows. (GH-2325) (#2372)

Prevent passing other invalid environment variables and command arguments..
(cherry picked from commit d174d24a5d37d1516b885dc7c82f71ecd5930700)

8 years ago[2.7] bpo-30727: Fix a race condition in test_threading. (GH-2334). (#2353)
Serhiy Storchaka [Fri, 23 Jun 2017 11:13:39 +0000 (14:13 +0300)]
[2.7] bpo-30727: Fix a race condition in test_threading. (GH-2334). (#2353)

(cherry picked from commit 32cb968a2edd482891c33b6f2ebae10f1d305424)

8 years ago[2.7] bpo-30709: Improve code example in Descriptor HowTo doc (GH-2339) (GH-2340)
Mariatta [Fri, 23 Jun 2017 04:24:23 +0000 (21:24 -0700)]
[2.7] bpo-30709: Improve code example in Descriptor HowTo doc (GH-2339) (GH-2340)

(cherry picked from commit b066edfb1b268e90ea11f45dd1827f46d7ceec88)

8 years agoAdd "Misc/NEWS.d" directory tree for "blurb". (#2333)
larryhastings [Thu, 22 Jun 2017 23:00:05 +0000 (16:00 -0700)]
Add "Misc/NEWS.d" directory tree for "blurb". (#2333)

CPython workflow is changing!  We're going to start using "blurb"
to manage Misc/NEWS entries:
    https://github.com/python/core-workflow
(This will be a big win for release managers, honest.)

This checkin simply populates the "Misc/NEWS.d" subdirectory tree
so that people can start putting their news entries in there.
No other changes (yet).

8 years agobpo-8799: Reduce timing sensitivity of condition test by explicitly (#2320)
Victor Stinner [Thu, 22 Jun 2017 00:09:40 +0000 (02:09 +0200)]
bpo-8799: Reduce timing sensitivity of condition test by explicitly (#2320)

delaying the main thread so that it doesn't race ahead of the workers.

(cherry picked from commit 020af2a2bc4708215360a3793b5a1790e15d05dd)

8 years agobpo-29591: Update VS project files (#2310)
Jeremy Kloth [Wed, 21 Jun 2017 19:14:53 +0000 (13:14 -0600)]
bpo-29591: Update VS project files (#2310)

* Silence warnings caused by duplicated defines from Modules\expat\winconfig.h
* Add WIN32 define to VS9.0 project files to match MSBuild project files.

8 years ago[2.7] bpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1 (#2300) (#2312)
Victor Stinner [Wed, 21 Jun 2017 15:12:46 +0000 (17:12 +0200)]
[2.7] bpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1 (#2300) (#2312)

* bpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1 (#2300)

New file: Modules/expat/siphash.h.
(cherry picked from commit 5ff7132313eb651107b179d20218dfe5d4e47f13)

* siphash.h: Address lack of stdint.h for Visual Studio 2003-2008

(cherry picked from libexpat commit c74d380b8f0b5215153d840d2af9455d9c53b960)

8 years agobpo-30368: Update build_ssl.py to restore Perl-less building (#1805)
Jeremy Kloth [Tue, 20 Jun 2017 20:53:39 +0000 (14:53 -0600)]
bpo-30368: Update build_ssl.py to restore Perl-less building (#1805)

* bpo-30368: Update build_ssl.py to restore Perl-less building

OpenSSL 1.0.2 releases changed how files are copied in the makefile,
thus causing Perl to be required even for Python's "prepared" OpenSSL.
Now build_ssl.py does the requisite copies before running nmake.

* bpo-30368: Update build_ssl.py to use prepared OpenSSL

* Updates SSL-linking projects to use the new include{suffix} directory
* build_ssl.py now only copies those files not handled by prepare_ssl.py

* * bpo-30368: Update build_ssl.py to use prepared OpenSSL

* Update SSL-linking projects to use the new include{suffix} directory

* Move comment to following line

8 years agobpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) (#2294)
Victor Stinner [Tue, 20 Jun 2017 14:20:36 +0000 (16:20 +0200)]
bpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) (#2294)

The current regex based splitting produces a wrong result. For example::

  http://abc#@def

Web browsers parse that URL as ``http://abc/#@def``, that is, the host
is ``abc``, the path is ``/``, and the fragment is ``#@def``.
(cherry picked from commit 90e01e50ef8a9e6c91f30d965563c378a4ad26de)

8 years agobpo-30176: Add missing curses cell attributes constants (#2278)
Xiang Zhang [Mon, 19 Jun 2017 14:12:45 +0000 (22:12 +0800)]
bpo-30176: Add missing curses cell attributes constants (#2278)

8 years ago[2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174)
Jay Bosamiya [Sun, 18 Jun 2017 16:41:03 +0000 (22:11 +0530)]
[2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174)

8 years agobpo-30540, bpo-30523: Add --matchfile and --list-cases options to regrtest (#2249)
Victor Stinner [Fri, 16 Jun 2017 15:30:03 +0000 (17:30 +0200)]
bpo-30540, bpo-30523: Add --matchfile and --list-cases options to regrtest (#2249)

[2.7] bpo-30540, bpo-30523: Add --matchfile and --list-cases options to regrtest

8 years agobpo-30675: Fix refleak hunting in regrtest (#2227)
Victor Stinner [Fri, 16 Jun 2017 10:14:09 +0000 (12:14 +0200)]
bpo-30675: Fix refleak hunting in regrtest (#2227)

regrtest now warms up caches: create explicitly all internal
singletons which are created on demand to prevent false positives
when checking for reference leaks.

8 years agobpo-29591: Upgrade Modules/expat to libexpat 2.2 (#2164) (#2202)
Victor Stinner [Thu, 15 Jun 2017 00:16:35 +0000 (02:16 +0200)]
bpo-29591: Upgrade Modules/expat to libexpat 2.2 (#2164) (#2202)

* bpo-29591: Upgrade Modules/expat to libexpat 2.2

* bpo-29591: Restore Python changes on expat

* bpo-29591: Remove expat config of unsupported platforms

Remove the configuration (Modules/expat/*config.h) of unsupported
platforms:

* Amiga
* MacOS Classic on PPC32
* Open Watcom

* bpo-29591: Remove useless XML_HAS_SET_HASH_SALT

The XML_HAS_SET_HASH_SALT define of Modules/expat/expat.h became
useless since our local expat copy was upgrade to expat 2.1 (it's now
expat 2.2.0).

(cherry picked from commit 23ec4b57e1359f9c539b8defc317542173ae087e)

8 years agobpo-30659 : Use ** for kwargs in namedtuple._replace() signature (GH-2173) (GH-2196)
Mariatta [Wed, 14 Jun 2017 19:07:42 +0000 (12:07 -0700)]
bpo-30659 : Use ** for kwargs in namedtuple._replace() signature (GH-2173) (GH-2196)

(cherry picked from commit 184bd82ba8106785ba22f0d2477dbd08bef821fb)

8 years agoFix trivial typo in Python Setup documentation (GH-2185) (GH-2190)
csabella [Wed, 14 Jun 2017 16:26:03 +0000 (12:26 -0400)]
Fix trivial typo in Python Setup documentation (GH-2185) (GH-2190)

Replace platform with platforms.
(cherry picked from commit 4ebf03d109f827c91a23256a447c1d74a203dfee)

8 years ago[2.7] bpo-24484: Avoid race condition in multiprocessing cleanup (GH-2159) (#2168)
Antoine Pitrou [Tue, 13 Jun 2017 15:52:29 +0000 (17:52 +0200)]
[2.7] bpo-24484: Avoid race condition in multiprocessing cleanup (GH-2159) (#2168)

* bpo-24484: Avoid race condition in multiprocessing cleanup

The finalizer registry can be mutated while inspected by multiprocessing
at process exit.

* Use test.support.start_threads()

* Add Misc/NEWS.
(cherry picked from commit 1eb6c0074d17f4fd425cacfdda893d65f5f77f0a)

8 years ago[2.7] bpo-29514: Check magic number for bugfix releases
Nick Coghlan [Tue, 13 Jun 2017 10:58:48 +0000 (20:58 +1000)]
[2.7] bpo-29514: Check magic number for bugfix releases

Add a test to check the current MAGIC_NUMBER against the
expected number for the release if the current release is
at candidate or final level. On test failure, describe to
the developer the procedure for changing the magic number.

This ensures that pre-merge CI will automatically pick up
on magic number changes in maintenance releases (and
explain why those are problematic), rather than relying on
all core developers to be aware of the implications of
such changes.

8 years ago_tkinter: Fix refleak in getint() (#2153)
Victor Stinner [Tue, 13 Jun 2017 09:12:01 +0000 (11:12 +0200)]
_tkinter: Fix refleak in getint() (#2153)

PyNumber_Int() creates a new reference: need to decrement result
reference counter.

8 years ago[2.7] Mention how to disable signal fd wakeup (GH-2140) (#2151)
Antoine Pitrou [Tue, 13 Jun 2017 08:21:28 +0000 (10:21 +0200)]
[2.7] Mention how to disable signal fd wakeup (GH-2140) (#2151)

(cherry picked from commit d79c1d4a9406384f10a37f26a7515ce79f9fdd78)

8 years agobpo-30217: add the operators ~ and | to the index (GH-1502) (GH-2137)
Marco Buttu [Mon, 12 Jun 2017 19:42:47 +0000 (21:42 +0200)]
bpo-30217: add the operators ~ and | to the index (GH-1502) (GH-2137)

(cherry picked from commit dc980dfbcfce4695ccde056c3983160ba97b5a36)

8 years agobpo-30615: Fix the leak reference in Modules/_elementtree.c (#2129)
Stéphane Wirtel [Mon, 12 Jun 2017 13:30:48 +0000 (15:30 +0200)]
bpo-30615: Fix the leak reference in Modules/_elementtree.c (#2129)

8 years ago[2.7] bpo-28994: Fixed errors handling in atexit._run_exitfuncs(). (GH-2034) (#2123)
Serhiy Storchaka [Mon, 12 Jun 2017 06:10:53 +0000 (09:10 +0300)]
[2.7] bpo-28994: Fixed errors handling in atexit._run_exitfuncs(). (GH-2034) (#2123)

The traceback no longer displayed for SystemExit raised in a callback registered by atexit..
(cherry picked from commit 3fd54d4a7e604067e2bc0f8cfd58bdbdc09fa7f4)

8 years agobpo-30621: Update Input Output Tutorial Example(GH-2074) (GH-2120)
Mariatta [Mon, 12 Jun 2017 01:59:33 +0000 (18:59 -0700)]
bpo-30621: Update Input Output Tutorial Example(GH-2074) (GH-2120)

import json before using json module
(cherry picked from commit 1dbce04d0e3e93b715eb0d8024da396361759d16)

8 years ago[2.7] Use Travis to make sure all generated files are up to date (GH-2080) (GH-2094)
Zachary Ware [Sun, 11 Jun 2017 22:45:40 +0000 (17:45 -0500)]
[2.7] Use Travis to make sure all generated files are up to date (GH-2080) (GH-2094)

(cherry-picked from commit 0afbabe245e2eb6f7cef3b70531d69f2a7ad8295)

Also adds `python.exe-gdb.py` to `.gitignore`, it is created by OS X builds.

8 years ago[2.7] bpo-27425: Be more explicit in .gitattributes (GH-840) (GH-2086)
Zachary Ware [Sun, 11 Jun 2017 19:19:39 +0000 (14:19 -0500)]
[2.7] bpo-27425: Be more explicit in .gitattributes (GH-840) (GH-2086)

Also updates checked-in line endings in several files.

8 years agobpo-25409: Clarify fnmatch and fnmatchcase documentation (GH-1535) (GH-2067)
Mariatta [Sat, 10 Jun 2017 14:26:39 +0000 (07:26 -0700)]
bpo-25409: Clarify fnmatch and fnmatchcase documentation (GH-1535) (GH-2067)

Mention that fnmatchcase does not call normcase, and fnmatch does.
(cherry picked from commit e5f6e86c48c7b2eb9e1d6a0e72867b4d8b4720f3)

8 years agobpo-30614: testInitNonExistentFile() of test_bz2 leaks references (#2033)
Stéphane Wirtel [Sat, 10 Jun 2017 12:36:57 +0000 (14:36 +0200)]
bpo-30614: testInitNonExistentFile() of test_bz2 leaks references (#2033)

* bpo-30614: testInitNonExistentFile() of test_bz2 leaks references

Extract the code of BZ2File_dealloc and create a new BZ2File_clear()
function. Call BZ2File_clear() in BZ2File_dealloc().

Define BZ2File_clear() as tp_clear.

Move the lock initialization before the "self->file =
PyObject_CallFunction" in BZ2File_init() and check the lock is not
created twice.

Call BZ2File_clear() in BZ2File_init() after the init of the lock

Co-Authored-By: Victor Stinner <victor.stinner@gmail.com>
* Create bz2module.c

Fix after the review of Victor Stinner

8 years ago[2.7] bpo-30417: Disable `cpu` resource on AppVeyor (GH-1951)
Zachary Ware [Sat, 10 Jun 2017 03:27:09 +0000 (22:27 -0500)]
[2.7] bpo-30417: Disable `cpu` resource on AppVeyor (GH-1951)

(cherry picked from commit 42e3acda86829def9adc354fbee77597b849bf9e)

8 years agobpo-30418: Popen.communicate() always ignore EINVAL (#2002) (#2006)
Victor Stinner [Thu, 8 Jun 2017 16:34:30 +0000 (18:34 +0200)]
bpo-30418: Popen.communicate() always ignore EINVAL (#2002) (#2006)

On Windows, subprocess.Popen.communicate() now also ignore EINVAL
on stdin.write() if the child process is still running but closed the
pipe.
(cherry picked from commit d52aa31378ae43e044a300edfe8285954c167216)

8 years ago[2.7] trivial: update config.{guess,sub} from gnu.org. (GH-1987) (#2007)
Matthias Klose [Thu, 8 Jun 2017 16:25:58 +0000 (09:25 -0700)]
[2.7] trivial: update config.{guess,sub} from gnu.org. (GH-1987) (#2007)

* Update config.{guess,sub} from gnu.org..
(cherry picked from commit 6f46683a6257f22f25d136ed080d58d0c060a43b)

8 years agobpo-23787: Change sum() docstring from sequence to iterable (GH-1859)
Mariatta [Tue, 6 Jun 2017 16:12:03 +0000 (09:12 -0700)]
bpo-23787: Change sum() docstring from sequence to iterable (GH-1859)

* bpo-23787: Change sum() docstring from sequence to iterable

Original patch by Raymond Hettinger.

8 years ago[2.7] Install dependencies in Travis OSX build (GH-1952)
Zachary Ware [Tue, 6 Jun 2017 03:41:36 +0000 (22:41 -0500)]
[2.7] Install dependencies in Travis OSX build (GH-1952)

(cherry picked from commit 167e0fc211c06df)

8 years ago[2.7] bpo-30417: Disable 'cpu' resource on Travis (GH-1928)
Zachary Ware [Tue, 6 Jun 2017 01:03:05 +0000 (20:03 -0500)]
[2.7] bpo-30417: Disable 'cpu' resource on Travis (GH-1928)

Also weakens the 'should this be run?' regex to allow all builds when .travis.yml changes.
(cherry picked from commit c53b13b270767948fddb58b287149c499f9a03c4)

8 years agoSimplify code in warnings modules (#1957)
Alex Gaynor [Mon, 5 Jun 2017 13:13:50 +0000 (09:13 -0400)]
Simplify code in warnings modules (#1957)

Metaprogramming a list of attributes was excessive, and made the code less readable and slower.

Backport of 5de3a64179bafcd440b32849b1129ed1fea47b85

8 years ago[2.7] Only run AppVeyor on long-lived branches (GH-1941)
Zachary Ware [Mon, 5 Jun 2017 00:52:00 +0000 (19:52 -0500)]
[2.7] Only run AppVeyor on long-lived branches (GH-1941)

Also on the short-lived `buildbot-custom` branch.
(cherry picked from commit d3bedf356aca04ed9135a84b08)

8 years agoSkip UNC tests on AppVeyor in case of ENOENT (GH-1950)
Zachary Ware [Sun, 4 Jun 2017 22:45:02 +0000 (17:45 -0500)]
Skip UNC tests on AppVeyor in case of ENOENT (GH-1950)

8 years ago[2.7] Turn on macOS builds for Travis (GH-1846) (GH-1931)
Brett Cannon [Sat, 3 Jun 2017 17:38:43 +0000 (10:38 -0700)]
[2.7] Turn on macOS builds for Travis (GH-1846) (GH-1931)

Initially the macOS builds are allowed to fail until such time that they can be determined to be stable and not add an unacceptable amount of time to the overall Travis-passing process.
(cherry picked from commit 21c2dd7cf8414c903f0e83cf1d6b7f02f645f422)

8 years agobpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses (#1904...
Xiang Zhang [Thu, 1 Jun 2017 14:22:18 +0000 (22:22 +0800)]
bpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses (#1904) (#1676)

8 years agobpo-30499: Remove a deprecated note about sets. (GH-1848) (GH-1907)
Mariatta [Thu, 1 Jun 2017 14:12:18 +0000 (07:12 -0700)]
bpo-30499: Remove a deprecated note about sets. (GH-1848) (GH-1907)

(cherry picked from commit 0737ee20671d60802a7ef40f653fe449f1921de0)

8 years agobpo-22702: Clarify documentation of str.join & bytes.join (GH-156) (GH-1898)
Mariatta [Thu, 1 Jun 2017 02:49:30 +0000 (19:49 -0700)]
bpo-22702: Clarify documentation of str.join & bytes.join (GH-156) (GH-1898)

The "iterable iterable" phrasing created confusion between the term
reference and the parameter name.

This simplifies the phrasing to just use the parameter name
without linking directly to the term definition..
(cherry picked from commit 08e2f355d04d3cbea5751ce1275306ee3f569b32)

8 years ago[2.7] Fix Travis config to reinstate test build (GH-1879) (GH-1891)
Brett Cannon [Wed, 31 May 2017 22:53:30 +0000 (15:53 -0700)]
[2.7] Fix Travis config to reinstate test build (GH-1879) (GH-1891)

(cherry picked from commit a5aa72ac789052411797c6f079ffff0a9fdbf82c)

8 years ago[2.7] Fix a trivial typo in global section (GH-1497) (GH-1882)
Mariatta [Wed, 31 May 2017 05:08:19 +0000 (22:08 -0700)]
[2.7] Fix a trivial typo in global section (GH-1497) (GH-1882)

(cherry picked from commit f34c6850203a2406c4950af7a9c8a134145df4ea)

8 years ago[2.7] Build docs in parallel (GH-1842). (GH-1873)
Mariatta [Tue, 30 May 2017 22:29:40 +0000 (15:29 -0700)]
[2.7] Build docs in parallel (GH-1842). (GH-1873)

(cherry picked from commit eba68e2c42e149acecb15bbeb692786e2540157d)

8 years agobpo-29766: Do not force --with-lto to true for --enable-optimizations (#1858)
Hanno Schlichting [Tue, 30 May 2017 02:07:07 +0000 (04:07 +0200)]
bpo-29766: Do not force --with-lto to true for --enable-optimizations (#1858)

This fixes a faulty backport to the Python 2.7 branch only of http://bugs.python.org/issue28032. Details in the bpo-29766.

8 years ago[2.7] bpo-29960 _random.Random corrupted on exception in setstate(). … (#1289)
Mariatta [Sat, 27 May 2017 14:19:55 +0000 (07:19 -0700)]
[2.7] bpo-29960 _random.Random corrupted on exception in setstate(). … (#1289)

(cherry picked from commit 9616a82e7802241a4b74cf7ae38d43c37bf66e48)

8 years ago[2.7] bpo-30310: tkFont now supports unicode options (e.g. font family). (#1567)
Serhiy Storchaka [Fri, 26 May 2017 05:15:51 +0000 (08:15 +0300)]
[2.7] bpo-30310: tkFont now supports unicode options (e.g. font family). (#1567)

8 years ago[2.7] Indent methods and attributes of MimeType class (GH-1306) (#1801)
Stéphane Wirtel [Thu, 25 May 2017 17:11:30 +0000 (19:11 +0200)]
[2.7] Indent methods and attributes of MimeType class (GH-1306) (#1801)

8 years ago[2.7] bpo-30414: multiprocessing.Queue._feed do not break from main loop on exc ...
Antoine Pitrou [Thu, 25 May 2017 15:53:04 +0000 (17:53 +0200)]
[2.7] bpo-30414: multiprocessing.Queue._feed do not break from main loop on exc (GH-1683) (#1817)

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored..
(cherry picked from commit bc50f03db4f58c869b78e98468e374d7e61f1227)

8 years agobpo-30394: Fix a socket leak in smtplib.SMTP.__init__() (#1700) (#1788)
Stéphane Wirtel [Wed, 24 May 2017 18:24:27 +0000 (20:24 +0200)]
bpo-30394: Fix a socket leak in smtplib.SMTP.__init__() (#1700) (#1788)

8 years agoadded re.UNICODE effects to insensitive flags (#1781)
Brian Ward [Wed, 24 May 2017 07:08:41 +0000 (00:08 -0700)]
added re.UNICODE effects to insensitive flags (#1781)

8 years agoFix spelling mistakes in tkinter.py (#1754)
Vijay Kumar [Tue, 23 May 2017 06:16:27 +0000 (11:46 +0530)]
Fix spelling mistakes in tkinter.py (#1754)

Ran the docstrings through spell checker, and fixed spelling issues.

8 years agoBuild the docs against Sphinx 1.6.1 (GH-1744)
Brett Cannon [Tue, 23 May 2017 00:47:01 +0000 (17:47 -0700)]
Build the docs against Sphinx 1.6.1 (GH-1744)

8 years ago[2.7] Fix typos in multiple `.rst` files (GH-1668) (#1707)
delirious-lettuce [Mon, 22 May 2017 17:16:53 +0000 (11:16 -0600)]
[2.7] Fix typos in multiple `.rst` files (GH-1668) (#1707)

8 years agobpo-30003: Fix handling escape characters in HZ codec (#1720) (#1556)
Xiang Zhang [Mon, 22 May 2017 17:04:27 +0000 (01:04 +0800)]
bpo-30003: Fix handling escape characters in HZ codec (#1720) (#1556)

8 years ago[2.7] bpo-30415: Add new tests for the fnmatch module. (GH-1684). (#1696)
Serhiy Storchaka [Sun, 21 May 2017 07:37:43 +0000 (10:37 +0300)]
[2.7] bpo-30415: Add new tests for the fnmatch module. (GH-1684). (#1696)

(cherry picked from commit 817554715b5578b0bac5c35e6ec9a1abd8649e53)

8 years agobpo-30409: locale.getpreferredencoding doesn't return result (#1672)
Sean McCully [Sun, 21 May 2017 01:44:02 +0000 (21:44 -0400)]
bpo-30409: locale.getpreferredencoding doesn't return result (#1672)

8 years ago[2.7] bpo-27945: Fixed various segfaults with dict. (GH-1657) (#1681)
Serhiy Storchaka [Sat, 20 May 2017 17:05:27 +0000 (20:05 +0300)]
[2.7] bpo-27945: Fixed various segfaults with dict. (GH-1657) (#1681)

Based on patches by Duane Griffin and Tim Mitchell.
(cherry picked from commit 753bca3934a7618a4fa96e107ad1c5c18633a683)

8 years ago[2.7] bpo-25794: Fix `type.__setattr__()` for non-interned or unicode attribute names...
Serhiy Storchaka [Sat, 20 May 2017 07:04:53 +0000 (10:04 +0300)]
[2.7] bpo-25794: Fix `type.__setattr__()` for non-interned or unicode attribute names. (GH-1652) (#1675)

Based on patch by Eryk Sun.
(cherry picked from commit d896985bb2de49046f9b6879e906d1e4db255e23)

8 years agobpo-26434: Fix multiprocessing grandchilds in a Windows service (GH-1167)
Marc Schlaich [Fri, 19 May 2017 00:40:16 +0000 (02:40 +0200)]
bpo-26434: Fix multiprocessing grandchilds in a Windows service (GH-1167)

Patch by Davin with help from Marc.

8 years ago[2.7] bpo-30375: Correct the stacklevel of regex compiling warnings. (#1595) (#1648)
Serhiy Storchaka [Thu, 18 May 2017 10:46:17 +0000 (13:46 +0300)]
[2.7] bpo-30375: Correct the stacklevel of regex compiling warnings. (#1595) (#1648)

Warnings emitted when compile a regular expression now always point
to the line in the user code.  Previously they could point into inners
of the re module if emitted from inside of groups or conditionals.

(cherry picked from commit c7ac7280c321b3c1679fe5f657a6be0f86adf173)