Migrate ExtractResult from namedtuple to dataclass (#306)
This means no more iterating/indexing/slicing/unpacking the result
object returned by this library. It is no longer a tuple. You must
directly reference the fields you're interested in.
For example, the
following will no longer work.
tldextract.extract("example.com")[1:3]
# TypeError: 'ExtractResult' object is not subscriptable
Migrate ExtractResult from namedtuple to dataclass (#306)
This means no more iterating/indexing/slicing/unpacking the result
object returned by this library. It is no longer a tuple. You must
directly reference the fields you're interested in.
For example, the
following will no longer work.
tldextract.extract("example.com")[1:3]
# TypeError: 'ExtractResult' object is not subscriptable
Always include suffix if private suffix enabled and private suffix exists (#300)
Add a 4th field is_private: bool, to the ExtractResultnamedtuple, indicating whether the extraction came from the PSL's
private domains or not.
This could cause issues when iterating over the tuple and assuming
only 3 fields.
Previously, the docs promoted iteration to rejoin parts of the tuple.
This is better achieved by individual access of fields of interest
(e.g. ExtractResult.subdomain) or convenience properties (e.g.
ExtractResult.{fqdn,registered_domain}).
This is the same content as version 3.6.0, originally released 2023-09-19,
which was yanked.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Updates the requirements on tldextract to permit the latest version.
Release notes
Sourced from tldextract's releases.
Changelog
Sourced from tldextract's changelog.
... (truncated)
Commits
14a53b8
5.0.0e739ff8
Migrate ExtractResult from namedtuple to dataclass (#306)4067dea
Merge tag '4.0.0'd64dda6
4.0.038887da
Drop support for EOL Python 3.7c393fde
Require docstrings in tests18f0a2d
Remove obsolete testsf4ea714
Type testsd366c5f
Consolidate config files4d00009
Delete unused configDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show