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

Fixed #27648 -- Deprecated (iLmsu) regex groups in url() patterns. #7749

Merged
merged 1 commit into from Dec 27, 2016

Conversation

timgraham
Copy link
Member

@knbk
Copy link
Contributor

knbk commented Dec 27, 2016

LGTM

warnings.warn(
"Using (?%s) in url() patterns is deprecated." % ch,
RemovedInDjango21Warning
)
# All of these are ignorable. Walk to the end of the
# group.
walk_to_end(ch, pattern_iter)
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps it would be clearer to repeat this line:

                    if ch in "iLmsu#":
                        warnings.warn(
                            "Using (?%s) in url() patterns is deprecated." % ch,
                            RemovedInDjango21Warning
                        )
                        # All of these are ignorable. Walk to the end of the
                        # group.
                        walk_to_end(ch, pattern_iter)
                    elif ch in "!=<":
                        # All of these are ignorable. Walk to the end of the
                        # group.
                        walk_to_end(ch, pattern_iter)

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed, thanks.

@timgraham timgraham merged commit 51cde87 into django:master Dec 27, 2016
@timgraham timgraham deleted the deprecate-flags branch December 27, 2016 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants