pymc-devs / pymc

Bayesian Modeling and Probabilistic Programming in Python
https://docs.pymc.io/
Other
8.66k stars 2k forks source link

Deprecation warning due to invalid escape sequences in Python 3.7 #3878

Closed tirkarthi closed 4 years ago

tirkarthi commented 4 years ago

Description of your problem

Deprecation warnings are raised due to invalid escape sequences. This can be fixed by using raw strings or escaping the literals.

 find . -iname '*.py' | grep -v example | xargs -P 4 -I{} python3.8 -Wall -m py_compile {} ./pymc3/util.py:27: DeprecationWarning: invalid escape sequence \_
  """Consistently escape LaTeX special characters for _repr_latex_ in IPython
./pymc3/distributions/continuous.py:106: DeprecationWarning: invalid escape sequence \s
  """
./pymc3/distributions/continuous.py:773: DeprecationWarning: invalid escape sequence \m
  '\mathit{{mu}}={},~\mathit{{sigma}}={},a={},b={})$'
./pymc3/distributions/continuous.py:2971: DeprecationWarning: invalid escape sequence \l
  """
./pymc3/distributions/continuous.py:4133: DeprecationWarning: invalid escape sequence \l
  """
./pymc3/ode/ode.py:28: DeprecationWarning: invalid escape sequence \d
  """
./pymc3/smc/sample_smc.py:36: DeprecationWarning: invalid escape sequence \m
  """
./pymc3/math.py:40: DeprecationWarning: invalid escape sequence \o
  """Return the Kronecker product of arguments:
./pymc3/math.py:63: DeprecationWarning: invalid escape sequence \o
  """Apply op to krons and m in a way that reproduces ``op(kronecker(*krons), m)``
./pymc3/variational/inference.py:295: DeprecationWarning: invalid escape sequence \l
  """**Kullback Leibler Divergence Inference**
./pymc3/variational/updates.py:684: DeprecationWarning: invalid escape sequence \s
  """ Adadelta updates
./pymc3/gp/gp.py:227: DeprecationWarning: invalid escape sequence \s
  """

Versions and main components

rpgoldman commented 4 years ago

I'm sitting on infinite hold right now, so I will see if I can fix these now.

rpgoldman commented 4 years ago

Fixed by #3879

tirkarthi commented 4 years ago

Thanks @rpgoldman

rpgoldman commented 4 years ago

@tirkarthi No problem! Thanks for passing this on, and let us know if it's not fully fixed.