Commit Graph

105292 Commits

Author SHA1 Message Date
Miss Islington (bot) afbcd9f26d
bpo-35998: Fix test_asyncio.test_start_tls_server_1() (GH-16815)
main() is now responsible to send the ANSWER, rather than
ServerProto. main() now waits until it got the HELLO before sending
the ANSWER over the new transport.

Previously, there was a race condition between main() replacing the
protocol and the protocol sending the ANSWER once it gets the HELLO.

TLSv1.3 was disabled for the test: reenable it.
(cherry picked from commit fab4ef2df0)

Co-authored-by: Victor Stinner <vstinner@python.org>
2019-10-16 01:36:57 -07:00
Miss Islington (bot) 2d647c0728
Update doc switcher list for 3.8.0 (GH-16809)
(cherry picked from commit 3f36043db2)

Co-authored-by: Ned Deily <nad@python.org>
2019-10-15 14:33:34 -07:00
Miss Islington (bot) 8ca282f12a
Typo fix - implemention should be implementation (GH-16806)
(cherry picked from commit 2798b60c55)

Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
2019-10-15 14:09:19 -07:00
Miss Islington (bot) f705f8e9b5
bpo-38478: Correctly handle keyword argument with same name as positional-only parameter (GH-16800)
(cherry picked from commit f3ef06a7cb)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-10-15 05:02:34 -07:00
Victor Stinner f82ce5b1b1
[3.8] bpo-36389: Backport debug enhancements from master (GH-16796)
* bpo-36389: _PyObject_CheckConsistency() available in release mode (GH-16612)

bpo-36389, bpo-38376: The _PyObject_CheckConsistency() function is
now also available in release mode. For example, it can be used to
debug a crash in the visit_decref() function of the GC.

Modify the following functions to also work in release mode:

* _PyDict_CheckConsistency()
* _PyObject_CheckConsistency()
* _PyType_CheckConsistency()
* _PyUnicode_CheckConsistency()

Other changes:

* _PyMem_IsPtrFreed(ptr) now also returns 1 if ptr is NULL
  (equals to 0).
* _PyBytesWriter_CheckConsistency() now returns 1 and is only used
  with assert().
* Reorder _PyObject_Dump() to write safe fields first, and only
  attempt to render repr() at the end.

(cherry picked from commit 6876257eaa)

* bpo-36389: Fix _PyBytesWriter in release mode (GH-16624)

Fix _PyBytesWriter API when Python is built in release mode with
assertions.

(cherry picked from commit 60ec6efd96)

* bpo-38070: Enhance visit_decref() debug trace (GH-16631)

subtract_refs() now pass the parent object to visit_decref() which
pass it to _PyObject_ASSERT(). So if the "is freed" assertion fails,
the parent is used in debug trace, rather than the freed object. The
parent object is more likely to contain useful information. Freed
objects cannot be inspected are are displayed as "<object at xxx is
freed>" with no other detail.

(cherry picked from commit 4d5f94b8cd)

* Fix also a typo in PYMEM_DEADBYTE macro comment

* bpo-36389: Add newline to _PyObject_AssertFailed() (GH-16629)

Add a newline between the verbose object dump and the Py_FatalError()
logs for readability.

(cherry picked from commit 7775349895)
2019-10-15 03:06:16 +02:00
Miss Islington (bot) 42308e8b27
bpo-38133: Update docs to reflect fixes to py.exe launcher (GH-16791)
(cherry picked from commit 4d202281c1)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-10-14 15:52:47 -07:00
Miss Islington (bot) 6fa79f983d
Doc: 3.8 is now stable. (GH-16790)
(cherry picked from commit 4504b4500d)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-10-14 15:21:32 -07:00
Gregory P. Smith 4f0587f161
[3.8] bpo-38456: Use /bin/true in test_subprocess (GH-16737)
* [3.8] bpo-38456: Use /bin/true in test_subprocess (GH-16736)

Instead of sys.executable, "-c", "pass" or "import sys; sys.exit(0)"
use /bin/true when it is available.  On a reasonable machine this
shaves up to two seconds wall time off the otherwise ~40sec execution
on a --with-pydebug build.  It should be more notable on many
buildbots or overloaded slower I/O systems (CI, etc)..
(cherry picked from commit 67b93f80c7)

* Handle when there is no 'true' command

