# HG changeset patch # User Aurélien Campéas # Date 1718801514 -7200 # Wed Jun 19 14:51:54 2024 +0200 # Node ID ff03d9db9bffb0c27127ab1e53b61db18452c2c4 # Parent 9385d2d14634e87e2fcfe4c7f1a008158c00a7cb py312 compatibility: provide a minimalist replacement for find_module diff --git a/lairucrem/__init__.py b/lairucrem/__init__.py --- a/lairucrem/__init__.py +++ b/lairucrem/__init__.py @@ -6,7 +6,7 @@ """The lairucrem librairy.""" import contextlib -import imp +import os.path import urwid @@ -37,10 +37,7 @@ The extension file is not loaded so, lazy import feature of mercurial is not activated. """ - path = __path__ # noqa: E0602 - fid, path = imp.find_module('extension', path)[:2] - fid.close() - return path + return os.path.join(__path__[0], 'extension' + '.py') def _MAIN_WIDGET_FACTORY():