Skip to content

gh-145299: Move __cached__ deprecation to its own section#145374

Open
gourijain029-del wants to merge 1 commit intopython:mainfrom
gourijain029-del:gh-145299-fix-cached-deprecation-location
Open

gh-145299: Move __cached__ deprecation to its own section#145374
gourijain029-del wants to merge 1 commit intopython:mainfrom
gourijain029-del:gh-145299-fix-cached-deprecation-location

Conversation

@gourijain029-del
Copy link

@gourijain029-del gourijain029-del commented Feb 28, 2026

The deprecation notice for __cached__ was incorrectly placed under the __file__ attribute documentation, making it confusing for readers.

This PR:

  • Creates a new module.__cached__ section in the datamodel docs
  • Moves the deprecation notice from __file__ to the new __cached__ section
  • Adds a brief description of what __cached__ is

Fixes #145299


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

The __cached__ deprecation notice was under __file__ documentation.
Since __cached__ was removed in 3.15, the deprecation notice is no
longer relevant and has been removed.
@gourijain029-del gourijain029-del force-pushed the gh-145299-fix-cached-deprecation-location branch from 0d0c668 to dc0295c Compare February 28, 2026 23:22

.. versionchanged:: 3.15
``__cached__`` is no longer set.

Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't look like you've moved it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

__cached__ deprecation notice under __file__

2 participants