Skip to content

Commit

Permalink
python: add novermin comment to tomllib import
Browse files Browse the repository at this point in the history
Problem: tomllib is included on Python 3.11 and newer versions and
is loaded when available.  This can cause a vermin check failure
because the minimum required version for flux-core is 3.6.

Add a "novermin" comment to pass the vermin check.  Add a small comment
to explain code as well.
  • Loading branch information
chu11 committed May 16, 2023
1 parent 2045282 commit 3b9b6e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bindings/python/flux/util.py
Expand Up @@ -30,8 +30,10 @@

import yaml

# tomllib added to standard library in Python 3.11
# flux-core minimum is Python 3.6.
try:
import tomllib
import tomllib # novermin
except ModuleNotFoundError:
from flux.utils import tomli as tomllib

Expand Down

0 comments on commit 3b9b6e3

Please sign in to comment.