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

Port to using urllib3 or requests #16

Open
jayvdb opened this issue Feb 15, 2016 · 7 comments
Open

Port to using urllib3 or requests #16

jayvdb opened this issue Feb 15, 2016 · 7 comments

Comments

@jayvdb
Copy link

jayvdb commented Feb 15, 2016

Would it be beneficial to port pyoai to use urllib3 or requests? (After #15 is merged)

It would remove a lot of complex http urllib/urllib2 code, and less future problems due to oddball http server configurations.

@jascoul
Copy link
Collaborator

jascoul commented Feb 17, 2016

I'm a bit reluctant about this.
PyOAI is a very old stable library with many users, so adding a dependency is a big step.
Are there any specific usecases you are thinking about?

@mpasternak
Copy link
Contributor

@jayvdb , python3-compatible release is out, would you like to submit a patch for urllib3 or requests? We could have a look.

@interrogator
Copy link

I think it'd be great to use requests, definitely more standard nowadays and it's true, it should simplify the codebase. @jayvdb any interest in making a PR? I believe this one would need good test coverage and so on, more work than most of the other todos in this repo right now

@jayvdb
Copy link
Author

jayvdb commented Apr 25, 2020

Sorry, I am not working in this area at the moment, and have a full plate on other OSS projects right now.

@interrogator
Copy link

My vote: get the current small stuff merged in and released, and keep this issue open as something that could be tried out later (ie. for next major release, if there ever needs to be one). If @jascoul says he'd accept a PR that refactors to use requests wherever possible, I'd consider doing this when I had some free time, as I totally agree that requests module is superior to urllib stuff in every way, and is definitely the norm for modern projects now. But long story short, if things work fine as is, prio for a big refactor with high potential for breaking changes should not be super high

@mpasternak
Copy link
Contributor

IDK if my vote counts, but unless the code gets way shorter and way more readable, I would refrain from relying on another 3rd party library, even as widespread as requests.

@interrogator
Copy link

Definitely a valid perspective (and it's not like I suddenly own this repo, so I guess it's for the others to decide)! Anyway, there's a list of things to do before this one, so it can get tabled for now. But in my experience you'd be surprised how nice requests can make some old urllib code :)

Plus it's all academic unless those who can merge say they'd accept the PR anyway, no point writing anything till confirmation of that exists.

So yeah, low low prio right now if nothing's broken with urllib.

And requests is really only 'technically' a third party module at this point 😃

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

No branches or pull requests

4 participants