Subject: Broken dependency: python39-markdown needs python39-importlib-metadata
From: Oleksandr Gavenko via Cygwin <[email-masked]>
To: [email-masked]
Date: Sat, 20 May 2023 00:22:59 +0300
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>

I installed python39-markdown and wanted to:

  import markdown

That fails with:

  File "/home/user/my/blog_md.py", line 5, in <module>
    import markdown
  File "/usr/lib/python3.9/site-packages/markdown/__init__.py", line 29, in <module>
    from .core import Markdown, markdown, markdownFromFile  # noqa: E402
  File "/usr/lib/python3.9/site-packages/markdown/core.py", line 26, in <module>
    from . import util
  File "/usr/lib/python3.9/site-packages/markdown/util.py", line 36, in <module>
    import importlib_metadata as metadata
  ModuleNotFoundError: No module named 'importlib_metadata'

In markdown/util.py:

  if sys.version_info >= (3, 10):
      from importlib import metadata
  else:
      # <PY310 use backport
      import importlib_metadata as metadata

In setup.ini:

  @ python39-markdown
  depends2: python39

After installing python39-importlib-metadata the problem disappeared.

-- 
http://defun.work/

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple