Virtualenv: [回帰] CWDに `attr:`を持つ `setup.cfg`がある場合、virtualenv20 +で` pipinstall`がクラッシュします

作成日 2020年03月02日  ·  12コメント  ·  ソース: pypa/virtualenv

問題

$ sbj。 おそらくhttps://github.com/pypa/virtualenv/issues/1670に関連してい
特にPython2で再現可能で、py3には影響しないようです。

再現

  1. CWDでsetup.cfgを作成する
$ cat setup.cfg 
[metadata]
name = boom
version = attr: boom.versiontools.get_self_version

2.2。

python2 -m pip install 'virtualenv >= 20'
python2 -m virtualenv test-venv-py2
  1. 他の場所でchdirしないでください
  2. そこにいくつかの既存のパッケージをインストールします。
test-venv-py2/bin/pip install setuptools

(必ずしもsetuptoolsである必要はなく、pip、6、実際には何でもかまいませんが、PyPIに存在する必要があります)

  1. ImportErrorを観察します。これは、CWDから構成をロードし、CWDがimport boom.versiontools.get_self_version試行するためです。
$ test-venv-py2/bin/pip install setuptools
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Requirement already satisfied: setuptools in ~/src/github/experiments/boom/test-venv-py2/lib/python2.7/site-packages (44.0.0)
ERROR: Exception:
Traceback (most recent call last):
  File "~/src/experiments/boom/test-venv-py2/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 186, in _main
    status = self.run(options, args)
  File "~/src/experiments/boom/test-venv-py2/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 412, in run
    isolated=options.isolated_mode,
  File "~/src/experiments/boom/test-venv-py2/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 543, in get_lib_location_guesses
    scheme = distutils_scheme('', *args, **kwargs)
  File "~/src/experiments/boom/test-venv-py2/lib/python2.7/site-packages/pip/_internal/locations.py", line 109, in distutils_scheme
    d.parse_config_files()
  File "~/src/experiments/boom/test-venv-py2/lib/python2.7/site.py", line 153, in parse_config_files
    result = old_parse_config_files(self, *args, **kwargs)
  File "~/src/experiments/boom/test-venv-py2/lib/python2.7/site.py", line 153, in parse_config_files
    result = old_parse_config_files(self, *args, **kwargs)
  File "~/src/experiments/boom/test-venv-py2/lib/python2.7/site-packages/_distutils_patch_virtualenv.py", line 19, in parse_config_files
    result = old_parse_config_files(self, *args, **kwargs)
  File "~/src/experiments/boom/test-venv-py2/lib/python2.7/site-packages/setuptools/dist.py", line 702, in parse_config_files
    ignore_option_errors=ignore_option_errors)
  File "~/src/experiments/boom/test-venv-py2/lib/python2.7/site-packages/setuptools/config.py", line 121, in parse_configuration
    meta.parse()
  File "~/src/experiments/boom/test-venv-py2/lib/python2.7/site-packages/setuptools/config.py", line 426, in parse
    section_parser_method(section_options)
  File "~/src/experiments/boom/test-venv-py2/lib/python2.7/site-packages/setuptools/config.py", line 399, in parse_section
    self[name] = value
  File "~/src/experiments/boom/test-venv-py2/lib/python2.7/site-packages/setuptools/config.py", line 184, in __setitem__
    value = parser(value)
  File "~/src/experiments/boom/test-venv-py2/lib/python2.7/site-packages/setuptools/config.py", line 515, in _parse_version
    version = self._parse_attr(value, self.package_dir)
  File "~/src/experiments/boom/test-venv-py2/lib/python2.7/site-packages/setuptools/config.py", line 349, in _parse_attr
    module = import_module(module_name)
  File "~/.pyenv/versions/2.7.15/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named boom.versiontools

