SyntaxError fails CI build in AppConf instantiation with metaclass


Our build fails due to the following error:

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

Is this due to an upgrade in Python version?

Here is the entire trace:

It appears to be related to

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 (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.