backport of 46113e0cf3 by Pablo Galindo.
2019-10-14 13:40:32 -07:00
Łukasz Langa cc06217d9d
Post v3.8.0 2019-10-14 22:02:48 +02:00
Łukasz Langa 85da2ddc89 Python 3.8.0
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl2keYQACgkQsmmV4xAl
 BWgtYA/+OuuxCQieZTU9h10naQvzp42/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lFrZj690IuAjPuV3o0+0MXXs6JJ+flWo5HFQ/EUGdt1
 Yq30gt4iau/Jdy/mVJCBggD79BVz3lcTfITZQ9CwpgxeivxeCqamlYsTwylanLrU
 CNyCLeyhEB5m2VyZ/yWIqoTcN7hxKXYqAn6ELKHIy2O/JcT00giG9IDDC7+OeW3Q
 8jN7zhb1AXhO1u+S+Kraw6fJDUxnq3AEknfShUpOW2KfyQwxh2HjpHJGPSrzIkjZ
 YMC8t6tyvHlpFnoqHWknLURkm4l8zfxl7rg4Z2tnu/41MmHtZE0MocDLKytzXUW2
 zsxJllqA6rRJPh4Rz/n6Mb6o4vgdJ5tHT2rsxhSmu2YiRjD4hp3Ovm5T6TMdMquh
 r+BXlMl+lN5J6xuEvwNSlUMcU/QKOrAvPBlgsSwhXMVp2/HZ20kfc2gRWg6O4PhM
 eMzH9by1Uw==
 =W9XA
 -----END PGP SIGNATURE-----

Merge tag 'v3.8.0' into 3.8

