Skip to content

Commit f969ebb

Browse files
authored
Merge pull request #374 from mj-will/support-python-3.12
Explicity support Python 3.12
2 parents b160e31 + 093d3eb commit f969ebb

File tree

7 files changed

+8
-12
lines changed

7 files changed

+8
-12
lines changed

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
os: [macOS, Ubuntu, Windows]
21-
python-version: ["3.8", "3.9", "3.10", "3.11"]
21+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
2222
runs-on: ${{ matrix.os }}-latest
2323

2424
steps:

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
os: [macOS, Ubuntu, Windows]
21-
python-version: ["3.8", "3.9", "3.10", "3.11"]
21+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
2222
runs-on: ${{ matrix.os }}-latest
2323

2424
steps:

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ gw = [
5555
]
5656
dev = [
5757
"pre-commit",
58-
"ray[default]",
58+
"ray[default]; sys_platform != 'win32' and python_version < '3.12'",
5959
"corner",
6060
"black>=24.0",
6161
]
@@ -99,6 +99,7 @@ target-version = [
9999
"py39",
100100
"py310",
101101
"py311",
102+
"py312",
102103
]
103104

104105
[tool.flake8]

tests/test_flows/test_base_flow.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ def test_base_flow_abstract_methods():
2828
"""Assert an error is raised if the methods are not implemented."""
2929
with pytest.raises(TypeError) as excinfo:
3030
BaseFlow()
31-
assert "instantiate abstract class BaseFlow with abstract method" in str(
32-
excinfo.value
33-
)
31+
assert "instantiate abstract class BaseFlow" in str(excinfo.value)
3432

3533

3634
@pytest.mark.parametrize(

tests/test_flowsampler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ def test_run_ins_redraw(flow_sampler):
830830
compute_initial_posterior=True,
831831
)
832832

833-
assert ns.draw_posterior_samples.has_calls(
833+
ns.draw_posterior_samples.assert_has_calls(
834834
[
835835
call(
836836
sampling_method="importance_sampling", use_final_samples=False

tests/test_gw/test_distance_converters.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ def test_converter_error():
5656
"""Assert an error is raised if the methods are not implemented"""
5757
with pytest.raises(TypeError) as excinfo:
5858
DistanceConverter()
59-
assert (
60-
"abstract methods from_uniform_parameter, to_uniform_parameter"
61-
in str(excinfo.value)
62-
)
59+
assert "abstract methods" in str(excinfo.value)
6360

6461

6562
def test_converter_to_uniform_parameter_error(base_converter):

tests/test_proposal/test_base_proposal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_init_with_draw():
3737
model = Mock()
3838
with pytest.raises(TypeError) as excinfo:
3939
Proposal(model)
40-
assert "class Proposal with abstract method" in str(excinfo.value)
40+
assert "class Proposal with" in str(excinfo.value)
4141

4242

4343
def test_initialised(proposal):

0 commit comments

Comments
 (0)