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}

Merged

Conversation

pradyunsg
Copy link
Member

@pradyunsg pradyunsg commented Jan 21, 2020

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

pradyunsg commented Jan 21, 2020

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

pradyunsg commented Jan 21, 2020

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

graingert commented Jan 21, 2020

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
0 of 22 checks passed
@pradyunsg pradyunsg deleted the hotfix/importerrors-in-distributions branch Jan 21, 2020
@pabelanger

This comment has been minimized.

@graingert
Copy link
Contributor

graingert commented Jan 21, 2020

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

HenrikOssipoff commented Jan 21, 2020

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

@honnix
Copy link

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

arlind87 commented Jan 21, 2020

Thnx for the fix. Much appreciated

@pradyunsg
Copy link
Member Author

pradyunsg commented Jan 21, 2020

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

fusionking commented Jan 21, 2020

Thank you for the fix

@aon2015

This comment has been minimized.

pylipp added a commit to pylipp/sdd that referenced this issue 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 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet