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

Hotfix: Restore __init__ method; more robust initialization for singleton locks #338

Merged
merged 14 commits into from
Jun 12, 2024

Conversation

ethanbb
Copy link
Contributor

@ethanbb ethanbb commented Jun 12, 2024

Fixes issue with subclassing brought up in pypa/virtualenv#2735 (discussed in #334)

@ethanbb
Copy link
Contributor Author

ethanbb commented Jun 12, 2024

Will add a test for this as well.

src/filelock/_api.py Outdated Show resolved Hide resolved
@ethanbb
Copy link
Contributor Author

ethanbb commented Jun 12, 2024

Sorry for this mess. I understand if you want to take longer to review this time; did not realize so much infrastructure relies on this package.

@gaborbernat
Copy link
Member

Sorry for this mess. I understand if you want to take longer to review this time; did not realize so much infrastructure relies on this package.

No worries All good.

Copy link

@tamird tamird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable.

src/filelock/_api.py Outdated Show resolved Hide resolved
@ethanbb ethanbb changed the title Hotfix: Restore __init__ method and use different strategy to bypass initialization Hotfix: Restore __init__ method; more robust initialization for singleton locks Jun 12, 2024
Copy link
Member

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add tests for the error message for each parameter differing 👍

src/filelock/_api.py Outdated Show resolved Hide resolved
@ethanbb
Copy link
Contributor Author

ethanbb commented Jun 12, 2024

I had this test failure on test_singleton_locks_are_deleted_when_no_external_references_exist when testing locally as well and couldn't figure out what was wrong. Anyone have an idea?

gaborbernat
gaborbernat previously approved these changes Jun 12, 2024
Copy link
Member

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ethanbb
Copy link
Contributor Author

ethanbb commented Jun 12, 2024

I had this test failure on test_singleton_locks_are_deleted_when_no_external_references_exist when testing locally as well and couldn't figure out what was wrong. Anyone have an idea?

Never mind, got it

Copy link
Member

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gaborbernat gaborbernat enabled auto-merge (squash) June 12, 2024 22:52
@gaborbernat gaborbernat merged commit 3d7b1a6 into tox-dev:main Jun 12, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants