GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Cryptic deprecation notice in the re module · Issue #99308 · python/cpython

Cryptic deprecation notice in the re module #99308

New issue
Copy link
New issue
Copy link
Closed
Closed
Cryptic deprecation notice in the re module#99308
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirtopic-regex

Description

@Kentzo
Kentzo
opened on Nov 10, 2022
Issue body actions

Documentation

I'm confused by the following notice:

Deprecated since version 3.11: Group id containing anything except ASCII digits.

After some digging I found the related PR.

With the notice as is I would assume that non-ASCII digits would be interpreted as a name, but after reading the PR it's obvious that it cannot be the case since names must contain ASCII letters and digits.

Perhaps it's better to rewrite it to match the notice for re.sub:

Deprecated since version 3.11: Group id containing anything except ASCII digits. Group names containing non-ASCII characters in bytes replacement strings.

See https://discuss.python.org/t/cryptic-3-11-deprecation-notice-in-the-re-module-doc/20903

  • PR: [3.11] gh-99308: Fix re docstring (GH-99308) #99310
  • PR: gh-99308: Clarify re docs for byte pattern group names #99311
  • PR: [3.11] Clarify re docs for byte pattern group names (GH-99308) #101001

Activity

  1. Kentzo
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    on Nov 10, 2022
  2. Kentzo
    added a commit that references this issue on Nov 10, 2022

    pythongh-99308: Fix wording of the deprecation notice in re for 3.12

    002af29
  3. AlexWaygood
    added
    topic-regex
    on Nov 10, 2022
  4. bedevere-bot commented on Nov 10, 2022

    @bedevere-bot
    bedevere-bot
    on Nov 10, 2022
    More actions

    GH-99310 is a backport of this pull request to the 3.11 branch.

  5. Kentzo
    added a commit that references this issue on Nov 10, 2022

    pythongh-99308: Fix wording of the deprecation notice in re for 3.11

    e2c4950
  6. gvanrossum commented on Nov 10, 2022

    @gvanrossum
    gvanrossum
    on Nov 10, 2022
    Member
    More actions

    Maybe @CAM-Gerlach can review this? It does look like the original PR left some unclear deprecation notices.

  7. CAM-Gerlach commented on Nov 10, 2022

    @CAM-Gerlach
    CAM-Gerlach
    on Nov 10, 2022
    Member
    More actions

    I'd reviewed the linked #99311 previously, but while I didn't explicitly state it in my initial review, yeah the textual clarifications I suggest there should also be made in the other two places from the same original PR where a change in the allowed values for name in patterns and replacements is mentioned.

    Also, since this was an unusual case where a deprecation made in one released turned into a change in the next, the changes will likely need to be manually backported with the cherry-picker script. While doing so, it would be really helpful to change the .. deprecated directive to deprecated-removed, to clarify both human-readibly and programmatically that the planned removal of support for the non-ASCII/numeric values will be in the very next version, which is not currently stated anywhere (and also isn't the standard deprecation policy).

  8. Kentzo
    added 2 commits that reference this issue on Nov 30, 2022

    pythongh-99308: Fix typos and make wording consistent

    0aa2260

    pythongh-99308: Fix missing dot.

    65b9453
  9. kumaraditya303
    added a commit that references this issue on Dec 25, 2022

    gh-99308: Clarify re docs for byte pattern group names (#99311)

    dbc1e69
  10. iritkatriel
    added a commit that references this issue on Dec 28, 2022

    Merged main into regmachine branch (#50)

    fdc73cb
  11. hauntsaninja commented on Jan 6, 2023

    @hauntsaninja
    hauntsaninja
    on Jan 6, 2023
    Contributor
    More actions

    It looks like the wording in #99311 was not backported to 3.11, because of some confusion: the wording change was to "version changed" which is 3.12, but on the 3.11 branch it exists as this deprecation notice.

    A corresponding PR to the 3.11 branch matching the wording is welcome!

  12. Kentzo
    added 2 commits that reference this issue on Jan 12, 2023

    pythongh-99308: Fix wording of the deprecation notice in re for 3.11

    7262b15

    pythongh-99308: Fix wording of the deprecation notice in re for 3.11

    7b84a3d
  13. bedevere-bot commented on Jan 12, 2023

    @bedevere-bot
    bedevere-bot
    on Jan 12, 2023
    More actions

    GH-101001 is a backport of this pull request to the 3.11 branch.

  14. hauntsaninja
    added a commit that references this issue on Mar 4, 2023

    [3.11] Clarify re docs for byte pattern group names (GH-99308) (#101001)

    cda1d52
  15. hauntsaninja
    closed this as completedon Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirDocumentation in the Doc dirtopic-regex

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.