Changes between Initial Version and Version 1 of Ticket #36696


Ignore:
Timestamp:
Oct 29, 2025, 5:31:49 PM (4 weeks ago)
Author:
Jacob Walls
Comment:

Thanks for the report. I might opt for FORWARDREF instead of STRING, but otherwise I agree.

Would you like to submit a PR targeting main?

I think this should be backported as part of Python 3.14 support, as otherwise you need to know to watch out for this gotcha when using a major 3.14 language feature.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36696

    • Property Keywords deferred annotations added
    • Property Severity NormalRelease blocker
    • Property Triage Stage UnreviewedAccepted
    • Property Type UncategorizedBug
  • Ticket #36696 – Description

    initial v1  
    1818This can be resolved in various ways:
    19191. One can add from __future__ import annotations to switch back to Stringified annotations. However, this is called to be deprecated in the future
    20 2. One can switch to always include HttpRequest. This would work, but code linters will fight this, argueing that HttpRequest is only used as an type annotation here (which is correct)
     202. One can switch to always import HttpRequest. This would work, but code linters will fight this, argueing that HttpRequest is only used as an type annotation here (which is correct)
    21213. As django.utils.inspect does not actually care for the annotations, inspect.inspect(..., annotation_format=annotationlib.Format.STRING) can be used (sadly this works only in Python 3.14).
    2222
Back to Top