← 返回首页
Deprecate creating immutable types with mutable bases · Issue #95388 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Deprecate creating immutable types with mutable bases #95388

New issue
New issue

Description

The C API currently allows creating immutable types from mutable bases. I can't find a case where this breaks things, but it's very hard to think about (and easy to skip thinking about) how this edge case affects things like cache invalidation.

I also don't immediately see a use case for this, so I think it's best to deprecate it, wait for 2 releases to see if anyone needs it, and remove it.

Metadata

Metadata

Assignees

Labels

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

  • Open in GitHub Copilot app

Footer

© 2026 GitHub, Inc.