Skip to content

Commit 65558be

Browse files
committed
Merge branch 'main' into grown-up-abcs
2 parents 048f22a + c88dacb commit 65558be

39 files changed

+1383
-1317
lines changed

Doc/library/calendar.rst

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -166,18 +166,13 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
166166
the specified width, representing an empty day. The *weekday* parameter
167167
is unused.
168168

169-
.. method:: formatweek(theweek, w=0, highlight_day=None)
169+
.. method:: formatweek(theweek, w=0)
170170

171171
Return a single week in a string with no newline. If *w* is provided, it
172172
specifies the width of the date columns, which are centered. Depends
173173
on the first weekday as specified in the constructor or set by the
174174
:meth:`setfirstweekday` method.
175175

176-
.. versionchanged:: 3.14
177-
If *highlight_day* is given, this date is highlighted in color.
178-
This can be :ref:`controlled using environment variables
179-
<using-on-controlling-color>`.
180-
181176

182177
.. method:: formatweekday(weekday, width)
183178

@@ -193,19 +188,14 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
193188
settings and are padded to the specified width.
194189

195190

196-
.. method:: formatmonth(theyear, themonth, w=0, l=0, highlight_day=None)
191+
.. method:: formatmonth(theyear, themonth, w=0, l=0)
197192

198193
Return a month's calendar in a multi-line string. If *w* is provided, it
199194
specifies the width of the date columns, which are centered. If *l* is
200195
given, it specifies the number of lines that each week will use. Depends
201196
on the first weekday as specified in the constructor or set by the
202197
:meth:`setfirstweekday` method.
203198

204-
.. versionchanged:: 3.14
205-
If *highlight_day* is given, this date is highlighted in color.
206-
This can be :ref:`controlled using environment variables
207-
<using-on-controlling-color>`.
208-
209199

210200
.. method:: formatmonthname(theyear, themonth, width=0, withyear=True)
211201

@@ -220,7 +210,7 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
220210
Print a month's calendar as returned by :meth:`formatmonth`.
221211

222212

223-
.. method:: formatyear(theyear, w=2, l=1, c=6, m=3, highlight_day=None)
213+
.. method:: formatyear(theyear, w=2, l=1, c=6, m=3)
224214

225215
Return a *m*-column calendar for an entire year as a multi-line string.
226216
Optional parameters *w*, *l*, and *c* are for date column width, lines per
@@ -229,11 +219,6 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
229219
:meth:`setfirstweekday` method. The earliest year for which a calendar
230220
can be generated is platform-dependent.
231221

232-
.. versionchanged:: 3.14
233-
If *highlight_day* is given, this date is highlighted in color.
234-
This can be :ref:`controlled using environment variables
235-
<using-on-controlling-color>`.
236-
237222

238223
.. method:: pryear(theyear, w=2, l=1, c=6, m=3)
239224

Doc/library/ctypes.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,6 +1406,28 @@ the shared library name at development time, and hardcode that into the wrapper
14061406
module instead of using :func:`~ctypes.util.find_library` to locate the library at runtime.
14071407

14081408

1409+
.. _ctypes-listing-loaded-shared-libraries:
1410+
1411+
Listing loaded shared libraries
1412+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1413+
1414+
When writing code that relies on code loaded from shared libraries, it can be
1415+
useful to know which shared libraries have already been loaded into the current
1416+
process.
1417+
1418+
The :mod:`!ctypes.util` module provides the :func:`~ctypes.util.dllist` function,
1419+
which calls the different APIs provided by the various platforms to help determine
1420+
which shared libraries have already been loaded into the current process.
1421+
1422+
The exact output of this function will be system dependent. On most platforms,
1423+
the first entry of this list represents the current process itself, which may
1424+
be an empty string.
1425+
For example, on glibc-based Linux, the return may look like::
1426+
1427+
>>> from ctypes.util import dllist
1428+
>>> dllist()
1429+
['', 'linux-vdso.so.1', '/lib/x86_64-linux-gnu/libm.so.6', '/lib/x86_64-linux-gnu/libc.so.6', ... ]
1430+
14091431
.. _ctypes-loading-shared-libraries:
14101432

14111433
Loading shared libraries
@@ -2083,6 +2105,20 @@ Utility functions
20832105
.. availability:: Windows
20842106

20852107

2108+
.. function:: dllist()
2109+
:module: ctypes.util
2110+
2111+
Try to provide a list of paths of the shared libraries loaded into the current
2112+
process. These paths are not normalized or processed in any way. The function
2113+
can raise :exc:`OSError` if the underlying platform APIs fail.
2114+
The exact functionality is system dependent.
2115+
2116+
On most platforms, the first element of the list represents the current
2117+
executable file. It may be an empty string.
2118+
2119+
.. availability:: Windows, macOS, iOS, glibc, BSD libc, musl
2120+
.. versionadded:: next
2121+
20862122
.. function:: FormatError([code])
20872123

20882124
Returns a textual description of the error code *code*. If no error code is

Doc/library/idle.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _idle:
22

3-
IDLE
4-
====
3+
IDLE --- Python editor and shell
4+
================================
55

