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

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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 -- pypa/warehouse#5838 -- for things like this.

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

@graingert

This comment has been minimized.

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
0 of 22 checks passed
🤖 (ubuntu-18.04, docs) 🤖 (ubuntu-18.04, docs)
Details
🤖 (ubuntu-18.04, lint) 🤖 (ubuntu-18.04, lint)
Details
🤖 (windows-latest, docs) 🤖 (windows-latest, docs)
Details
🤖 (windows-latest, lint) 🤖 (windows-latest, lint)
Details
🤖 (macos-latest, docs) 🤖 (macos-latest, docs)
Details
🤖 (macos-latest, lint) 🤖 (macos-latest, lint)
Details
Linux Build #20200121.5 failed
Details
Linux (Test Primary Python27) Test Primary Python27 failed
Details
Linux (Test Primary Python36) Test Primary Python36 failed
Details
Windows Build #20200121.5 failed
Details
Windows (Test Primary Python27-x64) Test Primary Python27-x64 failed
Details
Windows (Test Primary Python27-x86) Test Primary Python27-x86 failed
Details
Windows (Test Primary Python35-x64) Test Primary Python35-x64 failed
Details
Windows (Test Primary Python36-x64) Test Primary Python36-x64 failed
Details
Windows (Test Primary Python37-x64) Test Primary Python37-x64 failed
Details
Windows (Test Primary Python38-x64) Test Primary Python38-x64 failed
Details
continuous-documentation/read-the-docs Read the Docs build failed!
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details
macOS Build #20200121.5 failed
Details
macOS (Test Primary Python27) Test Primary Python27 failed
Details
macOS (Test Primary Python36) Test Primary Python36 failed
Details
news-file/pr Missing either a news entry or a trivial file/label.
Details
@pradyunsg pradyunsg deleted the pradyunsg:hotfix/importerrors-in-distributions branch Jan 21, 2020
@pabelanger

This comment was marked as off-topic.

Copy link

pabelanger commented Jan 21, 2020

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

@graingert

This comment has been minimized.

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: pypa/warehouse#5838

@HenrikOssipoff

This comment has been minimized.

Copy link

HenrikOssipoff commented Jan 21, 2020

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

@honnix

This comment has been minimized.

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

This comment has been minimized.

Copy link

RDIL commented Jan 21, 2020

Thanks for the fix 😃

@arlind87

This comment has been minimized.

Copy link

arlind87 commented Jan 21, 2020

Thnx for the fix. Much appreciated

@pradyunsg

This comment has been minimized.

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

This comment has been minimized.

Copy link

mehuled commented Jan 21, 2020

Thanks for the fix.

@fusionking

This comment has been minimized.

Copy link

fusionking commented Jan 21, 2020

Thank you for the fix

@aon2015

This comment was marked as spam.

Copy link

aon2015 commented Jan 25, 2020

grammars/TypeScript.json
Uploading  #0.png…

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

You can’t perform that action at this time.