{"id":23124,"library":"m2r","title":"m2r","description":"m2r is a Python utility for converting Markdown files to reStructuredText, enabling inclusion of Markdown content in Sphinx documentation. Version 0.3.1 is the latest release; the library is no longer actively maintained.","status":"deprecated","version":"0.3.1","language":"python","source_language":"en","source_url":"https://github.com/miyakogi/m2r","tags":["markdown","restructuredtext","sphinx","converter","documentation"],"install":[{"cmd":"pip install m2r","lang":"bash","label":"pip"}],"dependencies":[{"reason":"Markdown parsing engine (m2r wraps mistune)","package":"mistune","optional":false},{"reason":"reStructuredText processing","package":"docutils","optional":false}],"imports":[{"note":"Direct import of convert function is correct; module-level call also works but less explicit.","wrong":"import m2r; m2r.convert()","symbol":"convert","correct":"from m2r import convert"},{"note":"Converts a Markdown file to RST string.","wrong":"","symbol":"parse_from_file","correct":"from m2r import parse_from_file"}],"quickstart":{"code":"from m2r import convert\n\nmarkdown_text = \"# Hello\\n\\nThis is **Markdown**.\"\nrst_text = convert(markdown_text)\nprint(rst_text)","lang":"python","description":"Convert a Markdown string to reStructuredText."},"warnings":[{"fix":"Replace 'm2r' with 'm2r2' or use 'recommonmark' or 'myst-parser' for Sphinx.","message":"m2r is no longer actively maintained. Consider using m2r2, recommonmark, or MyST for continued support.","severity":"deprecated","affected_versions":"all"},{"fix":"Review converted output manually and adjust source Markdown or use an alternative converter.","message":"m2r's conversion is not lossless; some Markdown constructs may not translate correctly to RST.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install m2r","cause":"m2r is not installed.","error":"ModuleNotFoundError: No module named 'm2r'"},{"fix":"Upgrade m2r: pip install --upgrade m2r","cause":"Outdated version (<0.2.0) where convert function existed under different name or not at all.","error":"ImportError: cannot import name 'convert' from 'm2r'"},{"fix":"Pin mistune to version <2.0.0: pip install 'mistune<2.0.0'","cause":"Incompatibility with newer versions of mistune (mistune>=2.0.0 changed API).","error":"AttributeError: 'NoneType' object has no attribute 'groups'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}