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-121277: Raise nice error onnext as second argument to deprecated-removed#124623

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
encukou merged 1 commit intopython:mainfromencukou:deprecated-removed-next
Sep 27, 2024

Conversation

encukou
Copy link
Member

@encukouencukou commentedSep 26, 2024
edited by github-actionsbot
Loading

Usingnext as the second argument doesn't make sense, but users should get a nicer message thanValueError: invalid literal for int() -- especially since Sphinx hides the traceback by default.


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

Copy link
Member

@ezio-melottiezio-melotti left a comment

Choose a reason for hiding this comment

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

I left a suggestion in case you want to be more explicit, but otherwise your version works too.

Comment on lines +291 to +293
if version_removed == 'next':
raise ValueError(
'deprecated-removed:: second argument cannot be `next`')
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ifversion_removed=='next':
raiseValueError(
'deprecated-removed:: second argument cannot be `next`')
ifversion_removed=='next':
raiseValueError(
'deprecated-removed:: second argument should be the version in which '
'the API will be removed, and cannot be `next`')

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Thanks for the suggestion! But I do think it's too long, and I hope anyone who addsdeprecated-removed:: already knows what the args are. If they need this error to find that out, something's very wrong :)

ezio-melotti reacted with thumbs up emoji
@encukouencukou merged commite349f73 intopython:mainSep 27, 2024
28 checks passed
@encukouencukou deleted the deprecated-removed-next branchSeptember 27, 2024 23:02
encukou added a commit to encukou/cpython that referenced this pull requestSep 27, 2024
encukou added a commit that referenced this pull requestOct 25, 2024
…124718)*gh-121277: Allow `.. versionadded:: next` in docs (GH-121278)Make `versionchanged:: next`` expand to current (unreleased) version.When a new CPython release is cut, the release manager will replaceall such occurences of "next" with the just-released version.(See the issue for release-tools and devguide PRs.)Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>(cherry picked from commit7d24ea9)*gh-121277: Raise nice error on `next` as second argument to deprecated-removed (GH-124623)(cherry-picked frome349f73)
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestOct 25, 2024
…nGH-121278) (pythonGH-124718)*pythongh-121277: Allow `.. versionadded:: next` in docs (pythonGH-121278)Make `versionchanged:: next`` expand to current (unreleased) version.When a new CPython release is cut, the release manager will replaceall such occurences of "next" with the just-released version.(See the issue for release-tools and devguide PRs.)Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>(cherry picked from commit7d24ea9)*pythongh-121277: Raise nice error on `next` as second argument to deprecated-removed (pythonGH-124623)(cherry-picked frome349f73)(cherry picked from commitdba992b)Co-authored-by: Petr Viktorin <encukou@gmail.com>
encukou added a commit that referenced this pull requestOct 28, 2024
…H-125980)Make `versionchanged:: next`` expand to current (unreleased) version.When a new CPython release is cut, the release manager will replaceall such occurences of "next" with the just-released version.(See the issue for release-tools and devguide PRs.)(cherry picked from commit7d24ea9)Also backports a minor fix-up:gh-121277: Raise nice error on `next` as second argument to deprecated-removed (GH-124623)(cherry-picked from commite349f73)Co-authored-by: Petr Viktorin <encukou@gmail.com>
encukou added a commit to encukou/cpython that referenced this pull requestDec 11, 2024
…nGH-121278) (python#124718)Make `versionchanged:: next`` expand to current (unreleased) version.When a new CPython release is cut, the release manager will replaceall such occurences of "next" with the just-released version.(See the issue for release-tools and devguide PRs.)Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>(cherry picked from commit7d24ea9)pythongh-121277: Raise nice error on `next` as second argument to deprecated-removed (pythonGH-124623)(cherry-picked frome349f73)
pablogsal pushed a commit that referenced this pull requestDec 11, 2024
…124718) (#127827)* [3.11]gh-121277: Allow `.. versionadded:: next` in docs (GH-121278) (#124718)Make `versionchanged:: next`` expand to current (unreleased) version.When a new CPython release is cut, the release manager will replaceall such occurences of "next" with the just-released version.(See the issue for release-tools and devguide PRs.)Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>(cherry picked from commit7d24ea9)gh-121277: Raise nice error on `next` as second argument to deprecated-removed (GH-124623)(cherry-picked frome349f73)* Import VersionChangesphinx.domains.changeset.VersionChange exists at least since Sphinx 2.1,according to:https://www.sphinx-doc.org/en/master/extdev/deprecated.html* Get config from env* Use version, not arguments directly
encukou added a commit to encukou/cpython that referenced this pull requestDec 12, 2024
…H-121278)Make `versionchanged:: next`` expand to current (unreleased) version.When a new CPython release is cut, the release manager will replaceall such occurences of "next" with the just-released version.(See the issue for release-tools and devguide PRs.)Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>(cherry picked from commit7d24ea9)pythongh-121277: Raise nice error on `next` as second argument to deprecated-removed (pythonGH-124623)(cherry-picked frome349f73)Updates for 3.10(cherry-picked from 3.11:f0895aa)* Use version, not arguments directly
encukou added a commit to encukou/cpython that referenced this pull requestDec 12, 2024
…H-121278)Make `versionchanged:: next`` expand to current (unreleased) version.When a new CPython release is cut, the release manager will replaceall such occurences of "next" with the just-released version.(See the issue for release-tools and devguide PRs.)Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>(cherry picked from commit7d24ea9)pythongh-121277: Raise nice error on `next` as second argument to deprecated-removed (pythonGH-124623)(cherry-picked frome349f73)Updates for 3.10(cherry-picked from 3.11:f0895aa)* Use version, not arguments directly
pablogsal pushed a commit that referenced this pull requestDec 13, 2024
…127867)Make `versionchanged:: next`` expand to current (unreleased) version.When a new CPython release is cut, the release manager will replaceall such occurences of "next" with the just-released version.(See the issue for release-tools and devguide PRs.)Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>(cherry picked from commit7d24ea9)gh-121277: Raise nice error on `next` as second argument to deprecated-removed (GH-124623)(cherry-picked frome349f73)Updates for 3.10(cherry-picked from 3.11:f0895aa)* Use version, not arguments directly
encukou added a commit to encukou/cpython that referenced this pull requestDec 20, 2024
…-121278) (pythonGH-127867)Make `versionchanged:: next`` expand to current (unreleased) version.When a new CPython release is cut, the release manager will replaceall such occurences of "next" with the just-released version.(See the issue for release-tools and devguide PRs.)Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>(cherry picked from commit7d24ea9)pythongh-121277: Raise nice error on `next` as second argument to deprecated-removed (pythonGH-124623)(cherry-picked frome349f73)Updates for 3.9(cherry-picked from 3.11:f0895aa)(cherry-picked from 3.10:8773554)* Use version, not arguments directly
ambv pushed a commit that referenced this pull requestJan 23, 2025
…28117)Make `versionchanged:: next`` expand to current (unreleased) version.When a new CPython release is cut, the release manager will replaceall such occurences of "next" with the just-released version.(See the issue for release-tools and devguide PRs.)Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>(cherry picked from commit7d24ea9)gh-121277: Raise nice error on `next` as second argument to deprecated-removed (GH-124623)(cherry-picked frome349f73)(cherry-picked from 3.11:f0895aa)(cherry-picked from 3.10:8773554)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ezio-melottiezio-melottiezio-melotti approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@encukou@ezio-melotti

[8]ページ先頭

©2009-2025 Movatter.jp