Skip to content

Regular expression flags warning in Python 3.6 #467

Closed

Description

@rudolphfroger

Babel with Python 3.6 issues a DeprecationWarning at import time:

site-packages/babel/plural.py:301: DeprecationWarning: Flags not at the start of the expression \s+(?u)
site-packages/babel/localtime/_unix.py:8: DeprecationWarning: Flags not at the start of the expression ^Time Zone: (.*)$(?m (truncated)

Relevant Python 3.5 docs about regular expression flags:

It should be used first in the expression string, or after one or more whitespace characters. If there are non-whitespace characters before the flag, the results are undefined.

Python 3.6 docs:

Flags should be used first in the expression string.

Activity

  1. akx commented on Feb 2, 2018

    @akx
    Member

    This seems to have been fixed in f89f487 (Babel 2.4+).

  2. added a commit that references this issue on Jun 24, 2022
  3. added a commit that references this issue on Jun 24, 2022
  4. added a commit that references this issue on Jun 24, 2022
  5. added a commit that references this issue on Jun 24, 2022
  6. added a commit that references this issue on Jun 24, 2022
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions