[Git][ghc/ghc][master] user_guide/flags.py: python-3.12 no longer includes distutils
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Sat Jul 22 03:28:32 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
026991d7 by Jens Petersen at 2023-07-21T23:28:13-04:00
user_guide/flags.py: python-3.12 no longer includes distutils
packaging.version seems able to handle this fine
- - - - -
1 changed file:
- docs/users_guide/flags.py
Changes:
=====================================
docs/users_guide/flags.py
=====================================
@@ -50,7 +50,7 @@ import sphinx
from sphinx import addnodes
from sphinx.domains.std import GenericObject
from sphinx.errors import SphinxError
-from distutils.version import LooseVersion
+from packaging.version import parse
from utils import build_table_from_list
import os.path
@@ -628,8 +628,8 @@ def purge_flags(app, env, docname):
def setup(app):
# The override argument to add_directive_to_domain is only supported by >= 1.8
- sphinx_version = LooseVersion(sphinx.__version__)
- override_arg = {'override': True} if sphinx_version >= LooseVersion('1.8') else {}
+ sphinx_version = parse(sphinx.__version__)
+ override_arg = {'override': True} if sphinx_version >= parse('1.8') else {}
# Add ghc-flag directive, and override the class with our own
app.add_object_type('ghc-flag', 'ghc-flag')
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/026991d7fcf9e3ce013081ab6d1e3d2200b694bb
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/026991d7fcf9e3ce013081ab6d1e3d2200b694bb
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230721/f65fa254/attachment-0001.html>
More information about the ghc-commits
mailing list