summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2021-01-14 08:56:59 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2021-01-14 13:13:04 -0500
commit92700475248c72f2c3a6e427f754e582a2b575fb (patch)
treee1ccea4a39735de44ec9bca37f3b0ed2575f529e /doc
parent6215ba10a7737bd3582926b0ade8a510441da48e (diff)
downloadmako-92700475248c72f2c3a6e427f754e582a2b575fb.tar.gz
Avoid warnings under Python 3.10
Fixed Python deprecation issues related to module importing, as well as file access within the Lingua plugin, for deprecated APIs that began to emit warnings under Python 3.10. Pull request courtesy Petr Viktorin. This modernizes the code to avoid `DeprecationWarning` and `ResourceWarning` encountered in the test suite under Python 3.10a4: - [load_module](https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.load_module) is deprecated - Some files weren't being closed This changes the semantics of the `compat.load_module` function: on Python 3.5+, the module is no longer inserted in `sys.modules`. All non-test calls did `del sys.modules[self.module_id]` right after the call, anyway. On older Python, the module is inserted and then deleted. (Some additional `DeprecationWarning` come from Setuptools: https://github.com/pypa/setuptools/pull/2517) Closes: #328 Pull-request: https://github.com/sqlalchemy/mako/pull/328 Pull-request-sha: 87c1d09e5f39de7b19e749568c437928580f7553 Change-Id: I9cb3772f6812ef14297792344caf2f9aa5337adf
Diffstat (limited to 'doc')
-rw-r--r--doc/build/unreleased/328.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/build/unreleased/328.rst b/doc/build/unreleased/328.rst
new file mode 100644
index 0000000..a3fba59
--- /dev/null
+++ b/doc/build/unreleased/328.rst
@@ -0,0 +1,7 @@
+.. change::
+ :tags: bug, py3k
+ :tickets: 328
+
+ Fixed Python deprecation issues related to module importing, as well as
+ file access within the Lingua plugin, for deprecated APIs that began to
+ emit warnings under Python 3.10. Pull request courtesy Petr Viktorin.