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

use requests instead of urllib #89

Merged
merged 3 commits into from Apr 3, 2016
Merged

use requests instead of urllib #89

merged 3 commits into from Apr 3, 2016

Conversation

jnozsc
Copy link
Contributor

@jnozsc jnozsc commented Feb 6, 2016

as #88 (comment) mentioned

@jnozsc
Copy link
Contributor Author

jnozsc commented Feb 6, 2016

(1) requests can handle gzip by default http://docs.python-requests.org/en/latest/community/faq/#encoded-data
(2) requests can not handle file:// so I have to add a requests-file

@john-kurkowski
Copy link
Owner

Oh wow! I was idly wishing in that comment. This is pretty nice.

For tldextract 1.x, I'd like to stick to no external dependencies. Mind if I wait to merge this until 2.x?

(Concretely, #81 is expected to force a 2.0 release.)

@@ -5,4 +5,6 @@ pytest==2.7.3
pytest-gitignore==1.3
pytest-mock==0.9.0
pytest-pylint==0.4.0
requests>=2.9.1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be >= 2.0, < 3? Maybe I've been in Node.js too long.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be in setup.py too?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jnozsc
Copy link
Contributor Author

jnozsc commented Feb 6, 2016

no problem, let's keep this open until 2.x

@mauricioabreu
Copy link
Contributor

Good job @jnozsc
urllib has some problems that the vendored urlblib in requests does not have.

john-kurkowski added a commit that referenced this pull request Mar 12, 2016
use requests instead of urllib

Conflicts:
	tldextract/tldextract.py
john-kurkowski added a commit that referenced this pull request Mar 13, 2016
@mauricioabreu
Copy link
Contributor

This PR can be closed, right? It is already merged in 2.X branch :)

@john-kurkowski
Copy link
Owner

I was gonna let it autoclose when it went to master, but sure, closed via 6e4f9cf. Thanks @jnozsc!

@john-kurkowski
Copy link
Owner

Never mind manually closing this. Keeping this open until autoclose on master. If I close it manually, the PR is marked "Closed," not "Merged," which is misleading.

@john-kurkowski john-kurkowski merged commit 58fe449 into john-kurkowski:master Apr 3, 2016
@TylerLubeck
Copy link
Contributor

Hi all,

Is pinning requests>2.9.1,<3 necessary? We have a few packages that rely on both tldextract and requests 2.2 (long story), and we're getting version conflicts because of it.

I ran the test suite with requests 2.2.1, requests 2.8.1, and requests 2.9.1 and they all pass.

@john-kurkowski
Copy link
Owner

The exact version range was somewhat arbitrary. I think it can be more flexible. Thanks for #98! Let's discuss there.

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

Successfully merging this pull request may close these issues.

None yet

4 participants