← 返回首页
`uuid` has a bunch of deprecated functions: let's decide what to do with them · Issue #113308 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

uuid has a bunch of deprecated functions: let's decide what to do with them #113308

New issue
New issue

Description

Feature or enhancement

uuid.py has several protected deprecated functions which are no longer in use:

cpython/Lib/uuid.py

Lines 591 to 594 in 4afa7be

def _load_system_functions():
"""[DEPRECATED] Platform-specific functions loaded at import time"""

cpython/Lib/uuid.py

Lines 567 to 575 in 4afa7be

def _ipconfig_getnode():
"""[DEPRECATED] Get the hardware address on Windows."""
# bpo-40501: UuidCreateSequential() is now the only supported approach
return _windll_getnode()
def _netbios_getnode():
"""[DEPRECATED] Get the hardware address on Windows."""
# bpo-40501: UuidCreateSequential() is now the only supported approach
return _windll_getnode()

And one unused module-level var:

_has_uuid_generate_time_safe = _uuid.has_uuid_generate_time_safe

The problem is that they were not deprecated with a warning. Only with docs.
But, right now they are deprecated since 2020.

This has a big history:

Some projects in the wild use _load_system_functions, despite the fact it is deprecated and was never documented and always was protected.

Examples:

So, what should we do?

  1. Add a proper warning, schedule it for removal in two versions
  2. Just remove them

I think that 1. is safer.
I would like to work on it after the decision is made.

Linked PRs

Metadata

Metadata

Assignees

Labels

stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

  • Open in GitHub Copilot app

Footer

© 2026 GitHub, Inc.