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

SyntaxWarning/DeprecatedWarnings invalid escape sequence #387

Open
Taragolis opened this issue Apr 25, 2024 · 0 comments · Fixed by #396
Open

SyntaxWarning/DeprecatedWarnings invalid escape sequence #387

Taragolis opened this issue Apr 25, 2024 · 0 comments · Fixed by #396

Comments

@Taragolis
Copy link

Taragolis commented Apr 25, 2024

At least latest version oss2 raise this warnings, but I guess it might affect older ones

oss2/api.py:497: DeprecationWarning: invalid escape sequence \&
oss2/utils.py:156: DeprecationWarning: invalid escape sequence \w

r'http://your-bucket.oss-cn-hangzhou.aliyuncs.com/logo.jpg?OSSAccessKeyId=YourAccessKeyId\&Expires=1447178011&Signature=UJfeJgvcypWq6Q%2Bm3IJcSHbvSak%3D'

pattern = '^([a-zA-Z]+://)?[\w.-]+(:\d+)?$'

Since Python 3.12 this kind of warning become SyntaxWarning, see: python/cpython#98401, which are not ignored by default as DeprecatedWarnings it would be nice if regexp/docstrings will wrap into the raw strings

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 a pull request may close this issue.

1 participant