-
-
Notifications
You must be signed in to change notification settings - Fork 32k
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
Conversation
There was a problem hiding this 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.
There was a problem hiding this 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.
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) |
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Allow to invalidate platform's cached results.
Allow to invalidate platform's cached results.
Using a cache invalidation approach is probably better than querying the new results every time. At least, it will not cause any breaking change.
platform.invalidate_caches
for invalidating cached results #122549📚 Documentation preview 📚: https://cpython-previews--122547.org.readthedocs.build/