#27549: django.utils.functional.lazy cannot be used with regular expressions 
module
(re)
-----------------------------------------+------------------------
               Reporter:  Daniel Hahler  |          Owner:  nobody
                   Type:  Bug            |         Status:  new
              Component:  Utilities      |        Version:  master
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 {{{
 from django.utils.functional import lazy
 import re

 f = lazy(lambda: 's', str)()
 re.match('s', f)
 }}}

 results in `TypeError: expected string or bytes-like object`.

 This gets generated in
 
https://github.com/python/cpython/blob/e02afa7a78f1515dd7386912812685fb4d519a44/Modules/_sre.c#L338-L342,
 where the `PyObject_GetBuffer` call appears to fail.

--
Ticket URL: <https://code.djangoproject.com/ticket/27549>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.abb9cd4b2090c51cd288ec6a46d4076d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to