Skip to content

Commit be193ce

Browse files
committed
Update supported Python versions (add 3.13, remove 3.8)
Signed-off-by: Keith Battocchi <kebatt@microsoft.com>
1 parent deb47c2 commit be193ce

File tree

4 files changed

+29
-34
lines changed

4 files changed

+29
-34
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ jobs:
121121
extras: "[plt,ray]"
122122
pattern: "(?!CustomerScenarios)"
123123
install_graphviz: true
124-
version: '3.8' # no supported version of tensorflow for 3.9
124+
version: '3.12'
125125
- kind: "customer-scenarios"
126126
extras: "[plt,dowhy]"
127127
pattern: "CustomerScenarios"
128-
version: '3.9'
128+
version: '3.12'
129129
install_graphviz: false
130130
fail-fast: false
131131
env:
@@ -204,20 +204,17 @@ jobs:
204204
strategy:
205205
matrix:
206206
os: [ubuntu-latest, windows-latest, macos-latest]
207-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
207+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
208208
kind: [serial, other, dml, main, treatment, ray]
209209
exclude:
210210
# Serial tests fail randomly on mac sometimes, so we don't run them there
211211
- os: macos-latest
212212
kind: serial
213-
# Mac ARM doesn't support tensorflow versions compatible with python 3.8
214-
- os: macos-latest
215-
python-version: '3.8'
216213
# Ray tests run out of memory on Windows
217214
- os: windows-latest
218215
kind: ray
219-
# Ray doesn't currently support Python 3.12
220-
- python-version: '3.12'
216+
# Ray doesn't currently support Python 3.13
217+
- python-version: '3.13'
221218
kind: ray
222219
# Assign the correct package and testing options for each kind of test
223220
include:
@@ -307,22 +304,23 @@ jobs:
307304
matrix:
308305
kind: [tests]
309306
os: [ubuntu-latest, windows-latest, macos-latest]
310-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
311-
extras: ["[plt,dowhy,ray]"]
307+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
312308
include:
309+
# assign extras to all combinations
310+
- extras: "[plt,dowhy,ray]"
311+
# overwrite extras for python 3.13 only
312+
- extras: "[plt,dowhy]"
313+
python-version: '3.13'
313314
# explicitly add the two notebook extras
314-
- kind: notebooks
315+
- kind: notebooks-other
315316
os: ubuntu-latest
316-
python-version: '3.8'
317+
python-version: '3.12'
317318
extras: "[plt,ray]"
318-
- kind: notebooks
319+
- kind: notebooks-customer
319320
os: ubuntu-latest
320-
python-version: '3.9'
321+
python-version: '3.12'
321322
extras: "[plt,dowhy]"
322-
exclude:
323-
# Mac ARM doesn't support tensorflow versions compatible with python 3.8
324-
- os: macos-latest
325-
python-version: '3.8'
323+
fail-fast: false
326324
runs-on: ${{ matrix.os }}
327325
steps:
328326
- name: Checkout repository
@@ -341,7 +339,7 @@ jobs:
341339
run: uv pip install --system -e .${{ matrix.extras }}
342340
- name: Install notebook requirements
343341
run: uv pip install --system jupyter jupyter-client nbconvert nbformat seaborn xgboost tqdm
344-
if: matrix.kind == 'notebooks'
342+
if: startswith(matrix.kind, 'notebooks-')
345343
- name: Save installed packages
346344
run: pip freeze --exclude-editable > lkg-${{ matrix.kind }}-${{ matrix.os }}-${{ matrix.python-version }}.txt
347345
- name: Upload installed packages
@@ -369,7 +367,7 @@ jobs:
369367
- name: Setup Python
370368
uses: actions/setup-python@v5
371369
with:
372-
python-version: '3.8'
370+
python-version: '3.12'
373371
- name: Install coverage
374372
run: pip install coverage[toml]
375373
- name: Combine coverage reports
@@ -413,8 +411,10 @@ jobs:
413411
kind: [tests, notebooks]
414412
include:
415413
- kind: tests
414+
pattern: tests
416415
output-name: lkg
417416
- kind: notebooks
417+
pattern: "notebooks-(?P<subset>[a-z]+)"
418418
output-name: lkg-notebook
419419
runs-on: ubuntu-latest
420420
steps:
@@ -430,7 +430,7 @@ jobs:
430430
name: lkg-${{ matrix.kind }}
431431
path: requirements
432432
- name: "Generate last known good versions"
433-
run: python .github/workflows/generate_lkg.py requirements "lkg-${{ matrix.kind }}-(?P<os>[a-z]+)-(latest|[0-9.]+)-(?P<pyversion>[0-9.]+).txt" ${{ matrix.output-name }}.txt
433+
run: python .github/workflows/generate_lkg.py requirements "lkg-${{ matrix.pattern }}-(?P<os>[a-z]+)-(latest|[0-9.]+)-(?P<pyversion>[0-9.]+).txt" ${{ matrix.output-name }}.txt
434434
- name: "Upload last known good versions"
435435
uses: actions/upload-artifact@v4
436436
with:

.github/workflows/publish-documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
- name: Setup Python
7272
uses: actions/setup-python@v5
7373
with:
74-
python-version: 3.8 # because of our supported TensorFlow versions, must build on 3.6-3.8
74+
python-version: 3.12
7575
- name: Ensure latest pip and setuptools
7676
run: python -m pip install --upgrade pip && pip install --upgrade setuptools
7777
- name: Install econml[all]

.github/workflows/publish-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
- name: Build wheels
7272
run: pip install 'cibuildwheel < 3' && python -m cibuildwheel --output-dir dist
7373
env:
74-
CIBW_BUILD: ${{ inputs.use_lkg && 'cp3{8,9,10,11,12}-*' || 'cp3*' }}
74+
CIBW_BUILD: ${{ inputs.use_lkg && 'cp3{9,10,11,12,13}-*' || 'cp3*' }}
7575
CIBW_SKIP: "*musl* *win32 *i686"
7676
- name: Upload wheels as artifact
7777
uses: actions/upload-artifact@v4
@@ -89,7 +89,7 @@ jobs:
8989
- name: Setup Python
9090
uses: actions/setup-python@v5
9191
with:
92-
python-version: 3.8 # because of our supported TensorFlow versions, must build on 3.6-3.8
92+
python-version: 3.12
9393
- name: Ensure latest pip and setuptools
9494
run: python -m pip install --upgrade pip && pip install --upgrade setuptools
9595
- name: Install econml[all]

pyproject.toml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "econml"
3-
requires-python = ">=3.8"
3+
requires-python = ">=3.9"
44
authors = [{ name = "PyWhy contributors" }]
55
description = "This package contains several methods for calculating Conditional Average Treatment Effects"
66
readme = "README.md"
@@ -9,11 +9,11 @@ license = { text = "MIT" }
99
dynamic = ["version"]
1010

1111
classifiers = [
12-
"Programming Language :: Python :: 3.8",
1312
"Programming Language :: Python :: 3.9",
1413
"Programming Language :: Python :: 3.10",
1514
"Programming Language :: Python :: 3.11",
1615
"Programming Language :: Python :: 3.12",
16+
"Programming Language :: Python :: 3.13",
1717
"License :: OSI Approved :: MIT License",
1818
"Operating System :: MacOS",
1919
"Operating System :: Microsoft :: Windows",
@@ -50,9 +50,7 @@ plt = [
5050
]
5151
dowhy = [
5252
# when updating this, also update the version check in dowhy.py
53-
"dowhy < 0.13; python_version > '3.8'",
54-
# Version capped due to scipy incompatibility - can't import dowhy 0.11.1 with scipy 1.4.1
55-
"dowhy < 0.11; python_version <= '3.8'"
53+
"dowhy < 0.13"
5654
]
5755
ray = [
5856
"ray > 2.2.0"
@@ -63,18 +61,15 @@ all = [
6361
"azure-cli",
6462
"graphviz",
6563
"matplotlib",
66-
"dowhy < 0.13; python_version > '3.8'",
67-
# Version capped due to scipy incompatibility - can't import dowhy 0.11.1 with scipy 1.4.1
68-
"dowhy < 0.11; python_version <= '3.8'",
64+
"dowhy < 0.13",
6965
"ray > 2.2.0"
7066
]
7167

7268
[build-system]
7369
requires = [
7470
"setuptools",
7571
"wheel",
76-
"numpy>=2,<3; python_version > '3.8'",
77-
"oldest-supported-numpy; python_version <= '3.8'",
72+
"numpy>=2,<3",
7873
"scipy",
7974
"cython"
8075
]

0 commit comments

Comments
 (0)