@@ -608,7 +608,7 @@ since it is impossible to detect the termination of alien threads.
608608 timeout occurs.
609609
610610 When the *timeout * argument is present and not ``None ``, it should be a
611- floating-point number specifying a timeout for the operation in seconds
611+ real number specifying a timeout for the operation in seconds
612612 (or fractions thereof). As :meth: `~Thread.join ` always returns ``None ``,
613613 you must call :meth: `~Thread.is_alive ` after :meth: `~Thread.join ` to
614614 decide whether a timeout happened -- if the thread is still alive, the
@@ -632,6 +632,9 @@ since it is impossible to detect the termination of alien threads.
632632
633633 May raise :exc: `PythonFinalizationError `.
634634
635+ .. versionchanged :: next
636+ Accepts any real number as *timeout *, not only integer or float.
637+
635638 .. attribute :: name
636639
637640 A string used for identification purposes only. It has no semantics.
@@ -764,7 +767,7 @@ All methods are executed atomically.
764767 If a call with *blocking * set to ``True `` would block, return ``False ``
765768 immediately; otherwise, set the lock to locked and return ``True ``.
766769
767- When invoked with the floating-point *timeout * argument set to a positive
770+ When invoked with the *timeout * argument set to a positive
768771 value, block for at most the number of seconds specified by *timeout *
769772 and as long as the lock cannot be acquired. A *timeout * argument of ``-1 ``
770773 specifies an unbounded wait. It is forbidden to specify a *timeout *
@@ -783,6 +786,9 @@ All methods are executed atomically.
783786 .. versionchanged :: 3.14
784787 Lock acquisition can now be interrupted by signals on Windows.
785788
789+ .. versionchanged :: next
790+ Accepts any real number as *timeout *, not only integer or float.
791+
786792
787793 .. method :: release()
788794
@@ -863,7 +869,7 @@ call release as many times the lock has been acquired can lead to deadlock.
863869 * If no thread owns the lock, acquire the lock and return immediately.
864870
865871 * If another thread owns the lock, block until we are able to acquire
866- lock, or *timeout *, if set to a positive float value.
872+ lock, or *timeout *, if set to a positive value.
867873
868874 * If the same thread owns the lock, acquire the lock again, and
869875 return immediately. This is the difference between :class: `Lock ` and
@@ -890,6 +896,9 @@ call release as many times the lock has been acquired can lead to deadlock.
890896 .. versionchanged :: 3.2
891897 The *timeout * parameter is new.
892898
899+ .. versionchanged :: next
900+ Accepts any real number as *timeout *, not only integer or float.
901+
893902
894903 .. method :: release()
895904
@@ -1023,7 +1032,7 @@ item to the buffer only needs to wake up one consumer thread.
10231032 occurs. Once awakened or timed out, it re-acquires the lock and returns.
10241033
10251034 When the *timeout * argument is present and not ``None ``, it should be a
1026- floating-point number specifying a timeout for the operation in seconds
1035+ real number specifying a timeout for the operation in seconds
10271036 (or fractions thereof).
10281037
10291038 When the underlying lock is an :class: `RLock `, it is not released using
@@ -1150,6 +1159,9 @@ Semaphores also support the :ref:`context management protocol <with-locks>`.
11501159 .. versionchanged :: 3.2
11511160 The *timeout * parameter is new.
11521161
1162+ .. versionchanged :: next
1163+ Accepts any real number as *timeout *, not only integer or float.
1164+
11531165 .. method :: release(n=1)
11541166
11551167 Release a semaphore, incrementing the internal counter by *n *. When it
@@ -1250,7 +1262,7 @@ method. The :meth:`~Event.wait` method blocks until the flag is true.
12501262 the internal flag did not become true within the given wait time.
12511263
12521264 When the timeout argument is present and not ``None ``, it should be a
1253- floating-point number specifying a timeout for the operation in seconds,
1265+ real number specifying a timeout for the operation in seconds,
12541266 or fractions thereof.
12551267
12561268 .. versionchanged :: 3.1
0 commit comments