Commit Graph

80182 Commits

Author SHA1 Message Date
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
grzgrzgrz3 6924ed55c9 bpo-30357 each test in test_thread waits until all spawned threads finish (#1583)
* bpo-30357 each test in test_thread waits until all spawn threads finish

* bpo-30357 each test in test_thread waits until all spawn threads finish

* bpo-30357: test_thread now uses threading_cleanup() (#1592)

test_thread: setUp() now uses support.threading_setup() and
support.threading_cleanup() to wait until threads complete to avoid
random side effects on following tests.

Co-Authored-By: Victor Stinner <victor.stinner@gmail.com>

* bpo-30357: test_thread now uses threading_cleanup() (#1592)

test_thread: setUp() now uses support.threading_setup() and
support.threading_cleanup() to wait until threads complete to avoid
random side effects on following tests.

Co-Authored-By: Victor Stinner <victor.stinner@gmail.com>
2017-05-15 21:01:07 +02:00
Victor Stinner 9d1983be50 bpo-11790: Fix sporadic failures in test_multiprocessing.WithProcessesTestCondition. (#1591)
(cherry picked from commit f25a8de845)
2017-05-15 17:32:14 +02:00
Serhiy Storchaka eb66897e87 [2.7] bpo-30366: Backport tests for test.support. (#1582)
Also backport new functions temp_dir() and python_is_optimized().
temp_cwd() now accepts None as a name (means using tempfile.mkdtemp).
check_syntax_error() now accepts arguments lineno and offset.
Use more specific error messages in get_attribute().
2017-05-15 11:59:35 +03:00
Xiang Zhang 982a17e02d bpo-30242: resolve some undefined behaviours in struct (#1418) (#1588) 2017-05-15 13:17:54 +08:00
Zachary Ware bd82a070cd Update Travis Doc build config (GH-1565)
Build the 'suspicious' doc target, turn on warnings-as-errors on the
docs, and always build the docs.  This better matches master's doc build
setup.
2017-05-13 10:05:53 -05:00
Zachary Ware f6c6d1e230 bpo-11681: Document the `-b` and `-bb` options (GH-1562) 2017-05-13 09:30:20 -05:00
Zachary Ware 4be66b6cd1 Fix warnings due to deprecated latex options (GH-1563) 2017-05-13 09:16:44 -05:00
Zachary Ware c7362b4b08 Update susp-ignored.csv (GH-1564) 2017-05-13 09:16:25 -05:00
Victor Stinner 94a3694c3d bpo-6393: Fix locale.getprerredencoding() on macOS (#1555)
Fix for bpo-6393: Python crashes on OSX when $LANG is set to some (but
not all) invalid values due to an invalid result from nl_langinfo

(cherry picked from commit 6d77e07196)
2017-05-12 11:51:38 +02:00
Victor Stinner f2e894cfd9 bpo-30342: Fix sysconfig.is_python_build() on VS9.0 (#1544)
Fix sysconfig.is_python_build() if Python is built with Visual Studio
2008 (VS 9.0).
2017-05-12 11:31:08 +02:00