bmcorser / fontawesome-markdown

Markdown extension to use Font Awesome icons in a GitHub style
http://bmcorser.github.io/fontawesome-markdown/
45 stars 27 forks source link

Fix deprecation warnings #18

Open mbasaglia opened 1 year ago

mbasaglia commented 1 year ago

The extension was giving me a bunch of deprecation warnings, so I've fixed them

These were the warnings I had:

INFO     -  DeprecationWarning: 'etree' is deprecated. Use 'xml.etree.ElementTree' instead.
              File "env/lib/python3.10/site-packages/markdown/util.py", line 475, in __getattr__
                warnings.warn(
              File "env/lib/python3.10/site-packages/fontawesome_markdown/__init__.py", line 1, in
                from .main import FontAwesomePattern, FontAwesomeExtension, FontAwesomeException, makeExtension  # NOQA
INFO     -  DeprecationWarning: Using the add method to register a processor or pattern is deprecated. Use the `register` method instead.
              File "env/lib/python3.10/site-packages/fontawesome_markdown/main.py", line 65, in extendMarkdown
                md.inlinePatterns.add('fontawesome', fontawesome, '<reference')
              File "env/lib/python3.10/site-packages/markdown/util.py", line 462, in add
                warnings.warn(
INFO     -  DeprecationWarning: The 'md_globals' parameter of 'fontawesome_markdown.main.FontAwesomeExtension.extendMarkdown' is deprecated.
              File "env/lib/python3.10/site-packages/markdown/core.py", line 125, in registerExtensions
                ext._extendMarkdown(self)
              File "env/lib/python3.10/site-packages/markdown/extensions/__init__.py", line 82, in _extendMarkdown
                warnings.warn(