File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 2
2
Changelog
3
3
=========
4
4
5
+ * Avoid calling deprecated ``uuid._load_system_functions() `` on Python 3.9+.
6
+
7
+ Thanks to Nikita Sobolev for the ping in `CPython Issue #113308 <https://github.com/python/cpython/issues/113308 >`__.
8
+
5
9
2.13.0 (2023-09-19)
6
10
-------------------
7
11
Original file line number Diff line number Diff line change @@ -217,11 +217,6 @@ def _stop(self) -> None:
217
217
uuid_generate_time_attr = "_generate_time_safe"
218
218
uuid_generate_time_patcher = mock .patch .object (uuid , uuid_generate_time_attr , new = None )
219
219
uuid_uuid_create_patcher = mock .patch .object (uuid , "_UuidCreate" , new = None )
220
- # We need to cause the functions to be loaded before we try patch them out,
221
- # which is done by this internal function
222
- uuid_idempotent_load_system_functions = (
223
- uuid ._load_system_functions # type: ignore[attr-defined]
224
- )
225
220
226
221
227
222
class travel :
@@ -237,7 +232,11 @@ def start(self) -> Coordinates:
237
232
_time_machine .patch_if_needed ()
238
233
239
234
if not coordinates_stack :
240
- uuid_idempotent_load_system_functions ()
235
+ if sys .version_info < (3 , 9 ):
236
+ # We need to cause the functions to be loaded before we patch
237
+ # them out, which is done by this internal function before:
238
+ # https://github.com/python/cpython/pull/19948
239
+ uuid ._load_system_functions ()
241
240
uuid_generate_time_patcher .start ()
242
241
uuid_uuid_create_patcher .start ()
243
242
You can’t perform that action at this time.
0 commit comments