#43745: generate_packets.py minimum Python version Open Date: 2022-01-30 21:09 Last Update: 2022-02-02 14:31 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/43745 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=43745 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2022-02-02 14:31 Updated by: alienvalkyrie Comment: Reply To cazfi Reply To alienvalkyrie Given the use of a python3 executable, our minimum supported version is in the Python 3 range Actually, you can still do '/usr/bin/python generate_packets.py' on a system with python2, and it works. But do we want to be semantically correct here, or would it be better to tell people that they should not use long EOL python2? I was referring more to the fact that the build system only looks for python3 – working with Python 2 instead is possible, of course, but without python3, autogen.sh will fail, so anyone working with Python 2 will already need more extensive workarounds (or build everything manually). But yeah, I'd go the route of saying "this might work with a lower version, but we're only officially supporting <whatever> and higher". Having a more recent minimum supported version would also allow modernizing (and pythonicizing) the script with newer language features and useful library functions. --------------------------------------------------------------------- Ticket Status: Reporter: alienvalkyrie Owner: (None) Type: Bugs Status: Open Priority: 5 - Medium MileStone: (None) Component: General Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: The comment in common/generate_packets.py claims it's compatible with every Python version since 1.5, and says to keep it that way; in particular, not to replace string.join calls. The update to make the script Python-3-compatible did just that. Clearly, the script is not 1.5-compatible anymore (nor does it need to). Given the use of a python3 executable, our minimum supported version is in the Python 3 range – we should figure out / decide what specific version we want that to be, and update the comment accordingly. -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/43745 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=43745