Skip to content

Conversation

@hexagonrecursion
Copy link
Contributor

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 :

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).

_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).
@hexagonrecursion
Copy link
Contributor Author

I'm working on a test for this.

@hexagonrecursion hexagonrecursion marked this pull request as draft January 31, 2021 18:22
@hexagonrecursion hexagonrecursion marked this pull request as ready for review January 31, 2021 19:56
@hexagonrecursion
Copy link
Contributor Author

This PR will be closed on 11th or April 2021 due to lack of upstream feedback.

@takluyver
Copy link
Member

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.

@hexagonrecursion
Copy link
Contributor Author

To be frank, that, combined with suddenly closing #106, feels like a passive-aggressive demand that I pay attention to your pull requests.

I'm sorry. I did not mean to come off that way.

I'll go and look at #103 now.

👍

@takluyver
Copy link
Member

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.

Copy link
Member

@takluyver takluyver left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pip/_vendor/pep517 is in sys.path when executing setup.py

2 participants