virtualenv icon indicating copy to clipboard operation
virtualenv copied to clipboard

virtualenv creation broken by filelock 3.15.0 release

Open tamird opened this issue 1 year ago • 8 comments

Creating virtualenv root in /codebuild/output/src4294789612/src/actions-runner/_work/python_monorepo/python_monorepo/.venv

object.__init__() takes exactly one argument (the instance to initialize)
Exception ignored in: <function BaseFileLock.__del__ at 0x7f8ac1d91760>
Traceback (most recent call last):
  File "/root/.local/share/pipx/venvs/poetry/lib/python3.11/site-packages/filelock/_api.py", line 365, in __del__
    self.release(force=True)
  File "/root/.local/share/pipx/venvs/poetry/lib/python3.11/site-packages/virtualenv/util/lock.py", line 34, in release
    with self.thread_safe:
         ^^^^^^^^^^^^^^^^
AttributeError: '_CountedFileLock' object has no attribute 'thread_safe'

https://github.com/tox-dev/filelock/pull/334 looks the likeliest culprit.

tamird avatar Jun 12 '24 18:06 tamird

+1 this issue is occuring for us as well

rlizzo avatar Jun 12 '24 18:06 rlizzo

Wow, searching far and wide and just now found this issue. Looks like it's happening to everyone!

For me, I'll just pin filelock for the time being:

pip install --upgrade hatch filelock==3.14.0

EarningsCall avatar Jun 12 '24 18:06 EarningsCall

The offending version of filelock has been yanked from PyPi, so this should basically be resolved. You might need to force a reinstallation of virtualenv (or whatever depended on it).

schmod avatar Jun 12 '24 19:06 schmod

Note to others: if you're GH Actions checks are failing you may need to purge your env caches that are created by actions/cache@v2

[edit] I removed my edit because I accidentally posted on the wrong repository! Apologies for the noise 🙏

susodapop avatar Jun 12 '24 19:06 susodapop

I think this has resurfaced with filelock 3.15.2?

edgarrmondragon avatar Jun 19 '24 14:06 edgarrmondragon

Looks like 3.15.2 just got yanked from PyPI

image

benjamin-awd avatar Jun 19 '24 14:06 benjamin-awd

Just noticed 3.15.2 is also yanked from PyPI

jkanche avatar Jun 19 '24 14:06 jkanche

3.15.3 was released, fixed the problem for me

sdmitriev1 avatar Jun 19 '24 17:06 sdmitriev1