python-fedex-devs / python-fedex

A light wrapper around FedEx's SOAP API.
http://python-fedex.readthedocs.org
BSD 3-Clause "New" or "Revised" License
156 stars 139 forks source link

Switch project required dependency to suds-community. #158

Closed ndobbs closed 2 years ago

ndobbs commented 2 years ago

PR #159 attempts to resolve this issue.

While building with the latest version of fedex our ci/cd process breaks while attempting to install the dependency suds-jurko.

ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-i40r_jb8/suds-jurko/setup.py'"'"'; __file__='"'"'/tmp/pip-install-i40r_jb8/suds-jurko/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-i40r_jb8/suds-jurko/pip-egg-info
         cwd: /tmp/pip-install-i40r_jb8/suds-jurko/
    Complete output (1 lines):
    error in suds-jurko setup command: use_2to3 is invalid.

Upon further examination it turns out that python's setuptools drops support for 2to3 in version v.58.0.0. In order to correct this it is recommended to switch to the new and actively maintained package suds-community which already has resolved this problem HERE.

I have also opted to pin this dependency for future cases where the project can be more intentional with the versions expected.

RandomJo commented 2 years ago

I'm running into this issue as well. To get around it for the time being, I changed the pipenv install step in my build process to this: pipenv install setuptools==57.5.0

CorainChicago commented 2 years ago

I had the same issue too and fixed it by running:

- pip install "setuptools==58.0.0 and then explicitely installing the requirements file for my lamdba with --use-deprecated=legacy-resolver at the end.

Version 58.0.0 introduces a breaking change to setuptools

Removed support for 2to3 during builds. Projects should port to a unified codebase or pin to an older version of Setuptools using PEP 518 build-requires

ndobbs commented 2 years ago

Changes merged to default branch #159 - closing issue.

CorainChicago commented 2 years ago

@ndobbs When will another version get released with these changes included?

ndobbs commented 2 years ago

@ndobbs When will another version get released with these changes included?

@CorainChicago I'm sorry, I'm only a contributor, I do not maintain this project and lack the authority to create a release.

ashtonpaul commented 2 years ago

@CorainChicago I was able to temporarily get my project to work by using a direct git link to the repo in my requirements.txt.

I replaced fedex==2.4.1 with git+https://github.com/python-fedex-devs/python-fedex.git#egg=fedex. This way it will put the latest master release which includes the updated suds-community package. I added a watch to this repo, so when 2.4.2 gets released I can switch my line in requirements.txt to fedex==2.4.2. Hope this helps.

Thanks for getting this updated @ndobbs. Hopefully a maintainer updates the repo soon and cuts a release.