pypa / virtualenv

Virtual Python Environment builder
https://virtualenv.pypa.io
MIT License
4.78k stars 1.02k forks source link

filelock 3.15.2 breaks virtualenv creation #2740

Closed BenBohannon closed 2 months ago

BenBohannon commented 2 months ago

Issue

Using /usr/local/bin/python (3.10.14) to create virtualenv...
RuntimeError: failed to build image pip, setuptools, wheel because:
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/virtualenv/seed/embed/via_app_data/via_app_data.py", line 54, in _install
    with parent.non_reentrant_lock_for_key(wheel_img.name):
  File "/usr/local/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/usr/local/lib/python3.10/site-packages/virtualenv/util/lock.py", line 1[42](https://github.com/one-thd/what-if-orchestrator/actions/runs/9583596449/job/26425243579?pr=68#step:6:43), in non_reentrant_lock_for_key
    with _CountedFileLock(str(self.path / f"{name}.lock")):
  File "/usr/local/lib/python3.10/site-packages/filelock/_api.py", line 117, in __call__
    instance = super().__call__(
TypeError: _CountedFileLock.__init__() got an unexpected keyword argument 'timeout'

Appears to be caused by this release: https://github.com/tox-dev/filelock/releases/tag/3.15.2

BenBohannon commented 2 months ago

Looks like it was pulled from pypi already

kwist-sgr commented 2 months ago

@BenBohannon Could you please check 3.15.3? This error should be fixed there