Bug 256444 - mail/mailman3: missing dependency on importlib-resources
Summary: mail/mailman3: missing dependency on importlib-resources
Status: Closed DUPLICATE of bug 254135
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Charlie Li
Depends on:
Reported: 2021-06-06 16:28 UTC by Omar Polo
Modified: 2021-06-06 16:32 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (vishwin)


Note You need to log in before you can comment on or make changes to this bug.
Description Omar Polo 2021-06-06 16:28:45 UTC
It seems that the latest mail/mailman3 is missing a dependency on devel/py-importlib-resources.

root@mail:~ # pkg install mailman3
root@mail:~ # service mailman info
Traceback (most recent call last):
  File "/usr/local/bin/mailman", line 33, in <module>
    sys.exit(load_entry_point('mailman==3.3.1', 'console_scripts', 'mailman')())
  File "/usr/local/bin/mailman", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/local/lib/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/local/lib/python3.8/site-packages/mailman/bin/mailman.py", line 22, in <module>
    from mailman.config import config
  File "/usr/local/lib/python3.8/site-packages/mailman/config/__init__.py", line 20, in <module>
    from mailman.config.config import Configuration
  File "/usr/local/lib/python3.8/site-packages/mailman/config/config.py", line 27, in <module>
    from importlib_resources import path, read_text
ModuleNotFoundError: No module named 'importlib_resources'

(the same happens even when running plain `mailman')

After the py38-importlib-resource package is installed, it seems to work:

root@mail:~ # pkg install py38-importlib-resources
root@mail:~ # service mailman info
Usage: mailman [OPTIONS] COMMAND [ARGS]...
Try 'mailman -h' for help.

Error: Invalid value for '-C' / '--config': File '/usr/local/mailman/etc/mailman.cfg' does not exist.
root@mail:~ #

this is happening on FreeBSD 13.0-RELEASE-p1 with packages build from the master branch.

NB: this is different from bug#254135 (which seems fixed?)

Comment 1 Omar Polo 2021-06-06 16:32:43 UTC
Apologies, while reading bug#254135 I haven't read that it already mentions impotrlib-resources.

Sorry for the noise

*** This bug has been marked as a duplicate of bug 254135 ***