Repository navigation
Issues with vo legacy shim - #193
Conversation
…are loaded with the same name, they will also use the same namespace, which causes functions in one setup_package.py to reappear in subsequent ones if not overridden.
|
The second part of the issue is resolved by the attached pull request. It seems that if you import different modules using The first part is trickier. I was compelled to change the relative imports that go outside of the to but that seems to break the |
|
These fixes work for me for the multiple install and the logic issues. |
|
I haven't tested this yet, but is the issue with relative imports in compatibility packages still unresolved? It kind of seems strange to me, like it shouldn't do that. But I'll have to look into it more. But if there's no other way, maybe this is a good excuse to call for reneging on the relative imports requirement? :) |
|
Here's the issue here --> It's easy enough to get at things that are imported by However, in order to import modules of a package from outside that package, eg. the shims do This sets up the shim "as if" it were at I tried changing all of this "peer" imports to absolute ones, but that breaks There's probably a way out of this mess, just haven't found it yet (and also haven't devoted much time yet). |
|
As I was fiddling around to try and understand this better, I noticed that the following works: I checked, and |
|
@astrofrog: The problem with such an approach is that it requires every module that could be imported to be imported in advance. This will not be ideal for subsidiary functionality (e.g. plotting) with extra requirements etc. Whatever approach we take needs to be "lazy". I believe I have a solution now based on PEP 302 finders and loaders that does the mapping from There is a theoretical downside in that: which is surprising, but I don't know of any code that relies on |
|
Finally getting back to this. For some reason GitHub hasn't been working for me on my work computer for several days. IT seems to have fixed it, though I still need to find out what the problem was... Anyways, this solution looks great. As for the |
|
Just so we're clear, @mdboom, is this ready to merge once @astrofrog confirms that it fixes the original issue? It appears to do the trick for me, but it would be good to confirm with @astrofrog, as well. Also, I just noticed that if I use |
|
Yes, I think this is ready to merge. I'm not sure how to support |
|
It seems to work for me! |
|
Yeah, I really don't think they need to be supported for develop. |
|
Yeah, I'm fine with not supporting |
Issues with vo legacy shim
Fix plot directive that had an incorrect value for context option
Adds a coveragerc file
Update mission statement
There are issues when using the vo legacy shim:
In addition, it looks like the vo shim gets installed/added three times: