Skip to content

[mypyc] Raise AttributeError also for non-refcounted types #11940

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

Merged
merged 2 commits into from
Jan 11, 2022

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Jan 8, 2022

Previously we only raised it for refcounted types when an attribute was
undefined, potentially resulting in errors like this:

SystemError: initialization of m failed without raising an exception

Unfortunately, this slows down the richards benchmark by about 15%. We
can get the lost performance back once we have support for always
defined attributes, at the latest.

…butes

Previously we only raised it for refcounted types, potentially resulting in
errors like this:

```
SystemError: initialization of m failed without raising an exception
```

Unfortunately, this slows down the richards benchmark by about 15%. We
can get the lost performance back once we have support for always
defined attributes, at the latest.
@JukkaL JukkaL requested a review from 97littleleaf11 January 8, 2022 11:54
@jhance
Copy link
Collaborator

jhance commented Jan 11, 2022

LGTM

@JukkaL JukkaL merged commit 6c1eb5b into master Jan 11, 2022
@JukkaL JukkaL deleted the mypyc-getattr-undefined branch January 11, 2022 16:27
tushar-deepsource pushed a commit to DeepSourceCorp/mypy that referenced this pull request Jan 20, 2022
)

Previously we only raised it for refcounted types, potentially resulting in
errors like this:

```
SystemError: initialization of m failed without raising an exception
```

Unfortunately, this slows down the richards benchmark by about 15%. We
can get the lost performance back once we have support for always
defined attributes, at the latest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants