Skip to content

gh-121028: Soft-deprecate sys.api_version #136463

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

encukou
Copy link
Member

@encukou encukou commented Jul 9, 2025

This copies the note from the corresponding C API.
I added that note in GH-135126.


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

Copy link
Member

@StanFromIreland StanFromIreland left a comment

Choose a reason for hiding this comment

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

Is this really "deprecation" if it is not explicitly said it is? To me, it currently reads as: this serves no purpose, but something (e.g. it may be used) in the future may change.

If this is to be soft-deprecated, then it should it not be stated as so (less soft-), and added to the pending removal in a future version file?

@encukou
Copy link
Member Author

encukou commented Jul 10, 2025

Please see PEP 387, especially the definition of soft deprecation and the part that says “If the expected maintenance overhead and security risk of the deprecated behavior is small [, deprecated API] can stay indefinitely”.

I admit that is not a typical soft-deprecation: it doesn't promise that the API “will not be developed further”. That's intentional: if we ever need an API version number we might as well pick up this one again, so I don't want people to rely on it being constant forever.

Also see typical usage (more in the issue):

kivy/tools/report.py: report.append('Python API      : %s' % sys.api_version)

There's no value in bothering users with deprecation warnings and removals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting core review docs Documentation in the Doc dir skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy