Skip to content

Fix debundled support by add a missing entry for appdirs #7690

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

Merged
merged 1 commit into from
Feb 4, 2020

Conversation

lazka
Copy link
Contributor

@lazka lazka commented Feb 2, 2020

pip has started to use the vendored appdirs directly since #7501
but didn't add an alias for the unbundled case.

This adds the missing alias.


Before the fix:

$ pip
Traceback (most recent call last):
  File "C:\msys64\mingw64\bin\pip-script.py", line 11, in <module>
    load_entry_point('pip==20.0.2', 'console_scripts', 'pip')()
  File "C:/msys64/mingw64/lib/python3.8/site-packages/pkg_resources/__init__.py", line 490, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "C:/msys64/mingw64/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2853, in load_entry_point
    return ep.load()
  File "C:/msys64/mingw64/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2444, in load
    return self.resolve()
  File "C:/msys64/mingw64/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2450, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "C:/msys64/mingw64/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 10, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "C:/msys64/mingw64/lib/python3.8/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "C:/msys64/mingw64/lib/python3.8/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
    from pip._internal.cli import cmdoptions
  File "C:/msys64/mingw64/lib/python3.8/site-packages/pip/_internal/cli/cmdoptions.py", line 25, in <module>
    from pip._internal.locations import USER_CACHE_DIR, get_src_prefix
  File "C:/msys64/mingw64/lib/python3.8/site-packages/pip/_internal/locations.py", line 19, in <module>
    from pip._internal.utils import appdirs
  File "C:/msys64/mingw64/lib/python3.8/site-packages/pip/_internal/utils/appdirs.py", line 13, in <module>
    from pip._vendor import appdirs as _appdirs
ImportError

@lazka
Copy link
Contributor Author

lazka commented Feb 2, 2020

I assume this doesn't need a NEWS entry / issue, but I'd be happy to create them if wanted.

@uranusjr
Copy link
Member

uranusjr commented Feb 3, 2020

appdirs was vendored much earlier than #7501 it was used bu another vendored lib), that PR only dropped the duplicated functionality :p

Nonetheless, thanks for catching this!

@chrahunt
Copy link
Member

chrahunt commented Feb 3, 2020

@pradyunsg, do we want to include this in 20.x?

@pradyunsg
Copy link
Member

I'm on board. Since we're probably going to be making a release for the PyPy tags anyway, I'll be happy to include this in the release as well. :)

@chrahunt
Copy link
Member

chrahunt commented Feb 4, 2020

@lazka, can you please add a bugfix news entry for this?

@lazka lazka force-pushed the vendored-debundled-appdirs-alias branch from 09ffd07 to e1fb489 Compare February 4, 2020 09:46
pip has started to use the vendored appdirs directly since pypa#7501
but didn't add an alias for the unbundled case.

This adds the missing alias.
@lazka lazka force-pushed the vendored-debundled-appdirs-alias branch from e1fb489 to 9be7454 Compare February 4, 2020 09:49
@lazka
Copy link
Contributor Author

lazka commented Feb 4, 2020

@chrahunt done

@pradyunsg
Copy link
Member

@chrahunt I don't think this should get a .bugfix entry, since debundling is "semi-supported". I'd prefer that we don't call this out in NEWS at all or, at best, call this out in our vendoring details (i.e. a .vendor suffix).

I'll merge this PR now, since I don't think the discussion on where the NEWS entry should be is a blocker for this PR. I'll file a follow-up PR where we can discuss that. :)

@pradyunsg pradyunsg merged commit d41741f into pypa:master Feb 4, 2020
@pradyunsg pradyunsg changed the title fix un-vendored support; add missing entry for appdirs Fix debundled support by add a missing entry for appdirs Feb 4, 2020
@pradyunsg
Copy link
Member

Thanks for the PR @lazka! ^>^

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Mar 10, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Mar 10, 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.

5 participants