8000 Merge branch 'main' into inlinecomp2 · carljm/cpython@0727d6f · GitHub
[go: up one dir, main page]

Skip to content

Commit 0727d6f

Browse files
committed
Merge branch 'main' into inlinecomp2
* main: pythongh-103822: [Calendar] change return value to enum for day and month APIs (pythonGH-103827) pythongh-65022: Fix description of tuple return value in copyreg (python#103892) pythonGH-103525: Improve exception message from `pathlib.PurePath()` (pythonGH-103526) pythongh-84436: Add integration C API tests for immortal objects (pythongh-103962) pythongh-103743: Add PyUnstable_Object_GC_NewWithExtraData (pythonGH-103744) pythongh-102997: Update Windows installer to SQLite 3.41.2. (python#102999) pythonGH-103484: Fix redirected permanently URLs (python#104001) Improve assert_type phrasing (python#104081) pythongh-102997: Update macOS installer to SQLite 3.41.2. (pythonGH-102998) pythonGH-103472: close response in HTTPConnection._tunnel (python#103473) pythongh-88496: IDLE - fix another test on macOS (python#104075) pythongh-94673: Hide Objects in PyTypeObject Behind Accessors (pythongh-104074) pythongh-94673: Properly Initialize and Finalize Static Builtin Types for Each Interpreter (pythongh-104072) pythongh-104016: Skip test for deeply neste f-strings on wasi (python#104071)
2 parents 1274e2b + 1f53844 commit 0727d6f

File tree

89 files changed

+885
-481
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+885
-481
lines changed

Doc/c-api/gcsupport.rst

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,31 @@ rules:
5959
Analogous to :c:func:`PyObject_New` but for container objects with the
6060
:const:`Py_TPFLAGS_HAVE_GC` flag set.
6161
62-
6362
.. c:function:: TYPE* PyObject_GC_NewVar(TYPE, PyTypeObject *type, Py_ssize_t size)
6463
6564
Analogous to :c:func:`PyObject_NewVar` but for container objects with the
6665
:const:`Py_TPFLAGS_HAVE_GC` flag set.
6766
67+
.. c:function:: PyObject* PyUnstable_Object_GC_NewWithExtraData(PyTypeObject *type, size_t extra_size)
68+
69+
Analogous to :c:func:`PyObject_GC_New` but allocates *extra_size*
70+
bytes at the end of the object (at offset
71+
:c:member:`~PyTypeObject.tp_basicsize`).
72+
The allocated memory is initialized to zeros,
73+
except for the :c:type:`Python object header <PyObject>`.
74+
75+
The extra data will be deallocated with the object, but otherwise it is
76+
not managed by Python.
77+
78+
.. warning::
79+
The function is marked as unstable because the final mechanism
80+
for reserving extra data after an instance is not yet decided.
81+
For allocating a variable number of fields, prefer using
82+
:c:type:`PyVarObject` and :c:member:`~PyTypeObject.tp_itemsize`
83+
instead.
84+
85+
.. versionadded:: 3.12
86+
6887
6988
.. c:function:: TYPE* PyObject_GC_Resize(TYPE, PyVarObject *op, Py_ssize_t newsize)
7089

Doc/conf.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,29 @@
264264

265265
linkcheck_allowed_redirects = {
266266
# bpo-NNNN -> BPO -> GH Issues
267-
r'https://bugs.python.org/issue\?@action=redirect&bpo=\d+': 'https://github.com/python/cpython/issues/\d+',
267+
r'https://bugs.python.org/issue\?@action=redirect&bpo=\d+': r'https://github.com/python/cpython/issues/\d+',
268268
# GH-NNNN used to refer to pull requests
269-
r'https://github.com/python/cpython/issues/\d+': 'https://github.com/python/cpython/pull/\d+',
269+
r'https://github.com/python/cpython/issues/\d+': r'https://github.com/python/cpython/pull/\d+',
270270
# :source:`something` linking files in the repository
271-
r'https://github.com/python/cpython/tree/.*': 'https://github.com/python/cpython/blob/.*'
271+
r'https://github.com/python/cpython/tree/.*': 'https://github.com/python/cpython/blob/.*',
272+
# Intentional HTTP use at Misc/NEWS.d/3.5.0a1.rst
273+
r'http://www.python.org/$': 'https://www.python.org/$',
274+
# Used in license page, keep as is
275+
r'https://www.zope.org/': r'https://www.zope.dev/',
276+
# Microsoft's redirects to learn.microsoft.com
277+
r'https://msdn.microsoft.com/.*': 'https://learn.microsoft.com/.*',
278+
r'https://docs.microsoft.com/.*': 'https://learn.microsoft.com/.*',
279+
r'https://go.microsoft.com/fwlink/\?LinkID=\d+': 'https://learn.microsoft.com/.*',
280+
# Language redirects
281+
r'https://toml.io': 'https://toml.io/en/',
282+
r'https://www.redhat.com': 'https://www.redhat.com/en',
283+
# Other redirects
284+
r'https://www.boost.org/libs/.+': r'https://www.boost.org/doc/libs/\d_\d+_\d/.+',
285+
r'https://support.microsoft.com/en-us/help/\d+': 'https://support.microsoft.com/en-us/topic/.+',
286+
r'https://perf.wiki.kernel.org$': 'https://perf.wiki.kernel.org/index.php/Main_Page',
287+
r'https://www.sqlite.org': 'https://www.sqlite.org/index.html',
288+
r'https://mitpress.mit.edu/sicp$': 'https://mitpress.mit.edu/9780262510875/structure-and-interpretation-of-computer-programs/',
289+
r'https://www.python.org/psf/': 'https://www.python.org/psf-landing/',
272290
}
273291

274292
linkcheck_anchors_ignore = [

Doc/faq/extending.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ on what you're trying to do.
4242
.. XXX make sure these all work
4343
4444
`Cython <https://cython.org>`_ and its relative `Pyrex
45-
<https://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/>`_ are compilers
45+
<https://www.csse.canterbury.ac.nz/greg.ewing/python/Pyrex/>`_ are compilers
4646
that accept a slightly modified form of Python and generate the corresponding
4747
C code. Cython and Pyrex make it possible to write an extension without having
4848
to learn Python's C API.

Doc/faq/general.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ commercial use, to sell copies of Python in source or binary form (modified or
5454
unmodified), or to sell products that incorporate Python in some form. We would
5555
still like to know about all commercial use of Python, of course.
5656

57-
See `the PSF license page <https://www.python.org/psf/license/>`_ to find further
58-
explanations and a link to the full text of the license.
57+
See `the license page <https://docs.python.org/3/license.html>`_ to find further
58+
explanations and the full text of the PSF License.
5959

6060
The Python logo is trademarked, and in certain cases permission is required to
6161
use it. Consult `the Trademark Usage Policy
@@ -215,7 +215,7 @@ every day, and Usenet readers are often more able to cope with this volume.
215215
Announcements of new software releases and events can be found in
216216
comp.lang.python.announce, a low-traffic moderated list that receives about five
217217
postings per day. It's available as `the python-announce mailing list
218-
<https://mail.python.org/mailman/listinfo/python-announce-list>`_.
218+
<https://mail.python.org/mailman3/lists/python-announce-list.python.org/>`_.
219219

220220
More info about other mailing lists and newsgroups
221221
can be found at https://www.python.org/community/lists/.
@@ -352,7 +352,7 @@ titled "Python X.Y Release Schedule", where X.Y is a version that hasn't been
352352
publicly released yet.
353353

354354
New development is discussed on `the python-dev mailing list
355-
<https://mail.python.org/mailman/listinfo/python-dev/>`_.
355+
<https://mail.python.org/mailman3/lists/python-dev.python.org/>`_.
356356

357357

358358
Is it reasonable to propose incompatible changes to Python?

Doc/faq/programming.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Yes.
6161
`Pyflakes <https://github.com/PyCQA/pyflakes>`_ do basic checking that will
6262
help you catch bugs sooner.
6363

64-
Static type checkers such as `Mypy <http://mypy-lang.org/>`_,
64+
Static type checkers such as `Mypy <https://mypy-lang.org/>`_,
6565
`Pyre <https://pyre-check.org/>`_, and
6666
`Pytype <https://github.com/google/pytype>`_ can check type hints in Python
6767
source code.

Doc/howto/pyporting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ to make sure everything functions as expected in both versions of Python.
438438
.. _Futurize: https://python-future.org/automatic_conversion.html
439439
.. _importlib2: https://pypi.org/project/importlib2
440440
.. _Modernize: https://python-modernize.readthedocs.io/
441-
.. _mypy: http://mypy-lang.org/
441+
.. _mypy: https://mypy-lang.org/
442442
.. _Porting to Python 3: http://python3porting.com/
443443
.. _Pylint: https://pypi.org/project/pylint
444444

Doc/library/asyncio-eventloop.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ Opening network connections
529529
specifies requirements for algorithms that reduce this user-visible
530530
delay and provides an algorithm.
531531

532-
For more information: https://tools.ietf.org/html/rfc6555
532+
For more information: https://datatracker.ietf.org/doc/html/rfc6555
533533

534534
.. versionchanged:: 3.11
535535

Doc/library/copyreg.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Such constructors may be factory functions or class instances.
2929

3030
Declares that *function* should be used as a "reduction" function for objects
3131
of type *type*. *function* must return either a string or a tuple
32-
containing two or five elements. See the :attr:`~pickle.Pickler.dispatch_table`
32+
containing between two and six elements. See the :attr:`~pickle.Pickler.dispatch_table`
3333
for more details on the interface of *function*.
3434

3535
The *constructor_ob* parameter is a legacy feature and is now ignored, but if

Doc/library/hashlib.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ Constructor functions also accept the following tree hashing parameters:
432432
:alt: Explanation of tree mode parameters.
433433

434434
See section 2.10 in `BLAKE2 specification
435-
<https://blake2.net/blake2_20130129.pdf>`_ for comprehensive review of tree
435+
<https://www.blake2.net/blake2_20130129.pdf>`_ for comprehensive review of tree
436436
hashing.
437437

438438

@@ -619,7 +619,7 @@ on the hash function used in digital signatures.
619619
by the signer.
620620

621621
(`NIST SP-800-106 "Randomized Hashing for Digital Signatures"
622-
<https://csrc.nist.gov/publications/detail/sp/800-106/final>`_)
622+
<https://csrc.nist.gov/publications/detail/sp/800-106/archive/2009-02-25>`_)
623623

624624
In BLAKE2 the salt is processed as a one-time input to the hash function during
625625
initialization, rather than as an input to each compression function.
@@ -628,7 +628,7 @@ initialization, rather than as an input to each compression function.
628628

629629
*Salted hashing* (or just hashing) with BLAKE2 or any other general-purpose
630630
cryptographic hash function, such as SHA-256, is not suitable for hashing
631-
passwords. See `BLAKE2 FAQ <https://blake2.net/#qa>`_ for more
631+
passwords. See `BLAKE2 FAQ <https://www.blake2.net/#qa>`_ for more
632632
information.
633633
..
634634
@@ -764,9 +764,9 @@ Domain Dedication 1.0 Universal:
764764

765765
* *Alexandr Sokolovskiy*
766766

767-
.. _BLAKE2: https://blake2.net
767+
.. _BLAKE2: https://www.blake2.net
768768
.. _HMAC: https://en.wikipedia.org/wiki/Hash-based_message_authentication_code
769-
.. _BLAKE: https://131002.net/blake/
769+
.. _BLAKE: https://web.archive.org/web/20200918190133/https://131002.net/blake/
770770
.. _SHA-3: https://en.wikipedia.org/wiki/NIST_hash_function_competition
771771
.. _ChaCha: https://cr.yp.to/chacha.html
772772
.. _pyblake2: https://pythonhosted.org/pyblake2/
@@ -782,7 +782,7 @@ Domain Dedication 1.0 Universal:
782782
Module :mod:`base64`
783783
Another way to encode binary hashes for non-binary environments.
784784

785-
https://blake2.net
785+
https://www.blake2.net
786786
Official BLAKE2 website.
787787

788788
https://csrc.nist.gov/csrc/media/publications/fips/180/2/archive/2002-08-01/documents/fips180-2.pdf

Doc/library/http.client.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ HTTPConnection Objects
354354
the CONNECT request.
355355

356356
As HTTP/1.1 is used for HTTP CONNECT tunnelling request, `as per the RFC
357-
<https://tools.ietf.org/html/rfc7231#section-4.3.6>`_, a HTTP ``Host:``
357+
<https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.6>`_, a HTTP ``Host:``
358358
header must be provided, matching the authority-form of the request target
359359
provided as the destination for the CONNECT request. If a HTTP ``Host:``
360360
header is not provided via the headers argument, one is generated and

0 commit comments

Comments
 (0)
0