Skip to content

Commit ec9f367

Browse files
Merge branch 'main' into update-libexpat
2 parents 4582d42 + 89b5571 commit ec9f367

File tree

87 files changed

+2792
-727
lines changed

Some content is hidden

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

87 files changed

+2792
-727
lines changed

.github/workflows/jit.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,34 @@ jobs:
134134
make all --jobs 4
135135
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
136136
137+
jit-with-disabled-gil:
138+
name: Free-Threaded (Debug)
139+
needs: interpreter
140+
runs-on: ubuntu-24.04
141+
timeout-minutes: 90
142+
strategy:
143+
fail-fast: false
144+
matrix:
145+
llvm:
146+
- 19
147+
steps:
148+
- uses: actions/checkout@v4
149+
with:
150+
persist-credentials: false
151+
- uses: actions/setup-python@v5
152+
with:
153+
python-version: '3.11'
154+
- name: Build with JIT enabled and GIL disabled
155+
run: |
156+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
157+
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
158+
./configure --enable-experimental-jit --with-pydebug --disable-gil
159+
make all --jobs 4
160+
- name: Run tests
161+
run: |
162+
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
163+
continue-on-error: true
164+
137165
no-opt-jit:
138166
name: JIT without optimizations (Debug)
139167
needs: interpreter
@@ -160,31 +188,3 @@ jobs:
160188
- name: Run tests without optimizations
161189
run: |
162190
PYTHON_UOPS_OPTIMIZE=0 ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
163-
164-
# XXX: GH-133171
165-
# jit-with-disabled-gil:
166-
# name: Free-Threaded (Debug)
167-
# needs: interpreter
168-
# runs-on: ubuntu-24.04
169-
# timeout-minutes: 90
170-
# strategy:
171-
# fail-fast: false
172-
# matrix:
173-
# llvm:
174-
# - 19
175-
# steps:
176-
# - uses: actions/checkout@v4
177-
# with:
178-
# persist-credentials: false
179-
# - uses: actions/setup-python@v5
180-
# with:
181-
# python-version: '3.11'
182-
# - name: Build with JIT enabled and GIL disabled
183-
# run: |
184-
# sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
185-
# export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
186-
# ./configure --enable-experimental-jit --with-pydebug --disable-gil
187-
# make all --jobs 4
188-
# - name: Run tests
189-
# run: |
190-
# ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3

Doc/c-api/weakref.rst

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -64,30 +64,6 @@ as much as it can.
6464
.. versionadded:: 3.13
6565
6666
67-
.. c:function:: PyObject* PyWeakref_GetObject(PyObject *ref)
68-
69-
Return a :term:`borrowed reference` to the referenced object from a weak
70-
reference, *ref*. If the referent is no longer live, returns ``Py_None``.
71-
72-
.. note::
73-
74-
This function returns a :term:`borrowed reference` to the referenced object.
75-
This means that you should always call :c:func:`Py_INCREF` on the object
76-
except when it cannot be destroyed before the last usage of the borrowed
77-
reference.
78-
79-
.. deprecated-removed:: 3.13 3.15
80-
Use :c:func:`PyWeakref_GetRef` instead.
81-
82-
83-
.. c:function:: PyObject* PyWeakref_GET_OBJECT(PyObject *ref)
84-
85-
Similar to :c:func:`PyWeakref_GetObject`, but does no error checking.
86-
87-
.. deprecated-removed:: 3.13 3.15
88-
Use :c:func:`PyWeakref_GetRef` instead.
89-
90-
9167
.. c:function:: int PyWeakref_IsDead(PyObject *ref)
9268
9369
Test if the weak reference *ref* is dead. Returns 1 if the reference is

Doc/data/refcounts.dat

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2947,12 +2947,6 @@ PyWeakref_CheckProxy:PyObject*:ob:0:
29472947
PyWeakref_CheckRef:int:::
29482948
PyWeakref_CheckRef:PyObject*:ob:0:
29492949

2950-
PyWeakref_GET_OBJECT:PyObject*::0:
2951-
PyWeakref_GET_OBJECT:PyObject*:ref:0:
2952-
2953-
PyWeakref_GetObject:PyObject*::0:
2954-
PyWeakref_GetObject:PyObject*:ref:0:
2955-
29562950
PyWeakref_GetRef:int:::
29572951
PyWeakref_GetRef:PyObject*:ref:0:
29582952
PyWeakref_GetRef:PyObject**:pobj:+1:

