Skip to content

Commit 8f31bb8

Browse files
Re-sync with internal repository
The internal and external repositories are out of sync. This Pull Request attempts to brings them back in sync by patching the GitHub repository. Please carefully review this patch. You must disable ShipIt for your project in order to merge this pull request. DO NOT IMPORT this pull request. Instead, merge it directly on GitHub using the MERGE BUTTON. Re-enable ShipIt after merging. fbshipit-source-id: 749e0725b2b28c4649cd342fc9f9e7b43b0fc093
1 parent e6f3131 commit 8f31bb8

57 files changed

Lines changed: 625 additions & 2117 deletions

Some content is hidden

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

.github/workflows/mypy.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,12 @@ jobs:
6969
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7070
with:
7171
persist-credentials: false
72-
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
72+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
7373
with:
7474
python-version: "3.15"
75-
activate-environment: true
76-
cache-dependency-glob: Tools/requirements-dev.txt
77-
- run: uv pip install -r Tools/requirements-dev.txt
75+
allow-prereleases: true
76+
cache: pip
77+
cache-dependency-path: Tools/requirements-dev.txt
78+
- run: pip install -r Tools/requirements-dev.txt
7879
- run: python3 Misc/mypy/make_symlinks.py --symlink
79-
- run: mypy --num-workers 4 --config-file ${{ matrix.target }}/mypy.ini
80+
- run: mypy --config-file ${{ matrix.target }}/mypy.ini

Doc/c-api/sentinel.rst

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,8 @@ Sentinel objects
1414

1515
.. c:function:: int PySentinel_Check(PyObject *o)
1616
17-
Return true if *o* is a :class:`sentinel` object or a subtype.
18-
The :class:`sentinel` type does not currently allow subclasses,
19-
so this check is exact.
20-
Future Python versions may choose to allow subtyping.
21-
This function always succeeds.
22-
23-
.. versionadded:: 3.15
24-
25-
.. c:function:: int PySentinel_CheckExact(PyObject *o)
26-
27-
Return true if *o* is a :class:`sentinel` object, but not a subtype.
28-
The :class:`sentinel` type does not currently allow subclasses.
29-
Future Python versions may choose to allow subtyping.
30-
This function always succeeds.
17+
Return true if *o* is a :class:`sentinel` object. The :class:`sentinel` type
18+
does not allow subclasses, so this check is exact.
3119
3220
.. versionadded:: 3.15
3321

Doc/library/mimetypes.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,11 +315,9 @@ than one MIME-type database; it provides an interface similar to the one of the
315315
When *strict* is ``True`` (the default), the mapping will be added to the
316316
official MIME types, otherwise to the non-standard ones.
317317

318-
.. deprecated:: 3.14
319-
*ext* values that do not start with ``'.'`` are deprecated.
320-
321-
.. versionchanged:: next
322-
*ext* now must start with ``'.'``. Otherwise :exc:`ValueError` is raised.
318+
.. deprecated-removed:: 3.14 3.16
319+
Invalid, undotted extensions will raise a
320+
:exc:`ValueError` in Python 3.16.
323321

324322

325323
.. _mimetypes-cli:

Include/cpython/sentinelobject.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
/* Sentinel object interface */
22

33
#ifndef Py_LIMITED_API
4-
#ifndef _Py_SENTINELOBJECT_H
5-
#define _Py_SENTINELOBJECT_H
4+
#ifndef Py_SENTINELOBJECT_H
5+
#define Py_SENTINELOBJECT_H
66
#ifdef __cplusplus
77
extern "C" {
88
#endif
99

1010
PyAPI_DATA(PyTypeObject) PySentinel_Type;
1111

12-
#define PySentinel_CheckExact(op) Py_IS_TYPE((op), &PySentinel_Type)
13-
14-
/* Alias as long as subclasses are not allowed. */
15-
#define PySentinel_Check(op) PySentinel_CheckExact(op)
12+
#define PySentinel_Check(op) Py_IS_TYPE((op), &PySentinel_Type)
1613

1714
PyAPI_FUNC(PyObject *) PySentinel_New(
1815
const char *name,
@@ -21,5 +18,5 @@ PyAPI_FUNC(PyObject *) PySentinel_New(
2118
#ifdef __cplusplus
2219
}
2320
#endif
24-
#endif /* !_Py_SENTINELOBJECT_H */
21+
#endif /* !Py_SENTINELOBJECT_H */
2522
#endif /* !Py_LIMITED_API */

Include/cpython/sliceobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#ifndef _Py_CPYTHON_SLICEOBJECT_H
1+
#ifndef Py_CPYTHON_SLICEOBJECT_H
22
# error "this header file must not be included directly"
33
#endif
44

Include/cpython/structseq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#ifndef _Py_CPYTHON_STRUCTSEQ_H
1+
#ifndef Py_CPYTHON_STRUCTSEQ_H
22
# error "this header file must not be included directly"
33
#endif
44

Include/internal/pycore_jit_unwind.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#if defined(_Py_JIT) && defined(__linux__) && defined(__ELF__)
1212
# define PY_HAVE_JIT_GDB_UNWIND
1313
# if defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && \
14-
defined(_Py_HAVE_LIBGCC_EH_FRAME_REGISTRATION)
14+
defined(HAVE_LIBGCC_EH_FRAME_REGISTRATION)
1515
# define PY_HAVE_JIT_GNU_BACKTRACE_UNWIND
1616
# endif
1717
#endif

Include/internal/pycore_mmap.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ extern "C" {
1111

1212
#include "pycore_pystate.h"
1313

14-
#if defined(_Py_HAVE_PR_SET_VMA_ANON_NAME) && defined(__linux__)
14+
#if defined(HAVE_PR_SET_VMA_ANON_NAME) && defined(__linux__)
1515
# include <linux/prctl.h>
1616
# include <sys/prctl.h>
1717
#endif
1818

19-
#if defined(_Py_HAVE_PR_SET_VMA_ANON_NAME) && defined(__linux__)
19+
#if defined(HAVE_PR_SET_VMA_ANON_NAME) && defined(__linux__)
2020
static inline int
2121
_PyAnnotateMemoryMap(void *addr, size_t size, const char *name)
2222
{

Include/sliceobject.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ PyAPI_FUNC(Py_ssize_t) PySlice_AdjustIndices(Py_ssize_t length,
4545
#endif
4646

4747
#ifndef Py_LIMITED_API
48-
# define _Py_CPYTHON_SLICEOBJECT_H
48+
# define Py_CPYTHON_SLICEOBJECT_H
4949
# include "cpython/sliceobject.h"
50-
# undef _Py_CPYTHON_SLICEOBJECT_H
50+
# undef Py_CPYTHON_SLICEOBJECT_H
5151
#endif
5252

5353
#ifdef __cplusplus

Include/structseq.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ PyAPI_FUNC(void) PyStructSequence_SetItem(PyObject*, Py_ssize_t, PyObject*);
2929
PyAPI_FUNC(PyObject*) PyStructSequence_GetItem(PyObject*, Py_ssize_t);
3030

3131
#ifndef Py_LIMITED_API
32-
# define _Py_CPYTHON_STRUCTSEQ_H
32+
# define Py_CPYTHON_STRUCTSEQ_H
3333
# include "cpython/structseq.h"
34-
# undef _Py_CPYTHON_STRUCTSEQ_H
34+
# undef Py_CPYTHON_STRUCTSEQ_H
3535
#endif
3636

3737
#ifdef __cplusplus

0 commit comments

Comments
 (0)