Skip to content

Regular expression flags warning in Python 3.6 #467

@rudolphfroger

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions