The PyType_HasFeature() change has been reverted: the static inline
function access directly the PyTypeObject.tp_flags member.
(cherry picked from commit 99c7e9853f)
Co-authored-by: Victor Stinner <vstinner@python.org>
so that
$ python -m json.tool foo.json foo.json
doesn't result in an empty foo.json.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 815dad42d5)
Co-authored-by: Chris Wesseling <chris.wesseling@protonmail.com>
In order to fix a bug in the 3.9 branch in GH-29394, more tests were added to
``test_functools.py`` to ensure that ``singledispatchmethod`` still correctly
wrapped a target method, even if the target method had already been wrapped by
multiple other decorators. This PR brings the new tests into the 3.11 and 3.10
branches as well.
(cherry picked from commit 32f55d1a5d)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Don't stackoveflow on debug builds
* Also catch the pickletester case
(cherry picked from commit d56375a0dd)
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
``typing.Tuple`` has been deprecated since Python 3.9, so it makes no sense to mention it so prominently in the documentation for the ``typing`` module.
(cherry picked from commit 87032cfa3d)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Specify that SSLContext.set_default_verify_paths is called on ALL systems.
The code of SSLContext.load_default_certs was changed in bpo-22449 to do this,
this fix corrects the documentation to match that change.
(cherry picked from commit 3551bf16ee)
Co-authored-by: LincolnPuzey <lincoln@puzey.dev>
SGI_ABI support was removed in [1] but this variable was never removed
from the makefile. Currently, it is just a bad variable that does not
get replaced by the configure script.
[1] https://github.com/python/cpython/pull/3294
Signed-off-by: Filipe Laíns <lains@riseup.net>
(cherry picked from commit 38982ab136)
Co-authored-by: Filipe Laíns <lains@riseup.net>
* bpo-45516: add protocol description to the Traversable documentation
Signed-off-by: Filipe Laíns <lains@riseup.net>
* Update Doc/library/importlib.rst
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* Update Lib/importlib/abc.py
* Update Doc/library/importlib.rst
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
(cherry picked from commit 4d03de3329)
Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
The link broke for Python 3.10 since importlib.metadata was made from a module into a package
I think this is trivial enough to not need a bpo issue.
Automerge-Triggered-By: GH:jaraco
(cherry picked from commit aae18a1740)
Co-authored-by: Philipp A <flying-sheep@web.de>
The list of PEPs at the top of the documentation for the ``typing`` module has
become too long to be readable. This PR proposes presenting this
information in a more structured and readable way by adding a new "relevant
PEPs" section to the ``typing`` docs.
(cherry picked from commit 03db1bbfd2)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Run test_shelve with all underlying dbm implementations and pickle protocols.
Also make test_shelve discoverable.
(cherry picked from commit b781cc3bfc)
the current test depended on integer sets being iterated on in a certain
fixed order. That order is different on PyPy (insertion based) and could
change in CPython in the future in theory. Make the test robust against
a different iteration order by sorting.
(cherry picked from commit 7401694807)
Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>