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

Deprecation warning due to invalid escape sequences. #393

Closed
tirkarthi opened this issue May 1, 2020 · 1 comment
Closed

Deprecation warning due to invalid escape sequences. #393

tirkarthi opened this issue May 1, 2020 · 1 comment

Comments

@tirkarthi
Copy link

@tirkarthi tirkarthi commented May 1, 2020

Checklist

  • I am sure the error is coming from Pyrogram's code and not elsewhere.
  • I have searched in the issue tracker for similar bug reports, including closed ones.
  • I ran pip3 install -U https://github.com/pyrogram/pyrogram/archive/develop.zip and reproduced the issue using the latest development version.

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.

Steps to Reproduce

find . -iname '*.py' | grep -Ev 'rdf4|tool' | xargs -P4 -I{} python3.8 -Wall -m py_compile {}
./compiler/api/compiler.py:29: DeprecationWarning: invalid escape sequence \w
  ARGS_RE = re.compile("[^{](\w+):([\w?!.<>#]+)")
./compiler/api/compiler.py:318: DeprecationWarning: invalid escape sequence \.
  re.sub("Optional\. ", "", docs[i].split("§")[1].rstrip(".") + ".")
./pyrogram/client/client.py:1759: DeprecationWarning: invalid escape sequence \*
  """Upload a file onto Telegram servers, without actually sending the message to anyone.
./pyrogram/client/types/messages_and_media/message.py:776: DeprecationWarning: invalid escape sequence \*
  """Bound method *reply_animation* :obj:`Message`.
./pyrogram/client/types/messages_and_media/message.py:918: DeprecationWarning: invalid escape sequence \*
  """Bound method *reply_audio* of :obj:`Message`.
./pyrogram/client/types/messages_and_media/message.py:1270: DeprecationWarning: invalid escape sequence \*
  """Bound method *reply_document* of :obj:`Message`.
./pyrogram/client/types/messages_and_media/message.py:1671: DeprecationWarning: invalid escape sequence \*
  """Bound method *reply_photo* of :obj:`Message`.
./pyrogram/client/types/messages_and_media/message.py:1869: DeprecationWarning: invalid escape sequence \*
  """Bound method *reply_sticker* of :obj:`Message`.
./pyrogram/client/types/messages_and_media/message.py:2079: DeprecationWarning: invalid escape sequence \*
  """Bound method *reply_video* of :obj:`Message`.
./pyrogram/client/types/messages_and_media/message.py:2222: DeprecationWarning: invalid escape sequence \*
  """Bound method *reply_video_note* of :obj:`Message`.
./pyrogram/client/types/messages_and_media/message.py:2345: DeprecationWarning: invalid escape sequence \*
  """Bound method *reply_voice* of :obj:`Message`.
./pyrogram/client/types/messages_and_media/message.py:2993: DeprecationWarning: invalid escape sequence \*
  """Bound method *download* of :obj:`Message`.
./pyrogram/client/methods/messages/send_sticker.py:46: DeprecationWarning: invalid escape sequence \*
  """Send static .webp or animated .tgs stickers.
./pyrogram/client/methods/messages/send_voice.py:49: DeprecationWarning: invalid escape sequence \*
  """Send audio files.
./pyrogram/client/methods/messages/download_media.py:44: DeprecationWarning: invalid escape sequence \*
  """Download the media from a message.
./pyrogram/client/methods/messages/send_document.py:49: DeprecationWarning: invalid escape sequence \*
  """Send generic files.
./pyrogram/client/methods/messages/send_video_note.py:49: DeprecationWarning: invalid escape sequence \*
  """Send video messages.
./pyrogram/client/methods/messages/send_video.py:53: DeprecationWarning: invalid escape sequence \*
  """Send video files.
./pyrogram/client/methods/messages/send_photo.py:49: DeprecationWarning: invalid escape sequence \*
  """Send photos.
./pyrogram/client/methods/messages/send_audio.py:52: DeprecationWarning: invalid escape sequence \*
  """Send audio files.
./pyrogram/client/methods/messages/send_animation.py:53: DeprecationWarning: invalid escape sequence \*
  """Send animation files (animation or H.264/MPEG-4 AVC video without sound).
@delivrance
Copy link
Member

@delivrance delivrance commented Aug 26, 2020

Should be fixed in recent changes. Closing.

@delivrance delivrance closed this Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.