Skip to content
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

Poetry build fails with new filelock bugfix version #343

Closed
wassupxP opened this issue Jun 19, 2024 · 9 comments
Closed

Poetry build fails with new filelock bugfix version #343

wassupxP opened this issue Jun 19, 2024 · 9 comments

Comments

@wassupxP
Copy link

wassupxP commented Jun 19, 2024

Hi guys, new bugfix release broke all poetry build. Seems that the bugfix changed API, is this intended? I believe this can be reproduced on any python package when building via poetry.

pip install poetry
poetry build
Traceback:
Traceback (most recent call last):
  File "/opt/contrib/lib/python3.9/site-packages/filelock/_api.py", line 388, in __del__
Exception ignored in: <function BaseFileLock.__del__ at 0x10684e940>
Traceback (most recent call last):
  File "/opt/contrib/lib/python3.9/site-packages/filelock/_api.py", line 388, in __del__
    self.release(force=True)
  File "/opt/contrib/lib/python3.9/site-packages/virtualenv/util/lock.py", line 34, in release
    with self.thread_safe:
AttributeError: '_CountedFileLock' object has no attribute 'thread_safe'
    self.release(force=True)
  File "/opt/contrib/lib/python3.9/site-packages/virtualenv/util/lock.py", line 34, in release
    with self.thread_safe:
AttributeError: '_CountedFileLock' object has no attribute 'thread_safe'
failed to build image setuptools, pip because:
Traceback (most recent call last):
  File "/opt/contrib/lib/python3.9/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 "/opt/contrib/lib/python3.9/contextlib.py", line 119, in __enter__
    return next(self.gen)
  File "/opt/contrib/lib/python3.9/site-packages/virtualenv/util/lock.py", line 142, in non_reentrant_lock_for_key
    with _CountedFileLock(str(self.path / f"{name}.lock")):
  File "/opt/contrib/lib/python3.9/site-packages/filelock/_api.py", line 117, in __call__
    instance = super().__call__(
TypeError: __init__() got an unexpected keyword argument 'timeout'
Traceback (most recent call last):
  File "/opt/contrib/lib/python3.9/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 "/opt/contrib/lib/python3.9/contextlib.py", line 119, in __enter__
    return next(self.gen)
  File "/opt/contrib/lib/python3.9/site-packages/virtualenv/util/lock.py", line 142, in non_reentrant_lock_for_key
    with _CountedFileLock(str(self.path / f"{name}.lock")):
  File "/opt/contrib/lib/python3.9/site-packages/filelock/_api.py", line 117, in __call__
    instance = super().__call__(
TypeError: __init__() got an unexpected keyword argument 'timeout'
@donsokolone
Copy link

Hi, I stumbled upon the same problem with 3.15.2 when running tox which uses filelock as dependency.

@gaborbernat
Copy link
Member

Yanked. Sorry for the trouble. cc @kwist-sgr, please make your fix on top of #344

@wassupxP
Copy link
Author

Do you know what is the ETA for this one? Would it be possible to drop this release as poetry and tox is used by plenty of users?

Thanks for the prompt response though!

@donsokolone
Copy link

donsokolone commented Jun 19, 2024

@wassupxP you could exclude this version from your requirements to get you up and running quickly

filelock>=3.13.1,!=3.15.2

@gaborbernat
Copy link
Member

Some relevant discussion about the problem in #340

@wassupxP
Copy link
Author

In my standard flow I won't even get to installation of my packages. The proposed workaround won't work for me, but thanks @donsokolone. I already have a workaround by forcing installation of previous version before poetry installation or falling back to pip for a while.

@hanssl
Copy link

hanssl commented Jun 19, 2024

I have not found a way to block 3.15.x because the file dependency is not in my code. Creating the poetry venv pulls in filelock via virtualenv.

Screenshot 2024-06-19 at 11 34 00 AM

@ugomancz
Copy link

I believe this issue has been fixed with the 3.15.3 release. I am not able to reproduce the issue anymore.

@wassupxP
Copy link
Author

Yes, thank you for quick fix, closing the ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants