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

Replace \* with \\* in docstrings #68

Closed
wants to merge 1 commit into from

Conversation

ashwin153
Copy link

@ashwin153 ashwin153 commented Nov 25, 2021

For example,

https://github.com/jek/blinker/blob/b5e9f0629200d2b2f62e13e595b802948bb4fefb/blinker/base.py#L250

Causes the following deprecation warning.

DeprecationWarning: invalid escape sequence \*

Here's a reproduction.

import warnings
warnings.simplefilter("always")
x = "\*\*kwargs"
# <stdin>:1: DeprecationWarning: invalid escape sequence \*

Instead, the \* should be replaced by \\*. The following does not raise a DeprecationWarning.

import warnings
warnings.simplefilter("always")
x = "\\*\\*kwargs"

Not a huge deal, but these warnings pollute my build logs.

@blacklight
Copy link

Can this PR please be merged? On Python 3.6 this is actually a breaking SyntaxError:

/usr/lib/python3.6/site-packages/flask/signals.py:13: in <module>
    from blinker import Namespace
/usr/lib/python3.6/site-packages/blinker/__init__.py:1: in <module>
    from blinker.base import (
E     File "/usr/lib/python3.6/site-packages/blinker/base.py", line 110
E       """
E        ^
E   SyntaxError: invalid escape sequence \*

@ashwin153
Copy link
Author

@yackx

@yackx
Copy link
Contributor

yackx commented Mar 3, 2022

Sorry @ashwin153 I am actually not involved in the project. @jek Can you please remove me from the contributor's list?

@juliangilbey
Copy link

This was fixed by 194e17a on 28 Oct 2020 by making the strings raw strings. Were you getting the deprecation warning even with the current master version?

@ashwin153
Copy link
Author

Oh maybe it's already fixed. Would it be possible to do a release?

@davidism
Copy link
Member

Fixed by #63, although both of these should have used ReST code markup instead.

``kwargs``

@davidism davidism closed this Jul 17, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants