SyntaxError fails CI build in AppConf instantiation with metaclass

Hi,

Our build fails due to the following error:

File “/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/appconf/base.py”, line 107
class AppConf(metaclass=AppConfMetaClass):
^
SyntaxError: invalid syntax

Is this due to an upgrade in Python version?

Here is the entire trace:
https://travis-ci.org/github/PARINetwork/pari/builds/679645331

It appears to be related to https://github.com/OpenAPITools/openapi-generator/issues/4823

Has anyone else faced a similar issue? It shows in the OpenAPITools issue post that this has been closed. Can someone point us to what can be done to get past this issue?

metaclass= is Py3 syntax. Your code runs Py2.

Looking at https://pypi.org/project/django-appconf/1.0.4/ (the package in which code the SyntaxError is), it has dropped Py2 support.

Does that mean that projects on Py2 should stop using Travis-CI? It is travis-ci code that invokes the Py3 syntax.

The error has nothing to do with Travis CI. It’s caused by a 3rd-party library that you yourself install, so it’s your job to resolve it.