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

Switching to requests for search connection #14

Merged
merged 15 commits into from
Feb 3, 2017

Conversation

laliberte
Copy link
Contributor

This PR builds upon #13.

It introduces three components to the search connection:

  1. The query is now sent using requests which greatly simplifies python 3 compatiblity.

  2. The search connection can now be instantiated and the requests session kept alive.

  3. The requests_cache package is internally supported and provides an easy way to enable simple caching of queries.

One advantage of using requests is the proper handling of timeouts and verified / unverified queries.

@agstephens
Copy link
Contributor

Hi @laliberte,
You have been doing great work here. Are you happy for me to pull now or are you making more fixes at present.
I realise that we should really be using the devel branch. When I have integrated the next pull request I will copy the master into devel and then you can fork that for any future developments.
Many thanks for your efforts on the Py3 port.
Ag

@laliberte
Copy link
Contributor Author

Hi @agstephens,

We could go the devel route but my (limited) experience working on open source projects is that the devel branch is mostly kept for breaking changes and on much bigger projects.

At the moment, my PRs are either clean-ups or under-the-hood changes that are 100% backward-compatible (except maybe for raised exceptions). Because these are mostly for stability with the ever-evolving python ecosystem, I would recommend merging into master directly. This way it is possible to maintain an updated fork without too much of an headache.

There are two things with the current PR and #13:

  1. On your travis-ci you might not have set your USERNAME, OPENID and PASSWORD as environment variables. These can hidden from everyone (even someone that has access to your account).

  2. Two tests are currently failing but it seems to be because the catalogue has changed. With this PR, we could freeze in time a cache that will make these tests more resilient to outside changes in the future.

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

2 participants