Commit Graph

106362 Commits

Author SHA1 Message Date
Miss Islington (bot) 40e2444c36
bpo-39010: Improve test shutdown (GH-22066) (#22083)
Simply closing the event loop isn't enough to avoid warnings. If we
don't also shut down the event loop's default executor, it sometimes
logs a "dangling thread" warning.

Follow-up to GH-22017
(cherry picked from commit be435ae2b0)

Co-authored-by: Ben Darnell <ben@bendarnell.com>

Co-authored-by: Ben Darnell <ben@bendarnell.com>
2020-09-03 13:54:36 -07:00
Miss Islington (bot) 1f5f127377
bpo-41696: Fix handling of debug mode in asyncio.run (GH-22069) (#22072)
* bpo-41696: Fix handling of debug mode in asyncio.run

This allows PYTHONASYNCIODEBUG or -X dev to enable asyncio debug mode
when using asyncio.run

* 📜🤖 Added by blurb_it.

Co-authored-by: hauntsaninja <>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 0770ad948c)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2020-09-03 13:54:06 -07:00
Miss Islington (bot) a986b061a3
bpo-39010: Fix errors logged on proactor loop restart (GH-22017) (#22035)
Stopping and restarting a proactor event loop on windows can lead to
spurious errors logged (ConnectionResetError while reading from the
self pipe). This fixes the issue by ensuring that we don't attempt
to start multiple copies of the self-pipe reading loop.
(cherry picked from commit ea5a6363c3)

Co-authored-by: Ben Darnell <ben@bendarnell.com>

Co-authored-by: Ben Darnell <ben@bendarnell.com>
2020-09-03 12:38:34 -07:00
Miss Islington (bot) 9fef7c54a0
bpo-39883: Use BSD0 license for code in docs (GH-17635) (GH-22074)
The PSF board approved this use.
(cherry picked from commit e223d06a8b)

Co-authored-by: Todd <toddrjen@gmail.com>
2020-09-03 07:41:09 -07:00
Miss Islington (bot) 5d663ededd
[doc] Remove references to PyChecker. (GH-22055)
(cherry picked from commit dea82b6731)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-09-02 08:29:46 -05:00
Miss Islington (bot) a8b05c4b97
Remove reference to Boa Constructor. (GH-22057)
(cherry picked from commit 1d25f5bf7b)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-09-02 08:28:59 -05:00
Pablo Galindo 77f4000ae0
[3.8] [3.9] bpo-41654: Fix deallocator of MemoryError to account for subclasses (GH-22020) (GH-22046)
When allocating MemoryError classes, there is some logic to use
pre-allocated instances in a freelist only if the type that is being
allocated is not a subclass of MemoryError. Unfortunately in the
destructor this logic is not present so the freelist is altered even
with subclasses of MemoryError..
(cherry picked from commit 9b648a95cc)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>.
(cherry picked from commit 87e91ae2e5)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-09-01 21:40:48 +01:00
Miss Islington (bot) 38e32872eb
bpo-41344: Raise ValueError when creating shared memory of size 0 (GH-21556) (GH-22019)
(cherry picked from commit 475a5fbb56)

Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>

Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>
2020-08-30 20:42:27 +01:00
Miss Islington (bot) 85ca9c049c
bpo-41524: fix pointer bug in PyOS_mystr{n}icmp (GH-21845) (GH-22016) 2020-08-30 16:20:40 +09:00
Miss Islington (bot) a1473d2c91
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:26 -04:00
Karthikeyan Singaravelan 838316db08
[3.8] bpo-41624: fix documentation of typing.Coroutine (GH-21952). (#21983)
(cherry picked from commit 8c58d2a216)

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

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

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

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2020-08-27 02:47:10 +02:00
Elvis Pranskevichus 57b698886b
[3.8] bpo-32751: Wait for task cancel in asyncio.wait_for() when timeout <= 0 (GH-21895) (#21967)
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)
2020-08-26 13:59:17 -07:00
Miss Islington (bot) 6e1954cd82
bpo-37658: Fix asyncio.wait_for() to respect waited task status (GH-21894) (#21965)
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 11:26:28 -07:00
Miss Islington (bot) 08045391a7
Document vars behavior when __dict__ is missing (GH-21466) (GH-21941)
(cherry picked from commit 802726acf6)

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

Co-authored-by: Denis Ovsienko <denis@ovsienko.info>
2020-08-22 05:07:43 -04:00
Miss Islington (bot) 0694b82381
bpo-40994: Ungroup items in collections.abc documentation for improved clarity (GH-21880) (#21927)
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:14 -04:00
Miss Islington (bot) 1370d9dd9f
bpo-41572: Fix grammar in BaseTransport.close docstring (GH-21914) (GH-21930)
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:58 +05:30
Victor Stinner 7d0fef56d8
bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901) (GH-21928)
* 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)
(cherry picked from commit 8f88190af5)
2020-08-20 13:28:49 +02:00
Frank Dana 34889a5785
[3.8] venv: Update Aspen URL in 'activate' script comment (GH-21797)
A comment in the venv `activate` script (as well as `activate.csh` and `activate.fish`) referencing Aspen magic directories lists a "further information" URL for Aspen at the zetadev.com website. zetadev.com changed ownership in 2019, and now redirects to a server in China with an expired security certificate.

Out of an abundance of caution, while not changing the _code_ for the activate scripts, this PR updates the URL in those comments to reference Aspen's new documentation home at https://aspen.io/.

No issue created, as I suspect this falls within the definition of a "trivial" change. Please let me know if I'm wrong about that, and I'll open the necessary issue(s).

While filed against the 3.8 branch, strictly speaking this is not a backported PR. The comment in question was entirely removed from the script between Python 3.8 and 3.9.

(IMHO this _should_ probably be backported to 3.7 and 3.6, as well. I'll happily file those PRs if needed.)

Automerge-Triggered-By: @vsajip
2020-08-19 12:34:50 -07:00
Miss Islington (bot) 2bcd0fe7a5
Fix typo in message from assert statement (GH-21283)
The error message was missing space between the action "acquire" and "_wait_semaphore" which is an attribute for instances of Condition.
(cherry picked from commit 99c0ee3c89)

Co-authored-by: Allen <64019758+aboddie@users.noreply.github.com>
2020-08-17 08:32:11 -07:00
Miss Islington (bot) 1baa8b14ee
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:37:12 -07:00
Miss Islington (bot) 08f0a21092
[3.8] bpo-41503: Fix race between setTarget and flush in logging.handlers.MemoryHandler (GH-21765) (GH-21898)
(cherry picked from commit 2353d77fad)


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

Automerge-Triggered-By: @vsajip
2020-08-16 09:27:01 -07:00
Miss Islington (bot) 243458115e
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:42:36 -07:00
Miss Islington (bot) 0a5b30d989
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:09:58 -07:00
Miss Islington (bot) 2a9f709ba2
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:51:21 -07:00
Miss Islington (bot) e05f20b371
Fixed comment about pathlib.link_to: it was added in 3.8, not changed. (GH-21851) (#21866)
(cherry picked from commit a3eae43aee)

Co-authored-by: Facundo Batista <facundo@taniquetil.com.ar>
2020-08-13 17:43:47 -03:00
Antoine Pitrou 43b3e4c329
[3.8] bpo-41066: Update the comparison section for os vs pathlib (GH-21261) (GH-21864)
(cherry picked from commit 0eb9deb4a6)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్  రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>

Automerge-Triggered-By: @pitrou
2020-08-13 13:03:18 -07:00
Miss Islington (bot) a3416c13b5
[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>
(cherry picked from commit f24430f154)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-08-13 11:38:55 -07:00
Miss Islington (bot) afff51fc09
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:12:05 -07:00
Miss Islington (bot) 622d90f65c
bpo-41475: Fix note in "What's new in 3.7" (GH-21733) (GH-21833)
(cherry picked from commit 76643c10ed)

Co-authored-by: Ram Rachum <ram@rachum.com>
2020-08-12 06:38:37 -04:00
Miss Islington (bot) 7b3ceaa710
[3.8] bpo-41504: Add links to asttokens, leoAst, LibCST and parso to ast docs (GH-21773) (GH-21829)
(cherry picked from commit e3c971ccfa)

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

https://bugs.python.org/issue41504
2020-08-11 07:45:25 -07:00
Miss Islington (bot) 09d82609be
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:06:11 -07:00
Miss Islington (bot) 860bc0ea70
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:01:14 -07:00
Miss Islington (bot) 61f23cb62d
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:37 -07:00
Miss Islington (bot) f421865c76
[3.8] Doc: Add output to example code in programming FAQ (GH-21346) (GH-21791)
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>

Automerge-Triggered-By: @merwok
2020-08-09 11:54:33 -07:00
Miss Islington (bot) 692552388d
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:59 -07:00
Miss Islington (bot) 105cfb5b18
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:45 -07:00
Miss Islington (bot) 66c8996619
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:21:33 -07:00
Miss Islington (bot) de5de413e7
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:05:04 -07:00
Miss Islington (bot) 398dabb681
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:37 -07:00
Steve Dower 135de08128
bpo-41490: Update ensurepip to install pip 20.2.1 and setuptools 49.2.1 (GH-21775) 2020-08-07 23:10:32 +01:00
Miss Islington (bot) 87bc22051f
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:15:37 -07:00
Miss Islington (bot) dc98a5468a
bpo-41098: Doc: Add missing deprecated directives (GH-21162)
PyUnicodeEncodeError_Create has been deprecated with
`Py_DEPRECATED` macro. But it was not documented.
(cherry picked from commit 46e19b61d3)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2020-08-07 00:49:46 -07:00
Miss Islington (bot) 713ba03276
bpo-41492: Fixes the description appearing in UAC prompts on Windows (GH-21754)
(cherry picked from commit 777b611c8c)

Co-authored-by: Steve Dower <steve.dower@python.org>
2020-08-06 09:52:57 -07:00
Miss Islington (bot) b5789a7419
bpo-41482: Fix error in ipaddress.IPv4Network docstring (GH-21736)
(cherry picked from commit 52f98424a5)

Co-authored-by: Eric L. Frederich <eric.frederich@gmail.com>
2020-08-05 14:43:16 -07:00
Batuhan Taskaya b24c9d2b06
[3.8] bpo-40726: handle uninitalized end_lineno on ast.increment_lineno (GH-21745)
…no (GH-20312).

(cherry picked from commit 8f4380d2f5)

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>

Automerge-Triggered-By: @pablogsal
2020-08-05 11:37:19 -07:00
Miss Islington (bot) f0e030cacb
bpo-36346: Doc: Update removal schedule of legacy Unicode (GH-21479)
See PEP 623 for detail.
(cherry picked from commit 270b4ad4df)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2020-08-04 18:57:10 -07:00
Miss Islington (bot) 46e448abbf
bpo-38156: Fix compiler warning in PyOS_StdioReadline() (GH-21721)
incr cannot be larger than INT_MAX: downcast to int explicitly.
(cherry picked from commit bde48fd811)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-08-03 17:59:02 -07:00