環境

  • OS:Gentoo Linux( centos:7 dockerコンテナでも再現可能)
  • pip list virtualenvがインストールされているホストPythonの

    $ python2 -m pip list                                      
    Package             Version    
    ------------------- -----------
    appdirs             1.4.3      
    configparser        4.0.2      
    contextlib2         0.6.0.post1
    distlib             0.3.0      
    filelock            3.0.12     
    importlib-metadata  1.5.0      
    importlib-resources 1.1.0      
    pathlib2            2.3.5      
    pip                 18.1       
    scandir             1.10.0     
    setuptools          40.5.0     
    singledispatch      3.4.0.3    
    six                 1.14.0     
    typing              3.7.4.1    
    virtualenv          20.0.7     
    wheel               0.32.2     
    zipp                1.2.0      
    You are using pip version 18.1, however version 20.0.2 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    

仮想環境作成の出力

必ず-vvv --with-traceback作成を実行してください:



$ <kbd i="24">python2 -m virtualenv -vvv --with-traceback test-venv-py2</kbd>

58 setup logging to NOTSET [DEBUG report:43]
69 find interpreter for spec PythonSpec(path=~/.pyenv/versions/ansible-lint-py2.7.15-pyenv-venv/bin/python2) [INFO builtin:44]
69 discover exe for PythonInfo(spec=CPython2.7.15.final.0-64, exe=~/.pyenv/versions/ansible-lint-py2.7.15-pyenv-venv/bin/python2, platform=linux2, version=u'2.7.15 (default, Sep 25 2018, 19:19:39) \n[GCC 7.3.0]', encoding_fs_io=UTF-8-UTF-8) in ~/.pyenv/versions/2.7.15 [DEBUG py_info:340]
70 filesystem is case-sensitive [DEBUG info:28]
71 Attempting to acquire lock 139774354598416 on ~/.local/share/virtualenv/py_info/20.0.7/0743af9fc1da334fdaa3884a6e8f56610e0b07773619ca8d43ce29ac2a098866.lock [DEBUG filelock:270]
72 Lock 139774354598416 acquired on ~/.local/share/virtualenv/py_info/20.0.7/0743af9fc1da334fdaa3884a6e8f56610e0b07773619ca8d43ce29ac2a098866.lock [INFO filelock:274]
72 get PythonInfo from ~/.local/share/virtualenv/py_info/20.0.7/0743af9fc1da334fdaa3884a6e8f56610e0b07773619ca8d43ce29ac2a098866.json for ~/.pyenv/versions/2.7.15/bin/python2.7 [DEBUG cached_py_info:76]
73 Attempting to release lock 139774354598416 on ~/.local/share/virtualenv/py_info/20.0.7/0743af9fc1da334fdaa3884a6e8f56610e0b07773619ca8d43ce29ac2a098866.lock [DEBUG filelock:315]
73 Lock 139774354598416 released on ~/.local/share/virtualenv/py_info/20.0.7/0743af9fc1da334fdaa3884a6e8f56610e0b07773619ca8d43ce29ac2a098866.lock [INFO filelock:318]
73 proposed PythonInfo({u'base_exec_prefix': None, u'system_stdlib': u'~/.pyenv/versions/2.7.15/lib/python2.7', u'has_venv': False, u'prefix': u'~/.pyenv/versions/2.7.15', u'stdout_encoding': None, u'executable': '~/.pyenv/versions/ansible-lint-py2.7.15-pyenv-venv/bin/python2', u'implementation': u'CPython', u'exec_prefix': u'~/.pyenv/versions/2.7.15', u'platform': u'linux2', u'version': u'2.7.15 (default, Sep 25 2018, 19:19:39) \n[GCC 7.3.0]', u'sysconfig_paths': {u'platstdlib': u'{platbase}/lib/python{py_version_short}', u'platlib': u'{platbase}/lib/python{py_version_short}/site-packages', u'purelib': u'{base}/lib/python{py_version_short}/site-packages', u'stdlib': u'{base}/lib/python{py_version_short}', u'scripts': u'{base}/bin', u'include': u'{base}/include/python{py_version_short}', u'data': u'{base}'}, u'base_prefix': None, u'file_system_encoding': u'UTF-8', u'version_info': VersionInfo(major=2, minor=7, micro=15, releaselevel=u'final', serial=0), u'sysconfig_vars': {u'base': u'~/.pyenv/versions/2.7.15', u'platbase': u'~/.pyenv/versions/2.7.15', u'PYTHONFRAMEWORK': u'', u'py_version_short': u'2.7'}, u'path': [u'~/.pyenv/versions/2.7.15/envs/ansible-lint-py2.7.15-pyenv-venv/lib/python2.7/site-packages/virtualenv/discovery', u'~/.pyenv/versions/2.7.15/lib/python27.zip', u'~/.pyenv/versions/2.7.15/lib/python2.7', u'~/.pyenv/versions/2.7.15/lib/python2.7/plat-linux2', u'~/.pyenv/versions/2.7.15/lib/python2.7/lib-tk', u'~/.pyenv/versions/2.7.15/lib/python2.7/lib-old', u'~/.pyenv/versions/2.7.15/lib/python2.7/lib-dynload', u'~/.pyenv/versions/2.7.15/lib/python2.7/site-packages'], u'max_size': 9223372036854775807, u'real_prefix': None, u'distutils_install': {u'purelib': u'lib/python2.7/site-packages', u'headers': u'include/python2.7/UNKNOWN', u'platlib': u'lib/python2.7/site-packages', u'data': u'', u'scripts': u'bin'}, u'architecture': 64, u'original_executable': u'~/.pyenv/versions/2.7.15/bin/python2.7', u'os': u'posix', u'system_executable': u'~/.pyenv/versions/2.7.15/bin/python2.7'}) [INFO builtin:50]
74 accepted PythonInfo({u'base_exec_prefix': None, u'system_stdlib': u'~/.pyenv/versions/2.7.15/lib/python2.7', u'has_venv': False, u'prefix': u'~/.pyenv/versions/2.7.15', u'stdout_encoding': None, u'executable': '~/.pyenv/versions/ansible-lint-py2.7.15-pyenv-venv/bin/python2', u'implementation': u'CPython', u'exec_prefix': u'~/.pyenv/versions/2.7.15', u'platform': u'linux2', u'version': u'2.7.15 (default, Sep 25 2018, 19:19:39) \n[GCC 7.3.0]', u'sysconfig_paths': {u'platstdlib': u'{platbase}/lib/python{py_version_short}', u'platlib': u'{platbase}/lib/python{py_version_short}/site-packages', u'purelib': u'{base}/lib/python{py_version_short}/site-packages', u'stdlib': u'{base}/lib/python{py_version_short}', u'scripts': u'{base}/bin', u'include': u'{base}/include/python{py_version_short}', u'data': u'{base}'}, u'base_prefix': None, u'file_system_encoding': u'UTF-8', u'version_info': VersionInfo(major=2, minor=7, micro=15, releaselevel=u'final', serial=0), u'sysconfig_vars': {u'base': u'~/.pyenv/versions/2.7.15', u'platbase': u'~/.pyenv/versions/2.7.15', u'PYTHONFRAMEWORK': u'', u'py_version_short': u'2.7'}, u'path': [u'~/.pyenv/versions/2.7.15/envs/ansible-lint-py2.7.15-pyenv-venv/lib/python2.7/site-packages/virtualenv/discovery', u'~/.pyenv/versions/2.7.15/lib/python27.zip', u'~/.pyenv/versions/2.7.15/lib/python2.7', u'~/.pyenv/versions/2.7.15/lib/python2.7/plat-linux2', u'~/.pyenv/versions/2.7.15/lib/python2.7/lib-tk', u'~/.pyenv/versions/2.7.15/lib/python2.7/lib-old', u'~/.pyenv/versions/2.7.15/lib/python2.7/lib-dynload', u'~/.pyenv/versions/2.7.15/lib/python2.7/site-packages'], u'max_size': 9223372036854775807, u'real_prefix': None, u'distutils_install': {u'purelib': u'lib/python2.7/site-packages', u'headers': u'include/python2.7/UNKNOWN', u'platlib': u'lib/python2.7/site-packages', u'data': u'', u'scripts': u'bin'}, u'architecture': 64, u'original_executable': u'~/.pyenv/versions/2.7.15/bin/python2.7', u'os': u'posix', u'system_executable': u'~/.pyenv/versions/2.7.15/bin/python2.7'}) [DEBUG builtin:52]
107 create virtual environment via CPython2Posix(dest=~/src/github/ansible/ansible-lint/test-venv-py2, clear=False, global=False) [INFO session:52]
107 create folder ~/src/github/ansible/ansible-lint/test-venv-py2/bin [DEBUG _sync:21]
108 create folder ~/src/github/ansible/ansible-lint/test-venv-py2/include [DEBUG _sync:21]
108 create folder ~/src/github/ansible/ansible-lint/test-venv-py2/lib/python2.7/site-packages [DEBUG _sync:21]
108 write ~/src/github/ansible/ansible-lint/test-venv-py2/pyvenv.cfg [DEBUG pyenv_cfg:34]
108     home = ~/.pyenv/versions/2.7.15 [DEBUG pyenv_cfg:38]
108     implementation = CPython [DEBUG pyenv_cfg:38]
108     version_info = 2.7.15.final.0 [DEBUG pyenv_cfg:38]
108     virtualenv = 20.0.7 [DEBUG pyenv_cfg:38]
108     include-system-site-packages = false [DEBUG pyenv_cfg:38]
108     base-prefix = ~/.pyenv/versions/2.7.15 [DEBUG pyenv_cfg:38]
108     base-exec-prefix = ~/.pyenv/versions/2.7.15 [DEBUG pyenv_cfg:38]
108     base-executable = ~/.pyenv/versions/2.7.15/bin/python2.7 [DEBUG pyenv_cfg:38]
108 copy ~/.pyenv/versions/2.7.15/bin/python2.7 to ~/src/github/ansible/ansible-lint/test-venv-py2/bin/python [DEBUG _sync:48]
114 symlink ~/.pyenv/versions/2.7.15/lib/python2.7/os.py to ~/src/github/ansible/ansible-lint/test-venv-py2/lib/python2.7/os.py [DEBUG _sync:40]
115 symlink ~/.pyenv/versions/2.7.15/lib/python2.7/os.pyc to ~/src/github/ansible/ansible-lint/test-venv-py2/lib/python2.7/os.pyc [DEBUG _sync:40]
115 symlink directory ~/.pyenv/versions/2.7.15/include/python2.7 to ~/src/github/ansible/ansible-lint/test-venv-py2/include/python2.7 [DEBUG _sync:40]
115 symlink directory ~/.pyenv/versions/2.7.15/lib/python2.7/lib-dynload to ~/src/github/ansible/ansible-lint/test-venv-py2/lib/python2.7/lib-dynload [DEBUG _sync:40]
115 add distutils patch file ~/src/github/ansible/ansible-lint/test-venv-py2/lib/python2.7/site-packages/_distutils_patch_virtualenv.py [DEBUG api:63]
116 add distutils patch file ~/src/github/ansible/ansible-lint/test-venv-py2/lib/python2.7/site-packages/_distutils_patch_virtualenv.pth [DEBUG api:67]
116 ============================== target debug ============================== [DEBUG session:54]
117 debug via ~/src/github/ansible/ansible-lint/test-venv-py2/bin/python ~/.pyenv/versions/ansible-lint-py2.7.15-pyenv-venv/lib/python2.7/site-packages/virtualenv/create/debug.py [DEBUG creator:182]
116 {
  "site": "<module 'site' from '~/.pyenv/versions/2.7.15/lib/python2.7/site.pyc'>", 
  "datetime": "<module 'datetime' from '~/.pyenv/versions/2.7.15/lib/python2.7/lib-dynload/datetime.so'>", 
  "sys": {
    "executable": "~/src/github/ansible/ansible-lint/test-venv-py2/bin/python", 
    "real_prefix": "~/.pyenv/versions/2.7.15", 
    "base_exec_prefix": "~/.pyenv/versions/2.7.15", 
    "exec_prefix": "~/src/github/ansible/ansible-lint/test-venv-py2", 
    "io_encoding": null, 
    "meta_path": [], 
    "fs_encoding": "UTF-8", 
    "prefix": "~/src/github/ansible/ansible-lint/test-venv-py2", 
    "_base_executable": null, 
    "path": [
      "~/.pyenv/versions/2.7.15/lib/python27.zip", 
      "~/.pyenv/versions/2.7.15/lib/python2.7", 
      "~/.pyenv/versions/2.7.15/lib/python2.7/plat-linux2", 
      "~/.pyenv/versions/2.7.15/lib/python2.7/lib-tk", 
      "~/.pyenv/versions/2.7.15/lib/python2.7/lib-old", 
      "~/.pyenv/versions/2.7.15/lib/python2.7/lib-dynload", 
      "~/src/github/ansible/ansible-lint/test-venv-py2/lib/python2.7/site-packages"
    ], 
    "base_prefix": "~/.pyenv/versions/2.7.15"
  }, 
  "json": "<module 'json' from '~/.pyenv/versions/2.7.15/lib/python2.7/json/__init__.pyc'>", 
  "version": "2.7.15 (default, Sep 25 2018, 19:19:39) \n[GCC 7.3.0]", 
  "os": "<module 'os' from '~/.pyenv/versions/2.7.15/lib/python2.7/os.pyc'>", 
  "math": "<module 'math' from '~/.pyenv/versions/2.7.15/lib/python2.7/lib-dynload/math.so'>"
} [DEBUG session:55]
146 add seed packages via FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=~/.local/share/virtualenv/seed-app-data/v1) [INFO session:59]
146 Attempting to acquire lock 139774343684496 on ~/.local/share/virtualenv/seed-app-data/v1/2.7/wheels.lock [DEBUG filelock:270]
146 Lock 139774343684496 acquired on ~/.local/share/virtualenv/seed-app-data/v1/2.7/wheels.lock [INFO filelock:274]
147 get bundled wheel ~/.pyenv/versions/ansible-lint-py2.7.15-pyenv-venv/lib/python2.7/site-packages/virtualenv/seed/embed/wheels/pip-20.0.2-py2.py3-none-any.whl [DEBUG acquire:51]
148 get bundled wheel ~/.pyenv/versions/ansible-lint-py2.7.15-pyenv-venv/lib/python2.7/site-packages/virtualenv/seed/embed/wheels/wheel-0.34.2-py2.py3-none-any.whl [DEBUG acquire:51]
148 get bundled wheel ~/.pyenv/versions/ansible-lint-py2.7.15-pyenv-venv/lib/python2.7/site-packages/virtualenv/seed/embed/wheels/setuptools-44.0.0-py2.py3-none-any.whl [DEBUG acquire:51]
150 install wheel from wheel ~/.local/share/virtualenv/seed-app-data/v1/2.7/wheels/wheel-0.34.2-py2.py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:46]
150 install pip from wheel ~/.local/share/virtualenv/seed-app-data/v1/2.7/wheels/pip-20.0.2-py2.py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:46]
151 install setuptools from wheel ~/.local/share/virtualenv/seed-app-data/v1/2.7/wheels/setuptools-44.0.0-py2.py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:46]
151 copy directory ~/.local/share/virtualenv/seed-app-data/v1/2.7/image/CopyPipInstall/wheel-0.34.2-py2.py3-none-any/wheel to ~/src/github/ansible/ansible-lint/test-venv-py2/lib/python2.7/site-packages/wheel [DEBUG _sync:48]
151 copy directory ~/.local/share/virtualenv/seed-app-data/v1/2.7/image/CopyPipInstall/pip-20.0.2-py2.py3-none-any/pip to ~/src/github/ansible/ansible-lint/test-venv-py2/lib/python2.7/site-packages/pip [DEBUG _sync:48]
152 copy ~/.local/share/virtualenv/seed-app-data/v1/2.7/image/CopyPipInstall/setuptools-44.0.0-py2.py3-none-any/easy_install.py to ~/src/github/ansible/ansible-lint/test-venv-py2/lib/python2.7/site-packages/easy_install.py [DEBUG _sync:48]
152 copy directory ~/.local/share/virtualenv/seed-app-data/v1/2.7/image/CopyPipInstall/setuptools-44.0.0-py2.py3-none-any/pkg_resources to ~/src/github/ansible/ansible-lint/test-venv-py2/lib/python2.7/site-packages/pkg_resources [DEBUG _sync:48]
156 copy directory ~/.local/share/virtualenv/seed-app-data/v1/2.7/image/CopyPipInstall/wheel-0.34.2-py2.py3-none-any/wheel-0.34.2.dist-info to ~/src/github/ansible/ansible-lint/test-venv-py2/lib/python2.7/site-packages/wheel-0.34.2.dist-info [DEBUG _sync:48]
158 copy directory ~/.local/share/virtualenv/seed-app-data/v1/2.7/image/CopyPipInstall/setuptools-44.0.0-py2.py3-none-any/setuptools to ~/src/github/ansible/ansible-lint/test-venv-py2/lib/python2.7/site-packages/setuptools [DEBUG _sync:48]
159 copy ~/.local/share/virtualenv/seed-app-data/v1/2.7/image/CopyPipInstall/wheel-0.34.2-py2.py3-none-any/wheel-0.34.2.virtualenv to ~/src/github/ansible/ansible-lint/test-venv-py2/lib/python2.7/site-packages/wheel-0.34.2.virtualenv [DEBUG _sync:48]
160 changing mode of ~/src/github/ansible/ansible-lint/test-venv-py2/bin/wheel to 755 [INFO util:566]
160 changing mode of ~/src/github/ansible/ansible-lint/test-venv-py2/bin/wheel-2.7 to 755 [INFO util:566]
161 changing mode of ~/src/github/ansible/ansible-lint/test-venv-py2/bin/wheel2 to 755 [INFO util:566]
161 generated console scripts wheel wheel2 wheel-2.7 [DEBUG base:53]
175 copy directory ~/.local/share/virtualenv/seed-app-data/v1/2.7/image/CopyPipInstall/setuptools-44.0.0-py2.py3-none-any/setuptools-44.0.0.dist-info to ~/src/github/ansible/ansible-lint/test-venv-py2/lib/python2.7/site-packages/setuptools-44.0.0.dist-info [DEBUG _sync:48]
177 copy ~/.local/share/virtualenv/seed-app-data/v1/2.7/image/CopyPipInstall/setuptools-44.0.0-py2.py3-none-any/setuptools-44.0.0.virtualenv to ~/src/github/ansible/ansible-lint/test-venv-py2/lib/python2.7/site-packages/setuptools-44.0.0.virtualenv [DEBUG _sync:48]
178 changing mode of ~/src/github/ansible/ansible-lint/test-venv-py2/bin/easy_install to 755 [INFO util:566]
179 changing mode of ~/src/github/ansible/ansible-lint/test-venv-py2/bin/easy_install2 to 755 [INFO util:566]
179 changing mode of ~/src/github/ansible/ansible-lint/test-venv-py2/bin/easy_install-2.7 to 755 [INFO util:566]
180 generated console scripts easy_install easy_install2 easy_install-2.7 [DEBUG base:53]
219 copy directory ~/.local/share/virtualenv/seed-app-data/v1/2.7/image/CopyPipInstall/pip-20.0.2-py2.py3-none-any/pip-20.0.2.dist-info to ~/src/github/ansible/ansible-lint/test-venv-py2/lib/python2.7/site-packages/pip-20.0.2.dist-info [DEBUG _sync:48]
221 copy ~/.local/share/virtualenv/seed-app-data/v1/2.7/image/CopyPipInstall/pip-20.0.2-py2.py3-none-any/pip-20.0.2.virtualenv to ~/src/github/ansible/ansible-lint/test-venv-py2/lib/python2.7/site-packages/pip-20.0.2.virtualenv [DEBUG _sync:48]
222 changing mode of ~/src/github/ansible/ansible-lint/test-venv-py2/bin/pip to 755 [INFO util:566]
222 changing mode of ~/src/github/ansible/ansible-lint/test-venv-py2/bin/pip-2.7 to 755 [INFO util:566]
222 changing mode of ~/src/github/ansible/ansible-lint/test-venv-py2/bin/pip2 to 755 [INFO util:566]
222 generated console scripts pip pip-2.7 pip2 [DEBUG base:53]
223 Attempting to release lock 139774343684496 on ~/.local/share/virtualenv/seed-app-data/v1/2.7/wheels.lock [DEBUG filelock:315]
223 Lock 139774343684496 released on ~/.local/share/virtualenv/seed-app-data/v1/2.7/wheels.lock [INFO filelock:318]
223 add activators for Python, CShell, Fish, PowerShell, Bash [INFO session:65]
226 write ~/src/github/ansible/ansible-lint/test-venv-py2/pyvenv.cfg [DEBUG pyenv_cfg:34]
226     home = ~/.pyenv/versions/2.7.15 [DEBUG pyenv_cfg:38]
226     implementation = CPython [DEBUG pyenv_cfg:38]
226     version_info = 2.7.15.final.0 [DEBUG pyenv_cfg:38]
226     virtualenv = 20.0.7 [DEBUG pyenv_cfg:38]
226     include-system-site-packages = false [DEBUG pyenv_cfg:38]
226     base-prefix = ~/.pyenv/versions/2.7.15 [DEBUG pyenv_cfg:38]
227     base-exec-prefix = ~/.pyenv/versions/2.7.15 [DEBUG pyenv_cfg:38]
227     base-executable = ~/.pyenv/versions/2.7.15/bin/python2.7 [DEBUG pyenv_cfg:38]
227 created virtual environment CPython2.7.15.final.0-64 in 170ms
  creator CPython2Posix(dest=~/src/github/ansible/ansible-lint/test-venv-py2, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=~/.local/share/virtualenv/seed-app-data/v1)
  activators PythonActivator,CShellActivator,FishActivator,PowerShellActivator,BashActivator [WARNING __main__:21]

