#31311: Unneeded escape sequences in character classes
--------------------------------------+------------------------------------
     Reporter:  Kimball Leavitt       |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Core (Other)          |                  Version:  3.0
     Severity:  Normal                |               Resolution:
     Keywords:  validators, regex     |             Triage Stage:  Accepted
    Has patch:  1                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by Kimball Leavitt):

 * stage:  Ready for checkin => Accepted


Old description:

> There are at least three places in the regex in django/core/validators.py
> that have unnecessary escape sequences inside of character classes:
>
> -
> https://github.com/django/django/blob/master/django/core/validators.py#L68
> -
> https://github.com/django/django/blob/master/django/core/validators.py#L85
> -
> https://github.com/django/django/blob/master/django/core/validators.py#L162

New description:

 There are at least three places in the regex in django/core/validators.py
 that have unnecessary escape sequences inside of character classes:

 -
 https://github.com/django/django/blob/master/django/core/validators.py#L68
 -
 https://github.com/django/django/blob/master/django/core/validators.py#L85
 -
 https://github.com/django/django/blob/master/django/core/validators.py#L166

--

Comment:

 Thanks for the review. I submitted a PR for this yesterday -
 https://github.com/django/django/pull/12498/files.

 You're right, the third one was wrong. I made the fix first, then
 submitted the ticket, so I hastily grabbed the wrong line. I changed it so
 it's correct
 (https://github.com/django/django/blob/master/django/core/validators.py#L166).

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31311#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.f337aa320ddcd903652657278f830563%40djangoproject.com.

Reply via email to