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

Deprecation warning due to invalid escape sequences #1777

Closed
tirkarthi opened this issue Feb 8, 2020 · 5 comments · Fixed by #1787
Closed

Deprecation warning due to invalid escape sequences #1777

tirkarthi opened this issue Feb 8, 2020 · 5 comments · Fixed by #1787
Labels
area/deprecation Deprecation notices

Comments

@tirkarthi
Copy link
Contributor

Description

Deprecation warnings are raised due to invalid escape sequences in Python 3.8 . Below is a log of the warnings raised during compiling all the python files. Using raw strings or escaping them will fix this issue.

find . -iname '*.py'  | xargs -P 4 -I{} python -Wall -m py_compile {}

./tests/unit/lib/schemas/test_schemas_api_caller.py:233: DeprecationWarning: invalid escape sequence \/
  "Content": '{"components":{"schemas":{"Some\/Awesome\/Schema.Object.1":{"type":"object","required":["foo","bar","baz"],"properties":{"foo":{"type":"string"},'
./tests/unit/lib/schemas/test_schemas_api_caller.py:234: DeprecationWarning: invalid escape sequence \/
  '"bar":{"type":"string"},"baz":{"type":"string"}}},"Some\/Awesome\/Schema.Object$2":{"type":"object","required":["foo","bar","baz"],'
./tests/integration/init/schemas/schemas_test_data_setup.py:172: DeprecationWarning: invalid escape sequence \/
  '"$ref":"#\/components\/schemas\/aws.partner\/mongodb.com\/Ticket.Created"},"detail-type":{"type":"string"},"resources":{"type":"array",'
@sriram-mv sriram-mv added the area/deprecation Deprecation notices label Feb 10, 2020
@jfuss
Copy link
Contributor

jfuss commented Feb 11, 2020

While we should fix the warnings they are not Python3.8 specific. I also see them in Python3.7.

@jfuss jfuss changed the title Deprecation warning due to invalid escape sequences in Python 3.8 Deprecation warning due to invalid escape sequences Feb 11, 2020
@tirkarthi
Copy link
Contributor Author

Yes, they were also present in Python 3.7 . In Python 3.8 they were made SyntaxWarning but got reverted later to deprecation warning since a lot of libraries were not fixed extending the deprecation period.

@jfuss
Copy link
Contributor

jfuss commented Feb 11, 2020

@tirkarthi Ahh. That makes more sense! I didn't realize they were reverted back.

@tirkarthi
Copy link
Contributor Author

I will raise a PR for this shortly.

@jfuss
Copy link
Contributor

jfuss commented Feb 11, 2020

@tirkarthi That would be much appreciated! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/deprecation Deprecation notices
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants