infrae / pyoai

The oaipmh module is a Python implementation of an "Open Archives$ Initiative Protocol for Metadata Harvesting"
http://pypi.python.org/pypi/pyoai
Other
83 stars 53 forks source link

Port to using urllib3 or requests #16

Open jayvdb opened 8 years ago

jayvdb commented 8 years ago

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 commented 8 years ago

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 commented 7 years ago

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

interrogator commented 4 years ago

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 commented 4 years ago

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

interrogator commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 :smiley: