After upgrading, update your cache file by deleting it or via tldextract --update
.
- Features
- Add
cache_fetch_timeout
kwarg andTLDEXTRACT_CACHE_TIMEOUT
env var (#139)
- Add
- Bugfixes
- Bugfixes
- Switch to explicit Python version check (#124)
- Misc.
- Document public vs. private domains
- Document support for Python 3.6
- Bugfixes
- Relax required
requests
version: >= 2.1 (#98)
- Relax required
- Misc.
- Include tests in release source tarball (#97)
No changes since 2.0rc1.
This release focuses on shedding confusing code branches & deprecated cruft.
- Breaking Changes
- Renamed/changed the type of
TLDExtract
constructor paramsuffix_list_url
- It used to take a
str
or iterable. Its replacement,suffix_list_urls
only takes an iterable. This better communicates that it tries a sequence of URLs, in order. To only try 1 URL, pass an iterable with exactly 1 URLstr
.
- It used to take a
- Serialize the local cache of the remote PSL as JSON (no more
pickle
) - #81- This should be a transparent upgrade for most users.
- However, if you're configured to only read from your local cache file, no other sources or fallbacks, the new version will be unable to read the old cache format, and an error will be raised.
- Remove deprecated code
TLDExtract
'sfetch
param. To disable live HTTP requests for the latest PSL, instead passsuffix_list_urls=None
.ExtractResult.tld
property. UseExtractResult.suffix
instead.
- Moved code
- Split
tldextract.tldextract
into a few files.- The official public interface of this package comes via
import tldextract
. But if you were relying on direct import fromtldextract.tldextract
anyway, those imports may have moved. - You can run the package
python -m tldextract
for the same effect as the includedtldextract
console script. This used to bepython -m tldextract.tldextract
.
- The official public interface of this package comes via
- Split
- Renamed/changed the type of
- Misc.
- Bugfixes
- Support possible gzipped PSL response - #88
- Bugfixes
- Fix potential for
UnicodeEncodeError
with info log - #85
- Fix potential for
- Bugfixes
- Support IDNA2008 - #82
- Misc.
- Ease running scripts during local development
- Bugfixes
- Misc.
Fix publishing mistake with 1.7.0.
- Features
- Can include PSL's private domains on CLI with
--private_domains
boolean flag
- Can include PSL's private domains on CLI with
- Bugfixes
- Improved support for multiple Punycode (or Punycode-looking) parts of a URL
- Mixed in/valid
- Mixed encodings
- Fix
ExtractResult._asdict
on Python 3.4. This should also save space, as__dict__
is not created for eachExtractResult
instance.
- Improved support for multiple Punycode (or Punycode-looking) parts of a URL
- Features
- Pass
extra_suffixes
directly to constructor
- Pass
- Bugfixes
- Punycode URLs were returned decoded, rather than left alone
- Things that look like Punycode to tldextract, but aren't, shouldn't raise
- Print unified diff to debug log, rather than inconsistent stderr
- Bugfixes
- Missing setuptools dependency
- Avoid u'' literal for Python 3.0 - 3.2 compatibility. Tests will still fail though.
- Bugfixes
- Exclude PSL's private domains by default - #19
- This is a BREAKING bugfix if you relied on the PSL's private domains
- Revert to old behavior by setting
include_psl_private_domains=True
UnicodeError
for inputs that looked like an IP
- Exclude PSL's private domains by default - #19
- Features
- Support punycode inputs
- Bugfixes
- Fix minor Python 3 unicode errors
- Bugfixes
- Match PSL's GitHub mirror rename, from mozilla-central to gecko-dev
- Try Mozilla's PSL SPOT first, then the mirror
- Features
- Specify your own PSL url/file with
suffix_list_url
kwarg fallback_to_snapshot
kwarg - defaults to True
- Specify your own PSL url/file with
- Deprecations
fetch
kwarg
- Features
- Better CLI
- Cache env var support
- Python 3.3 support
- New aliases
suffix
andregistered_domain
- Bugfixes
- Fix dns root label
- Bugfixes
- Reliable logger name
- Forgotten
import sys