Doc/data/stable_abi.dat

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Doc/deprecations/c-api-pending-removal-in-3.15.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Pending removal in Python 3.15
33

44
* The :c:func:`!PyImport_ImportModuleNoBlock`:
55
Use :c:func:`PyImport_ImportModule` instead.
6-
* :c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`:
6+
* :c:func:`!PyWeakref_GetObject` and :c:func:`!PyWeakref_GET_OBJECT`:
77
Use :c:func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project
88
<https://github.com/python/pythoncapi-compat/>`__ can be used to get
99
:c:func:`PyWeakref_GetRef` on Python 3.12 and older.

Doc/howto/free-threading-extensions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ that return :term:`strong references <strong reference>`.
173173
+-----------------------------------+-----------------------------------+
174174
| :c:func:`PyDict_Next` | none (see :ref:`PyDict_Next`) |
175175
+-----------------------------------+-----------------------------------+
176-
| :c:func:`PyWeakref_GetObject` | :c:func:`PyWeakref_GetRef` |
176+
| :c:func:`!PyWeakref_GetObject` | :c:func:`PyWeakref_GetRef` |
177177
+-----------------------------------+-----------------------------------+
178-
| :c:func:`PyWeakref_GET_OBJECT` | :c:func:`PyWeakref_GetRef` |
178+
| :c:func:`!PyWeakref_GET_OBJECT` | :c:func:`PyWeakref_GetRef` |
179179
+-----------------------------------+-----------------------------------+
180180
| :c:func:`PyImport_AddModule` | :c:func:`PyImport_AddModuleRef` |
181181
+-----------------------------------+-----------------------------------+

Doc/library/codecs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ particular, the following variants typically exist:
13391339
+-----------------+--------------------------------+--------------------------------+
13401340
| utf_8 | U8, UTF, utf8, cp65001 | all languages |
13411341
+-----------------+--------------------------------+--------------------------------+
1342-
| utf_8_sig | | all languages |
1342+
| utf_8_sig | utf8-sig | all languages |
13431343
+-----------------+--------------------------------+--------------------------------+
13441344

13451345
.. versionchanged:: 3.4

Doc/library/datetime.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,9 @@ Other constructors, all class methods:
535535
:c:func:`localtime` function. Raise :exc:`OSError` instead of
536536
:exc:`ValueError` on :c:func:`localtime` failure.
537537

538+
.. versionchanged:: next
539+
Accepts any real number as *timestamp*, not only integer or float.
540+
538541

539542
.. classmethod:: date.fromordinal(ordinal)
540543

@@ -1020,6 +1023,10 @@ Other constructors, all class methods:
10201023
.. versionchanged:: 3.6
10211024
:meth:`fromtimestamp` may return instances with :attr:`.fold` set to 1.
10221025

1026+
.. versionchanged:: next
1027+
Accepts any real number as *timestamp*, not only integer or float.
1028+
1029+
10231030
.. classmethod:: datetime.utcfromtimestamp(timestamp)
10241031

10251032
Return the UTC :class:`.datetime` corresponding to the POSIX timestamp, with
@@ -1060,6 +1067,9 @@ Other constructors, all class methods:
10601067

10611068
Use :meth:`datetime.fromtimestamp` with :const:`UTC` instead.
10621069

1070+
.. versionchanged:: next
1071+
Accepts any real number as *timestamp*, not only integer or float.
1072+
10631073

10641074
.. classmethod:: datetime.fromordinal(ordinal)
10651075

Doc/library/os.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3618,7 +3618,8 @@ features:
36183618
where each member is an int expressing nanoseconds.
36193619
- If *times* is not ``None``,
36203620
it must be a 2-tuple of the form ``(atime, mtime)``
3621-
where each member is an int or float expressing seconds.
3621+
where each member is a real number expressing seconds,
3622+
rounded down to nanoseconds.
36223623
- If *times* is ``None`` and *ns* is unspecified,
36233624
this is equivalent to specifying ``ns=(atime_ns, mtime_ns)``
36243625
where both times are the current time.
@@ -3645,6 +3646,9 @@ features:
36453646
.. versionchanged:: 3.6
36463647
Accepts a :term:`path-like object`.
36473648

