Commit graph

98010 commits

Author SHA1 Message Date
Victor Stinner
f0ff849adc bpo-30524: Fix _PyStack_UnpackDict() (#1886)
* bpo-29259: Remove unused func parameter of _PyStack_UnpackDict()
* bpo-29286: Change _PyStack_UnpackDict() prototype to be able to
  notify of failure when args is NULL. _PyStack_UnpackDict() now
  returns -1 on error.
2017-06-09 13:24:53 +02:00
Serhiy Storchaka
570b1c971c [3.6] bpo-30529: Fix errors for invalid whitespaces in f-string subexpressions. (GH-1888) (#2013)
'invalid character in identifier' now is raised instead of
'f-string: empty expression not allowed' if a subexpression contains
only whitespaces and they are not accepted by Python parser.
(cherry picked from commit 2e9cd58)
2017-06-09 00:38:06 +03:00
Victor Stinner
b319d09ee4 bpo-30418: Popen.communicate() always ignore EINVAL (#2002) (#2004)
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 23:14:07 +02:00
Victor Stinner
31b950ab86 bpo-30601: Fix a refleak in WindowsConsoleIO (#2003) (#2008)
Fix a reference leak in _io._WindowsConsoleIO: PyUnicode_FSDecoder()
always initialize decodedname when it succeed and it doesn't clear
input decodedname object.
(cherry picked from commit 29adc13bd7)
2017-06-08 23:13:12 +02:00
Denis Osipov
ca1b66fd05 [3.6] bpo-30584: Fix test_os fails on non-English Windows (GH-1980) (#1999)
* Fix bpo-30584

* Adding a comment mentionning the bpo and explaining what is the identifier

* Add Denis Osipov to Misc/ACKS
(cherry picked from commit 897bba7563)
2017-06-08 14:02:05 +02:00
Nathaniel J. Smith
854f7ba1d5 [3.6] bpo-30594: Fixed refcounting in newPySSLSocket (GH-1992) (#1994)
If pass a server_hostname= that fails IDNA decoding to SSLContext.wrap_socket or SSLContext.wrap_bio, then the SSLContext object had a spurious Py_DECREF called on it, eventually leading to segfaults.
(cherry picked from commit 65ece7ca23)
2017-06-08 14:14:40 +03:00
Matthias Klose
2c7f927369 [3.6] trivial: update config.{guess,sub} from gnu.org. (GH-1987) (#1990)
* Update config.{guess,sub} from gnu.org.
(cherry picked from commit 6f46683a62)
2017-06-07 18:07:41 -07:00
Antoine Pietri
ceabf9acf0 bpo-30177: pathlib: include the full path in resolve(strict=False) (#1893) (#1985) 2017-06-07 10:18:56 -07:00
Nate
09b6c0c71e [3.6] bpo-29822: make inspect.isabstract() work during __init_subclass__ (#1979)
At the time when an abstract base class' __init_subclass__ runs,
ABCMeta.__new__ has not yet finished running, so in the presence of
__init_subclass__, inspect.isabstract() can no longer depend only on
TPFLAGS_IS_ABSTRACT.
(cherry picked from commit fcfe80ec25)
2017-06-07 07:21:34 +03:00
Nate
6fb12b5c43 bpo-29581: bpo-29581: Make ABCMeta.__new__ pass **kwargs to type.__new__ (GH-527) (GH-1282)
Many metaclasses in the standard library don't play nice with
__init_subclass__. This bug makes ABCMeta in particular with
__init_subclass__, which is an 80/20 solution for me personally.
AFAICT, a general solution to this problem requires updating all
metaclasses in the standard library to make sure they pass **kwargs to
type.__new__, whereas this PR only fixes ABCMeta. For context, see
https://bugs.python.org/issue29581.

* added a test combining ABCMeta and __init_subclass__
* Added NEWS item

(cherry picked from commit bd583ef985)

* [3.6] bpo-29581: Make ABCMeta.__new__ pass **kwargs to type.__new__ (GH-527)

Many metaclasses in the standard library don't play nice with
__init_subclass__. This bug makes ABCMeta in particular with
__init_subclass__, which is an 80/20 solution for me personally.
AFAICT, a general solution to this problem requires updating all
metaclasses in the standard library to make sure they pass **kwargs to
type.__new__, whereas this PR only fixes ABCMeta. For context, see
https://bugs.python.org/issue29581.

* added a test combining ABCMeta and __init_subclass__
* Added NEWS item.
(cherry picked from commit bd583ef985)

* **kwargs -> ``kwargs`` in attempts to fix the Travis build.

* Quote the **kwargs
2017-06-06 17:31:03 -07:00
gfyoung
063f0b3583 bpo-29596: Improve clinic howto documentation (GH-1710) (GH-1976)
Clarify that `two-pass` buffer can only be dumped once, and it prints out all text sent to it during all processing, even from Clinic blocks *after* the dumping point.
2017-06-06 14:17:18 -07:00
Steve Dower
2bafc0dcca [3.6] bpo-30557: faulthandler now correctly filters and displays exception … (#1960)
* bpo-30557: faulthandler now correctly filters and displays exception codes on Windows (#1924)

* bpo-30557: faulthandler now correctly filters and displays exception codes on Windows

* Adds test for non-fatal exceptions.

* Adds bpo number to comment.

* bpo-30557: Fix test_faulthandler (#1969)

On Windows 8, 8.1 and 10 at least, the exit code is the exception
code (no bit is cleared).
2017-06-06 13:47:14 -07:00
wim glenn
b25b7254d9 bpo-30583: Fix typo in datetime dateutil documentation (GH-1972) (GH-1974)
Replace `datetuil` into `dateutil`
(cherry picked from commit 53f2af1655)
2017-06-06 12:32:14 -07:00
Serhiy Storchaka
68e5af89d4 [3.6] bpo-30567: Fix refleak in sys.getwindowsversion (GH-1940) (#1970)
(cherry picked from commit 48fb766)
2017-06-06 19:23:02 +03:00
Mariatta
e1a60d9032 [3.6] bpo-30303: IDLE: Add _utest argument to textview (GH-1499) (#1916)
(cherry picked from commit ba365da9ce)
2017-06-06 11:56:59 -04:00
Zachary Ware
01ea561f29 [3.6] Install dependencies in Travis OSX build (GH-1952)
(cherry picked from commit 167e0fc211)
2017-06-05 22:41:17 -05:00
Nick Coghlan
798cfb2123 bpo-30052: Always regenerate cross-references (GH-1339) (GH-1921)
The patch for bpo-30052 changed the preferred link target
for :func:`bytes` and :func`bytearray` references to be the
respective type definitions rather than the corresponding
builtin function entries.

This patch changes the daily documentation builds to disable
the output caching in Sphinx, in order to ensure that
cross-reference changes like this one are reliably picked
up and applied automatically after merging.
(cherry picked from commit 7a82f9c2b9)
2017-06-05 19:19:37 -07:00
Zachary Ware
d125738e93 [3.6] bpo-30417: Disable 'cpu' and 'tzdata' resources 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 19:10:21 -05:00
csabella
ce40550acd bpo-30538: Update count() in Functional Programming HOWTO (GH-1919) (GH-1943)
* bpo-30538: Update count() in Functional HOWTO
* bpo-30538: Update enumerate() arguments in Functional HOWTO
(cherry picked from commit 9be4ff359d)
2017-06-04 20:12:23 -07:00
Mariatta
86eb93fae6 bpo-30530: Update Descriptor How To Documentation (GH-1845) (GH-1953)
Update the code example in Functions and Methods section
Remove objtype argument in MethodType
(cherry picked from commit 1bced56567)
2017-06-04 20:06:48 -07:00
Zachary Ware
47779d720a [3.6] 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:50:37 -05:00
Zachary Ware
7e6d999b6c [3.6] Fix skipping test_UNC_path on AppVeyor due to a different error being raised (GH-1920)
We get `ERROR_BAD_NETPATH` (53) on AppVeyor which is translated to
ENOENT (2).
(cherry picked from commit 7a99625e0d)
2017-06-04 17:14:03 -05:00
Brett Cannon
ba6bfcdfb4 [3.6] Turn on macOS builds for Travis (GH-1846) (#1929)
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:33:53 -07:00
Steve Dower
c63ae1122f bpo-30544: _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails (#1912) (#1925)
* bpo-30544: _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

* bpo-30544: _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails
2017-06-02 14:39:05 -07:00
Mariatta
1c92c0edca bpo-30052: Link bytes & bytearray to stdtypes not functions (GH-1271) (GH-1915)
Builtin container types have two potential link targets in the docs:

- their entry in the list of builtin callables
- their type documentation

This change brings `bytes` and `bytearray` into line with other
container types by having cross-references default to linking to
their type documentation, rather than their builtin callable entry..
(cherry picked from commit c6db4811f9)
2017-06-01 21:56:24 -07:00
Matthias Bussonnier
e417d12d72 bpo-29660: traceback: Document that etype is ignored in some places. (GH-344) (GH-1913)
(cherry picked from commit cdb89cd)
2017-06-01 20:26:15 -07:00
Xiang Zhang
95b4da2be4 bpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses (#1676) (#1903) 2017-06-01 22:20:27 +08:00
Mariatta
9d752aa5e6 bpo-30499: Remove a deprecated note about sets. (GH-1848) (GH-1905)
(cherry picked from commit 0737ee2067)
2017-06-01 07:12:01 -07:00
Mariatta
9522159bc4 bpo-22702: Clarify documentation of str.join & bytes.join (GH-156) (GH-1897)
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:01 -07:00
csabella
9abd0bf68f bpo-27618: Clarify that threading.Lock is a factory function (GH-1307) (GH-1894)
(cherry picked from commit 56ddfd2eea)
2017-05-31 18:53:24 -07:00
Brett Cannon
767b6d7d2d [3.6] Fix Travis config to reinstate test build (GH-1879) (GH-1889)
(cherry picked from commit a5aa72ac78)
2017-05-31 15:52:39 -07:00
Mariatta
e49c5e9277 [3.6] Fix a trivial typo in global section (GH-1497) (GH-1880)
(cherry picked from commit f34c685020)
2017-05-30 22:08:04 -07:00
Mariatta
60b257b01c bpo-17188: add missing periods at the end of sentences (GH-1875) (GH-1876)
(cherry picked from commit 9efad1e5ae)
2017-05-30 15:37:43 -07:00
Mariatta
89e0a189f8 [3.6] Build docs in parallel (GH-1842) (GH-1872)
(cherry picked from commit eba68e2c42)
2017-05-30 15:29:24 -07:00
csabella
ad13d54646 bpo-30354: Update data model documentation for super() (GH-1561) (GH-1868)
The data model section of the language reference was written well
before the zero-argument form of super() was added.

To avoid giving the impression that they're doing something
unusual, this updates the description of `__new__` and `__init__`
to use the zero-argument form.

Patch by Cheryl Sabella.
(cherry picked from commit 12b1c18098)
2017-05-30 13:48:22 -07:00
csabella
00b381b9a7 bpo-17188: DOC: Document 'from None' in raise statement (GH-1671) (GH-1867)
Original patch by Dennis Mårtensson.
(cherry picked from commit 763557eac0)
2017-05-30 13:27:39 -07:00
Mariatta
03c7600982 Improve grammar in The Import System documentation (GH-1862) (GH-1863)
Replace `an ModuleNotFoundError` with `a ModuleNotFoundError`.
Replace `an path` with `a path`.
(cherry picked from commit 9c972b5780)
2017-05-30 09:29:06 -07:00
Mariatta
d52f47a8f7 [3.6] bpo-30361: Use better example for mixed-type operands (GH-1701) (#1856)
(cherry picked from commit e405d4b8df)
2017-05-29 18:19:31 -04:00
Mariatta
2ee91c8ad8 [3.6] bpo-30470: Deprecate invalid ctypes call protection on Windows. (GH-1810) (GH-1833)
Calling Ctypes functions is deprecated in 3.6.2 and will be removed in 3.7.
(cherry picked from commit f931fd1c2a)
2017-05-27 07:58:25 -07:00
Mariatta
94d8261d1c [3.6] bpo-29960 _random.Random corrupted on exception in setstate(). … (#1287)
(cherry picked from commit 9616a82e78)
2017-05-27 07:20:24 -07:00
Serhiy Storchaka
b52c68a5a3 [3.6] bpo-30398: Add a docstring for re.error. (GH-1647) (#1830)
Also document that some attributes may be None.
(cherry picked from commit 12d6b5d)
2017-05-27 16:37:40 +03:00
Serhiy Storchaka
584ef2aecf [3.6] Fix the signature of JSONDecodeError (no end parameter). (GH-1827) (#1828)
Unlikely to the simplejson module, json.JSONDecodeError doesn't accept the end argument.
(cherry picked from commit 5becf38)
2017-05-27 16:37:11 +03:00
Antoine Pitrou
2783cc4262 [3.6] bpo-30414: multiprocessing.Queue._feed do not break from main loop on exc (GH-1683) (#1815)
* 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 16:57:46 +02:00
Serhiy Storchaka
f43b293f2f [3.6] bpo-29943: Do not replace the function PySlice_GetIndicesEx() with a macro (GH-1049) (#1813)
if Py_LIMITED_API is not defined.
(cherry picked from commit 49a9059)
2017-05-25 15:32:08 +03:00
Serhiy Storchaka
89a3102640 [3.6] bpo-29104: Fixed parsing backslashes in f-strings. (GH-490) (#1812)
(cherry picked from commit 0cd7a3f)
2017-05-25 14:18:55 +03:00
Zachary Ware
a2a9984a27 [3.6] bpo-30160: Clarify intended usage of wfile (gh-1300) (GH-1793)
The library does not enforce compliance with the HTTP protocol,
so violations are not technically disallowed. Extend the stream's
description to avoid suggesting that intentional protocol violations are
not supported.
(cherry picked from commit a083c8e)
2017-05-24 16:11:01 -05:00
Stéphane Wirtel
c3454f0e79 bpo-30394: Fix a socket leak in smtplib.SMTP.__init__() (#1700) (#1790) 2017-05-25 02:59:06 +08:00
Kushal Das
9bcf81da14 [3.6] bpo-30376: Update outdated WindowObject references (GH-1630) (#1746)
(cherry picked from commit 93fc20b73e)
2017-05-23 09:57:04 -07:00
Łukasz Langa
70705e3cdf [3.6] call remove_done_callback in finally section (GH-1688) (#1755)
(cherry picked from commit 21b3e04c13)
2017-05-23 00:36:23 -07:00
Vijay Kumar
762add7877 Fix spelling mistakes in tkinter.py (#1751)
Ran the docstrings through spell checker, and fixed spelling issues.
2017-05-23 09:14:02 +03:00