blaze / blaze/odo

Deprecation warning due to invalid escape sequences

Open
#625 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1k
Forks
131
PR merge metrics
No merged PRs in 30d

Description

Deprecation warning due to invalid escape sequences. Using raw strings or escaping them again helps in resolving this. Check https://github.com/asottile/pyupgrade/ for automatic fix of this.

```
find . -iname '*.py' | grep -Ev 'rdf4|tool|doc' | xargs -P4 -I{} python3.8 -Wall -m py_compile {}
./odo/backends/bcolz.py:71: DeprecationWarning: invalid escape sequence \.
@resource.register('.*\.bcolz/?')
./odo/backends/sql.py:318: DeprecationWarning: invalid escape sequence \s
"""Creates a cached sqlalchemy engine.
./odo/backends/sql.py:701: DeprecationWarning: invalid escape sequence \w
pattern = 'hive://((?P[a-zA-Z_]\w*)@)?(?P[\w.]+)(:(?P\d*))?(/(?P\w*))?'
./odo/backends/hdfs.py:514: DeprecationWarning: invalid escape sequence \w
hdfs_pattern = '(((?P[a-zA-Z]\w*)@)?(?P[\w.-]*)?(:(?P\d+))?:)?(?P[/\w.*-]+)'
./odo/backends/text.py:71: DeprecationWarning: invalid escape sequence \.
@resource.register('.+\.(txt|log)(.gz)?')
./odo/backends/aws.py:155: DeprecationWarning: invalid escape sequence \.
@resource.register('s3://.*\.csv(\.gz)?', priority=18)
./odo/backends/aws.py:160: DeprecationWarning: invalid escape sequence \*
@resource.register('s3://.*\*.csv(\.gz)?', priority=19)
./odo/backends/aws.py:182: DeprecationWarning: invalid escape sequence \.
@resource.register('s3://.*\.txt(\.gz)?', priority=18)
./odo/backends/aws.py:187: DeprecationWarning: invalid escape sequence \.
@resource.register('s3://.*\.json(\.gz)?', priority=18)
./odo/backends/csv.py:340: DeprecationWarning: invalid escape sequence \s
elif (all(re.match('^\s*\D\w*\s*$', n) for n in found_names) and
./odo/backends/csv.py:400: DeprecationWarning: invalid escape sequence \.
@resource.register('.+\.(csv|tsv|ssv|data|dat)(\.gz|\.bz2?)?')
./odo/backends/csv.py:405: DeprecationWarning: invalid escape sequence \*
@resource.register('.*\*.+', priority=12)
./odo/backends/ssh.py:89: DeprecationWarning: invalid escape sequence \w
ssh_pattern = '((?P[a-zA-Z]\w*)@)?(?P[\w.-]*)(:(?P\d+))?:(?P[/\w.*-]+)'
./odo/backends/sas.py:16: DeprecationWarning: invalid escape sequence \.
@resource.register('.+\.(sas7bdat)')
./odo/backends/json.py:213: DeprecationWarning: invalid escape sequence \.
@resource.register('json://.*\.json(\.gz)?', priority=11)
./odo/backends/json.py:220: DeprecationWarning: invalid escape sequence \.
@resource.register('.*\.jsonlines(\.gz)?', priority=11)
./odo/backends/json.py:221: DeprecationWarning: invalid escape sequence \.
@resource.register('jsonlines://.*\.json(\.gz)?', priority=11)
./odo/backends/json.py:228: DeprecationWarning: invalid escape sequence \.
@resource.register('.*\.json(\.gz)?')
./odo/resource.py:14: DeprecationWarning: invalid escape sequence \.
""" Refer to data by strings
./odo/directory.py:53: DeprecationWarning: invalid escape sequence \*
@resource.register('.+' + re_path_sep + '\*\..+', priority=15)
./odo/regex.py:29: DeprecationWarning: invalid escape sequence \d
"""
./versioneer.py:467: DeprecationWarning: invalid escape sequence \s
LONG_VERSION_PY['git'] = '''
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.