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

Add stacklevel to deprecation warnings for argument name change #121

Merged
merged 2 commits into from
Dec 26, 2021
Merged

Add stacklevel to deprecation warnings for argument name change #121

merged 2 commits into from
Dec 26, 2021

Conversation

XuehaiPan
Copy link
Contributor

Changes:

  1. Add * to function signature to mark the deprecated argument poll_intervall as keyword only.

  2. Add stacklevel=2 for deprecation warnings, show the file and lineno for the user's code rather than this module (filelock).

    From Fix misspelled keyword argument poll_interval for method acquire #119 (comment):

    I don't know where it's coming from (maybe virtualenv?) but I'm getting a lot of warnings

src/filelock/_api.py Show resolved Hide resolved
@XuehaiPan XuehaiPan requested a review from gaborbernat December 4, 2021 08:27
tests/test_filelock.py Outdated Show resolved Hide resolved
tests/test_filelock.py Show resolved Hide resolved
@gaborbernat gaborbernat merged commit 7dc1378 into tox-dev:main Dec 26, 2021
@XuehaiPan XuehaiPan deleted the better-warnings branch December 26, 2021 13:54
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.

2 participants