Skip to content

Travis: build with Python 3 (fixes master build)

Marco Braun requested to merge github/fork/curiousleo/patch-2 into master

Created by: curiousleo

Travis CI for this project is configured to use Python 2.7 and fails on master, which is indicated by a read "build: failing" badge on this project's GitHub landing page. The underlying problem is this:

  File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/buildingspy/development/validator.py", line 84, in _getInfoRevisionsHTML

    with open(moFile, mode="r", encoding="utf-8") as f:

TypeError: 'encoding' is an invalid keyword argument for this function

In Python 2.7, open does not accept an encoding parameter. In Python 3, it does. https://docs.python.org/2.7/library/functions.html#open https://docs.python.org/3.8/library/functions.html#open

Additionally, the call stack clearly shows that open is called from the BuildingsPy library. The BuildingsPy library build instruction make it clear that Python 3 is required. https://simulationresearch.lbl.gov/modelica/buildingspy/install.html

Python 3.9 is the latest and greatest Python 3 version, but it was released less than a week ago. Python 3.8 was released a year ago and still receives bugfixes (as opposed to older versions which only receive security updates), so that seems like a good compromise.

Merge request reports

Loading