Switch DMARC checking to use the publicsuffixlist module.

Review Request #13454 — Created Dec. 13, 2023 and submitted — Latest diff uploaded

Information

Djblets
release-4.x

Reviewers

Historically, Djblets has used the publicsuffix module to compute the
correct public sufix for a domain (e.g., example.com from
www.example.com). This module is now deprecated, replaced by a modern
publicsuffixlist module, which has wider Python support and a built-in
data file.

We now use this module, which is fairly close to a drop-in replacement
(it actually has a compatible interface for publicsuffix users, but
it's trivial to migrate to the modern API).

We also now cache the instance, to avoid having to load and parse every
time we're checking a DMARC record.

Unit tests pass.

Commits

Files