executablebooks / MyST-Parser

An extended commonmark compliant parser, with bridges to docutils/sphinx
https://myst-parser.readthedocs.io
MIT License
708 stars 189 forks source link

Support sphinx 7.3 - use default config value types #889

Closed arwedus closed 2 months ago

arwedus commented 3 months ago

https://github.com/executablebooks/MyST-Parser/blob/978e845543b5bcb7af0ff89cac9f798cb8c16ab3/myst_parser/sphinx_ext/main.py#L56

for sphinx 7.3 support, this should be rewritten to:

    for name, default, field in MdParserConfig().as_triple():
        if "sphinx" not in field.metadata.get("omit", []):
            app.add_config_value(f"myst_{name}", default, "env")

-> The allowed type is then the one from the default value, which seems to always be set correctly.

See also:

https://github.com/sphinx-doc/sphinx/pull/11746#issuecomment-2016605370

chrisjsewell commented 3 months ago

The allowed type is then the one from the default value, which seems to always be set correctly.

Hi @arwedus, it does not I'm afraid, types=Any was added to fix https://github.com/executablebooks/MyST-Parser/issues/558

chrisjsewell commented 2 months ago

this is now fixed in sphinx