Skip to content

Commit 9c329a2

Browse files
authored
Merge pull request #131 from lcmd-epfl/drop-py39
Drop python 3.9 support
2 parents 378e7e1 + 32b5819 commit 9c329a2

File tree

6 files changed

+5
-46
lines changed

6 files changed

+5
-46
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ The last one is recommended if you do not know which features you wish to use, s
3434
| `[equio]` | interface with [metatensor](https://github.com/metatensor/metatensor) |
3535
| `[regression]` | tools to run kernel ridge regression (no quantum chemistry) |
3636
| `[wigner]` | tool to compute Wigner d-matrices for real spherical harmonics |
37+
| `[dev]` | all above + linting + documentation building |
3738

3839

3940
If you want to be able to edit Q-stack's code after installing, you need to download it yourself, for instance with this series of commands
@@ -43,7 +44,7 @@ git clone https://github.com/lcmd-epfl/Q-stack
4344
cd Q-stack
4445

4546
#optionally, run the following line, if you want to be extra-careful about reproducibility, by installing a well-known version of all dependencies
46-
python -m pip install -r requirements.py3.13.txt # (or "requirements.py3.{9,11}.txt" if you have an older version of python and that first file doesn't work)
47+
python -m pip install -r requirements.py3.13.txt # (or "requirements.py3.11.txt" if you have an older version of python and that first file doesn't work)
4748

4849
python -m pip install -e .[all] # note: this translates as "install as '-e'ditable, install from this directory ('.'), with optional feature 'all'"
4950
```

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ classifiers = [
3535

3636
# note: minimal versions were just copy-pasted from requirements.txt, some earlier versions may also work
3737
# note: maximal versions are just the latest versions to exist when compatibility checks were made, later versions may also work
38-
requires-python = ">=3.9"
38+
requires-python = ">=3.10"
3939
dependencies = [
4040
'numpy >= 1.26.1, < 2.4',
4141
'scipy >= 1.1.0, < 1.17',

qstack/__init__.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
"""Q-stack."""
22

3-
import sys
4-
import warnings
5-
import builtins
63
from qstack import tools
74
from qstack import constants
85
from qstack import mathutils
9-
10-
11-
if sys.version_info[1]<10:
12-
warnings.warn('Redefining built-in function zip for compatibility', stacklevel=1)
13-
_zip = builtins.zip
14-
def zip_override(*iterables, strict=False):
15-
"""Override built-in zip for python<3.10 to ignore `strict` argument."""
16-
return _zip(*iterables)
17-
builtins.zip = zip_override

qstack/regression/local_kernels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
import ctypes
1212
import sysconfig
1313
import warnings
14+
from itertools import pairwise
1415
import numpy as np
1516
import sklearn.metrics.pairwise as _SKLEARN_PAIRWISE
1617
from qstack.regression import __path__ as REGMODULE_PATH
17-
from qstack.tools import pairwise
1818

1919

2020
RAM_BATCHING_SIZE = 1024**3 * 5 # 5GiB

qstack/tools.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,11 @@
44
"""
55

66
import os
7-
import sys
87
import time
98
import resource
109
import argparse
1110
import numpy as np
12-
from itertools import accumulate
13-
if sys.version_info[1]>=10:
14-
from itertools import pairwise
15-
else:
16-
def pairwise(iterable):
17-
"""Implement itertools.pairwise for python<3.10.
18-
19-
Taken from https://docs.python.org/3/library/itertools.html#itertools.pairwise
20-
"""
21-
iterator = iter(iterable)
22-
a = next(iterator, None)
23-
for b in iterator:
24-
yield a, b
25-
a = b
11+
from itertools import accumulate, pairwise
2612

2713

2814
def unix_time_decorator(func):

requirements.py3.9.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)