diff options
author | Bénédikt Tran <10796600+picnixz@users.noreply.github.com> | 2024-11-15 13:52:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-15 13:52:56 (GMT) |
commit | 612ac283b81907d328891b102f5bfafcf62bd833 (patch) | |
tree | 9872082ba62c25e4ed121263857cf08574f38457 /Doc | |
parent | 08f98f4576f95f9ae1a4423d151fce053416f39f (diff) | |
download | cpython-612ac283b81907d328891b102f5bfafcf62bd833.zip cpython-612ac283b81907d328891b102f5bfafcf62bd833.tar.gz cpython-612ac283b81907d328891b102f5bfafcf62bd833.tar.bz2 |
gh-122549: Add platform.invalidate_caches() (#122547)
Allow to invalidate platform's cached results.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/platform.rst | 12 | ||||
-rw-r--r-- | Doc/whatsnew/3.14.rst | 8 |
2 files changed, 20 insertions, 0 deletions
diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst index 1beb3b9..cfe1e7b 100644 --- a/Doc/library/platform.rst +++ b/Doc/library/platform.rst @@ -359,3 +359,15 @@ Android Platform <https://storage.googleapis.com/play_public/supported_devices.html>`__. .. versionadded:: 3.13 + + +Miscellaneous +------------- + +.. function:: invalidate_caches() + + Clear out the internal cache of information, such as the :func:`uname`. + 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 diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index d38188f..6cec611 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -454,6 +454,14 @@ pathlib (Contributed by Barney Gale in :gh:`125413`.) +platform +-------- + +* Add :func:`platform.invalidate_caches` to invalidate the cached results. + + (Contributed by Bénédikt Tran in :gh:`122549`.) + + pdb --- |