Skip to content
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

Rename pip._internal.distributions.{source -> sdist} #7621

Merged

Conversation

pradyunsg
Copy link
Member

Certain environments seem to be leaving behind empty folders in this
directory -- There was an older pip release that included a source/
folder here which isn't getting deleted for some reason (or that's getting added
somehow). I have not figured out the root cause why this happens yet. This is
resulting in ImportErrors since Python imports have a higher precedence for
packages compared to modules.

This PR changes the name we're trying to import from, which should
help prevent this mode of failure.

Should help with #7217.

Certain environments seem to be leaving behind empty folders in this
directory -- There was an older pip release that included a source/
folder here which isn't getting deleted for some reason. I have not
figured out the root cause why this happens yet. This is resulting in
ImportErrors since Python imports have a higher precedence for packages
compared to modules.

This commit changes the name we're trying to import from, which should
help prevent this mode of failure.
@pradyunsg
Copy link
Member Author

Ah great. that our own CI pipelines are affected by it. This is gonna be one fun release to make.

@sbidoul
Copy link
Member

sbidoul commented Jan 21, 2020

@pradyunsg are there downsides to pulling 20.0 of PyPI until 20.0.1 is ready?

@pradyunsg
Copy link
Member Author

Yea, that'll cause different kinds of breakages. We really need the ability to yank releases on PyPI -- pypi/warehouse#5838 -- for things like this.

For now, I'm just admin-merging this and making the release.

@graingert
Copy link
Contributor

perhaps the "pip._internal" package name should be renamed each release? eg "pip._internal_020_000_000" and "pip._internal_019_003_001"

@pradyunsg pradyunsg merged commit b47903e into pypa:master Jan 21, 2020
@pradyunsg pradyunsg deleted the hotfix/importerrors-in-distributions branch January 21, 2020 12:39
@pabelanger

This comment has been minimized.

@graingert
Copy link
Contributor

Pleae don't yank releases, you should tag 19.3.1 as 20.1 as revert if needed

You should probably discuss that here: pypi/warehouse#5838

@HenrikOssipoff
Copy link

@pradyunsg I want to thank you for the very quick handling of this issue. Much appreciated 🥇

@honnix
Copy link
Contributor

honnix commented Jan 21, 2020

fwiw it must be something where code is cached, because after installing 20.0.1, I have

ll /Users/honnix/.virtualenvs/test-pip/lib/python3.7/site-packages/pip/_internal/distributions/
total 48
-rw-r--r--  1 honnix  staff   959B Jan 21 14:10 __init__.py
drwxr-xr-x  8 honnix  staff   256B Jan 21 14:10 __pycache__
-rw-r--r--  1 honnix  staff   1.4K Jan 21 14:10 base.py
-rw-r--r--  1 honnix  staff   760B Jan 21 14:10 installed.py
-rw-r--r--  1 honnix  staff   4.0K Jan 21 14:10 sdist.py      <-----------
drwxr-xr-x  5 honnix  staff   160B Jan 21 14:10 source        <-----------
-rw-r--r--  1 honnix  staff   4.0K Jan 21 14:10 source.py     <-----------
-rw-r--r--  1 honnix  staff   1.3K Jan 21 14:10 wheel.py

@RDIL
Copy link
Contributor

RDIL commented Jan 21, 2020

Thanks for the fix 😃

@arlind87
Copy link

Thnx for the fix. Much appreciated

@pradyunsg
Copy link
Member Author

fwiw it must be something where code is cached, because after installing 20.0.1, I have

Yep -- circa pypa/wheel#147. We'll be fixing our release process automation to prevent this kind of failure from ever happening again: #7624.

@mehuled
Copy link

mehuled commented Jan 21, 2020

Thanks for the fix.

@fusionking
Copy link

Thank you for the fix

@aon2015

This comment has been minimized.

pylipp added a commit to pylipp/sdd that referenced this pull request Feb 15, 2020
- enable upgrading
- enable specifying version for installing or upgrading
- install bash and zsh completion scripts
- get bitten by pypa/pip#7621 when extending
  tests
- silence command -v output
- use wget -P
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Feb 24, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Feb 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.