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>
The examples in argparse documentation use `error: too few arguments`
error message which was removed in this commit f97c59a in 2011.
(cherry picked from commit 04e8293465)
Co-authored-by: suic86 <marko.gabriel.cz@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>
This code doesn't have effect on the final result, but causes
GCC 8 warnings and can have an undefined behavior.
(cherry picked from commit 827d49f3cf)
The protocol parameter can be any protocol supported by the
pickle module.
(cherry picked from commit 2ef65f346a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
When bpo-12015 got resolved by increasing the length of the
random string generated by _RandomNameSequence from six to eight
characters, the docstring of the class was not adjusted accordingly.
(cherry picked from commit 9c463ec88b)
Co-authored-by: Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de>
* bpo-33201: Modernize "Extension types" doc
* Split tutorial and other topics
* Some small fixes
* Address some review comments
* Rename noddy* to custom* and shoddy to sublist
* Fix markup
(cherry picked from commit 1d80a56173)
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
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>
Py_UNICODE is deprecated since Python 3.3.
But the deprecation is missed in the c-api/arg document.
(cherry picked from commit 42ec190761)
Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
A 'u' string prefix cannot be paired with either 'r' or 'f'. Consistently
color as much of the prefix, starting at the right, as is valid.
(cherry picked from commit da58533ac6)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Build and link with private copy of Tcl/Tk 8.6 for the macOS 10.6+
installer. The 10.9+ installer variant already does this. This means that
the Python 3.7 provided by the python.org macOS installers no longer need or
use any external versions of Tcl/Tk, either system-provided or user-
installed, such as ActiveTcl.