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 in Doc/tools/extensions/peg_highlight.py #85845

Closed
tirkarthi opened this issue Aug 31, 2020 · 2 comments
Labels
3.10 only security fixes build The build process and cross-build type-bug An unexpected behavior, bug, or error

Comments

@tirkarthi
Copy link
Member

BPO 41679
Nosy @vstinner, @pablogsal, @miss-islington, @tirkarthi
PRs
  • bpo-41679: Fix invalid escape sequences in the peg_highlight Sphinx extension #22047
  • [3.9] bpo-41679: Fix invalid escape sequences in the peg_highlight Sphinx extension (GH-22047) #22065
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-09-02.16:53:39.137>
    created_at = <Date 2020-08-31.16:11:52.976>
    labels = ['type-bug', '3.10', 'build']
    title = 'Deprecation warning due to invalid escape sequences in Doc/tools/extensions/peg_highlight.py'
    updated_at = <Date 2020-09-02.16:53:39.136>
    user = 'https://github.com/tirkarthi'

    bugs.python.org fields:

    activity = <Date 2020-09-02.16:53:39.136>
    actor = 'pablogsal'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-09-02.16:53:39.137>
    closer = 'pablogsal'
    components = ['Build']
    creation = <Date 2020-08-31.16:11:52.976>
    creator = 'xtreak'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 41679
    keywords = ['patch']
    message_count = 2.0
    messages = ['376158', '376198']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'pablogsal', 'miss-islington', 'xtreak']
    pr_nums = ['22047', '22065']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue41679'
    versions = ['Python 3.10']

    @tirkarthi
    Copy link
    Member Author

    Following warnings are caused in Doc/tools/extensions/peg_highlight.py . These warnings show up during doc builds since the extension is used in the build. This is an easy issue to fix.

    ./python -Wall -m py_compile /root/cpython/Doc/tools/extensions/peg_highlight.py
    /root/cpython/Doc/tools/extensions/peg_highlight.py:62: DeprecationWarning: invalid escape sequence \s
    r"^\s*" + _name + "\s*" + "(\[.*\])?" + "\s*" + "(\(.+\))?" + "\s*(:)",
    /root/cpython/Doc/tools/extensions/peg_highlight.py:62: DeprecationWarning: invalid escape sequence \[
    r"^\s*" + _name + "\s*" + "(\[.*\])?" + "\s*" + "(\(.+\))?" + "\s*(:)",
    /root/cpython/Doc/tools/extensions/peg_highlight.py:62: DeprecationWarning: invalid escape sequence \s
    r"^\s*" + _name + "\s*" + "(\[.*\])?" + "\s*" + "(\(.+\))?" + "\s*(:)",
    /root/cpython/Doc/tools/extensions/peg_highlight.py:62: DeprecationWarning: invalid escape sequence \(
    r"^\s*" + _name + "\s*" + "(\[.*\])?" + "\s*" + "(\(.+\))?" + "\s*(:)",
    /root/cpython/Doc/tools/extensions/peg_highlight.py:62: DeprecationWarning: invalid escape sequence \s
    r"^\s*" + _name + "\s*" + "(\[.*\])?" + "\s*" + "(\(.+\))?" + "\s*(:)",

    @tirkarthi tirkarthi added 3.10 only security fixes build The build process and cross-build type-bug An unexpected behavior, bug, or error labels Aug 31, 2020
    @vstinner
    Copy link
    Member

    vstinner commented Sep 1, 2020

    Do you want to propose a PR to fix these warnings?

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes build The build process and cross-build type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants