GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-122549: Allow to invalidate platform's cached results by picnixz · Pull Request #122547 · python/cpython

Conversation

@picnixz

@picnixz picnixz commented Aug 1, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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

  • Issue: Add platform.invalidate_caches for invalidating cached results #122549

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
picnixz added 5 commits August 1, 2024 11:04
@picnixz
allow to invalidate platform's information caches
85a5629
@picnixz
add test
992b561
@picnixz
add docs
2b89d91
@picnixz
add NEWS
8f87179
@picnixz
add What's New
2d9f328
@bedevere-app bedevere-app Bot mentioned this pull request Aug 1, 2024
platform.node() does not return the latest hostname value #122525
Closed
@bedevere-app bedevere-app Bot added the awaiting review label Aug 1, 2024
@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
@bedevere-app bedevere-app Bot mentioned this pull request Aug 1, 2024
Add platform.invalidate_caches for invalidating cached results #122549
Closed
@picnixz
update issue numbers
8aeccdb
kashav
kashav suggested changes Aug 1, 2024
View reviewed changes

@kashav kashav left a comment

Copy link
Copy Markdown

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/platform.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting core review and removed awaiting review labels Aug 1, 2024
ZeroIntensity
ZeroIntensity reviewed Aug 1, 2024
View reviewed changes
Comment thread Lib/platform.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@picnixz
fix typo
ce3201b
vstinner
vstinner approved these changes Aug 9, 2024
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/platform.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Aug 9, 2024
@picnixz
Merge remote-tracking branch 'upstream/main' into platform-invalidate…
42668a3
…-cache-122549
@picnixz picnixz added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Aug 26, 2024
@bedevere-bot

bedevere-bot commented Aug 26, 2024

Copy link
Copy Markdown

🤖 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

picnixz commented Aug 26, 2024

Copy link
Copy Markdown
Member Author

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)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Aug 26, 2024

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz
Merge branch 'main' into platform-invalidate-cache
4558e85
@vstinner
vstinner enabled auto-merge (squash) November 15, 2024 13:42
@vstinner
vstinner merged commit 612ac28 into python:main Nov 15, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label Nov 15, 2024
@picnixz
picnixz deleted the platform-invalidate-cache branch November 15, 2024 13:55
picnixz
picnixz commented Nov 16, 2024
View reviewed changes
Comment thread Doc/library/platform.rst
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

@picnixz picnixz Nov 16, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vstinner vstinner Nov 18, 2024

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@picnixz picnixz Nov 18, 2024

Copy link
Copy Markdown
Member Author

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
picnixz added a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
@picnixz
pythongh-122549: Add platform.invalidate_caches() (python#122547)
4330cad
Allow to invalidate platform's cached results.
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
@picnixz @ebonnal
pythongh-122549: Add platform.invalidate_caches() (python#122547)
2b73db0
Allow to invalidate platform's cached results.
@hugovk hugovk mentioned this pull request Jan 25, 2025
gh-129294: use winapi to determine win version before invoking cmd.exe #129295
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner approved these changes
@ZeroIntensity ZeroIntensity ZeroIntensity left review comments
+1 more reviewer
@kashav kashav kashav requested changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@picnixz @bedevere-bot @vstinner @kashav @ZeroIntensity
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.