Opened 7 hours ago
Last modified 4 hours ago
#36903 assigned Bug
inspect.signature should use FORWARDREF annotation_format for python 3.14+ — at Version 2
| Reported by: | 93578237 | Owned by: | |
|---|---|---|---|
| Component: | Core (Other) | Version: | 6.0 |
| Severity: | Release blocker | Keywords: | typing, inspect, deferred annotations |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
On python 3.14 it fails at least here:
https://github.com/django/django/blob/13299a6203f4bc3e5b2552c96a51ff2b15da3c43/django/contrib/auth/__init__.py#L43
import typing as t
from django.contrib.auth.backends import ModelBackend
if t.TYPE_CHECKING:
from django.http import HttpRequest
from testproject.models import User as UserModel
class AuthenticationBackend(ModelBackend):
def authenticate(
self,
request: HttpRequest | None = None,
username: str | None = None,
password: str | None = None,
**kwargs: t.Any,
) -> UserModel | None: ...
Maybe a new function signature should be added to utils/inspect.py
Change History (2)
comment:1 by , 6 hours ago
| Description: | modified (diff) |
|---|
comment:2 by , 6 hours ago
| Description: | modified (diff) |
|---|
Note:
See TracTickets
for help on using tickets.