Commit Graph

80192 Commits

Author SHA1 Message Date
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
Stéphane Wirtel 779e7c933e bpo-30394: Fix a socket leak in smtplib.SMTP.__init__() (#1700) (#1788) 2017-05-25 02:24:27 +08:00
Brian Ward 9395ca40f2 added re.UNICODE effects to insensitive flags (#1781) 2017-05-24 00:08:41 -07:00
Vijay Kumar f31f225468 Fix spelling mistakes in tkinter.py (#1754)
Ran the docstrings through spell checker, and fixed spelling issues.
2017-05-23 09:16:27 +03:00
Brett Cannon fd58340e47 Build the docs against Sphinx 1.6.1 (GH-1744) 2017-05-22 17:47:01 -07:00
delirious-lettuce 374e57d928 [2.7] Fix typos in multiple `.rst` files (GH-1668) (#1707) 2017-05-22 20:16:53 +03:00
Xiang Zhang 6e1b832a6c bpo-30003: Fix handling escape characters in HZ codec (#1720) (#1556) 2017-05-23 01:04:27 +08:00
Serhiy Storchaka 2b67c7aae7 [2.7] bpo-30415: Add new tests for the fnmatch module. (GH-1684). (#1696)
(cherry picked from commit 817554715b)
2017-05-21 10:37:43 +03:00
Sean McCully cef8b1741c bpo-30409: locale.getpreferredencoding doesn't return result (#1672) 2017-05-20 18:44:02 -07:00
Serhiy Storchaka e6a0b59829 [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 753bca3934)
2017-05-20 20:05:27 +03:00
Serhiy Storchaka e9f9b04278 [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 d896985bb2)
2017-05-20 10:04:53 +03:00
Marc Schlaich c47c315812 bpo-26434: Fix multiprocessing grandchilds in a Windows service (GH-1167)
Patch by Davin with help from Marc.
2017-05-18 19:40:16 -05:00
Serhiy Storchaka dfcfc91578 [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 c7ac7280c3)
2017-05-18 13:46:17 +03:00
Serhiy Storchaka 955b6760cf [2.7] bpo-30363: Backport warnings in the re module. (#1577)
Running Python with the -3 option now warns about regular expression
syntax that is invalid or has different semantic in Python 3
or will change the behavior in future Python versions.
2017-05-18 12:34:40 +03:00
Serhiy Storchaka 09b52471f3 bpo-30365: Backport warnings and fix bugs in ElementTree. (#1581)
Running Python with the -3 option now emits deprecation warnings for
getchildren() and getiterator() methods of the Element class in the
xml.etree.cElementTree module and when pass the html argument to
xml.etree.ElementTree.XMLParser().

Fixed a deprecation warning about the doctype() method of the
xml.etree.ElementTree.XMLParser class.  Now it is emitted only when
define the doctype() method in the subclass of XMLParser.

Fixed a bug in the test_bug_200708_close test method.  An EchoTarget
instance was incorrectly passed to XMLParser() as the html argument and
silently ignored.

Tests no longer failed when use the -m option for running only selected
test methods. Checking warnings now is more specific, warnings are
expected only when use deprecated features.
2017-05-17 10:08:11 +03:00
Victor Stinner 800e4b7ad6 bpo-30329: Catch Windows error 10022 on shutdown() (#1538) (#1624)
Catch the Windows socket WSAEINVAL error (code 10022) in imaplib
on shutdown(SHUT_RDWR): An invalid operation was attempted

This error occurs sometimes on SSL connections.
(cherry picked from commit 83a2c28798)
2017-05-16 17:38:30 -07:00
Serhiy Storchaka b8b9f95f66 [2.7] bpo-30380: Fix Sphinx 1.6.1 warnings. (GH-1613) (#1616)
* Use explicit numbering for footnotes referred by explicit number.
* Fix literal strings formatting in howto/urllib2.rst.
* Add `:noindex:` to duplicated definition of list.
* Update susp-ignored.csv for reference/expressions.rst.
(cherry picked from commit d97b7dc94b)
2017-05-17 01:26:48 +03:00
Brett Cannon 97eb2a7d77 [2.7] bpo-30380: Pin the version of Sphinx used to build the docs (GH-1612) (GH-1619) 2017-05-16 14:41:00 -07:00