Skip to content

Commit b9d24cb

Browse files
ambvmeta-codesync[bot]
authored andcommitted
Sync pre-release CPython 3.15 branch from GitHub (2026-07-10)
Summary: Imported python/cpython `3.15.0b3+dev` from upstream rev [`cb912e1`](https://www.github.com/python/cpython/commit/cb912e108c590bb0b8ded55653e63ad47f945362) (committed 2026-07-10 02:49:38+00:00). # Commit Info - Base: (`3.15.0b3+dev`) - [`9fb25cb`](https://www.github.com/python/cpython/commit/9fb25cbd41410fb9bdf230d6242f0358885405ae) (commit date: 2026-07-09 04:15:30+00:00) - Imported: (`3.15.0b3+dev`) - [`cb912e1`](https://www.github.com/python/cpython/commit/cb912e108c590bb0b8ded55653e63ad47f945362) (commit date: 2026-07-10 02:49:38+00:00) # Noteworthy file changes - Native files (1 added): ``` + Modules/_testlimitedcapi/run.c ``` - Low-signal files (5 added) (NEWS.d, docs, .github) Complete list of added/removed files: https://www.internalfb.com/intern/everpaste/?color=0&handle=GFswySKOrRxOrfsEAI7E_EwwpT0Ybr0LAAAz Reviewed By: DinoV Differential Revision: D111395278 fbshipit-source-id: d478faa6c0982e14b26152941f20932c5cb7f279
1 parent ff97c3c commit b9d24cb

42 files changed

Lines changed: 1846 additions & 371 deletions

Some content is hidden

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

Doc/library/tkinter.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,7 +2015,7 @@ Base and mixin classes
20152015

20162016
.. method:: winfo_exists()
20172017

2018-
Return ``1`` if the widget exists, ``0`` otherwise.
2018+
Return true if the widget exists, false otherwise.
20192019

20202020
.. method:: winfo_fpixels(number)
20212021

@@ -2054,7 +2054,7 @@ Base and mixin classes
20542054

20552055
.. method:: winfo_ismapped()
20562056

2057-
Return ``1`` if the widget is currently mapped, ``0`` otherwise.
2057+
Return true if the widget is currently mapped, false otherwise.
20582058

20592059
.. method:: winfo_manager()
20602060

@@ -2185,8 +2185,8 @@ Base and mixin classes
21852185

21862186
.. method:: winfo_viewable()
21872187

2188-
Return ``1`` if the widget and all of its ancestors up through the
2189-
nearest toplevel window are mapped, ``0`` otherwise.
2188+
Return true if the widget and all of its ancestors up through the
2189+
nearest toplevel window are mapped, false otherwise.
21902190

21912191
.. method:: winfo_visual()
21922192

@@ -5591,7 +5591,7 @@ Widget classes
55915591
.. method:: edit_modified(arg=None)
55925592

55935593
If *arg* is omitted, return the current state of the modified flag as
5594-
``0`` or ``1``; the flag is set automatically whenever the text is
5594+
true or false; the flag is set automatically whenever the text is
55955595
inserted or deleted.
55965596
Otherwise set the flag to the boolean *arg*.
55975597

Doc/library/urllib.parse.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,9 @@ task isn't already covered by the URL parsing functions above.
649649

650650
The optional *encoding* and *errors* parameters specify how to deal with
651651
non-ASCII characters, as accepted by the :meth:`str.encode` method.
652-
*encoding* defaults to ``'utf-8'``.
653-
*errors* defaults to ``'strict'``, meaning unsupported characters raise a
652+
Although these parameters default to ``None`` in the function signature,
653+
when processing :class:`str` inputs, *encoding* effectively defaults to ``'utf-8'``
654+
and *errors* to ``'strict'``, meaning unsupported characters raise a
654655
:class:`UnicodeEncodeError`.
655656
*encoding* and *errors* must not be supplied if *string* is a
656657
:class:`bytes`, or a :class:`TypeError` is raised.

Include/cpython/pythonrun.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ PyAPI_FUNC(PyObject *) PyRun_FileExFlags(
4040
PyCompilerFlags *flags);
4141

4242

43+
PyAPI_FUNC(PyObject *) Py_CompileStringFlags(
44+
const char *str,
45+
const char *filename,
46+
int start,
47+
PyCompilerFlags *flags);
4348
PyAPI_FUNC(PyObject *) Py_CompileStringExFlags(
4449
const char *str,
4550
const char *filename, /* decoded from the filesystem encoding */

Include/internal/pycore_pylifecycle.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@ extern int _Py_LegacyLocaleDetected(int warn);
111111
// Export for 'readline' shared extension
112112
PyAPI_FUNC(char*) _Py_SetLocaleFromEnv(int category);
113113

114-
// Export for special main.c string compiling with source tracebacks
115-
int _PyRun_SimpleStringFlagsWithName(const char *command, const char* name, PyCompilerFlags *flags);
116-
117114

118115
/* interpreter config */
119116

Include/internal/pycore_pythonrun.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,18 @@ extern "C" {
88
# error "this header requires Py_BUILD_CORE define"
99
#endif
1010

11-
extern int _PyRun_SimpleFileObject(
11+
extern PyObject* _PyRun_SimpleFile(
1212
FILE *fp,
1313
PyObject *filename,
1414
int closeit,
1515
PyCompilerFlags *flags);
1616

17-
extern int _PyRun_AnyFileObject(
17+
extern PyObject* _PyRun_AnyFile(
1818
FILE *fp,
1919
PyObject *filename,
2020
int closeit,
2121
PyCompilerFlags *flags);
2222

23-
extern int _PyRun_InteractiveLoopObject(
24-
FILE *fp,
25-
PyObject *filename,
26-
PyCompilerFlags *flags);
27-
2823
extern int _PyObject_SupportedAsScript(PyObject *);
2924
extern const char* _Py_SourceAsString(
3025
PyObject *cmd,
@@ -33,12 +28,18 @@ extern const char* _Py_SourceAsString(
3328
PyCompilerFlags *cf,
3429
PyObject **cmd_copy);
3530

36-
extern PyObject * _Py_CompileStringObjectWithModule(
31+
extern PyObject * _Py_CompileString(
3732
const char *str,
3833
PyObject *filename, int start,
3934
PyCompilerFlags *flags, int optimize,
4035
PyObject *module);
4136

37+
// Export for special main.c string compiling with source tracebacks
38+
extern PyObject* _PyRun_SimpleString(
39+
const char *command,
40+
PyObject* name,
41+
PyCompilerFlags *flags);
42+
4243

4344
/* Stack size, in "pointers". This must be large enough, so
4445
* no two calls to check recursion depth are more than this far

Lib/email/utils.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,13 @@ def parsedate_to_datetime(data):
317317
if parsed_date_tz is None:
318318
raise ValueError('Invalid date value or format "%s"' % str(data))
319319
*dtuple, tz = parsed_date_tz
320-
if tz is None:
321-
return datetime.datetime(*dtuple[:6])
322-
return datetime.datetime(*dtuple[:6],
323-
tzinfo=datetime.timezone(datetime.timedelta(seconds=tz)))
320+
try:
321+
if tz is None:
322+
return datetime.datetime(*dtuple[:6])
323+
return datetime.datetime(*dtuple[:6],
324+
tzinfo=datetime.timezone(datetime.timedelta(seconds=tz)))
325+
except OverflowError as exc:
326+
raise ValueError('Invalid date value or format "%s"' % str(data)) from exc
324327

325328

326329
def parseaddr(addr, *, strict=True):

Lib/imaplib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ def select(self, mailbox='INBOX', readonly=False):
899899
if __debug__:
900900
if self.debug >= 1:
901901
self._dump_ur(self.untagged_responses)
902-
raise self.readonly('%s is not writable' % mailbox)
902+
raise self.readonly('%r is not writable' % (mailbox,))
903903
return typ, self.untagged_responses.get('EXISTS', [None])
904904

905905

@@ -1024,7 +1024,7 @@ def uid(self, command, *args):
10241024
"""
10251025
command = command.upper()
10261026
if not command in Commands:
1027-
raise self.error("Unknown IMAP4 UID command: %s" % command)
1027+
raise self.error("Unknown IMAP4 UID command: %r" % (command,))
10281028
if self.state not in Commands[command]:
10291029
raise self.error("command %s illegal in state %s, "
10301030
"only allowed in states %s" %

0 commit comments

Comments
 (0)