Skip to content

Use time.monotonic in OrderedDict LRU cache example#150986

Merged
sobolevn merged 1 commit into
python:mainfrom
ilya-nikolaev:docs/collections-ordered-dict-code-example
Jun 5, 2026
Merged

Use time.monotonic in OrderedDict LRU cache example#150986
sobolevn merged 1 commit into
python:mainfrom
ilya-nikolaev:docs/collections-ordered-dict-code-example

Conversation

@ilya-nikolaev
Copy link
Copy Markdown
Contributor

time.time() changed to time.monotonic() (does not depend on NTP or time transfers) that is a more correct way to measure a period of time

@ilya-nikolaev ilya-nikolaev requested a review from rhettinger as a code owner June 5, 2026 21:06
@python-cla-bot
Copy link
Copy Markdown

python-cla-bot Bot commented Jun 5, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community
Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33014095 | 📁 Comparing 63e1256 against main (6544bf4)

  🔍 Preview build  

1 file changed
± library/collections.html

@sobolevn sobolevn added skip issue needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jun 5, 2026
@sobolevn sobolevn merged commit ea4c855 into python:main Jun 5, 2026
48 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Jun 5, 2026
@miss-islington-app
Copy link
Copy Markdown

Thanks @ilya-nikolaev for the PR, and @sobolevn for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented Jun 5, 2026

GH-150991 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 5, 2026
@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented Jun 5, 2026

GH-150992 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jun 5, 2026
@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented Jun 5, 2026

GH-150993 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jun 5, 2026
sobolevn pushed a commit that referenced this pull request Jun 5, 2026
…) (#150991)

Use `time.monotonic` in OrderedDict LRU cache example (GH-150986)
(cherry picked from commit ea4c855)

Co-authored-by: Ilya Nikolaev <65247719+ilya-nikolaev@users.noreply.github.com>
sobolevn pushed a commit that referenced this pull request Jun 5, 2026
…) (#150992)

Use `time.monotonic` in OrderedDict LRU cache example (GH-150986)
(cherry picked from commit ea4c855)

Co-authored-by: Ilya Nikolaev <65247719+ilya-nikolaev@users.noreply.github.com>
sobolevn pushed a commit that referenced this pull request Jun 5, 2026
…) (#150993)

Use `time.monotonic` in OrderedDict LRU cache example (GH-150986)
(cherry picked from commit ea4c855)

Co-authored-by: Ilya Nikolaev <65247719+ilya-nikolaev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants