Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a default value to TLDEXTRACT_CACHE_TIMEOUT #154

Closed
wants to merge 1 commit into from

Conversation

guoyuqi
Copy link

@guoyuqi guoyuqi commented Sep 12, 2018

if no default value defined with TLDEXTRACT_CACHE_TIMEOUT, tldextract maybe hang indefinitely since the requests never go through.

if no default value defined with TLDEXTRACT_CACHE_TIMEOUT, tldextract maybe hang indefinitely since the requests never go through.
@floer32
Copy link
Collaborator

floer32 commented Mar 4, 2019

@guoyuqi This is a "hmmmmm" one because ... I agree for my personal preferences that I like when things don't timeout (would rather just get an error, and have my calling code be able to do retries). but kind of also thinking that requests, by design, does not specify a default timeout. so what's more astonishing to the general user, having it hang, or having it deviate from the default requests would use? Not sure!

the compromise solution is seemingly: have a default timeout but have it be very long. like 5 minutes.

what do you think @guoyuqi ?

since there is already a configuration variable for it though, there is a workaround, so i'm marking it as lower-priority than the other tickets

@john-kurkowski
Copy link
Owner

I'd defer to requests. Expect this library to default the same as the popular, familiar Python library.

@floer32
Copy link
Collaborator

floer32 commented Mar 5, 2019

yeah - Principle of Least Astonishment - do what someone would expect for a library that wraps requests

@floer32
Copy link
Collaborator

floer32 commented Mar 5, 2019

Would be good to add a note to the README though since it does not point out this environment variable being available. @guoyuqi would you want to open a PR with a readme update adding to the 'caching' section?

@floer32
Copy link
Collaborator

floer32 commented Mar 5, 2019

created #159 about updating README, closing this one

@floer32 floer32 closed this Mar 5, 2019
@floer32
Copy link
Collaborator

floer32 commented Mar 5, 2019

thanks again @guoyuqi !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants