Bug 273259 - mail/mailman3: Fails to start with python-importlib-resources >= 6.0
Summary: mail/mailman3: Fails to start with python-importlib-resources >= 6.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Robert Clausecker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-21 10:04 UTC by Einar Bjarni Halldórsson
Modified: 2023-09-22 05:13 UTC (History)
2 users (show)

See Also:
fuz: merge-quarterly-


Attachments
patch (1.01 KB, patch)
2023-09-14 13:05 UTC, Kurt Jaeger
no flags Details | Diff
Updates mail/mailman3 to 3.3.9.b1 (2.12 KB, patch)
2023-09-15 12:48 UTC, Einar Bjarni Halldórsson
einar: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Einar Bjarni Halldórsson 2023-08-21 10:04:48 UTC
After upgrading python-importlib-resources to 6.0, mailman fails to start:

ImportError: cannot import name 'path' from 'importlib_resources' (/usr/local/lib/python3.9/site-packages/importlib_resources/__init__.py)

This has already been reported upstream https://gitlab.com/mailman/mailman/-/issues/1093 and a fix merged in https://gitlab.com/mailman/mailman/-/merge_requests/1130

The fix drops support for python < 3.9 and drops the dependency on importlib-resources.

Waiting for a release of mailman to fix in ports, workaround until then is to pin python-importlib-resources to <6.0.
Comment 1 Kurt Jaeger freebsd_committer freebsd_triage 2023-09-14 13:05:13 UTC
Created attachment 244834 [details]
patch

Does this patch do what you want to fix the issue ?
Comment 2 Einar Bjarni Halldórsson 2023-09-15 08:45:54 UTC
(In reply to Kurt Jaeger from comment #1)

No, we need the changes from https://gitlab.com/mailman/mailman/-/merge_requests/1130#aaa880b17679720cda10b5102a3491633ad11378

I'm going to test building with that commit. If there isn't a release of mailman in sight, I might try getting the port upgraded to that specific commit.
Comment 3 Einar Bjarni Halldórsson 2023-09-15 12:48:31 UTC
Created attachment 244887 [details]
Updates mail/mailman3 to 3.3.9.b1

Mailman 3.3.8 depends on py-importlib-resources, but is incompatible with 6.0.1.

Since the port is broken as-is, update to upstream commit that removes the dependency on importlib-resources.
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2023-09-19 17:20:22 UTC
Will commit with small changes:

 - the DISTVERSION will be 3.3.8-81-g5e4431af6 as per Porter's Handbook § 5.4.3
 - will remove redundant GL_ACCOUNT and GL_PROJECT

Shall this one be merged into 2023Q3?
Comment 5 Einar Bjarni Halldórsson 2023-09-19 20:01:26 UTC
(In reply to Robert Clausecker from comment #4)

Good point about DISTVERSION.
The source at the tag reports as 3.3.9b1.

No need to backport to quarterly, py-importlib-resources is at version 5.4.0, the breakage happened after py-importlib-resources was updated to 6.0.
Comment 6 Robert Clausecker freebsd_committer freebsd_triage 2023-09-19 20:04:03 UTC
Cool.  Will proceed with a commit then.
Comment 7 commit-hook freebsd_committer freebsd_triage 2023-09-22 05:09:10 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=dcaf243b427998fb375ebc49564c297e16378685

commit dcaf243b427998fb375ebc49564c297e16378685
Author:     Einar Bjarni Halldórsson <einar@loggins.is>
AuthorDate: 2023-09-15 12:35:05 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-09-22 04:54:46 +0000

    mail/mailman3: update to 3.3.8-81-g5e4431af6

    This update mail/mailman3 to intermediate commit 3.3.8-81-g5e4431af6 to
    avoid a dependency on py-importlib-resources.  Needed since
    py-importlib-resources has been upgraded to 6.0.1 which is incompatible
    with mailman.

    PR:             273259

 mail/mailman3/Makefile | 8 ++++----
 mail/mailman3/distinfo | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)
Comment 8 Robert Clausecker freebsd_committer freebsd_triage 2023-09-22 05:13:45 UTC
Thank you for your contribution.