Skip to content

Raise DeprecationWarning for sys._clear_type_cache #129027

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

Closed
tomasr8 opened this issue Jan 19, 2025 · 2 comments
Closed

Raise DeprecationWarning for sys._clear_type_cache #129027

tomasr8 opened this issue Jan 19, 2025 · 2 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@tomasr8
Copy link
Member

tomasr8 commented Jan 19, 2025

Feature or enhancement

Proposal:

sys._clear_type_cache was deprecated in 3.13 in favour of sys._clear_internal_caches, however there is no runtime DeprecationWarning raised. Should we add one? AFAICT, it is not soft-deprecated, so the intent is to eventually remove it.

cc @brandtbucher since you deprecated sys._clear_type_cache in #115152.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

@tomasr8 tomasr8 added the type-feature A feature request or enhancement label Jan 19, 2025
@picnixz picnixz added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Jan 19, 2025
srinivasreddy added a commit to srinivasreddy/cpython that referenced this issue Jan 20, 2025
srinivasreddy added a commit to srinivasreddy/cpython that referenced this issue Jan 20, 2025
srinivasreddy added a commit to srinivasreddy/cpython that referenced this issue Jan 20, 2025
srinivasreddy added a commit to srinivasreddy/cpython that referenced this issue Jan 20, 2025
srinivasreddy added a commit to srinivasreddy/cpython that referenced this issue Jan 21, 2025
srinivasreddy added a commit to srinivasreddy/cpython that referenced this issue Jan 23, 2025
srinivasreddy added a commit to srinivasreddy/cpython that referenced this issue Jan 29, 2025
srinivasreddy added a commit to srinivasreddy/cpython that referenced this issue Feb 7, 2025
@encukou
Copy link
Member

encukou commented Feb 7, 2025

AFAICT, it is not soft-deprecated

As far as I can see, it's tested, documented, and only marked as deprecated in the docs. Isn't that what soft deprecation is?

@tomasr8
Copy link
Member Author

tomasr8 commented Feb 7, 2025

AFAICT, it is not soft-deprecated

As far as I can see, it's tested, documented, and only marked as deprecated in the docs. Isn't that what soft deprecation is?

What I meant is, the docs don't specifically mention that it is soft-deprecated (I don't actually know if this is a requirement, some deprecated items mention soft-deprecation explicitly, does a lack of an explicit mention imply it is not soft-deprecated?). If it were soft-deprecated, we should not be adding a warning.

srinivasreddy added a commit to srinivasreddy/cpython that referenced this issue Feb 17, 2025
hugovk added a commit to srinivasreddy/cpython that referenced this issue Apr 24, 2025
hugovk added a commit that referenced this issue Apr 25, 2025
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@hugovk hugovk closed this as completed Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

4 participants