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

Fix DeprecationWarnings in newer Pythons (3.6+) #41

Open
mcarans opened this issue Nov 27, 2018 · 0 comments · May be fixed by #43
Open

Fix DeprecationWarnings in newer Pythons (3.6+) #41

mcarans opened this issue Nov 27, 2018 · 0 comments · May be fixed by #43

Comments

@mcarans
Copy link

mcarans commented Nov 27, 2018

I see these warnings each time I run:

...python3.6/site-packages/slugify/main.py:65
  ...python3.6/site-packages/slugify/main.py:65: DeprecationWarning: invalid escape sequence \p
    '''

...python3.6/site-packages/slugify/main.py:98
  ...python3.6/site-packages/slugify/main.py:98: DeprecationWarning: invalid escape sequence \L
    PRETRANSLATE = re.compile(u'(\L<options>)', options=convert_dict)

...python3.6/site-packages/slugify/main.py:140
  ...python3.6/site-packages/slugify/main.py:140: DeprecationWarning: invalid escape sequence \p
    unwanted_chars_re = u'[^\p{{AlNum}}{safe_chars}]+'.format(safe_chars=re.escape(self._safe_chars or ''))

...python3.6/site-packages/slugify/main.py:144
  ...python3.6/site-packages/slugify/main.py:144: DeprecationWarning: invalid escape sequence \p
    unwanted_chars_and_words_re = unwanted_chars_re + u'|(?<!\p{AlNum})(?:\L<stop_words>)(?!\p{AlNum})'

Perhaps this is the problem:
https://stackoverflow.com/questions/50504500/deprecationwarning-invalid-escape-sequence-what-to-use-instead-of-d

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 a pull request may close this issue.

1 participant