Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Travis CI build fails with invalid syntax for f-string in Python 3.5 #2070

Closed
wenzeslaus opened this issue Jan 6, 2022 · 2 comments
Closed
Labels
bug Something isn't working CI Continuous integration
Milestone

Comments

@wenzeslaus
Copy link
Member

Describe the bug

Travis CI build fails with SyntaxError for an f-string.

To Reproduce

See builds for the releasebranch_7_8 branch.

Expected behavior

I don't know. The CI runs with 16.04. Should we update the Travis config? Clearly, it is first compilation-related Python >=3.6 requirement. Perhaps, we do want to keep the Python requirements low in 7.8? I would say, at least update whatever the commit is breaking.

Screenshots

LD_LIBRARY_PATH="/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/bin:/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/bin:/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/scripts:/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/lib:/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/lib:" LC_ALL=C LANG=C LANGUAGE=C  --html-description < /dev/null | grep -v '</body>\|</html>' > pngdriver.tmp.html ; fi
VERSION_NUMBER=7.8.7dev VERSION_DATE=2022 MODULE_TOPDIR=../.. \
        python3 /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/tools/mkhtml.py pngdriver > /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/html/pngdriver.html
  File "/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/tools/mkhtml.py", line 84
    trunk_url = f"https://github.com/OSGeo/grass/tree/releasebranch_{major}_{minor}/"
                                                                                    ^
SyntaxError: invalid syntax
../../include/Make/Html.make:7: recipe for target '/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/html/pngdriver.html' failed
make[4]: *** [/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/html/pngdriver.html] Error 1
make[4]: Leaving directory '/home/travis/build/OSGeo/grass/lib/pngdriver'
../../include/Make/Lib.make:26: recipe for target 'lib' failed
make[3]: *** [lib] Error 2
make[4]: Entering directory '/home/travis/build/OSGeo/grass/lib/pngdriver'
if [ "" != "" ] ; then GISRC=/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/demolocation/.grassrc78 GISBASE=/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu PATH="/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/bin:/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/bin:/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/scripts:$PATH" PYTHONPATH="/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/etc/python:/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/gui/wxpython:$PYTHONPATH" LD_LIBRARY_PATH="/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/bin:/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/bin:/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/scripts:/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/lib:/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/lib:" LC_ALL=C LANG=C LANGUAGE=C  --html-description < /dev/null | grep -v '</body>\|</html>' > pngdriver.tmp.html ; fi
VERSION_NUMBER=7.8.7dev VERSION_DATE=2021 MODULE_TOPDIR=../.. \
        python3 /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/tools/mkhtml.py pngdriver > /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/html/pngdriver.html
  File "/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/tools/mkhtml.py", line 85
    addons_url = f"https://github.com/OSGeo/grass-addons/tree/grass{major}/"
                                                                           ^
SyntaxError: invalid syntax
../../include/Make/Html.make:7: recipe for target '/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/html/pngdriver.html' failed
make[4]: *** [/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/html/pngdriver.html] Error 1
make[4]: Leaving directory '/home/travis/build/OSGeo/grass/lib/pngdriver'
../../include/Make/Lib.make:26: recipe for target 'lib' failed

System description

Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.7 LTS
Release:	16.04
Codename:	xenial
...
python3 is already the newest version (3.5.1-3).
python3-dev is already the newest version (3.5.1-3).
python3-six is already the newest version (1.10.0-3).

Additional context

Fails since cda4220 (#2037) which introduced the first f-string (some more f-strings appeared in the code since then).

@wenzeslaus wenzeslaus added bug Something isn't working CI Continuous integration labels Jan 6, 2022
@wenzeslaus wenzeslaus added this to the 7.8.7 milestone Jan 6, 2022
@tmszi
Copy link
Member

tmszi commented Jan 8, 2022

I can replace those f-strings with the format() function, so we continue to ensure compatibility with Python 3.5/Python 2.7 G 7.8 release (as you say Ubuntu Xenial 16.04 distribution is LTS with Extended Security Maintenance which end 2026, and still uses Python 3.5).

@tmszi
Copy link
Member

tmszi commented Jan 13, 2022

Closed with #2077.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CI Continuous integration
Projects
None yet
Development

No branches or pull requests

2 participants