Skip to content

Commit 5d7d197

Browse files
authored
Merge pull request geodynamics#682 from bobmyhill/python3.14
Python 3.14
2 parents 1d9d6e3 + 8c70eb6 commit 5d7d197

File tree

6 files changed

+15
-50
lines changed

6 files changed

+15
-50
lines changed

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
strategy:
1010
matrix:
11-
python-versions: ['3.12']
11+
python-versions: ['3.13']
1212

1313
steps:
1414
- uses: actions/checkout@v4

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
strategy:
1212
matrix:
13-
python-versions: ['3.12']
13+
python-versions: ['3.13']
1414

1515
steps:
1616
- uses: actions/checkout@v4
@@ -38,7 +38,7 @@ jobs:
3838

3939
strategy:
4040
matrix:
41-
python-versions: ['3.9', '3.10', '3.11', '3.12', '3.13']
41+
python-versions: ['3.10', '3.11', '3.12', '3.13', '3.14']
4242

4343
steps:
4444
- uses: actions/checkout@v4
@@ -65,7 +65,7 @@ jobs:
6565

6666
strategy:
6767
matrix:
68-
python-versions: ['3.9', '3.10', '3.11', '3.12', '3.13']
68+
python-versions: ['3.10', '3.11', '3.12', '3.13', '3.14']
6969

7070
steps:
7171
- uses: actions/checkout@v4

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ If you use BurnMan in your work, we ask that you cite the following publications
5353

5454
## Installation requirements
5555

56-
* Python 3.8+
56+
* Python 3.10+
5757
* Python modules:
5858
NumPy, SciPy, SymPy, Matplotlib
5959

burnman/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
Requirements
8282
------------
8383
84-
- Python 3.8+
84+
- Python 3.10+
8585
- Python modules: NumPy, SciPy, SymPy, Sparse, Matplotlib
8686
8787
Optional modules

burnman/classes/material.py

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -7,48 +7,9 @@
77
from copy import deepcopy
88
from ..utils.math import bracket
99
from scipy.optimize import brentq
10+
from functools import cached_property
1011

11-
12-
# TODO: When we require Python 3.8+, replace with
13-
# functools.cached_property decorator
14-
class cached_property(property):
15-
"""A decorator that converts a function into a lazy property. The
16-
function wrapped is called the first time to retrieve the result
17-
and then that calculated result is used the next time you access
18-
the value::
19-
20-
class Foo(object):
21-
22-
@cached_property
23-
def foo(self):
24-
# calculate something important here
25-
return 42
26-
27-
The class has to have a `__dict__` in order for this property to
28-
work.
29-
30-
This decorator is adapted slightly from the one in the werkzeug module:
31-
https://tedboy.github.io/flask/_modules/werkzeug/utils.html#cached_property
32-
"""
33-
34-
def __init__(self, func, name=None, doc=None):
35-
self.__name__ = name or func.__name__
36-
self.__module__ = func.__module__
37-
self.__doc__ = doc or func.__doc__
38-
self.func = func
39-
40-
def __set__(self, obj, value):
41-
obj.__dict__[self.__name__] = value
42-
43-
def __get__(self, obj, type=None):
44-
if obj is None:
45-
return self
46-
try:
47-
value = obj.__dict__[self.__name__]
48-
except KeyError:
49-
value = self.func(obj)
50-
obj.__dict__[self.__name__] = value
51-
return value
12+
cached_property = cached_property # for easier access
5213

5314

5415
def material_property(func):

pyproject.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,27 @@ documentation = "https://burnman.readthedocs.io/"
1111
classifiers = [
1212
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
1313
"Operating System :: OS Independent",
14-
"Programming Language :: Python :: 3.9",
1514
"Programming Language :: Python :: 3.10",
1615
"Programming Language :: Python :: 3.11",
1716
"Programming Language :: Python :: 3.12",
1817
"Programming Language :: Python :: 3.13",
18+
"Programming Language :: Python :: 3.14",
1919
]
2020

2121
[tool.poetry.dependencies]
22-
python = "^3.8"
22+
python = "^3.10"
2323
numpy = "^2"
2424
scipy = "^1.10"
2525
sympy = "^1.12"
2626
cvxpy = "^1.3"
2727
matplotlib = "^3.7"
28-
numba = ">=0.59,^0"
28+
numba = [
29+
{ version = ">=0.59,^0", python = "<3.14" },
30+
{ version = ">=0.63.0b1", python = ">=3.14" }
31+
]
2932
pycddlib-standalone = {version = "^3.0", optional = true}
3033

34+
3135
[tool.poetry.dev-dependencies]
3236
ipython = "^8.5"
3337
numba = ">=0.59,^0"

0 commit comments

Comments
 (0)