python-magento icon indicating copy to clipboard operation
python-magento copied to clipboard

setuptools v 58 or higher breaks suds-jurko, the correct fix is to switch to community suds

Open TinBane opened this issue 4 years ago • 1 comments

Expected Behavior

pip install --no-cache-dir magento installs magento plugin and dependencies correctly

Actual Behavior

`pip install --no-cache-dir magento Collecting magento Downloading magento-3.1.tar.gz (15 kB) Collecting suds-jurko>=0.6 Downloading suds-jurko-0.6.zip (255 kB) |████████████████████████████████| 255 kB 5.0 MB/s ERROR: Command errored out with exit status 1: command: /Users/USER/Envs/test_app4-qNS7RZsm/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/55/mh1fhpy136127glbtr5dnf5w0000gn/T/pip-install-iih2s6by/suds-jurko_ad1ecf90d8434c64a219b6304351b175/setup.py'"'"'; file='"'"'/private/var/folders/55/mh1fhpy136127glbtr5dnf5w0000gn/T/pip-install-iih2s6by/suds-jurko_ad1ecf90d8434c64a219b6304351b175/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/55/mh1fhpy136127glbtr5dnf5w0000gn/T/pip-pip-egg-info-uoi5_hcm cwd: /private/var/folders/55/mh1fhpy136127glbtr5dnf5w0000gn/T/pip-install-iih2s6by/suds-jurko_ad1ecf90d8434c64a219b6304351b175/ Complete output (1 lines): error in suds-jurko setup command: use_2to3 is invalid. ... WARNING: Discarding https://files.pythonhosted.org/packages/5e/08/a5bd75d83f33fb9e1613b2ceb6442205bf43a81aa6b961f903d129a43bbf/magento-0.1.1.tar.gz#sha256=f59bed3c45653e3e307b3c3bd281702b39da9c1e116236191e0f96f31d4c1330 (from https://pypi.org/simple/magento/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Cannot install magento==3.0 and magento==3.1 because these package versions have conflicting dependencies.

The conflict is caused by: magento 3.1 depends on suds-jurko>=0.6 magento 3.0 depends on suds-jurko>=0.6

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies`

Steps to Reproduce the Problem

  1. Check you are running setuptools version 58 or higher
  2. Install magento plugin in a free virtual environment with no cache (ie pip install --no-cache-dir magento) and no suds-jurko
  3. Magento library can not install, because the dependency (suds-jurko) is not installed

In setuptools 58 they removed a command 'use_2to3', which from the name likely converted packages to python3 from python2. suds-jurko is a barely maintained fork of suds, from a period where suds was not maintained.

The correct fix should be to test magento plugin with the community suds package instead, as suds-jurko is no longer supported actively, and cannot be installed with setuptools 58 or higher.

Specifications

  • Version: 3.1
  • Platform: Mac OS X 11.2.3
  • Subsystem: Python 3.8.12

TinBane avatar Sep 27 '21 04:09 TinBane

I've created a pull request. I've run my own internal tests to ensure that API connectivity still works, but they are limited to the functions we use internally at my business.

TinBane avatar Sep 27 '21 06:09 TinBane