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

fix: poetry run pytest raises SyntaxError: invalid escape sequence \S #454

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

waketzheng
Copy link

@waketzheng waketzheng commented May 24, 2024

Fixes #465

Checklist

  • poetry run pytest
  • pre-commit run --all-files
  • tox

Motivation and Context

As the docopt project has been not maintained for many years, shall we to use another one to replace it:
docopt/docopt#507 (comment)
https://github.com/jazzband/docopt-ng

@waketzheng waketzheng requested a review from TheKevJames as a code owner May 24, 2024 10:00
@waketzheng waketzheng changed the title chore(deps): use docopt-ng instead fix: poetry run pytest raises SyntaxError: invalid escape sequence \S Jun 8, 2024
@waketzheng
Copy link
Author

@TheKevJames thanks for this useful and easy to use package~

Can this PR be accepted?

@jpmckinney
Copy link

+1 The test failures are only because CI isn't configured to allow third-party PRs to push results to Coveralls.

docopt is not maintained and has deprecated code that will eventually cause SyntaxError in all cases (it currently causes SyntaxWarnings, that are upgraded to errors if run with PYTHONWARNINGS=error or similar).

https://docs.python.org/3/whatsnew/3.12.html

A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+.\d+") now emits a SyntaxWarning ("\d" is an invalid escape sequence, use raw strings for regular expression: re.compile(r"\d+.\d+")). In a future Python version, SyntaxError will eventually be raised, instead of SyntaxWarning. (Contributed by Victor Stinner in gh-98401.)

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.

poetry run pytest raises SyntaxError: invalid escape sequence \S
2 participants