Skip to content

Commit f0e6634

Browse files
authored
Merge branch 'main' into fix-test-doctest-warning
2 parents 7691ef3 + ff3e145 commit f0e6634

File tree

6 files changed

+23
-13
lines changed

6 files changed

+23
-13
lines changed

.github/CODEOWNERS

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,14 @@ Doc/library/site.rst @FFY00
9696
Lib/test/test_except*.py @iritkatriel
9797
Objects/exceptions.c @iritkatriel
9898

99-
# Hashing
100-
**/*hashlib* @gpshead @tiran
99+
# Hashing & cryptographic primitives
100+
**/*hashlib* @gpshead @tiran @picnixz
101101
**/*pyhash* @gpshead @tiran
102-
**/sha* @gpshead @tiran
103-
Modules/md5* @gpshead @tiran
104-
**/*blake* @gpshead @tiran
102+
**/sha* @gpshead @tiran @picnixz
103+
Modules/md5* @gpshead @tiran @picnixz
104+
**/*blake* @gpshead @tiran @picnixz
105105
Modules/_hacl/** @gpshead
106+
**/*hmac* @gpshead @picnixz
106107

107108
# logging
108109
**/*logging* @vsajip

Include/cpython/pyerrors.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,6 @@ PyAPI_FUNC(void) _PyErr_ChainExceptions1(PyObject *);
9494

9595
/* In exceptions.c */
9696

97-
PyAPI_FUNC(int) _PyUnicodeError_GetParams(
98-
PyObject *self,
99-
PyObject **obj, Py_ssize_t *objlen,
100-
Py_ssize_t *start, Py_ssize_t *end,
101-
int as_bytes);
102-
10397
PyAPI_FUNC(PyObject*) PyUnstable_Exc_PrepReraiseStar(
10498
PyObject *orig,
10599
PyObject *excs);

Include/internal/pycore_pyerrors.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,15 @@ Py_DEPRECATED(3.12) extern void _PyErr_ChainExceptions(PyObject *, PyObject *, P
190190
PyAPI_DATA(PyTypeObject) _PyExc_IncompleteInputError;
191191
#define PyExc_IncompleteInputError ((PyObject *)(&_PyExc_IncompleteInputError))
192192

193+
extern int _PyUnicodeError_GetParams(
194+
PyObject *self,
195+
PyObject **obj,
196+
Py_ssize_t *objlen,
197+
Py_ssize_t *start,
198+
Py_ssize_t *end,
199+
int as_bytes);
200+
201+
193202
#ifdef __cplusplus
194203
}
195204
#endif

Lib/pickle.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import sys
3232
from sys import maxsize
3333
from struct import pack, unpack
34-
import re
3534
import io
3635
import codecs
3736
import _compat_pickle
@@ -188,7 +187,7 @@ def __init__(self, value):
188187
NEXT_BUFFER = b'\x97' # push next out-of-band buffer
189188
READONLY_BUFFER = b'\x98' # make top of stack readonly
190189

191-
__all__.extend([x for x in dir() if re.match("[A-Z][A-Z0-9_]+$", x)])
190+
__all__.extend(x for x in dir() if x.isupper() and not x.startswith('_'))
192191

193192

194193
class _Framer:

Lib/test/test_glob.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,10 @@ def fn(pat):
511511
@skip_unless_symlink
512512
class SymlinkLoopGlobTests(unittest.TestCase):
513513

514+
# gh-109959: On Linux, glob._isdir() and glob._lexists() can return False
515+
# randomly when checking the "link/" symbolic link.
516+
# https://github.com/python/cpython/issues/109959#issuecomment-2577550700
517+
@unittest.skip("flaky test")
514518
def test_selflink(self):
515519
tempdir = TESTFN + "_dir"
516520
os.makedirs(tempdir)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Improve import time of :mod:`pickle` by 25% by removing an unnecessary
2+
regular expression. As such, :mod:`re` is no more implicitly available
3+
as ``pickle.re``. Patch by Bénédikt Tran.

0 commit comments

Comments
 (0)