-
Notifications
You must be signed in to change notification settings - Fork 55
Fix #104 (path pollution) #105
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
Conversation
_in_process.py is executed as a subprocess. This causes its parent directory to become sys.path[0]. Any extra files in the same directory shadow pypi libraries eg colorlog. Solution: put _in_process.py in its own special subdirectory. Note: the directory has to be a module because importlib.resources.path does not support resources with directory separators in their name: https://docs.python.org/3/library/importlib.html#importlib.resources.path : > resource is the name of the resource to open within package; > it may not contain path separators and it may not have sub-resources > (i.e. it cannot be a directory).
|
I'm working on a test for this. |
|
This PR will be closed on 11th or April 2021 due to lack of upstream feedback. |
|
To be frank, that, combined with suddenly closing #106, feels like a passive-aggressive demand that I pay attention to your pull requests. I apologise if I've misinterpreted that, but that's how it reads. I accept that I'm a fairly lazy maintainer of this project. It's not a particularly fun or interesting project to maintain - it's a boring little piece of infrastructure which will work in the background of the tools most people use. Dealing with grumpy contributors makes it an even less attractive thing to spend time on. If I haven't responded to a PR in a week or so, it's probably off the first page of my inbox, and before long I'll have forgotten about it. You're not the only person it's happened to. Since I dislike the idea that the squeaky wheel gets the grease, I'll go and look at #103 now. |
|
OK, sorry to misread your remarks. I think it's someone's law that everything written on the internet sounds twice as grumpy as it's meant to be. 😉 I'll have a read of #104 and this now. |
takluyver
left a comment
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.
Thanks, this makes sense. I've added a bit of info in the package docstring; once CI completes, I'll merge it.
Fixes #104
_in_process.py is executed as a subprocess. This causes its parent
directory to become sys.path[0]. Any extra files in the same directory
shadow pypi libraries eg colorlog.
Solution: put _in_process.py in its own special subdirectory.
Note: the directory has to be a module because
importlib.resources.path does not support resources with directory
separators in their name:
https://docs.python.org/3/library/importlib.html#importlib.resources.path :