fix py-configparser backports, see #4154#4155
fix py-configparser backports, see #4154#4155luigi-calori wants to merge 1 commit intospack:developfrom
Conversation
453d6e1 to
5149c93
Compare
12ae6af to
9d3348d
Compare
|
Have you contacted the developer about this issue? |
|
No, I did not, I just found the bug and look around for a fix. Not being sure about how much was widespread. |
|
I think so. This line was added for a reason, I'm afraid of blindly removing it. Update: Just looked at #4154. This might be a more widespread problem. We should definitely try to fix this permanently. |
|
FWIW, I'm tripping over this, although I might be complexificating it. I have my standard tree of spack things, Thought I'd try and see if |
|
If I remember well , this problem was related to the lack of init.py inside backport But things could be more complicated: I ' ll let other more spack and python savvy to dig. |
|
That makes sense. Although the suggestion you link to says |
|
I'm reading through: https://packaging.python.org/namespace_packages/ Apparently, there are 3 different ways to create a namespace package. The first method, native namespace packages, says:
On a hunch, I tried installing things with Python 3 and the import test works! So that's the problem. As for the solution, I'll have to keep digging. |
|
Actually, if you look in |
fe1d2e9 to
c6620ac
Compare
c6620ac to
da28181
Compare
5bb19be to
1f4ce05
Compare
53653b6 to
6210cd5
Compare
6210cd5 to
5a0eff6
Compare
|
Can we merge, please? I am running into flake issues. |
|
I'll be looking into this. I aim to figure out why this change works before merging it. Let me know if I missed something and in fact the reason is precisely known. |
|
My current understanding is that doing this may cause conflicts with other packages which add to the In the meantime, if you In more detail: As mentioned in #4155 (comment), Python has three methods for managing namespace packages: implicit (PEP 420), pkgutils, and pkg_resources.
In the linked nix issue, the suggestion to add Takeaways:
|
5a0eff6 to
dad5f5c
Compare
|
@scheibelp Should this advice to use |
|
@goxberry I'll submit a PR to add this advice to the documentation. |
dad5f5c to
8a9a33c
Compare
8a9a33c to
bc8175e
Compare
bc8175e to
36281ff
Compare
36281ff to
20a8cd4
Compare
Fixes #4154
py_flake8, installed with spack and loaded as module does not work due to
error in py-configparser (backport )