Skip to content

Commit 3aec454

Browse files
authored
dropped 3.9 support (#944)
* dropped 3.9 support This is mainly because we'll likely release in a month or so. --------- Signed-off-by: Nick Papior <nickpapior@gmail.com>
1 parent fe73d50 commit 3aec454

File tree

7 files changed

+13
-45
lines changed

7 files changed

+13
-45
lines changed

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
runs-on: ${{ matrix.os }}
6969
strategy:
7070
matrix:
71-
python-version: ['3.9', '3.13']
71+
python-version: ['3.10', '3.13']
7272
full-test: [true, false]
7373
minimal-dep: [true, false]
7474
os: [ubuntu-latest, macos-13, macos-latest]
@@ -119,7 +119,7 @@ jobs:
119119
fi
120120
# Test minimal versioning?
121121
if [[ "${{ matrix.minimal-dep }}" == "true" ]]; then
122-
echo "sisl_install_packages='numpy==1.21.*' 'scipy==1.6.*' 'xarray==0.21.*'" >> $GITHUB_OUTPUT
122+
echo "sisl_install_packages='numpy==1.22.*' 'scipy==1.8.*' 'xarray==0.21.*'" >> $GITHUB_OUTPUT
123123
else
124124
echo "sisl_install_packages=" >> $GITHUB_OUTPUT
125125
fi

.github/workflows/wheels.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,6 @@ jobs:
114114
CIBW_BUILD: "cp310-*"
115115
CIBW_ARCHS: ${{ matrix.cibw_archs }}
116116

117-
- name: Build wheels for CPython 3.9
118-
uses: pypa/cibuildwheel@v3.1.4
119-
env:
120-
CIBW_BUILD: "cp39-*"
121-
CIBW_ARCHS: ${{ matrix.cibw_archs }}
122-
123117
- name: Store artifacts
124118
uses: actions/upload-artifact@v4
125119
with:
@@ -184,7 +178,7 @@ jobs:
184178
- name: Python installation
185179
uses: actions/setup-python@v6
186180
with:
187-
python-version: "3.9"
181+
python-version: "3.10"
188182

189183
- name: Wait for testpypi to catch up
190184
run: |
@@ -201,7 +195,7 @@ jobs:
201195
--index-url https://test.pypi.org/simple/ \
202196
--extra-index-url https://pypi.org/simple/ \
203197
"sisl[test,viz]==${{ env.SISL_VERSION }}" \
204-
"numpy==1.21.*" "scipy==1.6.*" "xarray==0.21.*"
198+
"numpy==1.22.*" "scipy==1.8.*" "xarray==0.21.*"
205199
206200
- name: Install sisl + dependencies (arm)
207201
if: matrix.os == 'macos-14'

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ cmake_print_variables(CMAKE_INTERPROCEDURAL_OPTIMIZATION)
2323
cmake_print_variables(CMAKE_POSITION_INDEPENDENT_CODE)
2424
cmake_print_variables(CMAKE_INSTALL_PREFIX)
2525
cmake_print_variables(CMAKE_PREFIX_PATH)
26+
cmake_print_variables(CMAKE_SYSTEM_NAME)
27+
cmake_print_variables(CMAKE_CROSSCOMPILING)
2628
if(SKBUILD)
2729
message(STATUS "scikit-build-core: ${SKBUILD_CORE_VERSION}")
2830
endif()

changes/orphan.3.change.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Dropped support for Python 3.9

docs/quickstart/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The above installation instructions installs the necessary dependencies
7474
to run sisl, so generally one shouldn't worry about getting correct
7575
packages etc. Here the more detailed requirements are listed.
7676

77-
- `Python`_ 3.9 or above
77+
- `Python`_ 3.10 or above
7878
- `numpy`_
7979
- `scipy`_
8080
- `xarray`_

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ build-backend = "scikit_build_core.build"
2424

2525
# Top most items are probably changed the most
2626
[project]
27-
requires-python = ">=3.9"
27+
requires-python = ">=3.10"
2828

2929
name = "sisl"
3030
description = "Manipulation and post-processing of DFT output and creating tight-binding models for NEGF transport"
@@ -52,8 +52,8 @@ keywords = [
5252
# lower bound of dependencies.
5353
dependencies = [
5454
# We need npt.NDArray
55-
"numpy>=1.21",
56-
"scipy>=1.6",
55+
"numpy>=1.22",
56+
"scipy>=1.8",
5757
# I can't get it to work on py311 with older versions
5858
"pyparsing>=2.2.1",
5959
# xarray fixes get_loc in 0.21
@@ -73,9 +73,9 @@ classifiers = [
7373
"Intended Audience :: Developers",
7474
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
7575
"Programming Language :: C",
76+
"Programming Language :: Cython",
7677
"Programming Language :: Fortran",
7778
"Programming Language :: Python",
78-
"Programming Language :: Python :: 3.9",
7979
"Programming Language :: Python :: 3.10",
8080
"Programming Language :: Python :: 3.11",
8181
"Programming Language :: Python :: 3.12",

src/sisl/io/tests/test_zipfile.py

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,7 @@
1111
import sisl
1212
from sisl.io._zipfile import ZipPath
1313

14-
# We will xfail all tests if the python version is <=3.9,
15-
# this is because sisl is expected to raise a RuntimeError
16-
# explaining that zipfile functionality requires Python 3.10 or newer.
17-
_is_old_python = sys.version_info < (3, 10)
18-
# 3.9 also prints very ugly errors when deleting a zipfile which make
19-
# it difficult to read the test output. So we patch the __del__ method.
20-
if _is_old_python:
21-
zipfile.ZipFile.__del__ = lambda self: None
22-
23-
24-
@pytest.mark.xfail(
25-
_is_old_python,
26-
reason="Zip file functionality requires Python 3.10 or newer",
27-
raises=RuntimeError,
28-
)
14+
2915
def test_zipfile_preserved():
3016
"""Test that the zipfile is preserved through the sile framework
3117
@@ -48,11 +34,6 @@ def test_zipfile_preserved():
4834
assert fdf.file.root is f
4935

5036

51-
@pytest.mark.xfail(
52-
_is_old_python,
53-
reason="Zip file functionality requires Python 3.10 or newer",
54-
raises=RuntimeError,
55-
)
5637
@pytest.mark.parametrize("specify_class", [True, False])
5738
@pytest.mark.parametrize("external_zip", [True, False])
5839
def test_zipfile_write_read(external_zip: bool, specify_class: bool):
@@ -97,11 +78,6 @@ def test_zipfile_write_read(external_zip: bool, specify_class: bool):
9778
assert np.allclose(read_geometry.cell, geometry.cell)
9879

9980

100-
@pytest.mark.xfail(
101-
_is_old_python,
102-
reason="Zip file functionality requires Python 3.10 or newer",
103-
raises=RuntimeError,
104-
)
10581
@pytest.mark.parametrize("external_zip", [True, False])
10682
@pytest.mark.parametrize("from_fdf", [True, False])
10783
def test_zipfile_write_read_binary(external_zip: bool, from_fdf: bool):
@@ -145,11 +121,6 @@ def test_zipfile_write_read_binary(external_zip: bool, from_fdf: bool):
145121
assert np.allclose(H.tocsr().toarray(), read_H.tocsr().toarray())
146122

147123

148-
@pytest.mark.xfail(
149-
_is_old_python,
150-
reason="Zip file functionality requires Python 3.10 or newer",
151-
raises=RuntimeError,
152-
)
153124
@pytest.mark.parametrize("external_zip", [True, False])
154125
@pytest.mark.parametrize("from_fdf", [True, False])
155126
def test_zipfile_write_read_cdf(external_zip: bool, from_fdf: bool):

0 commit comments

Comments
 (0)