Add a cache mechanism#62
Conversation
|
Please don't merge. Some tests are failling. Here is some sample code I also noticed after submitting this PR, that last line raises |
|
Fixed now using StringIO. but some tests are still failling Any help is welcome |
|
Using raw response (instead of StringIO) - File-like object representation of response (for advanced usage). Use of raw requires that stream=True be set on the request. But there is still a problem with |
|
Hi @femtotrader I just wanted to say that you're not pushing things into the void, I just haven't had the time to properly review but will try to make time real soon. |
|
Thanks. My own opinion about a roadmap is:
|
|
I wonder if we can't add requests http://www.python-requests.org/en/latest/ as a dependency it will be easier to manage tests with |
|
@femtotrader yes I've been thinking about this for the last few days, when I started this project out I wanted little to no dependencies but I am now thinking about introducing dependencies so then we might go for requests. Many aeons ago I thought about using requests but decided to go with the good ol' standard urllib because it allowed me to open both local and remote paths in the same call and return a file handle. Unfortunately requests didn't but there's a way around. So I'm +1 on introducing it to make dev life easier. |
|
Nice decision which should lead to a lot of code "cleanup". |
|
I did a branch with requests only (no urlopen again) but some tests are still failling. https://github.com/femtotrader/datapackage/tree/cache_requests_only Any idea ? |
Should fix #61