Commit Graph

80209 Commits

Author SHA1 Message Date
Serhiy Storchaka 787826c931 [2.7] bpo-30746: Prohibited the '=' character in environment variable names (GH-2382) (#2393)
in `os.putenv()` and `os.spawn*()`..
(cherry picked from commit 77703942c5)
2017-06-25 09:50:00 +03:00
Serhiy Storchaka 9dda2caca8 [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 d174d24a5d)
2017-06-24 11:49:00 +03:00
Serhiy Storchaka 7709b4d57b [2.7] bpo-30727: Fix a race condition in test_threading. (GH-2334). (#2353)
(cherry picked from commit 32cb968a2e)
2017-06-23 14:13:39 +03:00
Mariatta 508267437c [2.7] bpo-30709: Improve code example in Descriptor HowTo doc (GH-2339) (GH-2340)
(cherry picked from commit b066edfb1b)
2017-06-22 21:24:23 -07:00
larryhastings 1ecfa45195 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).
2017-06-22 16:00:05 -07:00
Victor Stinner da6d305b6f 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 020af2a2bc)
2017-06-22 02:09:40 +02:00
Jeremy Kloth ab3b0ade50 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.
2017-06-21 21:14:53 +02:00
Victor Stinner 2ada64d2a0 [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 5ff7132313)

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

