Commit Graph

107691 Commits

Author SHA1 Message Date
Miss Islington (bot) 901c2eae6e
bpo-41524: fix pointer bug in PyOS_mystr{n}icmp (GH-21845) (GH-21978) 2020-08-30 15:53:09 +09:00
Miss Islington (bot) 6b5e88744c
bpo-41634: Fix a typo in the curses documentation (GH-21958)
(cherry picked from commit 398575c210)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-08-29 18:33:48 -04:00
Miss Islington (bot) 88b86a9752
bpo-19521: Fix parallel build race condition on AIX (GH-22001)
Patch by Michael Haubenwallner.
(cherry picked from commit e6dcd371b2)

Co-authored-by: Stefan Krah <skrah@bytereef.org>
2020-08-29 18:36:40 +02:00
Karthikeyan Singaravelan c01a7edc67
[3.9] bpo-41624: fix documentation of typing.Coroutine (GH-21952) (#21982)
(cherry picked from commit 8c58d2a)

Co-authored-by: MingZhe Hu <humingzhework@163.com>

Co-authored-by: MingZhe Hu <humingzhework@163.com>
2020-08-28 08:06:31 -07:00
Miss Islington (bot) 7361451b97
bpo-41609: Fix output of pdb's whatis command for instance methods (GH-21935) (#21977)
(cherry picked from commit 022bc7572f)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2020-08-27 03:17:40 +02:00
Miss Islington (bot) 211e4c6e9c
bpo-33660: Fix PosixPath to resolve a relative path on root (#21974)
(cherry picked from commit 94ad6c674f)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2020-08-27 02:51:44 +02:00
Miss Islington (bot) 9de6be4e2a
bpo-37658: Fix asyncio.wait_for() to respect waited task status (GH-21894) (GH-21964)
Currently, if `asyncio.wait_for()` itself is cancelled it will always
raise `CancelledError` regardless if the underlying task is still
running.  This is similar to a race with the timeout, which is handled
already.
(cherry picked from commit a2118a1462)

Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
2020-08-26 19:15:35 +02:00
Miss Islington (bot) 1036ccb55d
bpo-32751: Wait for task cancel in asyncio.wait_for() when timeout <= 0 (GH-21895) (GH-21963)
When I was fixing bpo-32751 back in GH-7216 I missed the case when
*timeout* is zero or negative.  This takes care of that.

Props to @aaliddell for noticing the inconsistency.
(cherry picked from commit c517fc7121)

Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
2020-08-26 19:14:59 +02:00
Miss Islington (bot) d7cd1164c1
Document vars behavior when __dict__ is missing (GH-21466) (GH-21939)
(cherry picked from commit 802726acf6)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-08-22 15:55:00 -03:00
Miss Islington (bot) 72d5ddb930
Fix grammar in Doc/tutorial/controlflow.rst (GH-21885) (#21922)
Automerge-Triggered-By: @csabella
(cherry picked from commit 0be7c216e1)

Co-authored-by: Denis Ovsienko <denis@ovsienko.info>
2020-08-22 05:08:02 -04:00
Miss Islington (bot) f497bbeed0
bpo-40994: Ungroup items in collections.abc documentation for improved clarity (GH-21880) (#21926)
Use a less surprising document structure.

Automerge-Triggered-By: @csabella
(cherry picked from commit 2ce39631f6)

Co-authored-by: Sydney Pemberton <46042811+sydneypemberton1986@users.noreply.github.com>
2020-08-22 05:06:54 -04:00
Miss Islington (bot) 429a86a120
bpo-41573: Update release versions in General FAQ (GH-21915) (#21938)
(cherry picked from commit 7173fc84e6)
Co-authored-by: wyz23x2 <52805709+wyz23x2@users.noreply.github.com>
2020-08-22 03:47:37 -04:00
Miss Islington (bot) a2d00f0473
bpo-41572: Fix grammar in BaseTransport.close docstring (GH-21914) (#21929)
Fix grammar in BaseTransport.close docstring.

https://bugs.python.org/issue41572

Signed-off-by: Cleber Rosa <crosa@redhat.com>
(cherry picked from commit 1afb42cfa8)

Co-authored-by: Cleber Rosa <cleber.gnu@gmail.com>
2020-08-21 17:49:40 +05:30
Miss Islington (bot) 3949827a54
Doc: add a missing period (GH-21819) (#21932)
(cherry picked from commit 12695f4c6d)

Co-authored-by: Mathieu Dupuy <deronnax@gmail.com>

Co-authored-by: Mathieu Dupuy <deronnax@gmail.com>
2020-08-20 17:40:57 -03:00
Victor Stinner 8f88190af5
[3.9] bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901)
* bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844)

Enable Sphinx 3.2 "c_allow_pre_v3" option and disable the
c_warn_on_allowed_pre_v3 option to make the documentation compatible
with Sphinx 2 and Sphinx 3.

(cherry picked from commit 423e77d6de)

* bpo-40204: Fix Sphinx sytanx in howto/instrumentation.rst (GH-21858)

Use generic '.. object::' to declare markers, rather than abusing
'..  c:function::' which fails on Sphinx 3.

(cherry picked from commit 43577c01a2)

* bpo-40204: Fix duplicates in the documentation (GH-21857)

Fix two Sphinx 3 issues:

Doc/c-api/buffer.rst:304: WARNING: Duplicate C declaration, also defined in 'c-api/buffer'.
Declaration is 'PyBUF_ND'.

Doc/c-api/unicode.rst:1603: WARNING: Duplicate C declaration, also defined in 'c-api/unicode'.
Declaration is 'PyObject* PyUnicode_Translate(PyObject *str, PyObject *table, const char *errors)'.

(cherry picked from commit 46d10b1237)

* bpo-40204: Add :noindex: in the documentation (GH-21859)

Add :noindex: to duplicated documentation to fix "duplicate object
description" errors.

For example, fix this Sphinx 3 issue:

Doc/library/configparser.rst:1146: WARNING: duplicate object
description of configparser.ConfigParser.optionxform, other instance
in library/configparser, use :noindex: for one of them

(cherry picked from commit d3ded08048)

* bpo-40204, doc: Fix syntax of C variables (GH-21846)

For example, fix the following Sphinx 3 errors:

Doc/c-api/buffer.rst:102: WARNING: Error in declarator or parameters
Invalid C declaration: Expected identifier in nested name. [error at 5]
  void \*obj
  -----^

Doc/c-api/arg.rst:130: WARNING: Unparseable C cross-reference: 'PyObject*'
Invalid C declaration: Expected end of definition. [error at 8]
  PyObject*
  --------^

The modified documentation is compatible with Sphinx 2 and Sphinx 3.

(cherry picked from commit 474652fe93)

* bpo-40204: Fix reference to terms in the doc (GH-21865)

Sphinx 3 requires to refer to terms with the exact case.

For example, fix the Sphinx 3 warning:

Doc/library/pkgutil.rst:71: WARNING: term Loader not found in case
sensitive match.made a reference to loader instead.

(cherry picked from commit bb0b08540c)

* bpo-40204: Fix duplicated productionlist names in the doc (GH-21900)

Sphinx 3 disallows having more than one productionlist markup with
the same name. Simply remove names in this case, since names are not
shown anyway. For example, fix the Sphinx 3 warning:

Doc/reference/introduction.rst:96: duplicate token description
of *:name, other instance in reference/expressions

(cherry picked from commit 1abeda80f7)
2020-08-19 19:25:22 +02:00
Miss Islington (bot) e3cafebb5c
bpo-41568: Fix refleaks in zoneinfo subclasses (GH-21907)
* Fix refleak in C module __init_subclass__

This was leaking a reference to the weak cache dictionary for every
ZoneInfo subclass created.

* Fix refleak in ZoneInfo subclass's clear_cache

The previous version of the code accidentally cleared the global
ZONEINFO_STRONG_CACHE variable (and inducing `ZoneInfo` to create a new
strong cache) on calls to a subclass's `clear_cache()`. This would not
affect guaranteed behavior, but it's still not the right thing to do
(and it caused reference leaks).
(cherry picked from commit c3dd7e45cc)

Co-authored-by: Paul Ganssle <paul@ganssle.io>
2020-08-17 16:24:15 -07:00
Miss Islington (bot) d6bdf6d52f
bpo-40782: Change asyncio.AbstractEventLoop.run_in_executor to be a method not a coroutine (GH-21852)
asyncio.AbstractEventLoop.run_in_executor should be a method that returns an asyncio Future, not an async method.
This matches the concrete implementations, and the documentation better.
(cherry picked from commit 29f84294d8)

Co-authored-by: James Weaver <james.barrett@bbc.co.uk>
2020-08-17 07:40:26 -07:00
Miss Islington (bot) 2c050e52f1
[3.9] bpo-41503: Fix race between setTarget and flush in logging.handlers.MemoryHandler (GH-21765) (GH-21897)
(cherry picked from commit 2353d77fad)


Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>

Automerge-Triggered-By: @vsajip
2020-08-16 08:34:27 -07:00
Miss Islington (bot) 28bf82661a
bpo-41540: AIX: skip test that is flaky with a default ulimit. (GH-21890) (#21893)
- AIX has extreme over-allocation that is in no relation to the physical
    RAM and swap.

(cherry picked from commit 39dab24621)

Authored-by: Stefan Krah <skrah@bytereef.org>
2020-08-15 20:40:14 +02:00
Miss Islington (bot) 1864eacc22
bpo-40878: xlc cannot handle C99 extern inline. (GH-21891)
This applies to the default "extc99" mode.  Python does not compile with "stdc99".

(cherry picked from commit 40e700ad04)

Authored-by: Stefan Krah <skrah@bytereef.org>
2020-08-15 20:37:08 +02:00
Miss Islington (bot) fc8ffe27b6
bpo-31122: ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer closes connection during TLS negotiation (GH-18772)
[bpo-31122](): ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer closes connection during TLS negotiation

Reproducer: http://tiny.cc/f4ztnz (tiny url because some bot keeps renaming b.p.o.-nnn as bpo links)
(cherry picked from commit 495bd03566)

Co-authored-by: Dima Tisnek <dimaqq@gmail.com>
2020-08-15 10:44:57 -07:00
Miss Islington (bot) 31bc45c4b2
Fix typo in typing doc (GH-21879)
Automerge-Triggered-By: @gvanrossum
(cherry picked from commit fa5d725198)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2020-08-14 16:10:14 -07:00
Miss Islington (bot) 33d3c64095
bpo-41025: Fix subclassing for zoneinfo.ZoneInfo (GH-20965) (GH-21876)
Prior to this change, attempting to subclass the C implementation of
zoneinfo.ZoneInfo gave the following error:

    TypeError: unbound method ZoneInfo.__init_subclass__() needs an argument

https://bugs.python.org/issue41025
(cherry picked from commit 87d8287865)

Co-authored-by: Paul Ganssle <paul@ganssle.io>
2020-08-14 11:18:24 -04:00
Miss Islington (bot) 7c288413db
bpo-41410: Fix outdated info in mkstemp docs (GH-21701)
Automerge-Triggered-By: @ericvsmith
(cherry picked from commit e55de68be3)

Co-authored-by: Rishav Kundu <rk@rishav.io>
2020-08-13 18:53:43 -07:00
Miss Islington (bot) 75c2281762
bpo-41526: Fixed layout of final page of the installer (GH-21871)
(cherry picked from commit 6444ca9469)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-08-13 16:55:37 -07:00
Miss Islington (bot) 7fcd515c35
Fixed comment about pathlib.link_to: it was added in 3.8, not changed. (GH-21851)
(cherry picked from commit a3eae43aee)

Co-authored-by: Facundo Batista <facundo@taniquetil.com.ar>
2020-08-13 13:54:48 -07:00
Miss Islington (bot) 3dd1153b99
bpo-41066: Update the comparison section for os vs pathlib (GH-21261)
(cherry picked from commit 0eb9deb4a6)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్  రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
2020-08-13 12:59:07 -07:00
Terry Jan Reedy f24430f154
[3.9] bpo-41520: Fix second codeop regression (GH-21848)
Fix the repression introduced by the initial regression fix.

(cherry picked from commit c818b15fa5)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-08-13 14:21:32 -04:00
Guido van Rossum b3ad2ca56a
[3.9] bpo-40979: refactored typing.rst; (mostly) same content, new sub-sections and ordering (GH-21574) (#21843)
Also added PEP 585 deprecation notes.

(cherry picked from commit ab72fdeb82)

Co-authored-by: Luciano Ramalho <luciano@ramalho.org>
2020-08-12 11:10:12 -07:00
Miss Islington (bot) 90eff4ed44
bpo-41520: codeop no longer ignores SyntaxWarning (GH-21838)
(cherry picked from commit 369a1cbdee)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-08-12 06:13:09 -07:00
Łukasz Langa 6e21a30215
Post 3.9.0rc1 2020-08-11 23:29:16 +02:00
Łukasz Langa 03e92654c9 Python 3.9.0rc1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl8y6lgACgkQsmmV4xAl
 BWhXjQ//XABukXJGoE4HrTusljOIn8ZmkBJbvhyaCmb83khYZHJmeExcV3UwDJE7
 U3fOfApErWwa79cn4ZI/naHAok8T4TFb0f2qvGuincG16FwTKpe/HyuMHq1OOzKn
 cCOtgulUuKG7kglykRxVSFym32Ch7y2pAVgtX8k3zwTdknx8UrfSX0mfFNQWgPgz
 ThXMIWy3PqFj1SFoOCjFq4ab8GhIcHSD4fxCibiGfZRJI7D7iJk2nHH29e0JOrwt
 ZA6kJw6nw6CqiauzSRCuBDYJT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AohfIEJG61l9kUVUj46k2Xeu2yU6e+RL/jthlczGLAehSGJTkF9IuKqYL1
 KU2RT+WYoIBKuMS4JsXgN7XQr1QrJq30el6LxpzADMvdNjAroip8ooUQRjbbjOB1
 KtDOOHl+BYTROsupH3Y2yxxXcgaKJlGyA84MWtbcljXQKAxaQHnDLh7Q820obClX
 WMo5UNBl1Q==
 =FI9l
 -----END PGP SIGNATURE-----

Merge tag 'v3.9.0rc1' into 3.9

Python 3.9.0rc1
2020-08-11 23:28:53 +02:00
Guido van Rossum d1d6a1c6ab
[3.9] bpo-41504: Add links to asttokens, leoAst, LibCST and parso to ast docs (GH-21773) (GH-21830)
(cherry picked from commit e3c971ccfa)

Co-authored-by: Edward K. Ream <edreamleo@gmail.com>

Co-authored-by: Edward K. Ream <edreamleo@gmail.com>
2020-08-11 14:04:26 -07:00
Łukasz Langa 439c93d51f
Python 3.9.0rc1 2020-08-11 20:58:17 +02:00
Miss Islington (bot) 5de00f63d4
bpo-41475: Fix note in "What's new in 3.7" (GH-21733) (#21832)
(cherry picked from commit 76643c10ed)

Co-authored-by: Ram Rachum <ram@rachum.com>
2020-08-11 19:03:21 +02:00
Miss Islington (bot) 2146e516ec
Add PEP 573 additions to What's New (GH-21374) (GH-21831)
(cherry picked from commit af3a6a8cae)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2020-08-11 18:34:20 +02:00
Victor Stinner a0b57b3317
bpo-38912: regrtest logs unraisable exception into sys.__stderr__ (GH-21718) (GH-21827)
regrtest_unraisable_hook() temporarily replaces sys.stderr with
sys.__stderr__ to help to display errors when a test captures stderr.

(cherry picked from commit 701b63894f)
2020-08-11 17:03:33 +02:00
Miss Islington (bot) 2cd58d8bb1
bpo-40548: Fix "Check for source changes (pull_request)" GH Action job (GH-21806)
On Git 2.28, "git diff master..." (3 dots) no longer works when
"fetch --depth=1" is used, whereas it works on Git 2.26.

Replace "..." (3 dots) with ".." (2 dots) in the "git diff" command
computing the list of modified files between the base branch and the
PR branch.
(cherry picked from commit eaa551702d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-08-10 10:09:41 -07:00
Miss Islington (bot) 9c253f4bc9
bpo-41514: Fix buggy IDLE test (GH-21808)
test_run method test_fatal_error failed when run twice, as with
python -m test -m test_fatal_error test_idle test_idle
because func.called was not reinitialized to 0.
This bug caused a failure on a refleak buildbot.
(cherry picked from commit 416f0b71ba)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-08-10 07:05:02 -07:00
Victor Stinner d2bea2636d
[3.9] bpo-41194: Convert _ast extension to PEP 489 (GH-21807)
* bpo-41194: Convert _ast extension to PEP 489 (GH-21293)

Convert the _ast extension module to PEP 489 "Multiphase
initialization". Replace the global _ast state with a module state.

(cherry picked from commit b1cc6ba73a)

* bpo-41204: Fix compiler warning in ast_type_init() (GH-21307)

(cherry picked from commit 1f76453173)
2020-08-10 15:55:54 +02:00
Ned Deily b0a2705532
Update macOS installer welcome files for 3.9.0rc. (GH-21804) 2020-08-10 03:04:13 -04:00
Miss Islington (bot) a9fa66377f
bpo-41468: Improve and test IDLE run error exit (GH-21798)
A message box pops up when an unexpected error stops the run process.  Tell users it is likely a random glitch, but report it if not.
(cherry picked from commit f2e161c279)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-08-09 13:26:21 -07:00
Miss Islington (bot) 6860cf5387
Doc: Add output to example code in programming FAQ (GH-21346)
Add output hint to document, part faq/programming, section [How do I write a function with output parameters (call by reference)?](https://docs.python.org/3/faq/programming.htmlGH-how-do-i-write-a-function-with-output-parameters-call-by-reference).

This patch make the output hint just like prefix code block.
(cherry picked from commit 67acf74c4e)

Co-authored-by: Jiajie Zhong <zhongjiajie955@hotmail.com>
2020-08-09 11:54:26 -07:00
Miss Islington (bot) 462b095d72
Improve renamed test_run.RecursionLimitTest (GH-21794)
PEP 8 style and new comments.
(cherry picked from commit 8b67bf907c)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-08-09 10:35:48 -07:00
Miss Islington (bot) 103ce3debf
bpo-41455: Provide a link to how the third generation is collected in the GC docs (GH-21703)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 82ca8fada1)

Co-authored-by: Yaroslav Pankovych <31005942+P-Alban@users.noreply.github.com>
2020-08-08 11:55:15 -07:00
Miss Islington (bot) d9106434f7
bpo-41497: Fix potential UnicodeDecodeError in dis CLI (GH-21757)
(cherry picked from commit a4084b9d1e)

Co-authored-by: Konge <zkonge@outlook.com>
2020-08-07 20:24:12 -07:00
Miss Islington (bot) deea701b7f
Doc: Add a link to tutorial page from `open()` doc (GH-21737)
Adds a link to the "Reading and Writing Files" page so users can
more easily discover how file handles are handled with the `with`
context manager vs without it.
(cherry picked from commit 705f145565)

Co-authored-by: Benjamin Kane <bbkane@users.noreply.github.com>
2020-08-07 20:03:56 -07:00
Steve Dower 70e9243a55
bpo-41490: Update ensurepip to install pip 20.2.1 and setuptools 49.2.1 (GH-21774) 2020-08-08 00:47:40 +01:00
Miss Islington (bot) 1ecbfbc26a
Update Azure Pipelines build to use Ubuntu 18.04 and move triggers into YAML files (GH-21776)
(cherry picked from commit 102b4988b1)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-08-07 16:01:44 -07:00
Miss Islington (bot) 5e12a5b822
bpo-41473: Skip test_gdb with gdb 9.2 to work around gdb bug (GH-21768)
gdb 9.2 on Fedora Rawhide is not reliable, see:

* https://bugs.python.org/issue41473
* https://bugzilla.redhat.com/show_bug.cgi?id=1866884
(cherry picked from commit e27a51c11e)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-08-07 09:18:29 -07:00