Hi Collin, > I was having a look at GLModuleSystem.py and noticed some duplicate > checks that an key is valid. Patch 0003 addresses that. > > Patch 0004 adds a missing None return type hint to > GLModuleTable.getCondition(). This is used to indicate that the module > is not a conditional dependency. I missed this in the type hint patch.
Looks good. Both patches applied. > > * In GLModuleSystem.py lines 784, 821: > > A condition can be a string or True. But > > str | bool > > makes it look like False was also a valid value. Is possible to > > write > > str | True > > in some way? > > The correct way to do this is Literal[True] after the import: > > from typing import Literal > > but I wasn't sure if it was compatible with Python 3.7. I ended up > trying it and it is compatible with Python 3.7. The documentation says > Python 3.8 which I've confirmed with my installation [1]. OK; if it's not valid syntax in Python 3.7 then we can't use it (or use it only in comments). > Here is the thread we chose Python 3.7: > > https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00004.html > > It appears it is EOL but I'm not sure how RHEL / CentOS versions and > packages work [2]. Does the next version default to 3.7? It looks like > they ship a few and allow you to use 'alternatives --set', but I am > unsure which is default. I'm not willing to open this discussion of minimum Python version again now (barring new arguments). We have considered everything, then made a decision; now let's stick to that decision. We can revisit this in two years. Bruno