mricon / ingress-fieldplan

Generate an easy workplan for Ingress fielding excursions
GNU General Public License v3.0
31 stars 8 forks source link

Potential dependency conflicts between ingress-fieldplan and httplib2 #15

Closed NeolithEra closed 5 years ago

NeolithEra commented 5 years ago

Hi, ingress-fieldplan directly and transitively introduced multiple versions of httplib2.

As shown in the following full dependency graph of ingress-fieldplan, ingress-fieldplan requires httplib2 (the latest version), while the installed version of google-api-python-client( 1.7.10) requires httplib2>=0.9.2, <1dev.

According to Pip's “first found wins” installation strategy, httplib2 0.13.1 is the actually installed version.

Although the first found package version httplib2 0.13.1 just satisfies the later dependency constraint (httplib2>=0.9.2,<1dev), it will lead to a build failure once developers release a newer version of httplib2.

Dependency tree--------

ingress-fieldplan-master
| +-google-api-python-client(version range:*)
| | +-httplib2(version range:>=0.9.2,<1dev)
| | +-google-auth(version range:>=1.4.1)
| | +-google-auth-httplib2(version range:>=0.0.3)
| | +-six(version range:>=1.6.1,<2dev)
| | +-uritemplate(version range:>=3.0.0,<4dev)
| +-googlemaps(version range:*)
| +-httplib2(version range:*)
| +-matplotlib(version range:*)
| +-networkx(version range:*)
| +-numpy(version range:*)
| +-oauth2client(version range:*)
| | +-httplib2(version range:>=0.9.1)
| | +-pyasn1(version range:>=0.1.7)
| | +-pyasn1-modules(version range:>=0.0.5)
| | | +-pyasn1(version range:>=0.4.6,<0.5.0)
| | +-rsa(version range:>=3.1.4)
| | +-six(version range:>=1.6.1)
| +-ortools(version range:<8.0,>=7.0)

Thanks for your attention. Best, Neolith

NeolithEra commented 5 years ago

Solution

  1. Fix your direct dependencies to be httplib2>=0.9.2,<1dev and google-api-python-client==1.7.10, to remove this conflict. I have checked this revision will not affect your downstream projects now.

  2. Remove your direct dependency httplib2, and use httplib2 transitively introduced by google-api-python-client.

Personally, I prefer solution 2.

Build a good dependency ecosystem for python projects is our common goal ^_^.

@mricon May I pull a request to solve this issue?