Commit Graph

107752 Commits

Author SHA1 Message Date
Miss Islington (bot) 49917d576a
bpo-41780: Fix __dir__ of types.GenericAlias (GH-22262)
Automerge-Triggered-By: @gvanrossum
(cherry picked from commit 2e87774df1)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
2020-09-15 16:37:13 -07:00
Miss Islington (bot) 0374883734
Improve the description of difflib in the documentation (GH-22253) (#22261)
From "can produce difference information in various formats ..."
to " can produce information about file differences in various formats ..."

Automerge-Triggered-By: @Mariatta
(cherry picked from commit 5531269f69)

Co-authored-by: Mandeep <mandeep052@gmail.com>
2020-09-15 12:45:05 -07:00
Pablo Galindo 55e0836849
[3.9] bpo-41631: _ast module uses again a global state (GH-21961) (GH-22258)
Partially revert commit ac46eb4ad6662cf6d771b20d8963658b2186c48c:
"bpo-38113: Update the Python-ast.c generator to PEP384 (gh-15957)".

Using a module state per module instance is causing subtle practical
problems.

For example, the Mercurial project replaces the __import__() function
to implement lazy import, whereas Python expected that "import _ast"
always return a fully initialized _ast module.

Add _PyAST_Fini() to clear the state at exit.

The _ast module has no state (set _astmodule.m_size to 0). Remove
astmodule_traverse(), astmodule_clear() and astmodule_free()
functions..
(cherry picked from commit e5fbe0cbd4)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-09-15 20:32:56 +02:00
Miss Islington (bot) 0cc037f8a7
bpo-41776: Revise example of "continue" in the tutorial documentation (GH-22234) (GH-22255)
Revise example of "continue" in the tutorial documentation
(cherry picked from commit 7bcc6456ad)

Co-authored-by: Neeraj Samtani <neerajjsamtani@gmail.com>

Co-authored-by: Neeraj Samtani <neerajjsamtani@gmail.com>
2020-09-15 09:56:28 -04:00
Miss Islington (bot) b502c7618d
bpo-40721: add note about enum member name case (GH-22231)
* UPPER_CASE preferred as enum members are constants
(cherry picked from commit 542e1df2b0)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2020-09-14 13:49:29 -07:00
Miss Islington (bot) bf7d4d039c
bpo-39883: Update macOS installer copy of LICENSE. (GH-22235) (GH-22236)
(cherry picked from commit 7dbbea75ce)

Co-authored-by: Ned Deily <nad@python.org>
2020-09-14 01:59:58 -04:00
Emmanuel Arias b3d11abcbc
[3.9] bpo-41778: Change a punctuation on documentation. (GH-22229) (GH-22232)
On this paragrapah the clarification about IIS7 seems there's not
connection beacuase is in other sentence. Move the punctuation
to connect both the last sentence with the information in the
parenthesis.

I think the NEWS is not necessary here.

Automerge-Triggered-By: @ericvsmith
(cherry picked from commit 94bfdee25d)

Co-authored-by: Emmanuel Arias <eamanu@yaerobi.com>
2020-09-13 17:38:01 -04:00
Miss Islington (bot) c978be283d
bpo-33239: Fix default value of 'buffering' parameter in docs of tempfile.* functions (GH-21763) (GH-22225)
(cherry picked from commit b48389d950)
2020-09-13 19:20:38 +01:00
Miss Islington (bot) 98f6e67a3d
bpo-41672: Fix type mismatches in imaplib docs (GH-22207)
(cherry picked from commit c75330605d)

Co-authored-by: Norbert Cyran <cyran.norbert97@gmail.com>
2020-09-12 01:14:37 -07:00
Miss Islington (bot) 7dfcc8e079
bpo-39651: Fix asyncio proactor _write_to_self() (GH-22197)
Fix a race condition in the call_soon_threadsafe() method of
asyncio.ProactorEventLoop: do nothing if the self-pipe socket has
been closed.
(cherry picked from commit 1b0f0e3d7d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-09-12 00:11:38 -07:00
Miss Islington (bot) 34e3c7592b
bpo-41731: Make test_cmd_line_script pass with -vv (GH-22206)
Argument script_exec_args is usually an absolute file name,
but twice has form ['-m', 'module_name'].
(cherry picked from commit 7e711ead26)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-09-11 23:45:34 -07:00
Miss Islington (bot) c2577b9e0e
bpo-41729: Fix test_winconsole failures (3) and hang (GH-22146)
The problems occured with a repository build on machine
with freshly updated Windows 10 Pro.
(cherry picked from commit 31c9828ec0)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-09-12 02:18:59 -04:00
Miss Islington (bot) c97e402a4c
[doc] struct: update note about network byte order form to be more helpful (GH-22201)
Update the sentence to provide some context on why network byte order is defined as big endian.
(cherry picked from commit fb27187203)

Co-authored-by: Stargirl Flowers <theaflowers@google.com>
2020-09-11 08:35:23 -07:00
Miss Islington (bot) 7af6bf4dad
Doc: Fix alphabetical ordering of removeprefix/suffix. (GH-22194)
(cherry picked from commit 3304cbd990)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2020-09-10 17:13:56 -07:00
Miss Islington (bot) 1b4bdb4cd7
bpo-37149: Change Shipman tkinter link from archive.org to TkDocs (GH-22188)
The new link responds much faster and begins with a short explanation of the status of the doc.
(cherry picked from commit 06d0b8b67e)

Co-authored-by: Mark Roseman <mark@markroseman.com>
2020-09-10 13:19:29 -07:00
Miss Islington (bot) b86e62644f
[doc] Remove superfluous comment about equal in f-strings (GH-22006)
Automerge-Triggered-By: @kushaldas
(cherry picked from commit 788b79fa7b)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-09-09 23:48:54 -07:00
Miss Islington (bot) 5f76d72092
Update idlelib/help.html to current IDLE doc (GH-22181)
(cherry picked from commit 471247150e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-09-09 16:16:05 -07:00
Miss Islington (bot) 41dbd6e484
Add missing colon to IDLE doc markup (GH-22007)
(cherry picked from commit 7a797a3967)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-09-09 15:29:51 -07:00
Ammar Askar 46bc21e178
[3.9] bpo-41688: Document bug in **= dispatching in the language data… (GH-22172)
I tossed in a "This bug is fixed in Python 3.10" sentence but I'm not sure if that's appropriate to have here.
2020-09-09 11:01:38 -07:00
Miss Islington (bot) 5dd8b3d27a
Fix incorrect bpo number in change notes. (GH-22151) (#22174) 2020-09-09 17:33:21 +01:00
Miss Islington (bot) 014b4ef0a1
Fixes dead links to Django's logging config docs (GH-20823) (GH-22170)
(cherry picked from commit 714217f956)
2020-09-09 14:45:08 +01:00
Miss Islington (bot) b2376f9141
Fix compiler warnings in init_dump_ascii_wstr() (GH-22150)
Fix GCC 9.3 (using -O3) warnings on x86:

initconfig.c: In function ‘init_dump_ascii_wstr’:
initconfig.c:2679:34: warning: format ‘%lc’ expects argument of type
‘wint_t’, but argument 2 has type ‘wchar_t’ {aka ‘long int’}
 2679 |             PySys_WriteStderr("%lc", ch);
initconfig.c:2682:38: warning: format ‘%x’ expects argument of type
‘unsigned int’, but argument 2 has type ‘wchar_t’ {aka ‘long int’}
 2682 |             PySys_WriteStderr("\\x%02x", ch);
initconfig.c:2686:38: warning: format ‘%x’ expects argument of type
‘unsigned int’, but argument 2 has type ‘wchar_t’ {aka ‘long int’}
 2686 |             PySys_WriteStderr("\\U%08x", ch);
initconfig.c:2690:38: warning: format ‘%x’ expects argument of type
‘unsigned int’, but argument 2 has type ‘wchar_t’ {aka ‘long int’}
 2690 |             PySys_WriteStderr("\\u%04x", ch);
(cherry picked from commit 640e8e1d5f)

Co-authored-by: Victor Stinner <vstinner@python.org>
2020-09-09 03:31:25 -07:00
Miss Islington (bot) 11a82c7220
bpo-41525: Make the Python program help ASCII-only (GH-21836)
(cherry picked from commit 58de1dd6a8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-09-08 17:47:53 -07:00
Miss Islington (bot) fd1c725867
[doc] Fix padding in timeit (GH-22152)
Compare -p and -u options help in rendered output to see the difference.
(cherry picked from commit 594f0ce73b)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-09-08 16:56:02 -07:00
Miss Islington (bot) 6e770fc4fe
[3.9] Fix typo in typing.py (GH-22121) (GH-22156)
This is a trivial PR to fix a typo in a docstring in typing.py. From reverences -> references
(cherry picked from commit 84ef33c511)


Co-authored-by: Graham Bleaney <gbleaney@gmail.com>
2020-09-08 16:36:07 -07:00
Miss Islington (bot) 1671b0e4e0
bpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (GH-22092)
(cherry picked from commit fd4cafd470)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-09-07 09:30:21 -07:00
Victor Stinner c73ee5acc9
bpo-41401: Fix test_fspath_support in test_io. (GH-21640) (GH-22133)
The error is exposed on non-UTF-8 locales.

(cherry picked from commit 67987acd5d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-09-07 16:45:57 +02:00
Benjamin Peterson b6d2acb1b1
[3.9] closes bpo-41723: Fix an error in the py_compile documentation. (GH-22118)
(cherry picked from commit 5371a46)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-09-05 22:54:46 -05:00
Miss Islington (bot) e4b359de76
[3.9] [doc] Fix padding in some typing definitions (GH-22114) (GH-22115)
Automerge-Triggered-By: @gvanrossum
(cherry picked from commit 2623868ede)


Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-09-05 19:54:12 -07:00
Miss Islington (bot) a708ae7470
bpo-41218: Improve the test cases for test_compile_top_level_await_no_coro (GH-21363) (GH-22109)
(cherry picked from commit c2c1f1f906)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-09-05 16:37:04 +01:00
Miss Islington (bot) 21100ab279
Remove unnecessary grammar decorations and change header (GH-20819) (GH-22101)
(cherry picked from commit b4282dd150)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-09-05 00:40:54 +01:00
Miss Islington (bot) d64d78be20
bpo-41531: Fix compilation of dict literals with more than 0xFFFF elements (GH-21850) (GH-22107)
(cherry picked from commit c51db0ea40)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-09-05 00:38:50 +01:00
Miss Islington (bot) 242eac1f04
On path with known exact float, extract the double with the fast macro. (GH-21072)
(cherry picked from commit 930f4518ae)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2020-09-04 16:12:48 -07:00
Miss Islington (bot) e92219d8f8
bpo-29590: fix stack trace for gen.throw() with yield from (GH-19896)
* Add failing test.

* bpo-29590: fix stack trace for gen.throw() with yield from (GH-NNNN)

When gen.throw() is called on a generator after a "yield from", the
intermediate stack trace entries are lost.  This commit fixes that.
(cherry picked from commit 8b33961e4b)

Co-authored-by: Chris Jerdonek <chris.jerdonek@gmail.com>
2020-09-04 16:07:18 -07:00
Miss Islington (bot) 106c1df736
closes bpo-41533: Fix a potential memory leak when allocating a stack (GH-21847)
Free the stack allocated in va_build_stack if do_mkstack fails
and the stack is not a small_stack
(cherry picked from commit 75c80b0bda)

Co-authored-by: Tony Solomonik <tony.solomonik@gmail.com>
2020-09-04 15:56:04 -07:00
Miss Islington (bot) 8ed1c177c9
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-09-04 15:55:05 -07:00
Miss Islington (bot) fbb9ee0a90
[3.9] bpo-38787: Clarify docs for PyType_GetModule and warn against common mistake (GH-20215) (GH-21984)
(cherry picked from commit d9a966ae08)


Co-authored-by: Petr Viktorin <encukou@gmail.com>

Automerge-Triggered-By: @Mariatta
2020-09-04 15:32:28 -07:00
Miss Islington (bot) bf8bf1c0dc
[3.9] Improve asyncio-dev 'Concurrency and Multithreading' docs (GH-20882) (GH-22009)
I added some information to the `Concurrency and Multithreading` section of the `Developing with asyncio` guide. 

This is all information that would have helped me when I started using asyncio. I incorrectly assumed that `loop.call_soon_threadsafe()` and `run_coroutine_threadsafe()` could be called from a thread in a process separate from the one that the event loop is running in. Explicitly stating that this will not work will probably help some people starting out with asyncio in the future.

I also added references to some other functions that can be used for inter-process communication without blocking the event loop. The section already mentions running blocking code in a ThreadPoolExecutor, but I think listing these other options in this section will also be helpful.
(cherry picked from commit c68c5af2dc)


Co-authored-by: Roger Iyengar <ri@rogeriyengar.com>
2020-09-04 15:31:06 -07:00
Miss Islington (bot) bd078df283
[3.9] bpo-40486: Specify what happens if directory content change diring iteration (GH-22025) (GH-22093)
(cherry picked from commit 306cfb3a37)


Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-09-04 15:29:06 -07:00
Miss Islington (bot) 78ef1b6b12
[3.9] Fix error in argparse documentation example (GH-17399) (GH-21992)
Automerge-Triggered-By: @rhettinger
(cherry picked from commit 8784d3300e)


Co-authored-by: SarahPythonista <4283226+SarahPythonista@users.noreply.github.com>
2020-09-04 15:26:22 -07:00
Miss Islington (bot) 672d8b9190
[3.9] [doc] Fix a typo in the graphlib docs (GH-22030) (GH-22076)
(cherry picked from commit 8516060076)


Co-authored-by: Mario Šaško <mariosasko777@gmail.com>
2020-09-04 15:25:50 -07:00
Miss Islington (bot) 6386e86bec
bpo-38585: Remove references to defusedexpat (GH-22095)
defusedexpat is not maintained.
(cherry picked from commit 51b84f8e96)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2020-09-04 14:17:45 -07:00
Miss Islington (bot) fb050d0d60
bpo-41721: Add xlc options (GH-22097)
(cherry picked from commit 84a7917b4c)

Authored-by: Stefan Krah <skrah@bytereef.org>
2020-09-04 23:02:57 +02:00
Miss Islington (bot) 8f13ff959a
bpo-41700: Skip test if the locale is not supported (GH-22081) (GH-22085)
(cherry picked from commit 54a66ade20)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2020-09-04 18:55:25 +09:00
Miss Islington (bot) 8d68e59f11
bpo-39010: Improve test shutdown (GH-22066) (#22082)
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:43 -07:00
Miss Islington (bot) a2680058ee
bpo-41696: Fix handling of debug mode in asyncio.run (GH-22069) (#22071)
* 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:09 -07:00
Miss Islington (bot) 49571c0b0e
bpo-39010: Fix errors logged on proactor loop restart (GH-22017) (#22034)
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:29 -07:00
Pablo Galindo 270e249290
[3.9] Fix 'gather' rules in the python parser generator (GH-22021) (GH-22080)
Currently, empty sequences in gather rules make the conditional for
gather rules fail as empty sequences evaluate as "False". We need to
explicitly check for "None" (the failure condition) to avoid false
negatives.
(cherry picked from commit e55a0e9)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-09-03 16:35:36 +01:00
Pablo Galindo be17295280
[3.9] bpo-41697: Correctly handle KeywordOrStarred when parsing arguments in the parser (GH-22077) (GH-22079)
(cherry picked from commit 315a61f7a9)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-09-03 16:35:17 +01:00
Miss Islington (bot) a5d0232b0d
bpo-39883: Use BSD0 license for code in docs (GH-17635) (GH-22073)
The PSF board approved this use.
(cherry picked from commit e223d06a8b)

Co-authored-by: Todd <toddrjen@gmail.com>
2020-09-03 07:40:10 -07:00