Skip to content

NotShareableError Should Inherit from TypeError #132781

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
ericsnowcurrently opened this issue Apr 21, 2025 · 0 comments
Closed

NotShareableError Should Inherit from TypeError #132781

ericsnowcurrently opened this issue Apr 21, 2025 · 0 comments
Assignees
Labels
3.14 new features, bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-subinterpreters type-bug An unexpected behavior, bug, or error

Comments

@ericsnowcurrently
Copy link
Member

ericsnowcurrently commented Apr 21, 2025

Bug report

Bug description:

Shareability is a feature of types, not values, so NotShareableError should be a subclass of TypeError, not ValueError.

CPython versions tested on:

3.14, CPython main branch

Operating systems tested on:

No response

Linked PRs

@ericsnowcurrently ericsnowcurrently added 3.14 new features, bugs and security fixes topic-subinterpreters type-bug An unexpected behavior, bug, or error labels Apr 21, 2025
@ericsnowcurrently ericsnowcurrently self-assigned this Apr 21, 2025
@picnixz picnixz added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Apr 24, 2025
ericsnowcurrently added a commit that referenced this issue Apr 25, 2025
The following are added to the internal C-API:

* _PyErr_FormatV()
* _PyErr_SetModuleNotFoundError()
* _PyXIData_GetNotShareableErrorType()
* _PyXIData_FormatNotShareableError()

We also drop _PyXIData_lookup_context_t and _PyXIData_GetLookupContext().
ericsnowcurrently added a commit that referenced this issue Apr 25, 2025
It was a subclass of ValueError. However, shareability is a feature of types, not values.
@picnixz picnixz closed this as completed Apr 26, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Subinterpreters Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.14 new features, bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-subinterpreters type-bug An unexpected behavior, bug, or error
Projects
Status: Done
Development

No branches or pull requests

2 participants