Skip to content

[MRG]: DeprecationWarning: invalid escape sequence in Python 3.6#526

Merged
lesteve merged 3 commits intojoblib:masterfrom
Attractadore:feature
Jun 1, 2017
Merged

[MRG]: DeprecationWarning: invalid escape sequence in Python 3.6#526
lesteve merged 3 commits intojoblib:masterfrom
Attractadore:feature

Conversation

@Attractadore
Copy link
Copy Markdown
Contributor

If python 3.6 is run with the -Wd flags, DeprecationWarnings are thrown whenever a backslash is not used in an escape sequence. I fixed all these warnings, using raw strings where possible and double backslashes otherwise.

@codecov
Copy link
Copy Markdown

codecov bot commented May 29, 2017

Codecov Report

Merging #526 into master will decrease coverage by 0.1%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #526      +/-   ##
==========================================
- Coverage   93.78%   93.68%   -0.11%     
==========================================
  Files          37       37              
  Lines        4779     4779              
==========================================
- Hits         4482     4477       -5     
- Misses        297      302       +5
Impacted Files Coverage Δ
joblib/func_inspect.py 91.42% <ø> (ø) ⬆️
joblib/test/test_func_inspect.py 91.15% <ø> (ø) ⬆️
joblib/test/test_testing.py 100% <ø> (ø) ⬆️
joblib/test/test_format_stack.py 100% <100%> (ø) ⬆️
joblib/_memory_helpers.py 73.84% <100%> (ø) ⬆️
joblib/_parallel_backends.py 91.21% <0%> (-2.03%) ⬇️
joblib/test/test_pool.py 98.83% <0%> (-0.78%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2addc76...4ef486c. Read the comment docs.

@lesteve
Copy link
Copy Markdown
Member

lesteve commented Jun 1, 2017

LGTM, thanks!

Of course this is not tested so it is likely that other things like this will crop with time but oh well ... we will fix them when DeprecationWarnings turn into errors.

@lesteve lesteve merged commit 9f78312 into joblib:master Jun 1, 2017
@ogrisel
Copy link
Copy Markdown
Contributor

ogrisel commented Jun 1, 2017

Thanks @Attractadore!

gedakc added a commit to gedakc/manuskript that referenced this pull request Nov 10, 2018
Fix by ensuring that regular expressions are constructed using either
raw string literals [1] or double backslashes [2].

[1] https://stackoverflow.com/questions/44325948/pandas-invalid-escape-sequence-after-update
[2] joblib/joblib#526

Note that python only shows the deprecation warnings on initial run [3].

[3] https://bugs.python.org/issue30091

To work around this issue, remove the cached bytecode with:

    find . -name "__pycache__" -exec rm -rf {} \;

Then to prevent compiling to bytecode add the "-B" option to python:

    python3 -B -m pytest -vs
gedakc added a commit to gedakc/manuskript that referenced this pull request Nov 16, 2018
Fix by ensuring that regular expressions are constructed using either
raw string literals [1] or double backslashes [2].

[1] https://stackoverflow.com/questions/44325948/pandas-invalid-escape-sequence-after-update
[2] joblib/joblib#526

Note that python only shows the deprecation warnings on initial run [3].

[3] https://bugs.python.org/issue30091

To work around this issue, remove the cached bytecode with:

    find . -name "__pycache__" -exec rm -rf {} \;

Then to prevent compiling to bytecode add the "-B" option to python:

    python3 -B -m pytest -vs
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.

3 participants