Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review
  • Loading branch information
sobolevn committed Feb 26, 2024
commit c198931d9ed2959fd0fa0c428f27ec0718d8c17f
10 changes: 5 additions & 5 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -919,16 +919,16 @@ Pending Removal in Python 3.15
in Python 3.15. To create a TypedDict class with 0 fields, use ``class
TD(TypedDict): pass`` or ``TD = TypedDict("TD", {})``.

* :mod:`wave`: Deprecate the ``getmark()``, ``setmark()`` and ``getmarkers()``
methods of the :class:`wave.Wave_read` and :class:`wave.Wave_write` classes.
They will be removed in Python 3.15.
(Contributed by Victor Stinner in :gh:`105096`.)

* :mod:`uuid`: Deprecate some internal protected parts:
Comment thread
sobolevn marked this conversation as resolved.
Outdated
``_has_uuid_generate_time_safe``, ``_netbios_getnode``, ``_ipconfig_getnode``,
and ``_load_system_functions``. They will be removed in Python 3.15.
(Contributed by Nikita Sobolev in :gh:`113308`.)

* :mod:`wave`: Deprecate the ``getmark()``, ``setmark()`` and ``getmarkers()``
methods of the :class:`wave.Wave_read` and :class:`wave.Wave_write` classes.
They will be removed in Python 3.15.
(Contributed by Victor Stinner in :gh:`105096`.)

Pending Removal in Python 3.16
------------------------------

Expand Down
4 changes: 4 additions & 0 deletions Lib/test/test_uuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,10 @@ def mock_generate_time_safe(self, safe_value):
"""
if os.name != 'posix':
self.skipTest('POSIX-only test')
msg = re.escape("'_load_system_functions' is deprecated and "
"slated for removal in Python 3.15")
with self.assertWarnsRegex(DeprecationWarning, msg):
self.uuid._load_system_functions()
f = self.uuid._generate_time_safe
if f is None:
self.skipTest('need uuid._generate_time_safe')
Expand Down
7 changes: 3 additions & 4 deletions Lib/uuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,14 +591,13 @@ def _netbios_getnode():

def __getattr__(attr):
if attr == "_has_uuid_generate_time_safe":
warnings._deprecated("_has_uuid_generate_time_safe", remove=(3, 15))
try:
import _uuid
except ImportError:
_has_uuid_generate_time_safe = None
return None
else:
_has_uuid_generate_time_safe = _uuid.has_uuid_generate_time_safe
warnings._deprecated("_has_uuid_generate_time_safe", remove=(3, 15))
return _has_uuid_generate_time_safe
return _uuid.has_uuid_generate_time_safe
raise AttributeError(f"module {__name__!r} has no attribute {attr!r}")


Expand Down