CyberSource / cybersource-rest-client-python

Python client library for the CyberSource REST API
Other
21 stars 36 forks source link

enum34 does not work with python3.6 std lib. #40

Closed afreepenguin closed 4 years ago

afreepenguin commented 4 years ago

I am getting this error after trying to install and run the library from a python 3.6 virtual environment.

"/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/re.py", line 142, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'

It looks like enum34 is no longer compatible with the standard library since Python 3.6. https://stackoverflow.com/questions/43124775/why-python-3-6-1-throws-attributeerror-module-enum-has-no-attribute-intflag It appears cybersource requires this package when building.

Name: enum34
Version: 1.1.6
Summary: Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4
Home-page: https://bitbucket.org/stoneleaf/enum34
Author: Ethan Furman
Author-email: ethan@stoneleaf.us
License: BSD License
Location: /Users/afree/Desktop/oms8/env14/lib/python3.6/site-packages
Requires:
Required-by: cybersource-rest-client-python

Switching enum34 for enum-compat in the setup file can fix this.

snavinch commented 4 years ago

Hi, Thank you for bringing this to our attention. We have successful travis builds in python 3.6 environment, attaching the link here.

afreepenguin commented 4 years ago

Hi, Thank you for bringing this to our attention. We have successful travis builds in python 3.6 environment, attaching the link here.

It will build, it will just fail on execution.

snavinch commented 4 years ago

Hi, We dint encounter this particular issue. However, we have released a new version of our SDK. Please try downloading that and see if it resolves your issue. Job link of our successful build and execution - https://travis-ci.org/CyberSource/cybersource-rest-samples-python/jobs/653385669

snavinch commented 4 years ago

Closing this issue as there isn't any response. Please feel free to get in touch with us for any future issues.