(cherry picked from libexpat commit c74d380b8f0b5215153d840d2af9455d9c53b960)
2017-06-21 17:12:46 +02:00
Jeremy Kloth ebbccea997 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
2017-06-20 22:53:39 +02:00
Victor Stinner d4324baca4 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 90e01e50ef)
2017-06-20 16:20:36 +02:00
Xiang Zhang b39a7481ee bpo-30176: Add missing curses cell attributes constants (#2278) 2017-06-19 22:12:45 +08:00
Jay Bosamiya c3c9db8927 [2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174) 2017-06-18 19:41:03 +03:00
Victor Stinner 24c2c20873 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
2017-06-16 17:30:03 +02:00
Victor Stinner 8bb0863e02 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.
2017-06-16 12:14:09 +02:00
Victor Stinner 0e4571a68a 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 23ec4b57e1)
2017-06-15 02:16:35 +02:00
Mariatta 4b30107bfd bpo-30659 : Use ** for kwargs in namedtuple._replace() signature (GH-2173) (GH-2196)
(cherry picked from commit 184bd82ba8)
2017-06-14 12:07:42 -07:00
csabella 311054a928 Fix trivial typo in Python Setup documentation (GH-2185) (GH-2190)
Replace platform with platforms.
(cherry picked from commit 4ebf03d109)
2017-06-14 09:26:03 -07:00
Antoine Pitrou d09f1674d7 [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 1eb6c0074d)
2017-06-13 17:52:29 +02:00
Nick Coghlan a51f12f154 [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.
2017-06-13 20:58:48 +10:00
Victor Stinner bdd3567ccc _tkinter: Fix refleak in getint() (#2153)
PyNumber_Int() creates a new reference: need to decrement result
reference counter.
2017-06-13 11:12:01 +02:00
Antoine Pitrou 15a6127e72 [2.7] Mention how to disable signal fd wakeup (GH-2140) (#2151)
(cherry picked from commit d79c1d4a94)
2017-06-13 10:21:28 +02:00
Marco Buttu bbb335891c bpo-30217: add the operators ~ and | to the index (GH-1502) (GH-2137)
(cherry picked from commit dc980dfbcf)
2017-06-12 12:42:47 -07:00
Stéphane Wirtel 41af942e57 bpo-30615: Fix the leak reference in Modules/_elementtree.c (#2129) 2017-06-12 15:30:48 +02:00
Serhiy Storchaka 0cc43df05e [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 3fd54d4a7e)
2017-06-12 09:10:53 +03:00
Mariatta 107949cb87 bpo-30621: Update Input Output Tutorial Example(GH-2074) (GH-2120)
import json before using json module
(cherry picked from commit 1dbce04d0e)
2017-06-11 18:59:33 -07:00
Zachary Ware 51658f7f9d [2.7] Use Travis to make sure all generated files are up to date (GH-2080) (GH-2094)
(cherry-picked from commit 0afbabe245)

Also adds `python.exe-gdb.py` to `.gitignore`, it is created by OS X builds.
2017-06-11 17:45:40 -05:00
Zachary Ware 5fe8ac69f9 [2.7] bpo-27425: Be more explicit in .gitattributes (GH-840) (GH-2086)
Also updates checked-in line endings in several files.
2017-06-11 14:19:39 -05:00
Mariatta 9660a7e4bb 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 e5f6e86c48)
2017-06-10 07:26:39 -07:00
Stéphane Wirtel 28288bebaf 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
2017-06-10 14:36:57 +02:00
Zachary Ware 3c7b67bb34 [2.7] bpo-30417: Disable `cpu` resource on AppVeyor (GH-1951)
(cherry picked from commit 42e3acda86)
2017-06-09 22:27:09 -05:00
Victor Stinner e5bdad2201 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 d52aa31378)
2017-06-08 18:34:30 +02:00
Matthias Klose fe681397dc [2.7] trivial: update config.{guess,sub} from gnu.org. (GH-1987) (#2007)
* Update config.{guess,sub} from gnu.org..
(cherry picked from commit 6f46683a62)
2017-06-08 09:25:58 -07:00
Mariatta 536209ef92 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.
2017-06-06 09:12:03 -07:00
Zachary Ware e29c5e8104 [2.7] Install dependencies in Travis OSX build (GH-1952)
(cherry picked from commit 167e0fc211)
2017-06-05 22:41:36 -05:00
Zachary Ware ddf8f141f0 [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 c53b13b270)
2017-06-05 20:03:05 -05:00
Alex Gaynor e14af32cc6 Simplify code in warnings modules (#1957)
Metaprogramming a list of attributes was excessive, and made the code less readable and slower.

Backport of 5de3a64179
2017-06-05 09:13:50 -04:00
Zachary Ware ed3edb4fbf [2.7] Only run AppVeyor on long-lived branches (GH-1941)
Also on the short-lived `buildbot-custom` branch.
(cherry picked from commit d3bedf356a)
2017-06-04 19:52:00 -05:00
Zachary Ware 87edc5e5e0 Skip UNC tests on AppVeyor in case of ENOENT (GH-1950) 2017-06-04 17:45:02 -05:00
Brett Cannon 6a1b89dd13 [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 21c2dd7cf8)
2017-06-03 10:38:43 -07:00
Xiang Zhang 3ef3bcbe38 bpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses (#1904) (#1676) 2017-06-01 22:22:18 +08:00
Mariatta 662d856cd7 bpo-30499: Remove a deprecated note about sets. (GH-1848) (GH-1907)
(cherry picked from commit 0737ee2067)
2017-06-01 07:12:18 -07:00
Mariatta 9139f23464 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 08e2f355d0)
2017-05-31 19:49:30 -07:00
Brett Cannon 32e220f1a2 [2.7] Fix Travis config to reinstate test build (GH-1879) (GH-1891)
(cherry picked from commit a5aa72ac78)
2017-05-31 15:53:30 -07:00
Mariatta e81aa87562 [2.7] Fix a trivial typo in global section (GH-1497) (GH-1882)
(cherry picked from commit f34c685020)
2017-05-30 22:08:19 -07:00
Mariatta 497e5e105a [2.7] Build docs in parallel (GH-1842). (GH-1873)
(cherry picked from commit eba68e2c42)
2017-05-30 15:29:40 -07:00
Hanno Schlichting 1f29cefc87 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.
2017-05-29 19:07:07 -07:00
Mariatta 1626a479e2 [2.7] bpo-29960 _random.Random corrupted on exception in setstate(). … (#1289)
(cherry picked from commit 9616a82e78)
2017-05-27 07:19:55 -07:00
Serhiy Storchaka 96f5020597 [2.7] bpo-30310: tkFont now supports unicode options (e.g. font family). (#1567) 2017-05-26 08:15:51 +03:00
Stéphane Wirtel 2bb6eb3fbb [2.7] Indent methods and attributes of MimeType class (GH-1306) (#1801) 2017-05-25 10:11:30 -07:00
Antoine Pitrou bdd964710d [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 bc50f03db4)
2017-05-25 17:53:04 +02:00