#36903: inspect.signature should use FORWARDREF annotation_format for python 
3.14+
-------------------------------------+-------------------------------------
     Reporter:  93578237             |                    Owner:  93578237
         Type:  Bug                  |                   Status:  assigned
    Component:  Core (Other)         |                  Version:  6.0
     Severity:  Release blocker      |               Resolution:
     Keywords:  typing, inspect,     |             Triage Stage:  Accepted
  deferred annotations               |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

 * owner:  (none) => 93578237
 * status:  new => assigned

Comment:

 A new function is appealing, since the last time we touched this, we ended
 up with bloat like this:

 {{{#!py
     # As the annotations are not used in any case, inspect the signature
 with
     # FORWARDREF to leave any deferred annotations unevaluated.
     if PY314:
         signature = inspect.signature(
             func, annotation_format=annotationlib.Format.FORWARDREF
         )
     else:
         signature = inspect.signature(func)
 }}}

 Now that we're aware of the multiple call sites that matter, DRY-ing this
 out makes sense to me.

 Thanks for volunteering.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36903#comment:8>
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 visit 
https://groups.google.com/d/msgid/django-updates/0107019c2e63c69f-8dc42e02-a376-4d7f-a686-02e0c0a1cb58-000000%40eu-central-1.amazonses.com.

Reply via email to