Changes between Initial Version and Version 3 of Ticket #36163


Ignore:
Timestamp:
Feb 7, 2025, 1:15:14 PM (5 days ago)
Author:
Mike Edmunds
Comment:

Updated description to require a deprecation period based on additional forum feedback (and per the original proposal in the forum).

Opened https://github.com/django/django/pull/19145 with an implementation of an @deprecate_posargs decorator to simplify the deprecation process.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36163

    • Property Owner set to Chaitanya Rahalkar
    • Property Status newassigned
    • Property Triage Stage UnreviewedAccepted
    • Property Version 5.1dev
  • Ticket #36163 – Description

    initial v3  
    55Forum discussion: https://forum.djangoproject.com/t/change-send-mail-and-emailmessage-to-kwargs-only/38239
    66
    7 Consensus in the forum was that this change should be made '''without a deprecation period.''' Existing code that uses positional arguments for the affected params would raise a TypeError after the change.
     7~~Consensus in the forum was that this change should be made '''without a deprecation period.''' Existing code that uses positional arguments for the affected params would raise a TypeError after the change.~~ __During a standard deprecation period, the affected parameters would be accepted as either positional or keyword arguments, but using posargs would raise a deprecation warning. After the deprecation period, continuing to use posargs for those params would result in Python's usual TypeError.__ [Edit: further forum discussion clarified need to follow the deprecation process.]
    88
    99A quick (and by no means exhaustive) GitHub code search suggests a lot of existing code already uses keyword arguments for these params, but that positional arguments are common for the earlier ones. One potential exception is custom EmailMultiAlternatives subclasses. (More details in the forum.)
Back to Top