Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-101100: Fix datetime reference warnings#114661

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
serhiy-storchaka merged 12 commits intopython:mainfromsmontanaro:doc-fix-dt
Jan 29, 2024

Conversation

smontanaro
Copy link
Contributor

@smontanarosmontanaro commentedJan 27, 2024
edited by github-actionsbot
Loading

Fixed dangling references.datetime,date, andtime classes have many method names in common (not too surprising). Where it didn't seem to make a difference, I changed the reference to thedatetime version of the method.


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

@smontanaro
Copy link
ContributorAuthor

@serhiy-storchaka I applied your suggestions, then got a bit carried away. It seems to me that if :attr:!tm_isdst is appropriate when several references are close together, then self-referential module references should be suppressed in most places. Accordingly, I replaced instances of

:mod:`datetime`

with

:mod:`!datetime`

to suppress the link to the documentation the user is currently viewing. If there's a good reason to retain these links, let me know and I'll undo that part of the change.

@smontanaro
Copy link
ContributorAuthor

I've responded to all recent comments.

smontanaroand others added2 commitsJanuary 28, 2024 10:25
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@serhiy-storchaka
Copy link
Member

Many references`attr<datetime.attr>` can be shortened to`~.datetime.attr`. Or, if you prefer the long form, they should be written as`~datetime.datetime.attr` or`attr <datetime.datetime.attr>`. Currently they only work by accident and can be broken after adding new global in thedatetime module.

smontanaroand others added2 commitsJanuary 29, 2024 07:13
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM. 😌

@smontanaro
Copy link
ContributorAuthor

Thanks. Feel free to merge. (I don't have -- or want -- check-in privilege.)

@serhiy-storchakaserhiy-storchaka added docsDocumentation in the Doc dir skip news labelsJan 29, 2024
@serhiy-storchakaserhiy-storchaka added needs backport to 3.11only security fixes needs backport to 3.12only security fixes labelsJan 29, 2024
@serhiy-storchakaserhiy-storchaka merged commite8b8f5e intopython:mainJan 29, 2024
@miss-islington-app
Copy link

Thanks@smontanaro for the PR, and@serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJan 29, 2024
(cherry picked from commite8b8f5e)Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@miss-islington-app
Copy link

Sorry,@smontanaro and@serhiy-storchaka, I could not cleanly backport this to3.11 due to a conflict.
Please backport usingcherry_picker on command line.

cherry_picker e8b8f5e9c2da6a436360ce648061c90bdfcba863 3.11

@bedevere-app
Copy link

GH-114716 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelJan 29, 2024
@serhiy-storchaka
Copy link
Member

Thank you@smontanaro. It was a complicated issue.

The documentation can still be refined: there are paragraphs with repeated links. But this is a different issue.

@serhiy-storchaka
Copy link
Member

Please look also at#114717.

serhiy-storchaka added a commit that referenced this pull requestJan 29, 2024
)(cherry picked from commite8b8f5e)Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull requestJan 29, 2024
)(cherry picked from commite8b8f5e)Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link

GH-114718 is a backport of this pull request to the3.11 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.11only security fixes labelJan 29, 2024
serhiy-storchaka added a commit that referenced this pull requestJan 29, 2024
)(cherry picked from commite8b8f5e)Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
aisk pushed a commit to aisk/cpython that referenced this pull requestFeb 11, 2024
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@serhiy-storchakaserhiy-storchakaserhiy-storchaka approved these changes

@pgansslepganssleAwaiting requested review from pgansslepganssle is a code owner

@abalkinabalkinAwaiting requested review from abalkinabalkin is a code owner

Labels
docsDocumentation in the Doc dirskip news
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@smontanaro@serhiy-storchaka

[8]ページ先頭

©2009-2025 Movatter.jp