Skip to content
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

Marks view.* extension types as imported #3413

Merged
merged 2 commits into from Mar 24, 2020

Conversation

da-woods
Copy link
Contributor

so that they can be inherited from.

Closes #3396

so that they can be inherited from.

Closes cython#3396
Comment on lines 135 to 138
for mod in self.context.modules.values():
if mod is self or mod.is_builtin_scope:
continue
mod.types_imported.update(ext_types)
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, this doesn't quite feel right at first sight. Why should we add the internal types to the imported types of all user defined modules? Shouldn't that happen only (and automatically) when a user cimports cython.view?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated it with a different approach. I can't really work out where it'd be sensible detect that these types are being used and add them to types_imported so I've marked them with a flag so they don't get imported instead..

@scoder scoder added this to the 3.0 milestone Mar 24, 2020
@scoder scoder merged commit 606b4f4 into cython:master Mar 24, 2020
@scoder
Copy link
Contributor

scoder commented Mar 24, 2020

Thanks

@da-woods da-woods deleted the inherit_from_array branch March 26, 2020 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create subclass to cython array
2 participants