Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671416 - app-editors/retext is broken by incompatibility of dev-python/markups with dev-python/markdown
Summary: app-editors/retext is broken by incompatibility of dev-python/markups with de...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Nils Freydank
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-18 11:43 UTC by Maurice van der Pot
Modified: 2019-11-19 20:34 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maurice van der Pot 2018-11-18 11:43:49 UTC
dev-python/markdown-3.0.0 dropped the deprecated support for passing extension parameters in the extension name. dev-python/markups-3.0.0 is the first version that no longer uses this mechanism.

Unfortunately because markups-3.0.0 is not in the tree yet, currently ReText is broken on a completely updated system (retext-7.0.3, markdown-3.0.1, markups-2.0.0). The preview pane no longer works, because the markup converter thread gets this exception:

Exception occurred while parsing document:
Traceback (most recent call last):
  File "/usr/lib64/python3.5/site-packages/ReText/tab.py", line 228, in updatePreviewBox
    self.converted = self.converterProcess.get_result()
  File "/usr/lib64/python3.5/site-packages/ReText/converterprocess.py", line 172, in get_result
    raise ConversionError(result)
ReText.converterprocess.ConversionError: The background markup conversion process received this exception:
    Traceback (most recent call last):
      File "/usr/lib64/python3.5/site-packages/ReText/converterprocess.py", line 74, in _converter_process_func
        current_markup = markup_class(job['filename'])
      File "/usr/lib64/python3.5/site-packages/markups/markdown.py", line 145, in __init__
        self._apply_extensions()
      File "/usr/lib64/python3.5/site-packages/markups/markdown.py", line 131, in _apply_extensions
        self.md = self.markdown.Markdown(extensions=extensions_final, output_format='html4')
      File "/usr/lib64/python3.5/site-packages/markdown/core.py", line 100, in __init__
        configs=kwargs.get('extension_configs', {}))
      File "/usr/lib64/python3.5/site-packages/markdown/core.py", line 126, in registerExtensions
        ext = self.build_extension(ext, configs.get(ext, {}))
      File "/usr/lib64/python3.5/site-packages/markdown/core.py", line 166, in build_extension
        module = importlib.import_module(ext_name)
      File "/usr/lib64/python3.5/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 985, in _gcd_import
      File "<frozen importlib._bootstrap>", line 968, in _find_and_load
      File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
    ImportError: No module named 'markups.mdx_mathjax(enable_dollar_delimiter=False)'


To fix this a later version of markups is required and some blockers should be added to prevent incompatible versions of markups and markdown to be installed simultaneously.

Note that markups-3.0.0 also has a dependency on the new package python-markdown-math (it was previously bundled). This package has been recently added to the tree for https://bugs.gentoo.org/668428
Comment 1 Liam Dennehy 2019-11-05 11:11:23 UTC
dev-python/markups-3.0.0 successfully builds and now renders previews for markdown in app-editors/retext-7.0.4-r1 after allowing both with ~amd64 accept keyword.
Comment 2 Nils Freydank 2019-11-19 20:34:28 UTC
Hi Maurice,

sorry that I didn't answer earlier. I think it was fixed with
953667cbe0955016a1042bc140c70a02560c3e2b (2018-11-17, got delayed
some weeks IIRC as I screwed up the PR on github.com badly)
so I’ll close this now.

Thanks to Liam for pinging me about this with your message.