Skip to content

Support latest realise of Markdown library #2892

Closed
@Samreay

Description

@Samreay

I believe there has been some update to the Markdown library and how it internally records its version that is breaking things.

With a brand new environment and a fresh install of mkdocs, a mkdocs build --strict --verbose fails my project with this error:

DEBUG    -  Loading configuration file: /Users/sh/Projects/dataportalapiclient/mkdocs.yml
ERROR    -  Config value: 'markdown_extensions'. Error: module 'markdown' has no attribute 'version_info'

At this point, mkdocs has a dependency on Markdown==3.4.1, which was released three days ago.

After running a pip install Markdown==3.3.7 to downgrade the version, rerunning the build is successful:

DEBUG    -  Loading configuration file: /Users/sh/Projects/dataportalapiclient/mkdocs.yml
...
DEBUG    -  mkdocstrings: Tearing handlers down
INFO     -  Documentation built in 3.45 seconds

I notice in this commit from May 27th on the Markdown repository, the deprecated version_info info object was removed, and replaced with the __version_info__ object, as per this table:

Deprecated Object Replacement Object
markdown.version markdown.__version__
markdown.version_info markdown.__version_info__
markdown.util.etree xml.etree.ElementTree
markdown.util.string_type str
markdown.util.text_type str
markdown.util.int2str chr
markdown.util.iterrange range
markdown.util.isBlockLevel markdown.Markdown.is_block_level
markdown.util.Processor().markdown markdown.util.Processor().md
markdown.util.Registry().__setitem__ markdown.util.Registry().register
markdown.util.Registry().__delitem__ markdown.util.Registry().deregister
markdown.util.Registry().add markdown.util.Registry().register

Hopefully the fix is a simple change to this dunder object! Whether this repository is the right place for the packaged markdown extension or not, I'm unsure, I couldn't quite see where that config gets run either here or in the Python Markdown library.

If this isn't the place, I'd appreciate if you can please point me towards the right repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions