-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Improved handling of module __path__ attribute for namespace packages, fixes #1321 #1402
Improved handling of module __path__ attribute for namespace packages, fixes #1321 #1402
Conversation
setuptools/tests/test_namespaces.py
Outdated
@@ -109,3 +109,34 @@ def test_namespace_package_installed_and_cwd(self, tmpdir): | |||
] | |||
with test.test.paths_on_pythonpath([str(target)]): | |||
subprocess.check_call(pkg_resources_imp, cwd=str(pkg_A)) | |||
|
|||
@pytest.mark.skipif(bool(os.environ.get("APPVEYOR")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for the bool
here.
Also, can you make this xfail
? This test should pass on Appveyor, so it would be good to know if it changes from xfail
to xpass
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that in appveyor run for this pull request 3 of 4 namespace tests passed when running under python-2.7.15 and all 4 passed when running under python-3.6.6. Should I remove xfail
for them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@daa The rest of the repo is not super consistent about xfail
vs skip
. Going forward we're trying to make a clear distinction, and at some point I'll go through and try and clean it up so that we can turn on strict xfail
(e.g. if an xfail
test succeeds, that's a failure).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, I misunderstood. Yeah, I think you should change these so that you don't introduce any new XPASS
es.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I removed xfail
marks for namespace tests that pass on AppVeyor.
setuptools/tests/test_namespaces.py
Outdated
@pytest.mark.xfail( | ||
os.environ.get("APPVEYOR"), | ||
reason="https://github.com/pypa/setuptools/issues/851", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can drop the APPVEYOR xfail
entirely, since it seems that this test is only failing on Appveyor for Python 2.7, which is covered by the xfail
anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, removed.
The diff indicates #851 may be addressed by this change also. |
Thank you for this. |
Thank you for merging. |
Unfortunately, Travis CI uses a pretty outdated version of setuptools package in Python 3.6 environments. That version has a bug that prevents using namespace packages [1]. Fortunately, it has been fixed in newer versions, thus we simply must update a setuptools version. pypa/setuptools#1402
Unfortunately, Travis CI uses a pretty outdated version of setuptools package in Python 3.6 environments. That version has a bug that prevents using namespace packages [1]. Fortunately, it has been fixed in newer versions, thus we simply must update a setuptools version. pypa/setuptools#1402
This was probably fixed in 40.3 with pypa/setuptools#1402 This reverts commit 0e96193.
This was probably fixed in 40.3 with pypa/setuptools#1402 This reverts commit 0e96193.
This was probably fixed in 40.3 with pypa/setuptools#1402 This reverts commit 0e96193.
Summary of changes
Improved
__path__
attribute handling for namespace packages, fixes a bug revealed with python3.6 when there are 2 packages in the same namespace one installed and one in current working directory.Closes #1321
Pull Request Checklist