On 2/22/26 14:53, Paul Tomblin via Mailman-users wrote:
I set up a new Mailman site using 3.3.10, and copied over my files from my old 
mailman site (using 2.1.34). I created a new domain, and a new list, and tried 
to import the settings from the old pickle file using mailman import21 
[email protected] /var/tmp/var.lib.mailman/lists/pt-test/config.pck (in 
the virtual environment shell) but I get the following error

   File "/usr/lib/python3.13/contextlib.py", line 528, in enter_context
     raise TypeError(f"'{cls.__module__}.{cls.__qualname__}' object does "
                     f"not support the context manager protocol") from None
TypeError: 'pathlib._local.PosixPath' object does not support the context 
manager protocol

There is a compatibility issue between Mailman <=3.3.10 and Python 3.13. See <https://gitlab.com/mailman/mailman/-/issues/1190> and <https://gitlab.com/mailman/mailman/-/merge_requests/1309>.

This patch will fix your issue.
```
--- a/src/mailman/utilities/i18n.py
+++ b/src/mailman/utilities/i18n.py
@@ -114,8 +114,7 @@ def search(resources, template_file, mlist=None, language=None):
         languages.append(language)
     languages.reverse()
     # The non-language qualified $template_dir paths in search order.
-    templates_dir = str(resources.enter_context(
-        files('mailman').joinpath('templates')))
+    templates_dir = str(files('mailman').joinpath('templates'))
     paths = [templates_dir, os.path.join(config.TEMPLATE_DIR, 'site')]
     if mlist is not None:
         # Don't forget these are in REVERSE search order!
```

--
Mark Sapiro <[email protected]>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

_______________________________________________
Mailman-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Archived at: 
https://lists.mailman3.org/archives/list/[email protected]/message/KQQEGPQJG7KWSFQ6R3VGZQQDHNHPKIVX/

This message sent to [email protected]

Reply via email to