commit 685d9a7bdbd382d9e8d4a2da74bd973e93356e05
Author: liushuyu <liushuyu011@gmail.com>
Date:   Thu Jan 16 09:12:34 2025 -0700

    utilities: remove context manager usage for PosixPath ...
    
    ... Python 3.13 removed the context manager functions from PosixPath

diff --git a/src/mailman/utilities/i18n.py b/src/mailman/utilities/i18n.py
index a694ae8dd..d4ab9085b 100644
--- 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!
diff --git a/src/mailman/utilities/tests/test_modules.py b/src/mailman/utilities/tests/test_modules.py
index baa39417b..f52553092 100644
--- a/src/mailman/utilities/tests/test_modules.py
+++ b/src/mailman/utilities/tests/test_modules.py
@@ -164,8 +164,7 @@ class AbstractStyle:
 
     def test_find_pluggable_components_by_plugin_name(self):
         with ExitStack() as resources:
-            testing_path = resources.enter_context(
-                files('mailman.plugins.testing'))
+            testing_path = files('mailman.plugins.testing')
             resources.enter_context(hack_syspath(0, str(testing_path)))
             resources.enter_context(configuration('plugin.example', **{
                 'class': 'example.hooks.ExamplePlugin',
@@ -176,8 +175,7 @@ class AbstractStyle:
 
     def test_find_pluggable_components_by_component_package(self):
         with ExitStack() as resources:
-            testing_path = resources.enter_context(
-                files('mailman.plugins.testing'))
+            testing_path = files('mailman.plugins.testing')
             resources.enter_context(hack_syspath(0, str(testing_path)))
             resources.enter_context(configuration('plugin.example', **{
                 'class': 'example.hooks.ExamplePlugin',
diff --git a/src/mailman/utilities/tests/test_templates.py b/src/mailman/utilities/tests/test_templates.py
index 43c680b23..e5a6139f7 100644
--- a/src/mailman/utilities/tests/test_templates.py
+++ b/src/mailman/utilities/tests/test_templates.py
@@ -63,8 +63,8 @@ class TestSearchOrder(unittest.TestCase):
         # tree.  The former will use /v/ as the root and the latter will use
         # /m/ as the root.
         with ExitStack() as resources:
-            in_tree = str(resources.enter_context(
-                resource_path('mailman').joinpath('templates')).parent)
+            in_tree = str(
+                resource_path('mailman').joinpath('templates').parent)
             raw_search_order = search(
                 resources, template_file, mailing_list, language)
         for path in raw_search_order:
