Skip to content

Stop defining __cached__ for Python 3.15 - #28476

Merged
ntBre merged 1 commit into
mainfrom
brent/f821-cached-py315
Sep 10, 2026
Merged

ntBre merged 1 commit into
mainfrom
brent/f821-cached-py315

Conversation

@ntBre

@ntBre ntBre commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

This moves __cached__ from the main list of MAGIC_GLOBALS to a version-specific list because it will be removed in 3.15.

Test Plan

A new mdtest for undefined-name (F821), which is just one of the rules affected but the easiest to test.

Summary
--

This moves `__cached__` from the main list of `MAGIC_GLOBALS` to a version-specific list because it
will be [removed](https://docs.python.org/3/reference/datamodel.html#module.__cached__) in 3.15.

Test Plan
--

A new mdtest for `undefined-name` (`F821`), which is just one of the rules affected but the easiest
to test.
@ntBre ntBre added rule Implementing or modifying a lint rule python315 Related to Python 3.15 labels Sep 9, 2026
@ntBre ntBre mentioned this pull request Sep 9, 2026
27 of 32 tasks
@astral-sh-bot

astral-sh-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

ecosystem-analyzer results

No diagnostic changes detected ✅

Full report with detailed diff (timing results)

@ntBre ntBre changed the title [pyflakes] Stop defining __cached__ for Python 3.15 (F821) Stop defining __cached__ for Python 3.15 Sep 9, 2026
@astral-sh-bot

astral-sh-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre
ntBre marked this pull request as ready for review September 9, 2026 21:45
@ntBre
ntBre merged commit 609e184 into main Sep 10, 2026
57 checks passed
@ntBre
ntBre deleted the brent/f821-cached-py315 branch September 10, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python315 Related to Python 3.15 rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants