Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/Lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
strategy:
matrix:
os: [ "ubuntu-latest", "windows-latest" ]
version: ['3.10', '3.11', '3.12']
version: ['3.11', '3.12', '3.13']
fail-fast: false
steps:
- uses: actions/checkout@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
python-version: "3.12"
- name: Install pypa/build
run: >-
python3 -m
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-against-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ['3.11', "3.12"]
version: ['3.11', "3.12", "3.13"]
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name = "ibex-bluesky-core" # REQUIRED, is the only field that cannot be marked
dynamic = ["version"]
description = "Core bluesky plan stubs & devices for use at ISIS"
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.11"
license-files = ["LICENSE"]

authors = [
Expand All @@ -33,15 +33,15 @@ classifiers = [
# that you indicate you support Python 3. These classifiers are *not*
# checked by "pip install". See instead "requires-python" key in this file.
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
]

dependencies = [
"bluesky", # Bluesky framework
"ophyd-async[ca] == 0.12.3", # Device abstraction
"ophyd-async[ca] == 0.13.1", # Device abstraction
"matplotlib", # Plotting
"lmfit", # Fitting
"scipy", # Definitions of erf/erfc functions
Expand Down
19 changes: 6 additions & 13 deletions tests/devices/test_block.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# pyright: reportMissingParameterType=false
import asyncio
import sys
from contextlib import nullcontext
from unittest.mock import ANY, MagicMock, call, patch

Expand All @@ -25,11 +23,6 @@
)
from tests.conftest import MOCK_PREFIX

if sys.version_info < (3, 11):
aio_timeout_error = asyncio.exceptions.TimeoutError
else:
aio_timeout_error = TimeoutError


async def _make_block(clazz):
block = clazz(float, MOCK_PREFIX, "float_block")
Expand Down Expand Up @@ -192,7 +185,7 @@ async def test_block_set_with_timeout():

set_mock_value(block.readback, 10)

with pytest.raises(aio_timeout_error):
with pytest.raises(TimeoutError):
await block.set(20)

func.assert_called_once_with(20, 10)
Expand Down Expand Up @@ -234,7 +227,7 @@ async def test_block_set_waiting_for_global_moving_flag_timeout():

set_mock_value(block.global_moving, True)
with patch("ibex_bluesky_core.devices.block.asyncio.sleep") as mock_aio_sleep:
with pytest.raises(aio_timeout_error):
with pytest.raises(TimeoutError):
await block.set(10)
# Only check first call, as wait_for_value from ophyd_async gives us a few more...
assert mock_aio_sleep.mock_calls[0] == call(GLOBAL_MOVING_FLAG_PRE_WAIT)
Expand Down Expand Up @@ -379,13 +372,13 @@ async def test_block_mot_set_outside_limits(mot_block):
async def test_block_failing_write(timeout_is_error):
block = await _block_with_write_config(BlockWriteConfig(timeout_is_error=timeout_is_error))

get_mock_put(block.setpoint).side_effect = aio_timeout_error
get_mock_put(block.setpoint).side_effect = TimeoutError

with pytest.raises(aio_timeout_error) if timeout_is_error else nullcontext():
with pytest.raises(TimeoutError) if timeout_is_error else nullcontext():
await block.set(1)


async def test_block_failing_write_with_default_write_config(writable_block):
get_mock_put(writable_block.setpoint).side_effect = aio_timeout_error
with pytest.raises(aio_timeout_error):
get_mock_put(writable_block.setpoint).side_effect = TimeoutError
with pytest.raises(TimeoutError):
await writable_block.set(1)
Loading