From 1925d53769efc945e817b273ad1d8825275bcd59 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith [Google LLC]" Date: Sat, 13 Apr 2024 01:38:09 +0000 Subject: [PATCH 1/2] gh-113308: Restore `uuid._load_system_functions` for 3.13 The do nothing private ``uuid._load_system_functions()`` function has been restored to appease a PyPI library that calls it to unblock 3.13 testing by others. It now triggers a :exc:`DeprecationWarning` instead. --- .../Library/2024-04-13-01-37-37.gh-issue-113308.6S_qUi.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2024-04-13-01-37-37.gh-issue-113308.6S_qUi.rst diff --git a/Misc/NEWS.d/next/Library/2024-04-13-01-37-37.gh-issue-113308.6S_qUi.rst b/Misc/NEWS.d/next/Library/2024-04-13-01-37-37.gh-issue-113308.6S_qUi.rst new file mode 100644 index 00000000000000..f514ca5ee29fbe --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-04-13-01-37-37.gh-issue-113308.6S_qUi.rst @@ -0,0 +1,3 @@ +The do nothing private ``uuid._load_system_functions()`` function has been +restored to appease a PyPI library that calls it to unblock 3.13 testing by +others. It now triggers a :exc:`DeprecationWarning` instead. From 4c126afeb4967994094d6c7316a27e9a87a0773f Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith [Google LLC]" Date: Sat, 13 Apr 2024 01:46:52 +0000 Subject: [PATCH 2/2] how'd i miss the main edit in the PR branch? --- Lib/uuid.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Lib/uuid.py b/Lib/uuid.py index c286eac38e1ef4..7ab3b4418c33c7 100644 --- a/Lib/uuid.py +++ b/Lib/uuid.py @@ -579,6 +579,14 @@ def _netstat_getnode(): _UuidCreate = None +def _load_system_functions(): + """[DEPRECATED] no-op since Python 3.9.""" + import warnings + warnings.warn("This private function will go away by Python 3.15;" + " it has been a no-op since 3.9.", DeprecationWarning, + stacklevel=2) + + def _unix_getnode(): """Get the hardware address on Unix using the _uuid extension module.""" if _generate_time_safe: