liormizr / s3path

s3path is a pathlib extension for AWS S3 Service
Apache License 2.0
206 stars 39 forks source link

Invalid escape sequence \Z #174

Open Alexander-Serov opened 2 months ago

Alexander-Serov commented 2 months ago
fitting.py:14: in <module>
    from s3path import PureS3Path, S3Path
.venv/lib/python3.8/site-packages/s3path/__init__.py:28: in <module>
    from .old_versions import (
E     File "/builds/project/.venv/lib/python3.8/site-packages/s3path/old_versions.py", line 76
E       new_regex_pattern += '/*\Z'
E                            ^
E   SyntaxError: invalid escape sequence \Z

Suggestion: mark this as raw (r-) string:

E       new_regex_pattern += r'/*\Z'

and the problem should be solved.

I only have it on some builds, so may depend on the python version used. All of my systems have 3.8.* but it fails only on some.

liormizr commented 1 month ago

I'll update here when deploying the next version with this fix

Thank you @Alexander-Serov for the fix

Alexander-Serov commented 1 month ago

@liormizr Sure!