Update djblets.mail for typing, enums, and deprecations.

Review Request #13154 — Created July 19, 2023 and submitted

Information

Djblets
release-4.x

Reviewers

This updates EmailMessage, DMARC code, and utilities to provide Python
type hints for all arguments and results, helping ensure consistency in
usage and behavior. This actually caught a couple of issues with None
values being fed into EmailMessage at points.

Positional arguments to EmailMessage and the enable_smart_spoofing
argument are deprecated, scheduled for removal in Djblets 6.

This all prepares for some upcoming work on this module.

Unit tests pass in Djblets and Review Board.

Summary ID
Update djblets.mail for typing, enums, and deprecations.
This updates `EmailMessage`, DMARC code, and utilities to provide Python type hints for all arguments and results, helping ensure consistency in usage and behavior. This actually caught a couple of issues with `None` values being fed into `EmailMessage` at points. Positional arguments to `EmailMessage` and the `enable_smart_spoofing` argument are deprecated, scheduled for removal in Djblets 6. This all prepares for some upcoming work on this module.
7c610bb22c73d16493ebfdf7cb2b68e0b03ec60d
Description From Last Updated

'typing_extensions.TypeAlias' imported but unused Column: 1 Error code: F401

reviewbotreviewbot

'enum.Enum' imported but unused Column: 1 Error code: F401

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-4.x (7c58a65)