ArcasProject / Arcas

A tool designed to help scraping APIs for academic articles
MIT License
38 stars 6 forks source link

`requests`, `requests_mock`, and `ratelimit` version #35

Closed TheChymera closed 6 years ago

TheChymera commented 7 years ago

I am trying to package your software for Gentoo Linux, but the test suite will not pass, apparently because arcas requires an old version of requests-mock:

chymera@zenbookhost ~/src/Arcas $ python setup.py test
running test
Searching for ratelimit==1.1.0
Reading https://pypi.python.org/simple/ratelimit/
Downloading https://pypi.python.org/packages/d8/86/3fed15cc23cc139b3f2fd8c92d78c93df70dea10cd7c058758b23c1a2144/ratelimit-1.1.0.tar.gz#md5=456a0c76fe33a8f325d43e9967f74686
Best match: ratelimit 1.1.0
Processing ratelimit-1.1.0.tar.gz
Writing /tmp/easy_install-5zaZk_/ratelimit-1.1.0/setup.cfg
Running ratelimit-1.1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-5zaZk_/ratelimit-1.1.0/egg-dist-tmp-r5QsuG
creating /home/chymera/src/Arcas/.eggs/ratelimit-1.1.0-py2.7.egg
Extracting ratelimit-1.1.0-py2.7.egg to /home/chymera/src/Arcas/.eggs

Installed /home/chymera/src/Arcas/.eggs/ratelimit-1.1.0-py2.7.egg
Traceback (most recent call last):
  File "setup.py", line 36, in <module>
    description='A library to gather data from academic apis',
  File "/usr/lib64/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib64/python2.7/site-packages/setuptools/command/test.py", line 199, in run
    installed_dists = self.install_dists(self.distribution)
  File "/usr/lib64/python2.7/site-packages/setuptools/command/test.py", line 194, in install_dists
    ir_d = dist.fetch_build_eggs(dist.install_requires or [])
  File "/usr/lib64/python2.7/site-packages/setuptools/dist.py", line 377, in fetch_build_eggs
    replace_conflicting=True,
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 852, in resolve
    dist = best[req.key] = env.best_match(req, ws, installer)
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 1117, in best_match
    dist = working_set.find(req)
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 715, in find
    raise VersionConflict(dist, req)
pkg_resources.VersionConflict: (requests-mock 1.2.0 (/usr/lib64/python2.7/site-packages), Requirement.parse('requests_mock==1.1.0'))

Version 1.1.0 is not available in the Gentoo main tree anymore, as we have moved on to 1.2.0. Could you adapt your requirements.txt to a more up to date version of requests-mock?

In the mean time, are there any Arcas features that would actually fail with =requests-mock-1.2.0 ?

Apparently you also require an older ratelimit (currently Gentoo only provides =ratelimit-1.4.1), and a very specific requests version, 2.12.1 (here, Gentoo provides more and even older versions 2.8.1, 2.11.1, 2.12.5, (~)2.13.0, (~)2.14.2, (~)2.18.1, (~)2.18.2-r1, (~)2.18.4 - yet not that very specific one).

Again, could you relax these very strict constraints, and for the time being, could you detail what exactly would break if the package was used with newer dependency versions?

Nikoleta-v3 commented 6 years ago

@TheChymera Thank you very much for your issue. I will update the requirements and will have a new release running by the end of the day.

Nikoleta-v3 commented 6 years ago

@TheChymera I updated the requirements.txt. The functions that Arcas uses for all the above packages have not changed so you shouldn't have an issue.

The hard coded version where just the versions that I was running with when creating Arcas, no any other reason.

I tried it locally and it works for me. Please let know if you have problems.

TheChymera commented 6 years ago

Hey there @Nikoleta-v3 ! Thanks very much for patching this up.

Could you perhaps publish your 0.0.4 release as a static archive? The repository has a dedicated section for that.

Currently it appears that you are tracking releases as branches - this makes distribution difficult because:

I could track the master branch of your package as a live version - but it seems that your master branch does not include your newest fixes (e.g. the version requirements).

Nikoleta-v3 commented 6 years ago

Thank you once again @TheChymera for your issue and ideas.

I put together a new release on Github (https://github.com/ArcasProject/Arcas/releases) and now the master branch is also in line with the latest version.