Python 3.8.0
2019-10-14 22:02:08 +02:00
Miss Islington (bot) deba4fac5d Remove draft status. Add asyncio REPL example (GH-16785) (GH-16786)
(cherry picked from commit 274bd013da)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-10-14 09:08:30 -07:00
Miss Islington (bot) aa909b6b12
bpo-38453: Resolve test directories before chdir to them (GH-16723)
(cherry picked from commit d83fc27029)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-10-14 09:01:29 -07:00
Łukasz Langa fa919fdf25
v3.8.0 2019-10-14 15:34:47 +02:00
Łukasz Langa e498329ebe
[3.8] bpo-37759: Polish What's New in Python 3.8. (GH-16769) (#16777)
(cherry picked from commit 298439ce3f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-10-14 15:25:46 +02:00
Ned Deily c0c6ae91f2
Make 3.8 README link to 3.8 doc pages, not master (GH-16776) 2019-10-14 09:14:21 -04:00
Miss Islington (bot) 80f8532f0f
Update build docs for macOS (GH-16771)
(cherry picked from commit 19d6842c15)

Co-authored-by: Ned Deily <nad@python.org>
2019-10-14 05:35:28 -07:00
Miss Islington (bot) 927f07c816 bpo-38469: Handle named expression scope with global/nonlocal keywords (GH-16755) (#16760)
The symbol table handing of PEP572's assignment expressions is not resolving correctly the scope of some variables in presence of global/nonlocal keywords in conjunction with comprehensions.
(cherry picked from commit fd5c414880)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-10-14 13:40:15 +02:00
Ned Deily ac53ba6c7c
[3.8] Update macOS installer display files for 3.8.0 (GH-16766) 2019-10-14 04:36:34 -04:00
Miss Islington (bot) 3ac152948d bpo-37759: Add examples for the new typing features (GH-16763) (GH-16764)
(cherry picked from commit a3291531ea)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-10-13 23:45:45 -07:00
Miss Islington (bot) c09379bd6e bpo-38461 and bpo-38463: Minor fixes to Whatsnew 3.8 (GH-16761) (GH-16762)
* bpo-38461: ncurses misspelled as curses

* bpo-38463: Fix broken link
(cherry picked from commit 61a6db5e79)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-10-13 21:54:05 -07:00
Raymond Hettinger 75d8a75295
Fix minor typos in Whatsnew (GH-16759) 2019-10-13 20:35:11 -07:00
Miss Islington (bot) 36f62860f6 bpo-38464: Document parameter for NormalDist.quantiles() (GH-16757) (GH-16758)
(cherry picked from commit 8a6cbf8adb)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-10-13 20:04:29 -07:00
Miss Islington (bot) 9a7c43bafd
Fix strict-aliasing rules errors on gcc 4.8.5. (GH-16714)
(cherry picked from commit c39d1ddc01)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2019-10-13 19:14:27 -07:00
Miss Islington (bot) 02d6f4f9bc Rebased version of what's new PR (GH-16745) (#16748)
* Use Unicode character for accent
* Various grammar fixes
* Sort library modules alphabetically; remove duplicated idlelib/IDLE section
(cherry picked from commit bb78f6cfa6)

Co-authored-by: Andrew Kuchling <amk@amk.ca>
2019-10-13 22:35:10 +02:00
Miss Islington (bot) c732660b7b
bpo-38467: Fix argument name of typing functions (GH-16753)
(cherry picked from commit fdfe2833ac)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2019-10-13 11:38:45 -07:00
Miss Islington (bot) e742826531
bpo-28556: Remove another mention of metaclass of Generic in typing docs (GH-16743)
Metaclass was removed in Python 3.7 (there is already a `versionchanged` item about this).

https://bugs.python.org/issue28556
(cherry picked from commit 8144095707)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
2019-10-13 10:00:19 -07:00
Miss Islington (bot) a04c7ebcb9
Correct signature of __build_class__ (GH-16735)
(cherry picked from commit e3babbd03c)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-10-13 08:53:54 -07:00
Miss Islington (bot) 6da52ac411
bpo-38431: Fix __repr__ method of InitVar to work with typing objects. (GH-16702)
(cherry picked from commit 793cb85437)

Co-authored-by: Samuel Colvin <samcolvin@gmail.com>
2019-10-13 05:04:05 -07:00
Miss Islington (bot) ba44ea6ff8
bpo-37731: Reorder includes in xmltok.c to avoid redefinition of _POSIX_C_SOURCE (GH-16733)
(cherry picked from commit 8177404d52)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-10-12 12:32:48 -07:00
Miss Islington (bot) fdc7cbeedc
Announce the change in the CancelledError inheritance (GH-16730)
This is a fairly noticeable change that requires adjustments in
existing asyncio code. It should therefore be announced.
(cherry picked from commit e634da2747)

Co-authored-by: Phil Jones <philip.graham.jones@googlemail.com>
2019-10-12 10:53:32 -07:00
Miss Islington (bot) e540bb5461
bpo-38332: Catch KeyError from unknown cte in encoded-word. (GH-16503)
KeyError should cause a failure in parsing the encoded word and should be caught and raised as a _InvalidEWError instead.
(cherry picked from commit 65dcc8a8dc)

Co-authored-by: Andrei Troie <andreitroie90@gmail.com>
2019-10-12 10:03:24 -07:00
Abhilash Raj 5a638a8055
[3.8] bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow oper parsing of URLs" (GH-16724) (GH-16728)
This reverts commit 87bd2071c7.

The reason for revert is a regression caused by the change in 3.8.0rc1, see bpo-38449 for more details.

https://bugs.python.org/issue38449
(cherry picked from commit 19a3d87300)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
2019-10-12 09:58:11 -07:00
Miss Islington (bot) 1da648aceb
bpo-38341: Add SMTPNotSupportedError in the exports of smtplib (GH-16525)
Add SMTPNotSupportedError in the exports of smtplib

Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com>
(cherry picked from commit 3faf826e58)

Co-authored-by: nde <denayer.norman@gmail.com>
2019-10-12 09:08:24 -07:00
Miss Islington (bot) 294c5229b1
Fix typo in the "Porting to Python 3.8" section. (GH-16435)
(cherry picked from commit dd6117c6d7)

Co-authored-by: bariod <35639254+bariod@users.noreply.github.com>
2019-10-11 14:09:44 -07:00
Zachary Ware 50290e3973
Update badges in README.rst (GH-16709)
We no longer use AppVeyor on 3.x, and others were still pointed at master.
2019-10-11 11:30:03 -05:00
Miss Islington (bot) 73665b4147
bpo-38347: find pathfix for Python scripts whose name contain a '-' (GH-16536)
pathfix.py: Assume all files that end on '.py' are Python scripts when working recursively.
(cherry picked from commit 2b7dc40b2a)

Co-authored-by: Ruediger Pluem <r.pluem@gmx.de>
2019-10-11 06:56:49 -07:00
Benjamin Peterson 380eb427dd
[3.8] Typo fix: "throuhgh" should be "through". (GH-16713)
(cherry picked from commit a8e0d3141e)

Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
2019-10-10 21:02:38 -07:00
Miss Islington (bot) 6bfeb819e5
docs: Add asyncio source code links (GH-16640)
(cherry picked from commit f900064ac4)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2019-10-10 16:25:28 -07:00
Miss Islington (bot) 398d84747d
Re-enable the OverflowError test for test_truediv on test_complex (GH-16591)
(cherry picked from commit 1dbe537385)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2019-10-10 10:11:07 -07:00
Miss Islington (bot) 8ab11c433a bpo-38109: Add missing constants to Lib/stat.py (GH-16665) (GH-16690)
Add missing stat.S_IFDOOR, stat.S_IFPORT, stat.S_IFWHT,
stat.S_ISDOOR, stat.S_ISPORT, and stat.S_ISWHT values to
the Python implementation of the stat module.
(cherry picked from commit 7bb14316b8)

Co-authored-by: Ronan Lamy <ronan.lamy@gmail.com>
2019-10-10 15:50:32 +02:00
Miss Islington (bot) baf8a9b03a
bpo-32996: Documentation fix-up. (GH-16646)
PR GH-4906 changed the typing.Generic class hierarchy, leaving an
outdated comment in the library reference. User-defined Generic ABCs now
must get a abc.ABCMeta metaclass from something other than typing.Generic
inheritance.
(cherry picked from commit d47f0dd2e8)

Co-authored-by: M. Eric Irrgang <mei2n@virginia.edu>
2019-10-10 04:19:03 -07:00
Miss Islington (bot) 6b6935e563
bpo-38425: Fix ‘res’ may be used uninitialized warning (GH-16688)
(cherry picked from commit a05fcd3c7a)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2019-10-10 01:00:19 -07:00
Miss Islington (bot) 0baa6b3c7d bpo-38409: Fix grammar in str.strip() docstring (GH-16682) (GH-16684)
(cherry picked from commit 09895c27cd)
2019-10-09 16:55:39 -05:00
Pablo Galindo 0bd9fac7a8 [3.8] bpo-38379: don't claim objects are collected when they aren't (GH-16658) (GH-16683)
* [bpo-38379](https://bugs.python.org/issue38379):  when a finalizer resurrects an object,
nothing is actually collected in this run of gc.
Change the stats to relect that truth.
(cherry picked from commit ecbf35f933)

Co-authored-by: Tim Peters <tim.peters@gmail.com>





https://bugs.python.org/issue38379



Automerge-Triggered-By: @pablogsal
2019-10-09 14:25:06 -07:00
Miss Islington (bot) 359a1975cb
bpo-37531: regrtest ignores output on timeout (GH-16659)
bpo-37531, bpo-38207: On timeout, regrtest no longer attempts to call
`popen.communicate() again: it can hang until all child processes
using stdout and stderr pipes completes. Kill the worker process and
ignores its output.

Reenable test_regrtest.test_multiprocessing_timeout().

bpo-37531: Change also the faulthandler timeout of the main process
from 1 minute to 5 minutes, for Python slowest buildbots.
(cherry picked from commit 0ec618af98)

Co-authored-by: Victor Stinner <vstinner@python.org>
2019-10-09 07:02:15 -07:00
Vinay Sajip d004a5b082
bpo-38368: Added fix for ctypes crash when handling arrays in structs/unions. (GH-16589) (GH-16671)
(cherry picked from commit e8bedbddad)
2019-10-09 06:47:57 +01:00
Miss Islington (bot) d8071cbf5b
Typo fix: "empy" should be "empty". (GH-16666)
(cherry picked from commit 01171ebd96)

Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
2019-10-08 19:42:22 -07:00
Pablo Galindo 526ef856dd
[3.8] bpo-38395: Fix ownership in weakref.proxy methods (GH-16632) (GH-16662)
The implementation of weakref.proxy's methods call back into the Python
API using a borrowed references of the weakly referenced object
(acquired via PyWeakref_GET_OBJECT). This API call may delete the last
reference to the object (either directly or via GC), leaving a dangling
pointer, which can be subsequently dereferenced.

To fix this, claim a temporary ownership of the referenced object when
calling the appropriate method. Some functions because at the moment they
do not need to access the borrowed referent, but to protect against
future changes to these functions, ownership need to be fixed in
all potentially affected methods..
(cherry picked from commit 10cd00a9e3)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-10-08 21:38:11 +01:00
Miss Islington (bot) 7162440a72
bpo-38407: Add docstrings for typing.SupportsXXX classes. (GH-16644)
(cherry picked from commit 8252c52e57)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-10-08 07:14:57 -07:00
Miss Islington (bot) 10b475a151
bpo-38405: Make nested subclasses of typing.NamedTuple pickleable. (GH-16641)
(cherry picked from commit 13abda4100)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-10-08 07:12:38 -07:00