CrossNox / m2r2

Markdown to reStructuredText converter
https://crossnox.github.io/m2r2
MIT License
107 stars 26 forks source link

New 'mistune' thrown no attribute 'BlockGrammar' #42

Closed sebek98 closed 2 years ago

sebek98 commented 2 years ago

Hi,

It looks like the new version on the 'mistune' (2.0.0 released Dec 5, 2021) package has different API and it throws AttributeError: module 'mistune' has no attribute 'BlockGrammar' Previous version (0.8.4 released Oct 18, 2018) looks correct and works fine.

`

Running Sphinx v4.1.2

Exception occurred: File "/home/osboxes/proba/taf_inherited_members/venv/lib/python3.9/site-packages/m2r2.py", line 83, in class RestBlockGrammar(mistune.BlockGrammar): AttributeError: module 'mistune' has no attribute 'BlockGrammar' The full traceback has been saved in /tmp/sphinx-err-3daao_tt.log, if you want to report the issue to the developers. `

Pipdeptree shows that this is a dependency of m2r2 package:

`

m2r2==0.3.1

  • docutils [required: Any, installed: 0.18.1]
  • mistune [required: Any, installed: 2.0.0] pipdeptree==2.2.0
  • pip [required: >=6.0.0, installed: 21.3.1] setuptools==58.3.0 wheel==0.37.0 `

Full sphinx log: `

Sphinx version: 4.1.2 Python version: 3.9.5 (CPython) Docutils version: 0.17.1 release Jinja2 version: 3.0.3 Last messages:

Loaded extensions: Traceback (most recent call last): File "/home/osboxes/proba/taf_inherited_members/venv/lib/python3.9/site-packages/sphinx/cmd/build.py", line 276, in build_main app = Sphinx(args.sourcedir, args.confdir, args.outputdir, File "/home/osboxes/proba/taf_inherited_members/venv/lib/python3.9/site-packages/sphinx/application.py", line 237, in init self.setup_extension(extension) File "/home/osboxes/proba/taf_inherited_members/venv/lib/python3.9/site-packages/sphinx/application.py", line 393, in setup_extension self.registry.load_extension(self, extname) File "/home/osboxes/proba/taf_inherited_members/venv/lib/python3.9/site-packages/sphinx/registry.py", line 429, in load_extension mod = import_module(extname) File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 855, in exec_module File "", line 228, in _call_with_frames_removed File "/home/osboxes/proba/taf_inherited_members/venv/lib/python3.9/site-packages/m2r2.py", line 83, in class RestBlockGrammar(mistune.BlockGrammar): AttributeError: module 'mistune' has no attribute 'BlockGrammar' `

CrossNox commented 2 years ago

Duplicate of #40