juju / theblues

Python library for the juju charmstore (v4)
GNU Lesser General Public License v3.0
5 stars 22 forks source link

make deps less strict to work across trusty -> xenial #20

Closed marcoceppi closed 8 years ago

marcoceppi commented 8 years ago

This fixes the following traceback which will happen to any user or package using theblues.

Traceback (most recent call last):
  File "/usr/bin/charm-version", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3141, in <module>
    @_call_aside
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3127, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3154, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 642, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 655, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 833, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (requests 2.2.1 (/usr/lib/python2.7/dist-packages), Requirement.parse('requests==2.6.0'), set(['theblues']))

fixes #21

jujugui commented 8 years ago

Test PASSed. Refer to this link for build results (access rights to CI server needed): http://ci.jujugui.org:8080//job/theblues-lib/66/ Test PASSed.

hatched commented 8 years ago

:+1:

Could you add some comments to the changes so that future us knows why it's a range?

marcoceppi commented 8 years ago

Thanks @hatched I've updated the versions to be more inclusive. This will cover every version of python-requests from trusty to xenial

jujugui commented 8 years ago

Test PASSed. Refer to this link for build results (access rights to CI server needed): http://ci.jujugui.org:8080//job/theblues-lib/67/ Test PASSed.

javacruft commented 8 years ago

== is never helpful in the context of packages - setting a minimum version is good tho - could we apply the same policy to all versions please? I think enforcing an upper limit should only be applied if there is a problem.

jujugui commented 8 years ago

Test PASSed. Refer to this link for build results (access rights to CI server needed): http://ci.jujugui.org:8080//job/theblues-lib/71/ Test PASSed.

bac commented 8 years ago

On our projects we've gotten into the habit of specifying versions exactly, since we're installing from a download cache. For general use libraries like this one it is a mistake.

I like @javacruft's suggestion to provide minimum versions and drop the upper bound. I'd not expect that to happen in this change, though.

:+1: with that change on requests only.

marcoceppi commented 8 years ago

@bac I've dropped upper bands and replaced all == with >= - thanks for the feedback

urosj commented 8 years ago

:+1: ty

jujugui commented 8 years ago

Test PASSed. Refer to this link for build results (access rights to CI server needed): http://ci.jujugui.org:8080//job/theblues-lib/72/ Test PASSed.