Hi Folks, I'm running the Debian-packaged mailman3 (version 3.8) which is a little behind the current 3.9 release ... Debian is now shipping Python 3.13 in 'sid'.
https://docs.python.org/3/whatsnew/3.13.html#id4 says: Remove the ability to use Path objects as context managers. This functionality was deprecated and has had no effect since Python 3.9. (Contributed by Barney Gale in gh-83863.)
As a result, I'm hitting tracebacks from many operations where pathlib.Path objects are used as context managers, like this one:
path, fp = find(default_uri, mlist, code) ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/mailman/utilities/i18n.py", line 157, in find for search_path in raw_search_order: ^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/mailman/utilities/i18n.py", line 117, in search templates_dir = str(resources.enter_context( ~~~~~~~~~~~~~~~~~~~~~~~^ files('mailman').joinpath('templates'))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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
Given that the python3.13 change is only to move a noop to an exception, it may be that this is a bug for python 3.9 and up as well.
Peter C
On 1/23/25 14:08, peter--- via Mailman-users wrote:
Hi Folks, I'm running the Debian-packaged mailman3 (version 3.8) which is a little behind the current 3.9 release ... Debian is now shipping Python 3.13 in 'sid'.
https://docs.python.org/3/whatsnew/3.13.html#id4 says: Remove the ability to use Path objects as context managers. This functionality was deprecated and has had no effect since Python 3.9. (Contributed by Barney Gale in gh-83863.) As a result, I'm hitting tracebacks from many operations where pathlib.Path objects are used as context managers, like this one:
This is https://gitlab.com/mailman/mailman/-/issues/1190 fixed for Mailman 3.3.11 by https://gitlab.com/mailman/mailman/-/merge_requests/1309
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Sapiro
-
peter@chubb.wattle.id.au