-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Upgrade vendored pep517 to 0.10.0 or later #8887
Comments
Can you provide a small, self-contained example of this? It sounds like a bug if |
By the way,
I'm sorry if that's happened to you, it certainly shouldn't. I checked the issues that I could find which you've raised and couldn't see what you were referring to. Could you give an example? I would certainly hope that if you're taking the time to help us by raising issues, we'd respond positively. (That doesn't necessarily mean that we'd agree with every suggestion, but I'd hope the discussion would at least be civil...) |
from setuptools import setup
import colorlog as logging
handler = logging.StreamHandler()
setup()
Sorry for the first sentence of my issue. I'm tired with different things (not about pip) and that's true that the recent evolutions of pip / pyproject.toml, pep517, pep518 lead to real difficulties for me. I'm loosing a lot of time and I can't manage to find good solutions to my applications. Anyway, that's not the subject of this issue and I realize that it's for the good of most Python users. |
No worries, there's a lot of change at the moment and it's hard for all of us - I could easily imagine one of us giving you a reply somewhere that translated to "aaargh, we're trying to do our best, stop coming up with more problems!!" so I wanted to make sure that wasn't what had happened 🙂 I just tried out your test case and can confirm that I see the bug. Thanks for a nice easy example to test with! I tried with both I don't know much about pip's vendoring code, so I'll need to do some digging before I can work out what's going on, but I can confirm that this is not correct behaviour. |
TL;DR: It appears to be a Long version:
The end result of this is that if anyone's build relies on a library with the name of any files in the vendored copy of the pep517 library, they'll encounter this same problem. Here's the path I discovered in step 1, with some extra newlines so it's actually readable:
Here's the setup.py-1 (prints path)
setup.py-2 (sleeps 1,000 seconds)
|
A single simplified from pathlib import Path
print(list(Path('/tmp').glob('pip-build-env-*/**/colorlog'))[0])
# All of these are from pep517.
# The commented-out ones all fail because the modules get imported, but raise an exception.
import _in_process
# import build
# import check
import colorlog
import compat
import dirtools
# import envbuild
# import meta
# import wrappers
print(_in_process)
print(colorlog)
print(compat)
print(dirtools)
exit(1) The results of running this:
|
It seems to me the best solution would be for |
@uranusjr yeah, that would probably make sense. |
I want to work on this bug. |
Tou will need to send issues and pull requests to this repository instead: https://github.com/pypa/pep517 |
I was confused why out of the dozens of libraries pip vendors only pep517 is in the path. I was thinking maybe pep517 is not vendored correctly. bcc execsnoop cleared that up:
Note the last line: pip runs src/pip/_vendor/pep517/_in_process.py as a subprocess. This is why its parent directory is in the path. |
Please continue the discussion in pypa/pep517. It will raise awareness to people working on the library. |
This should be closed in favor of pypa/pyproject-hooks#104 |
Let’s repurpose this to make sure we remember to upgrade the bundled copy of pep517 when upstream releases the fix. |
Fix is merged pypa/pyproject-hooks#105. Awaiting release |
Released as 0.10.0, if someone wants to update the vendoring. |
Each time I submit an issue here (pip), I'm getting not very nice feedback, but let's try again 🙂
If a build uses
import colorlog
(to get https://pypi.org/project/colorlog/), the module imported ispip/_vendor/pep517/colorlog.py
, which is incompatible with https://pypi.org/project/colorlog/ and one gets an error like:The text was updated successfully, but these errors were encountered: