`obj.async` is now a syntax error, so the warning/shim is
quasi-unnecessary.
(cherry picked from commit f90f5d5c1d)
Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
Don't crash on warnings.warn_explicit() if module_globals is not a dict.
(cherry picked from commit b056562860)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Also bump PendingDeprecationWarning to DeprecationWarning.
(cherry picked from commit 9eb40bc38d)
Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
The urllib.robotparser's __str__ representation now includes wildcard
entries and the "Crawl-delay" and "Request-rate" fields.
(cherry picked from commit bd08a0af2d)
Co-authored-by: Michael Lazar <lazar.michael22@gmail.com>
This happens in the NixOS build sandbox, for example, where the only
other user is nobody with home directory /.
(cherry picked from commit 5c0d462689)
Co-authored-by: Anders Kaseorg <andersk@mit.edu>
Pass os.environ's copy to new process created at test_posix:
test_specify_environment. Otherwise important variables such as
LD_LIBRARY_PATH are not set and the child process might not work at all
in an environment where such variables are required for Python to function.
(cherry picked from commit 7ec8f28656)
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
Previously emitted cover files only when --missing option was used.
(cherry picked from commit 47ab15470d)
Co-authored-by: Michael Selik <mike@selik.org>
Fix test_embed.test_pre_initialization_sys_options() when building with --enable-shared
(cherry picked from commit 4114846265)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
External importers were being added in both phases of the import
system initialisation.
They're only supposed to be added in the second phase, after the
import machinery has been appropriately configured.
(cherry picked from commit 0977091dca)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
as docstrings and translatable strings, and rejects
bytes literals and f-string expressions.
(cherry picked from commit 69524821a8)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
`test_urllib2net.OtherNetworkTests.test_sites_no_connection_close`
used `http://www.imdb.com/` but it is moved to https so the test is
not valid anymore. Skip test for the moment to allow CI to proceed.
(cherry picked from commit 36d56ea826)
Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
Adds some working and markup fixes that I missed
in the initial commit for this issue.
(Follow-up to GH-6419)
(cherry picked from commit 1a5c4bdb6e)
Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
The pydoc CLI assumed -m pydoc would add the empty string
to sys.path, and hence got confused when it switched to
adding the full initial working directory instead.
This refactors the pydoc CLI path manipulation to be
more testable, and ensures it won't accidentally
remove the standard library directory containing
pydoc itself from sys.path.
(cherry picked from commit 82a9481059)
Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
Executors in concurrent.futures accepted tasks after executor was shutdown by interpreter exit. Tasks were left in PENDING state forever. This fix changes submit to instead raise a RuntimeError.
(cherry picked from commit c4b695f85e)
Co-authored-by: Mark Nemec <mrknmc@me.com>
An entry of None in sys.path_importer_cache represents a negative/missing finder for a path, so clearing it out makes sense.
(cherry picked from commit 9e2be60634)
* Add a test for frozen with unhashable field value.
* Improve a comment.
(cherry picked from commit 74940913d2)
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
This removes a hack and replaces it with a proper
mapping {'list': 'List', 'dict': 'Dict', ...}.
(cherry picked from commit 2a363d2930)
Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
Different paths are executed for normal exit and for leaving
the 'async with' block with 'break', 'continue' or 'return'.
(cherry picked from commit 2eeac269dd)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>