Skip to content

Commit 08cf0a5

Browse files
committed
Merge branch 'main' into gh-41872
2 parents f122cc6 + 3291656 commit 08cf0a5

File tree

185 files changed

+1494
-420
lines changed

Some content is hidden

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

185 files changed

+1494
-420
lines changed

Doc/c-api/long.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
657657
Export API
658658
^^^^^^^^^^
659659
660-
.. versionadded:: next
660+
.. versionadded:: 3.14
661661
662662
.. c:struct:: PyLongLayout
663663
@@ -769,7 +769,7 @@ PyLongWriter API
769769
770770
The :c:type:`PyLongWriter` API can be used to import an integer.
771771
772-
.. versionadded:: next
772+
.. versionadded:: 3.14
773773
774774
.. c:struct:: PyLongWriter
775775

Doc/library/asyncio-policy.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ for the current process:
4646

4747
If *policy* is set to ``None``, the default policy is restored.
4848

49+
.. deprecated:: next
50+
The :func:`set_event_loop_policy` function is deprecated and
51+
will be removed in Python 3.16.
52+
4953

5054
.. _asyncio-policy-objects:
5155

Doc/library/ctypes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,7 +1964,7 @@ Utility functions
19641964

19651965
.. availability:: Windows
19661966

1967-
.. versionadded:: next
1967+
.. versionadded:: 3.14
19681968

19691969

19701970
.. function:: cast(obj, type)
@@ -2825,4 +2825,4 @@ Exceptions
28252825

28262826
.. availability:: Windows
28272827

2828-
.. versionadded:: next
2828+
.. versionadded:: 3.14

Doc/library/errno.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ defined by the module. The specific list of defined symbols is available as
617617

618618
Memory page has hardware error.
619619

620-
.. versionadded:: next
620+
.. versionadded:: 3.14
621621

622622

623623
.. data:: EALREADY

Doc/library/select.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ Edge and Level Trigger Polling (epoll) Objects
324324
:const:`EPOLLEXCLUSIVE` was added. It's only supported by Linux Kernel 4.5
325325
or later.
326326

327-
.. versionadded:: next
327+
.. versionadded:: 3.14
328328
:const:`EPOLLWAKEUP` was added. It's only supported by Linux Kernel 3.5
329329
or later.
330330

Doc/library/stdtypes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4153,7 +4153,7 @@ copying.
41534153

41544154
Count the number of occurrences of *value*.
41554155

4156-
.. versionadded:: next
4156+
.. versionadded:: 3.14
41574157

41584158
.. method:: index(value, start=0, stop=sys.maxsize, /)
41594159

@@ -4162,7 +4162,7 @@ copying.
41624162

41634163
Raises a :exc:`ValueError` if *value* cannot be found.
41644164

4165-
.. versionadded:: next
4165+
.. versionadded:: 3.14
41664166

41674167
There are also several readonly attributes available:
41684168

Include/internal/pycore_pyerrors.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,18 @@ PyAPI_FUNC(void) _PyErr_SetString(
130130
PyObject *exception,
131131
const char *string);
132132

133+
/*
134+
* Set an exception with the error message decoded from the current locale
135+
* encoding (LC_CTYPE).
136+
*
137+
* Exceptions occurring in decoding take priority over the desired exception.
138+
*
139+
* Exported for '_ctypes' shared extensions.
140+
*/
141+
PyAPI_FUNC(void) _PyErr_SetLocaleString(
142+
PyObject *exception,
143+
const char *string);
144+
133145
PyAPI_FUNC(PyObject*) _PyErr_Format(
134146
PyThreadState *tstate,
135147
PyObject *exception,

Include/patchlevel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
#define PY_MINOR_VERSION 14
2121
#define PY_MICRO_VERSION 0
2222
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA
23-
#define PY_RELEASE_SERIAL 2
23+
#define PY_RELEASE_SERIAL 3
2424

2525
/* Version as a string */
26-
#define PY_VERSION "3.14.0a2+"
26+
#define PY_VERSION "3.14.0a3+"
2727
/*--end constants--*/
2828

2929
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.

Lib/asyncio/events.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
'AbstractEventLoopPolicy',
99
'AbstractEventLoop', 'AbstractServer',
1010
'Handle', 'TimerHandle',
11-
'get_event_loop_policy', 'set_event_loop_policy',
11+
'get_event_loop_policy',
12+
'_set_event_loop_policy',
13+
'set_event_loop_policy',
1214
'get_event_loop', 'set_event_loop', 'new_event_loop',
1315
'_set_running_loop', 'get_running_loop',
1416
'_get_running_loop',
@@ -21,6 +23,7 @@
2123
import subprocess
2224
import sys
2325
import threading
26+
import warnings
2427

2528
from . import format_helpers
2629

@@ -765,7 +768,7 @@ def get_event_loop_policy():
765768
return _event_loop_policy
766769

767770

768-
def set_event_loop_policy(policy):
771+
def _set_event_loop_policy(policy):
769772
"""Set the current event loop policy.
770773
771774
If policy is None, the default policy is restored."""
@@ -774,6 +777,9 @@ def set_event_loop_policy(policy):
774777
raise TypeError(f"policy must be an instance of AbstractEventLoopPolicy or None, not '{type(policy).__name__}'")
775778
_event_loop_policy = policy
776779

780+
def set_event_loop_policy(policy):
781+
warnings._deprecated('set_event_loop_policy', remove=(3,16))
782+
_set_event_loop_policy(policy)
777783

778784
def get_event_loop():
779785
"""Return an asyncio event loop.

Lib/idlelib/pyshell.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,9 @@ def __init__(self, tkconsole):
424424
def spawn_subprocess(self):
425425
if self.subprocess_arglist is None:
426426
self.subprocess_arglist = self.build_subprocess_arglist()
427-
self.rpcsubproc = subprocess.Popen(self.subprocess_arglist)
427+
# gh-127060: Disable traceback colors
428+
env = dict(os.environ, TERM='dumb')
429+
self.rpcsubproc = subprocess.Popen(self.subprocess_arglist, env=env)
428430

429431
def build_subprocess_arglist(self):
430432
assert (self.port!=0), (

0 commit comments

Comments
 (0)