Changes between Initial Version and Version 2 of Ticket #28628


Ignore:
Timestamp:
Sep 23, 2017, 8:08:36 AM (7 years ago)
Author:
James Bennett
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28628

    • Property Summary Audit for and abolish all use of '\d' in URL patternsAudit for and abolish all use of '\d' in regexes
  • Ticket #28628 – Description

    initial v2  
    1 Now that we're in the 2.0 release cycle and Python 3 only, any examples or code in Django using a `\d` in a regex URL pattern should be replaced with `[0-9]`, as `\d` on Python 3 matches any character with Unicode category [Nd], which is almost certainly not what people expect. Changing to explicit `[0-9]`, perhaps with a note about why it should be preferred, would be better.
     1Now that we're in the 2.0 release cycle and Python 3 only, any examples or code in Django using a `\d` in a regex should be replaced with `[0-9]`, as `\d` on Python 3 matches any character with Unicode category [Nd], which is almost certainly not what people expect. Changing to explicit `[0-9]`, perhaps with a note about why it should be preferred, would be better.
Back to Top