Skip to content

Commit bc9ecde

Browse files
Merge pull request #105 from PolicyEngine/nikhilwoodruff/issue104
Enable Python 3.11+
2 parents 70ba63b + ec46d4c commit bc9ecde

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed

.github/fetch_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
def fetch_version():
22
try:
3-
import pkg_resources
3+
import importlib
44

5-
version = pkg_resources.get_distribution("policyengine").version
5+
return importlib.import_module("policyengine").__version__
66
return version
77
except Exception as e:
88
print(f"Error fetching version: {e}")

.github/workflows/any_changes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Python
2020
uses: actions/setup-python@v2
2121
with:
22-
python-version: '3.10'
22+
python-version: '3.13'
2323

2424
- name: Install package
2525
run: uv pip install .[dev] --system

.github/workflows/code_changes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Set up Python
3131
uses: actions/setup-python@v2
3232
with:
33-
python-version: '3.10'
33+
python-version: '3.13'
3434

3535
- name: Install package
3636
run: uv pip install .[dev] --system

.github/workflows/publish_package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Python
1818
uses: actions/setup-python@v2
1919
with:
20-
python-version: '3.10'
20+
python-version: '3.13'
2121

2222
- name: Install package
2323
run: uv pip install .[dev] --system

changelog_entry.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- bump: patch
2+
changes:
3+
fixed:
4+
- Dependency for `pkg_resources`.

policyengine/utils/charts.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import plotly.graph_objects as go
22
from IPython.core.display import HTML, display_html
3-
import pkg_resources
43

54

65
def add_fonts():
@@ -44,7 +43,9 @@ def add_fonts():
4443

4544

4645
def get_version_number(package):
47-
return pkg_resources.get_distribution(package).version
46+
import importlib
47+
48+
return importlib.import_module(package).__version__
4849

4950

5051
def format_fig(

0 commit comments

Comments
 (0)