Closed cormier closed 7 years ago
Thanks for the PR. Do we really need all of those requirements in requirements.txt
? I think flask
, requests
, and pillow
should be enough.
This requirements.txt
is the output of pip freeze
. The extra dependencies are the dependencies of flask
, requests
and pillow
. It is not necessary to explicitely define them in requirements.txt
because pip
will install them anyway when installing the "main" dependencies of the project. However, by doing so, you cannot guarantee what version of the sub dependency pip will fetch.
I think that by formally defining all the dependencies in requirements.txt
this project will be easier to maintain because the users will be able to reproduce the environment on which we test, thus limiting the chances of them experiencing issues on a combination of sub-dependencies we did not test.
Ah that makes sense. Good point.
I'm looking into this now. I will have to do some tweaking as I don't want to break support for Python2.
Pushed a change. The reason for this is that I don't want to break other peoples setup when they pull the recent changes and suddenly python2 doesn't work anymore, and they also likely have to reinstall the dependencies for python3.
What do you think?
I think that's fair. I'll be sure to integrate python2 support in the tests PR.
Just thought of this: for python 2 support, instead of handling urllib /urllib2 import, would it be simpler to just use requests since it's already in the dependencies?
Ah yes. That's a good idea. Then we also won't need that try/except block anymore, I presume?
Yes, exactly, because requests will do this for us.
Brilliant! That's much better of course.
I had a moment to work on this so here's a commit that implements the feature with requests
Cool thanks a lot. I didn't get around to merge this yet but will hopefully be able to do this soon after I an some tests.
Alright, this looks good now. I edited the Readme a bit to clarify that Python 2 and 3 both work and also put the dependencies back in as well so that people know what is needed and what is optional (and why).
If you are happy with this, I will squash and merge and then look at the other two PRs.
Thanks again for your work. It's much appreciated.
Looks good to me! I will rebase the other PRs on top of this one.
Hi! Thanks for working on this nice project.
Since python2.7 is reaching end of line, I thought it could be useful to port the project to python3.
fix #24