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
_______________________________________________
Mailman-users mailing list -- mailman-users@mailman3.org
To unsubscribe send an email to mailman-users-le...@mailman3.org
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Archived at: 
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/OEMPJBJA6WKBLYFHS6LUZD6ES6TDHBQA/

This message sent to arch...@mail-archive.com

Reply via email to