Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/pipPublic

Python3.12-dev & Windows:zipimporter has no attributefind_module #11688

Closed as not planned
Labels
type: bugA confirmed bug or unintended behavior
@kdeldycke

Description

@kdeldycke

Description

The vendored version ofpkg_resources inpip fails with Python3.12-dev on Windows.

Expected behavior

No response

pip version

22.3.1

Python version

3.12.0-alpha.3 (x64)

OS

Windows 2022 & 2019

How to Reproduce

Tl;Dr, you just have to run in Windows with Python 3.12:

$ pip download --no-binary=:all: --no-deps --dest ./local-download/ pygments==2.14.0

The long version is that I amemulating the CLI above in my code, by mimicking some ofpip's internals.

That way I can download the source distribution of thePygments version I depends on, and inspect its test data files which are not distributed as part of the wheel.

This construction is working perfectly on the full matrix of:

  • Distributions:
    • ubuntu-22.04
    • ubuntu-20.04
    • macos-12
    • macos-11
    • windows-2022
    • windows-2019
  • Python versions:
    • 3.7
    • 3.8
    • 3.9
    • 3.10
    • 3.11
    • 3.12-dev

But not on the combination of3.12-dev with eitherwindows-2022 orwindows-2019.

See theresult of this matrix execution here, and theexact trace here.

Output

C:\(...)\pip\_internal\cli\req_command.py:247: in wrapperreturn func(self, options, args)C:\(...)\pip\_internal\commands\download.py:93: in run    session=self.get_default_session(options)C:\(...)\pip\_internal\cli\req_command.py:98: in get_default_sessionself._session=self.enter_context(self._build_session(options))C:\(...)\pip\_internal\cli\req_command.py:125: in _build_session    session= PipSession(C:\(...)\pip\_internal\network\session.py:343: in __init__self.headers["User-Agent"]= user_agent()C:\(...)\pip\_internal\network\session.py:175: in user_agent    setuptools_dist= get_default_environment().get_distribution("setuptools")C:\(...)\pip\_internal\metadata\importlib\_envs.py:188: in get_distributionreturnnext(matches,None)C:\(...)\pip\_internal\metadata\importlib\_envs.py:183: in <genexpr>    matches= (C:\(...)\pip\_internal\metadata\base.py:612: in iter_all_distributionsfor distinself._iter_distributions():C:\(...)\pip\_internal\metadata\importlib\_envs.py:176: in _iter_distributionsfor distin finder.find_eggs(location):C:\(...)\pip\_internal\metadata\importlib\_envs.py:144: in find_eggsyield fromself._find_eggs_in_dir(location)C:\(...)\pip\_internal\metadata\importlib\_envs.py:111: in _find_eggs_in_dirfrom pip._vendor.pkg_resourcesimport find_distributionsC:\(...)\pip\_vendor\pkg_resources\__init__.py:3251: in <module>@_call_asideC:\(...)\pip\_vendor\pkg_resources\__init__.py:3235: in _call_aside    f(*args,**kwargs)C:\(...)\pip\_vendor\pkg_resources\__init__.py:3277: in _initialize_master_working_settuple(C:\(...)\pip\_vendor\pkg_resources\__init__.py:3278: in <genexpr>    dist.activate(replace=False)C:\(...)\pip\_vendor\pkg_resources\__init__.py:2785: in activate    declare_namespace(pkg)C:\(...)\pip\_vendor\pkg_resources\__init__.py:2284: in declare_namespace    _handle_ns(packageName, path_item)_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _def_handle_ns(packageName,path_item):"""Ensure that named package includes a subpath of path_item (if needed)"""            importer= get_importer(path_item)if importerisNone:returnNone# capture warnings due to #1111with warnings.catch_warnings():            warnings.simplefilter("ignore")>           loader = importer.find_module(packageName)E           AttributeError: 'zipimporter' object has no attribute 'find_module'. Did you mean: 'load_module'?C:\(...)\pip\_vendor\pkg_resources\__init__.py:2201: AttributeError

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugA confirmed bug or unintended behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp