Re: [Django] #31311: Unneeded escape sequences in character classes

2020-02-28 Thread Django
#31311: Unneeded escape sequences in character classes
--+
 Reporter:  Kimball Leavitt   |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  closed
Component:  Core (Other)  |  Version:  3.0
 Severity:  Normal|   Resolution:  fixed
 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 Mariusz Felisiak ):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"7c6b66383da5f9a67142334cd2ed2d769739e8f1" 7c6b663]:
 {{{
 #!CommitTicketReference repository=""
 revision="7c6b66383da5f9a67142334cd2ed2d769739e8f1"
 Fixed #31311 -- Removed unneeded escapes in validator regexes.

 Special characters lose their special meaning inside sets of characters.

 "-" lose its special meaning if it's placed as the first or last
 character.
 }}}

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.fdf0fc1173acd1d01ead40830a7a4772%40djangoproject.com.


Re: [Django] #31311: Unneeded escape sequences in character classes

2020-02-27 Thread Django
#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: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.f337aa320ddcd903652657278f830563%40djangoproject.com.


Re: [Django] #31311: Unneeded escape sequences in character classes

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

 * stage:  Accepted => Ready for checkin


Comment:

 [https://github.com/django/django/pull/12498 PR]

 Yep, this looks fine. Thank you.

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.a35d2f11b17060261d122e6ca58b754c%40djangoproject.com.


Re: [Django] #31311: Unneeded escape sequences in character classes

2020-02-27 Thread Django
#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):

 * has_patch:  0 => 1


-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.fba942d06816a815b5a95cbd71e946ac%40djangoproject.com.


Re: [Django] #31311: Unneeded escape sequences in character classes

2020-02-26 Thread Django
#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:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Carlton Gibson):

 * has_patch:  1 => 0
 * stage:  Unreviewed => Accepted


Comment:

 The third example here (L162) is:

 {{{
 r'((?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+)(?:[A-Z0-9-]{2,63}(?https://code.djangoproject.com/ticket/31311#comment:1>
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.431c84eb0e730a988dc3c60583995339%40djangoproject.com.


[Django] #31311: Unneeded escape sequences in character classes

2020-02-26 Thread Django
#31311: Unneeded escape sequences in character classes
-+-
   Reporter:  kimbo  |  Owner:  nobody
   Type: | Status:  new
  Cleanup/optimization   |
  Component:  Core   |Version:  3.0
  (Other)|
   Severity:  Normal |   Keywords:  validators, regex
   Triage Stage: |  Has patch:  1
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 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

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/048.c4db92d7aa6d8720a1375ca450b9a01e%40djangoproject.com.