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

Fix importing of namespace packages. Add in a regtest for the same. #2294

Merged
merged 2 commits into from May 26, 2018

Conversation

newt0311
Copy link
Contributor

Python 3.3 added in support for namespace packages which are essentially directories with no __init__.py file. This pull request adds in support for these into pyximport.

On python2 trying to import a pyx module in a namespace package is still an error (which matches normal python behavior).

Note that the regtest only works on python3. Not sure how to adjust it for python2 but happy to update this pr if somebody can point me in the right direction...

-- PG

@scoder
Copy link
Contributor

scoder commented May 26, 2018

You can exclude the test in runtests.py, look for VER_DEP_MODULES.

…mespace packages were introduced in Python 3.3.
@scoder scoder merged commit 45df483 into cython:master May 26, 2018
@newt0311 newt0311 deleted the namespace_pkgs branch May 26, 2018 13:44
@tcwalther
Copy link

This is a fantastic PR, thanks so much. Any estimation on when this will be released on PyPI, either as a bugfix release for 0.28 or as part of 0.29?

@scoder scoder added this to the 0.29 milestone Jun 20, 2018
@scoder
Copy link
Contributor

scoder commented Jun 20, 2018

Probably a couple of weeks still, in 0.29.

@tcwalther
Copy link

Good to know, thanks for the information.

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.

None yet

4 participants