Skip to content

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

  • Drop support for Python3.8
  • Pass mypy check
  • pre-commit autoupdate
  • Remove coverage v5 from tox test list

@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.)

@waketzheng
Copy link
Author

@TheKevJames Cloud you take a look at this PR?

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