Use an unique identifier for the different grammars documented using
the Sphinx productionlist markup.
productionlist markups of the same grammar, like "expressions" or
"compound statements", use the same identifier "python-grammar".
(cherry picked from commit 8af239eacf)
Co-authored-by: Victor Stinner <vstinner@python.org>
EnumMeta double-checks that `__repr__`, `__str__`, `__format__`, and `__reduce_ex__` are not the same as `object`'s, and replaces them if they are -- even if that replacement was intentionally done in the Enum being constructed. This patch fixes that.
Automerge-Triggered-By: @ethanfurman
(cherry picked from commit 22415ad625)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
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>
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>
NuGet automatically includes .props file from the build directory in the
target using the package, but only if the .props file has the correct
name: it must be $(id).props
Rename python.props correspondingly in all the nuspec variants. Also
keep python.props as it were for backward compatibility.
(cherry picked from commit 7c11a9acca)
Co-authored-by: Václav Slavík <vaclav@slavik.io>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Automerge-Triggered-By: @Mariatta
The error is exposed on non-UTF-8 locales.
(cherry picked from commit 67987acd5d)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit c73ee5acc9)
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>
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>
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>
* 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>
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>
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>