参照: https

bug

最も参考になるコメント

こんにちは、この問題の修正はvirtualenv20.0.8を介してリリースされました。 https://pypi.org/project/virtualenv/20.0.8/(https://virtualenv.pypa.io/en/latest/changelog.html#v20-0-8-2020-03-04)を参照してください。 問題が解決されていない場合は、試して報告してください。 そうでない場合は、ここにコメントしてください。チケットを再開します。 ご不便をおかけしましたことをお詫び申し上げますとともに、この新しいメジャーリリースで予期しないバグを解決するまで、しばらくお待ちいただきますようお願いいたします。
thanks

全てのコメント12件

ImportErrorを観察します。これは、CWDから構成をロードし、CWDがboom.versiontools.get_self_versionをインポートしようとするためです。

それはそれがすべきことではありませんか? あなたの期待でここで何が起こるべきですか?

Python 3 / Python 2 + virtualenv 16でインポートしようとはしませんが、Python 2 + virtualenv20では爆発します。

いいえ、CWDに何かがあるからといって、他のパッケージをインストールするときに爆発することはありません。

@webknjazは、古いvirtualenvにインポートされないことを100%

ポジティブ。 virtualenv 20+では失敗しますが、Python2と組み合わせただけです。それが私が言っていることです。

https://github.com/pypa/virtualenv/pull/1688で修正される可能性がありますが、確認できますか?

さて、確認します。

回帰デモ:
asciicast

(そのPRはまだチェックしていません)

確認済み。 PR#1688はそれを修正します:
asciicast

おかげで、今日それをマージし、リリースをカットします。

こんにちは、この問題の修正はvirtualenv20.0.8を介してリリースされました。 https://pypi.org/project/virtualenv/20.0.8/(https://virtualenv.pypa.io/en/latest/changelog.html#v20-0-8-2020-03-04)を参照してください。 問題が解決されていない場合は、試して報告してください。 そうでない場合は、ここにコメントしてください。チケットを再開します。 ご不便をおかけしましたことをお詫び申し上げますとともに、この新しいメジャーリリースで予期しないバグを解決するまで、しばらくお待ちいただきますようお願いいたします。
thanks

レスポンシブな修正とステルスリリースをありがとう@gaborbernat ! あなたの仕事は大歓迎です!

このページは役に立ちましたか?
0 / 5 - 0 評価