Skip to content

Regex HOWTO: invalid string literals result in SyntaxWarning#148092

Merged
hugovk merged 6 commits intopython:mainfrom
hugovk:3.15-howto-regex
Apr 4, 2026
Merged

Regex HOWTO: invalid string literals result in SyntaxWarning#148092
hugovk merged 6 commits intopython:mainfrom
hugovk:3.15-howto-regex

Conversation

@hugovk
Copy link
Copy Markdown
Member

@hugovk hugovk commented Apr 4, 2026

Since 3.12, invalid Python string literals result in a SyntaxWarning and no longer a DeprecationWarning:

https://docs.python.org/3/whatsnew/3.12.html#other-language-changes

Also:

  • Use sentence case for headers
  • Fix a typo and numbering
  • neither/or -> neither/nor
  • Find/returns -> Find/return

📚 Documentation preview 📚: https://cpython-previews--148092.org.readthedocs.build/

@hugovk hugovk added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Apr 4, 2026
@bedevere-app bedevere-app bot added awaiting core review docs Documentation in the Doc dir skip news labels Apr 4, 2026
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Apr 4, 2026
@picnixz picnixz changed the title Regex HOWTO: invalid string literals result in DeprecationWarning Regex HOWTO: invalid string literals result in SyntaxWarning Apr 4, 2026
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Copy link
Copy Markdown
Member

@StanFromIreland StanFromIreland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hugovk hugovk merged commit fbdbea9 into python:main Apr 4, 2026
34 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Apr 4, 2026
@hugovk hugovk deleted the 3.15-howto-regex branch April 4, 2026 16:13
@miss-islington-app
Copy link
Copy Markdown

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 4, 2026
…nGH-148092)

(cherry picked from commit fbdbea9)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 4, 2026
…nGH-148092)

(cherry picked from commit fbdbea9)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 4, 2026

GH-148097 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Apr 4, 2026
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 4, 2026

GH-148098 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Apr 4, 2026
hugovk added a commit that referenced this pull request Apr 4, 2026
…GH-148092) (#148097)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
hugovk added a commit that referenced this pull request Apr 4, 2026
…GH-148092) (#148098)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants