Including `bigcommerce` python package throws this error for Hawthorn release

I’m running into this error when installed this additional python package that appears to run Python 3 on a Hawthorn instance of Open edX that’s running Python 2. Has anyone been able to get Python 3 packages working on Python 2 for the platform. It appears to work fine in the Juniper release or newer since that uses Python 3.

Installing this package bigcommerce · PyPI

SyntaxError: invalid syntax
Traceback (most recent call last):
File "/edx/app/edxapp/edx-platform/manage.py", line 118, in <module>
startup.run()
File "/edx/app/edxapp/edx-platform/lms/startup.py", line 19, in run
django.setup()
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/apps/config.py", line 94, in create
module = import_module(entry)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/bigcommerce/__init__.py", line 3, in <module>
from bigcommerce.customer_login_token import CustomerLoginTokens as customer_login_token
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/bigcommerce/customer_login_token.py", line 9
def create(cls, client, customer_id: int, redirect_url=None, request_ip=None, iat_time=None, channel_id: int = 1):
^
SyntaxError: invalid syntax

Hawthorn

root@lms:/edx/app/edxapp/edx-platform# python --version
Python 2.7.12

Juniper

root@lms:/edx/app/edxapp/edx-platform# python --version
Python 3.5.2

cc: @Tim_McCormack

We’re rolling back to a version of the bigcommerce-api-python package that can work with Python 2. This seems to work so far with the syntax error that we were seeing above.

After further testing it appears that the method argument that included a type identifier argument: int = 1 specifying that it needs to be of int type was causing the issue. I’m guessing that this is Python 3 syntax. After changing this back to argument=1 without the type the unit test passed successfully.