john-kurkowski / tldextract

Accurately separates a URL’s subdomain, domain, and public suffix, using the Public Suffix List (PSL).
BSD 3-Clause "New" or "Revised" License
1.81k stars 211 forks source link

Version 3.6.0 introduced a breaking change without bumping to 4.0.0 #305

Closed dror-wing closed 8 months ago

dror-wing commented 9 months ago

Our production code broke after upgrading to version 3.6.0 because of the following line:

subdomain, domain, suffix = tldextract.extract(link.lower())

We were expecting a breaking change would reflect in a major version bump as per the semver spec.

Thank you

john-kurkowski commented 9 months ago

Thanks for letting us know about this issue and your use case. Thank you for the xkcd. 😊

There was some discussion of the possibility of breaking in #300. We wanted to add a field to this project, which sounds like a minor version bump. However, maybe when a public interface is a tuple, there's no way to lengthen the tuple (nor shorten it) without it being a breaking change?

In the meantime, for anybody encountering this issue, to work around: directly reference the fields you're interested in.

https://github.com/john-kurkowski/tldextract/blob/f4ea7140e8c893ec8d963293a7e1097177bbc76e/README.md?plain=1#L37-L39

TTycho commented 8 months ago

Ouch, this break cases like: '.'.join(part for part in ext[-2:] if part) I upgraded to direct field referencing but I would consider this a breaking change.

john-kurkowski commented 8 months ago