3649+
.. versionchanged:: next
3650+
Accepts any real numbers as *times*, not only integers or floats.
3651+
36483652

36493653
.. function:: walk(top, topdown=True, onerror=None, followlinks=False)
36503654

@@ -4050,7 +4054,7 @@ Naturally, they are all only available on Linux.
40504054
the timer will fire when the timer's clock
40514055
(set by *clockid* in :func:`timerfd_create`) reaches *initial* seconds.
40524056

4053-
The timer's interval is set by the *interval* :py:class:`float`.
4057+
The timer's interval is set by the *interval* real number.
40544058
If *interval* is zero, the timer only fires once, on the initial expiration.
40554059
If *interval* is greater than zero, the timer fires every time *interval*
40564060
seconds have elapsed since the previous expiration.

Doc/library/select.rst

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,9 @@ The module defines the following:
129129

130130
Empty iterables are allowed, but acceptance of three empty iterables is
131131
platform-dependent. (It is known to work on Unix but not on Windows.) The
132-
optional *timeout* argument specifies a time-out as a floating-point number
133-
in seconds. When the *timeout* argument is omitted the function blocks until
132+
optional *timeout* argument specifies a time-out in seconds; it may be
133+
a non-integer to specify fractions of seconds.
134+
When the *timeout* argument is omitted the function blocks until
134135
at least one file descriptor is ready. A time-out value of zero specifies a
135136
poll and never blocks.
136137

@@ -164,6 +165,9 @@ The module defines the following:
164165
:pep:`475` for the rationale), instead of raising
165166
:exc:`InterruptedError`.
166167

168+
.. versionchanged:: next
169+
Accepts any real number as *timeout*, not only integer or float.
170+
167171

168172
.. data:: PIPE_BUF
169173

@@ -270,6 +274,9 @@ object.
270274
:pep:`475` for the rationale), instead of raising
271275
:exc:`InterruptedError`.
272276

277+
.. versionchanged:: next
278+
Accepts any real number as *timeout*, not only integer or float.
279+
273280

274281
.. _epoll-objects:
275282

@@ -368,14 +375,19 @@ Edge and Level Trigger Polling (epoll) Objects
368375

369376
.. method:: epoll.poll(timeout=None, maxevents=-1)
370377

371-
Wait for events. timeout in seconds (float)
378+
Wait for events.
379+
If *timeout* is given, it specifies the length of time in seconds
380+
(may be non-integer) which the system will wait for events before returning.
372381

373382
.. versionchanged:: 3.5
374383
The function is now retried with a recomputed timeout when interrupted by
375384
a signal, except if the signal handler raises an exception (see
376385
:pep:`475` for the rationale), instead of raising
377386
:exc:`InterruptedError`.
378387

388+
.. versionchanged:: next
389+
Accepts any real number as *timeout*, not only integer or float.
390+
379391

380392
.. _poll-objects:
381393

@@ -464,6 +476,9 @@ linearly scanned again. :c:func:`!select` is *O*\ (*highest file descriptor*), w
464476
:pep:`475` for the rationale), instead of raising
465477
:exc:`InterruptedError`.
466478

479+
.. versionchanged:: next
480+
Accepts any real number as *timeout*, not only integer or float.
481+
467482

468483
.. _kqueue-objects:
469484

@@ -496,7 +511,7 @@ Kqueue Objects
496511

497512
- changelist must be an iterable of kevent objects or ``None``
498513
- max_events must be 0 or a positive integer
499-
- timeout in seconds (floats possible); the default is ``None``,
514+
- timeout in seconds (non-integers are possible); the default is ``None``,
500515
to wait forever
501516

502517
.. versionchanged:: 3.5
@@ -505,6 +520,9 @@ Kqueue Objects
505520
:pep:`475` for the rationale), instead of raising
506521
:exc:`InterruptedError`.
507522

523+
.. versionchanged:: next
524+
Accepts any real number as *timeout*, not only integer or float.
525+
508526

509527
.. _kevent-objects:
510528

0 commit comments

Comments
 (0)