Skip to content

Commit 9f2f286

Browse files
Merge pull request #147 from Geode-solutions/fix/python_3_12_compatibility
fix(python 3.12): compatibility
2 parents 20e3f94 + a5389c0 commit 9f2f286

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

.github/workflows/CICD.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v4
1414
- uses: actions/setup-python@v5
1515
with:
16-
python-version: "3.9"
16+
python-version: "3.12"
1717
- name: Test
1818
run: |
1919
pip install -r requirements.txt

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ authors = [
1212
]
1313
description = "OpenGeodeWeb-Back is an open source framework that proposes handy python functions and wrappers for the OpenGeode ecosystem"
1414
readme = "README.md"
15-
requires-python = ">=3.8"
15+
requires-python = ">=3.9, <3.13"
1616
classifiers = [
1717
"Programming Language :: Python :: 3",
1818
"License :: OSI Approved :: MIT License",

src/opengeodeweb_back/utils_functions.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import flask
99
from jsonschema import validate
1010
from jsonschema.exceptions import ValidationError
11-
import pkg_resources
11+
import importlib.metadata as metadata
1212

1313
# Local application imports
1414

@@ -70,10 +70,7 @@ def versions(list_packages: list):
7070
list_with_versions = []
7171
for package in list_packages:
7272
list_with_versions.append(
73-
{
74-
"package": package,
75-
"version": pkg_resources.get_distribution(package).version,
76-
}
73+
{"package": package, "version": metadata.distribution(package).version}
7774
)
7875
return list_with_versions
7976

0 commit comments

Comments
 (0)