66
.. moduleauthor:: Guido van Rossum <[email protected]>
77

@@ -12,6 +12,9 @@ IDLE
1212
single: Python Editor
1313
single: Integrated Development Environment
1414

15+
..
16+
Remember to update Lib/idlelib/help.html with idlelib.help.copy_source() when modifying this file.
17+
1518
--------------
1619

1720
IDLE is Python's Integrated Development and Learning Environment.
@@ -971,8 +974,8 @@ information. The only current default extension is zzdummy, an example
971974
also used for testing.
972975

973976

974-
idlelib
975-
-------
977+
idlelib --- implementation of IDLE application
978+
----------------------------------------------
976979

977980
.. module:: idlelib
978981
:synopsis: Implementation package for the IDLE shell/editor.

Doc/library/socketserver.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,11 @@ Server Objects
266266

267267
.. attribute:: address_family
268268

269-
The family of protocols to which the server's socket belongs.
270-
Common examples are :const:`socket.AF_INET` and :const:`socket.AF_UNIX`.
269+
The family of protocols to which the server's socket belongs. Common
270+
examples are :const:`socket.AF_INET`, :const:`socket.AF_INET6`, and
271+
:const:`socket.AF_UNIX`. Subclass the TCP or UDP server classes in this
272+
module with class attribute ``address_family = AF_INET6`` set if you
273+
want IPv6 server classes.
271274

272275

273276
.. attribute:: RequestHandlerClass

Doc/whatsnew/3.14.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,13 @@ For further information on how to build Python, see
235235
This is not to be confused with `tail call optimization`__ of Python
236236
functions, which is currently not implemented in CPython.
237237

238+
This new interpreter type is an internal implementation detail of the CPython
239+
interpreter. It doesn't change the visible behavior of Python programs at
240+
all. It can improve their performance, but doesn't change anything else.
241+
238242
__ https://en.wikipedia.org/wiki/Tail_call
239243

240-
(Contributed by Ken Jin in :gh:`128718`, with ideas on how to implement this
244+
(Contributed by Ken Jin in :gh:`128563`, with ideas on how to implement this
241245
in CPython by Mark Shannon, Garrett Gu, Haoran Xu, and Josh Haberman.)
242246

243247

@@ -389,6 +393,9 @@ ctypes
389393
complex C types.
390394
(Contributed by Sergey B Kirpichev in :gh:`61103`).
391395

396+
* Add :func:`ctypes.util.dllist` for listing the shared libraries
397+
loaded by the current process.
398+
(Contributed by Brian Ward in :gh:`119349`.)
392399

393400
datetime
394401
--------
@@ -925,6 +932,14 @@ Deprecated
925932
write new code. The :mod:`subprocess` module is recommended instead.
926933
(Contributed by Victor Stinner in :gh:`120743`.)
927934

935+
* :mod:`pdb`:
936+
The undocumented ``pdb.Pdb.curframe_locals`` attribtue is now a deprecated
937+
read-only property. The low overhead dynamic frame locals access added in
938+
Python 3.13 by PEP 667 means the frame locals cache reference previously
939+
stored in this attribute is no longer needed. Derived debuggers should access
940+
``pdb.Pdb.curframe.f_locals`` directly in Python 3.13 and later versions.
941+
(Contributed by Tian Gao in :gh:`124369` and :gh:`125951`.)
942+
928943
* :mod:`symtable`:
929944
Deprecate :meth:`symtable.Class.get_methods` due to the lack of interest.
930945
(Contributed by Bénédikt Tran in :gh:`119698`.)

Lib/asyncio/tasks.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,23 +245,23 @@ def uncancel(self):
245245
return self._num_cancels_requested
246246

247247
def __eager_start(self):
248-
prev_task = _swap_current_task(self._loop, self)
248+
prev_task = _py_swap_current_task(self._loop, self)
249249
try:
250-
_register_eager_task(self)
250+
_py_register_eager_task(self)
251251
try:
252252
self._context.run(self.__step_run_and_handle_result, None)
253253
finally:
254-
_unregister_eager_task(self)
254+
_py_unregister_eager_task(self)
255255
finally:
256256
try:
257-
curtask = _swap_current_task(self._loop, prev_task)
257+
curtask = _py_swap_current_task(self._loop, prev_task)
258258
assert curtask is self
259259
finally:
260260
if self.done():
261261
self._coro = None
262262
self = None # Needed to break cycles when an exception occurs.
263263
else:
264-
_register_task(self)
264+
_py_register_task(self)
265265

266266
def __step(self, exc=None):
267267
if self.done():
@@ -273,11 +273,11 @@ def __step(self, exc=None):
273273
self._must_cancel = False
274274
self._fut_waiter = None
275275

276-
_enter_task(self._loop, self)
276+
_py_enter_task(self._loop, self)
277277
try:
278278
self.__step_run_and_handle_result(exc)
279279
finally:
280-
_leave_task(self._loop, self)
280+
_py_leave_task(self._loop, self)
281281
self = None # Needed to break cycles when an exception occurs.
282282

283283
def __step_run_and_handle_result(self, exc):

0 commit comments

Comments
 (0)