Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use importlib.reload instead of imp.reload (Python 3.12 compat) #211

Merged
merged 2 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ and gettext to build the Flatpak.

#### Source

Gaupol requires Python ≥ 3.2, PyGObject ≥ 3.12 and GTK ≥ 3.12.
Gaupol requires Python ≥ 3.4, PyGObject ≥ 3.12 and GTK ≥ 3.12.
Additionally, during installation you need gettext. Optional, but
strongly recommended dependencies include:

Expand Down
6 changes: 3 additions & 3 deletions aeidon/test/test_locales.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import aeidon
import imp
import importlib

from aeidon.i18n import _, d_
from unittest.mock import patch
Expand Down Expand Up @@ -46,10 +46,10 @@ def test_get_system_code(self):

@patch.dict("os.environ", dict(LANGUAGE="sr@Latn"))
def test_get_system_modifier__latn(self):
imp.reload(aeidon.locales)
importlib.reload(aeidon.locales)
assert aeidon.locales.get_system_modifier() == "Latn"

@patch.dict("os.environ", dict(LANGUAGE="en"))
def test_get_system_modifier__none(self):
imp.reload(aeidon.locales)
importlib.reload(aeidon.locales)
assert aeidon.locales.get_system_modifier() is None