scrapinghub / portia2code

BSD 3-Clause "New" or "Revised" License
49 stars 25 forks source link

Conflicts between portia2code and six #10

Open NeolithEra opened 4 years ago

NeolithEra commented 4 years ago

Hi, users are unable to run portia2code due to dependency conflict with six package. As shown in the following full dependency graph of portia2code, portia2code requires six ==1.10.0,while jsonschema requires six >=1.11.0.

According to pip’s “first found wins” installation strategy, six 1.10.0 is the actually installed version. However, six 1.10.0 does not satisfy >=1.11.0.

Dependency tree-----------

portia2code  - 0.0.17
| +- autoflake(install version:0.6.6 version range:==0.6.6)
| +- autopep8(install version:1.2.2 version range:==1.2.2)
| +- dateparser(install version:0.7.2 version range:*)
| | +- python-dateutil(install version:2.8.1 version range:*)
| | +- pytz(install version:2019.3 version range:*)
| | +- regex(install version:2019.12.9 version range:*)
| | +- tzlocal(install version:2.0.0 version range:*)
| | | +- pytz(install version:2019.3 version range:*)
| +- scrapely(install version:0.14.1 version range:*)
| +- scrapy(install version:1.8.0 version range:*)
| +- six(install version:1.10.0 version range:==1.10.0)
| +- slybot(install version:0.13.3 version range:>=0.13.0)
| | +- jsonschema(install version:3.2.0 version range:*)
| | | +-six(install version:1.13.0 version range:>=1.11.0)
| | +- six(install version:1.10.0 version range:*)
| +- w3lib(install version:1.21.0 version range:*)
| | +- six (install version:1.13.0 version range:>=1.4.1)

Thanks for your help. Best, Neolith

NeolithEra commented 4 years ago

Suggested Solution

  1. Fix your direct dependency to be six >=1.10.0. I have checked this revision will not affect your downstream projects now.
  2. Remove your direct dependency six, and use six transitively introduced by jsonschema.

@ruairif Which solution do you prefer, 1 or 2? Please let me know your choice. I can submit a PR to solve this issue.

ruairif commented 4 years ago

Thanks for highlighting this @NeolithEra

I prefer solution 1 as we import and use six directly in the project and don't want to rely on another library which may eventually drop six as a dependency.

If you can make a PR to resolve this it would be much appreciated

NeolithEra commented 4 years ago

@ruairif Thanks for your feedback. :-p