Skip to content

[3.13] gh-132710: only use stable _uuid.generate_time_safe() to deduce MAC address (GH-132901) #134704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: 3.13
Choose a base branch
from

Conversation

picnixz
Copy link
Member

@picnixz picnixz commented May 26, 2025

(cherry picked from commit 3bffada)


An additional NEWS entry will be needed (I forgot to do it for the other twos, so I'll add a NEWS entry for 3.15 and 3.14 in a separate PR, and when this PR needs to be merged, then I'll add it as well)

…to deduce MAC address (pythonGH-132901)

(cherry picked from commit 3bffada)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@@ -572,22 +572,24 @@ def _netstat_getnode():
try:
import _uuid
_generate_time_safe = getattr(_uuid, "generate_time_safe", None)
_has_stable_extractable_node = _uuid.has_stable_extractable_node
Copy link
Contributor

@zanieb zanieb Jun 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_has_stable_extractable_node = _uuid.has_stable_extractable_node
_has_stable_extractable_node = getattr(_uuid, "has_stable_extractable_node", False)

This failed downstream in astral-sh/python-build-standalone#634, I think you need to use getattr as above.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(though maybe something else weird is going on)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, that's weird. The _uuid module should unconditionally have the attribute.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I thought from reading the patch too. I didn't dig deeper though, since this worked around the failing test.

@picnixz
Copy link
Member Author

picnixz commented Jun 8, 2025

Once this is merged, I'll need to incorporate #135226 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy