Closed martinburchell closed 1 year ago
Using test_argparse_text.py
:
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--something", help="Some help")
parser.parse_args()
then python3.8 test_argparse_text.py --help
gives:
usage: test_argparse_text.py [-h] [--something SOMETHING]
optional arguments:
-h, --help show this help message and exit
--something SOMETHING
Some help
whereas python3.10 test_argparse_text.py --help
gives:
usage: test_argparse_text.py [-h] [--something SOMETHING]
options:
-h, --help show this help message and exit
--something SOMETHING
Some help
so the change from "optional arguments" to "options" looks to be a change in argparse
(a standard library module) between Python 3.8 and 3.10.
Let's try moving this to Python 3.10. Add a check in the relevant build script and pin the GitHub workflow to Ubuntu 22.04 / Python 3.10. I can install python3.10 from deadsnakes.
Building the docs with different versions of python results in different output. Currently the GitHub docs workflow assumes python 3.8.