Skip to content

gh-122549: Allow to invalidate platform's cached results #122547

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

Merged
merged 9 commits into from
Nov 15, 2024

Conversation

picnixz
Copy link
Member

@picnixz picnixz commented Aug 1, 2024

Using a cache invalidation approach is probably better than querying the new results every time. At least, it will not cause any breaking change.


📚 Documentation preview 📚: https://cpython-previews--122547.org.readthedocs.build/

@picnixz picnixz changed the title gh-122525: Allow to invalidate platform's cached results gh-122549: Allow to invalidate platform's cached results Aug 1, 2024
Copy link

@kashav kashav left a comment

Choose a reason for hiding this comment

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

The current implementation doesn’t seem useful to me.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM. The function looks useful when the hostname changes, tests look complete, and the documentation is good enough.

@picnixz picnixz added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Aug 26, 2024
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @picnixz for commit 42668a3 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Aug 26, 2024
@picnixz
Copy link
Member Author

picnixz commented Aug 26, 2024

I just want to be sure that build bots won't be unhappy with this change for whatever reason (we'll get the answer in roughly 8 hours)

@picnixz
Copy link
Member Author

picnixz commented Aug 26, 2024

The USAN failures are known #111178, the refleaks on Fedora are known as well #122136.

@vstinner vstinner enabled auto-merge (squash) November 15, 2024 13:42
@vstinner vstinner merged commit 612ac28 into python:main Nov 15, 2024
36 checks passed
@picnixz picnixz deleted the platform-invalidate-cache branch November 15, 2024 13:55
This is typically useful when the platform's :func:`node` is changed
by an external process and one needs to retrieve the updated value.

.. versionadded:: 3.14
Copy link
Member Author

@picnixz picnixz Nov 16, 2024

Choose a reason for hiding this comment

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

I should have used a versionadded:: next here but at that time, it didn't exist yet. Not sure if this warrants an additional commit though. WDYT @vstinner

Copy link
Member

Choose a reason for hiding this comment

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

next will be replaced with 3.14 anyway, there is no need to replace it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea but sometimes users are confused that the feature is present in the docs but not in the current release. That was the purpose of next

picnixz added a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
Allow to invalidate platform's cached results.
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
Allow to invalidate platform's cached results.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants