Skip to content

Commit a70b403

Browse files
Merge branch 'main' into Optimize-_MATCH_CLASS
2 parents bb01cf0 + 0c29f83 commit a70b403

32 files changed

+623
-478
lines changed

.github/actionlint.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
self-hosted-runner:
2-
# Pending https://github.com/rhysd/actionlint/pull/615
3-
labels: ["windows-2025-vs2026"]
4-
51
config-variables: null
62

73
paths:

.github/zizmor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Configuration for the zizmor static analysis tool, run via prek in CI
2-
# https://woodruffw.github.io/zizmor/configuration/
2+
# https://docs.zizmor.sh/configuration/
33
rules:
44
dangerous-triggers:
55
ignore:

.pre-commit-config.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.15.0
3+
rev: a27a2e47c7751b639d2b5badf0ef6ff11fee893f # frozen: v0.15.4
44
hooks:
55
- id: ruff-check
66
name: Run Ruff (lint) on Apple/
@@ -60,20 +60,20 @@ repos:
6060
files: ^Tools/wasm/
6161

6262
- repo: https://github.com/psf/black-pre-commit-mirror
63-
rev: 26.1.0
63+
rev: ea488cebbfd88a5f50b8bd95d5c829d0bb76feb8 # frozen: 26.1.0
6464
hooks:
6565
- id: black
6666
name: Run Black on Tools/jit/
6767
files: ^Tools/jit/
6868

6969
- repo: https://github.com/Lucas-C/pre-commit-hooks
70-
rev: v1.5.6
70+
rev: ad1b27d73581aa16cca06fc4a0761fc563ffe8e8 # frozen: v1.5.6
7171
hooks:
7272
- id: remove-tabs
7373
types: [python]
7474

7575
- repo: https://github.com/pre-commit/pre-commit-hooks
76-
rev: v6.0.0
76+
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
7777
hooks:
7878
- id: check-case-conflict
7979
- id: check-merge-conflict
@@ -91,24 +91,24 @@ repos:
9191
files: '^\.github/CODEOWNERS|\.(gram)$'
9292

9393
- repo: https://github.com/python-jsonschema/check-jsonschema
94-
rev: 0.36.1
94+
rev: 9f48a48aa91a6040d749ad68ec70907d907a5a7f # frozen: 0.37.0
9595
hooks:
9696
- id: check-dependabot
9797
- id: check-github-workflows
9898
- id: check-readthedocs
9999

100100
- repo: https://github.com/rhysd/actionlint
101-
rev: v1.7.10
101+
rev: 393031adb9afb225ee52ae2ccd7a5af5525e03e8 # frozen: v1.7.11
102102
hooks:
103103
- id: actionlint
104104

105-
- repo: https://github.com/woodruffw/zizmor-pre-commit
106-
rev: v1.22.0
105+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
106+
rev: b546b77c44c466a54a42af5499dcc0dcc1a3193f # frozen: v1.22.0
107107
hooks:
108108
- id: zizmor
109109

110110
- repo: https://github.com/sphinx-contrib/sphinx-lint
111-
rev: v1.0.2
111+
rev: c883505f64b59c3c5c9375191e4ad9f98e727ccd # frozen: v1.0.2
112112
hooks:
113113
- id: sphinx-lint
114114
args: [--enable=default-role]

Doc/c-api/dict.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ Dictionary objects
8282
8383
Return a new dictionary that contains the same key-value pairs as *p*.
8484
85-
.. versionchanged:: next
86-
If *p* is a subclass of :class:`frozendict`, the result will be a
87-
:class:`frozendict` instance instead of a :class:`dict` instance.
88-
8985
.. c:function:: int PyDict_SetItem(PyObject *p, PyObject *key, PyObject *val)
9086
9187
Insert *val* into the dictionary *p* with a key of *key*. *key* must be

Doc/deprecations/pending-removal-in-3.18.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
Pending removal in Python 3.18
22
------------------------------
33

4+
* No longer accept a boolean value when a file descriptor is expected.
5+
(Contributed by Serhiy Storchaka in :gh:`82626`.)
6+
47
* :mod:`decimal`:
58

69
* The non-standard and undocumented :class:`~decimal.Decimal` format

Doc/library/functions.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ are always available. They are listed here in alphabetical order.
594594

595595
:param globals:
596596
The global namespace (default: ``None``).
597-
:type globals: :class:`dict` | ``None``
597+
:type globals: :class:`dict` | :class:`frozendict` | ``None``
598598

599599
:param locals:
600600
The local namespace (default: ``None``).
@@ -660,6 +660,10 @@ are always available. They are listed here in alphabetical order.
660660
The semantics of the default *locals* namespace have been adjusted as
661661
described for the :func:`locals` builtin.
662662

663+
.. versionchanged:: next
664+
665+
*globals* can now be a :class:`frozendict`.
666+
663667
.. index:: pair: built-in function; exec
664668

665669
.. function:: exec(source, /, globals=None, locals=None, *, closure=None)
@@ -737,6 +741,10 @@ are always available. They are listed here in alphabetical order.
737741
The semantics of the default *locals* namespace have been adjusted as
738742
described for the :func:`locals` builtin.
739743

744+
.. versionchanged:: next
745+
746+
*globals* can now be a :class:`frozendict`.
747+
740748

741749
.. function:: filter(function, iterable, /)
742750

Doc/library/xml.etree.elementtree.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,9 @@ Functions
702702
attributes. *extra* contains additional attributes, given as keyword
703703
arguments. Returns an element instance.
704704

705+
.. versionchanged:: next
706+
*attrib* can now be a :class:`frozendict`.
707+
705708

706709
.. function:: tostring(element, encoding="us-ascii", method="xml", *, \
707710
xml_declaration=None, default_namespace=None, \
@@ -887,6 +890,9 @@ Element Objects
887890
an optional dictionary, containing element attributes. *extra* contains
888891
additional attributes, given as keyword arguments.
889892

893+
.. versionchanged:: next
894+
*attrib* can now be a :class:`frozendict`.
895+
890896

891897
.. attribute:: tag
892898

Include/internal/pycore_dict.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ extern void _PyDict_Clear_LockHeld(PyObject *op);
160160
PyAPI_FUNC(void) _PyDict_EnsureSharedOnRead(PyDictObject *mp);
161161
#endif
162162

163-
extern PyObject* _PyDict_CopyAsDict(PyObject *op);
163+
// Export for '_elementtree' shared extension
164+
PyAPI_FUNC(PyObject*) _PyDict_CopyAsDict(PyObject *op);
164165

165166
#define DKIX_EMPTY (-1)
166167
#define DKIX_DUMMY (-2) /* Used internally */
@@ -372,15 +373,15 @@ _PyDict_UniqueId(PyDictObject *mp)
372373
static inline void
373374
_Py_INCREF_DICT(PyObject *op)
374375
{
375-
assert(PyDict_Check(op));
376+
assert(PyAnyDict_Check(op));
376377
Py_ssize_t id = _PyDict_UniqueId((PyDictObject *)op);
377378
_Py_THREAD_INCREF_OBJECT(op, id);
378379
}
379380

380381
static inline void
381382
_Py_DECREF_DICT(PyObject *op)
382383
{
383-
assert(PyDict_Check(op));
384+
assert(PyAnyDict_Check(op));
384385
Py_ssize_t id = _PyDict_UniqueId((PyDictObject *)op);
385386
_Py_THREAD_DECREF_OBJECT(op, id);
386387
}

0 commit comments

Comments
 (0)