pyobs-flipro 2.0.0.dev8__tar.gz → 2.0.0.dev10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/.github/dependabot.yml +5 -0
  2. pyobs_flipro-2.0.0.dev10/.github/workflows/dependabot-automerge.yml +24 -0
  3. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/.github/workflows/pypi.yml +1 -1
  4. pyobs_flipro-2.0.0.dev10/.github/workflows/pyrefly.yml +26 -0
  5. pyobs_flipro-2.0.0.dev10/.github/workflows/pytest.yml +28 -0
  6. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/PKG-INFO +1 -1
  7. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/pyobs_flipro/fliprocamera.py +43 -16
  8. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/pyobs_flipro/fliprodriver.pyx +106 -30
  9. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/pyobs_flipro/libflipro.pxd +1 -1
  10. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/pyproject.toml +7 -1
  11. pyobs_flipro-2.0.0.dev10/specs/plans/2026-08-16-nogil-libflipro-driver-calls.md +104 -0
  12. pyobs_flipro-2.0.0.dev10/tests/test_fliprocamera.py +108 -0
  13. pyobs_flipro-2.0.0.dev10/tests/test_import.py +23 -0
  14. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/uv.lock +61 -1
  15. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/.github/workflows/ruff.yml +0 -0
  16. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/.pre-commit-config.yaml +0 -0
  17. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/.readthedocs.yml +0 -0
  18. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/CMakeLists.txt +0 -0
  19. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/LICENSE +0 -0
  20. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/README.md +0 -0
  21. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/docs/Makefile +0 -0
  22. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/docs/make.bat +0 -0
  23. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/docs/requirements.txt +0 -0
  24. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/docs/source/_static/pyobs.gif +0 -0
  25. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/docs/source/conf.py +0 -0
  26. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/docs/source/index.rst +0 -0
  27. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/lib/libflipro.h +0 -0
  28. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/lib/liblibflialgo.so +0 -0
  29. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/lib/liblibflipro.so +0 -0
  30. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/poetry.lock +0 -0
  31. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/pyobs_flipro/__init__.py +0 -0
  32. {pyobs_flipro-2.0.0.dev8 → pyobs_flipro-2.0.0.dev10}/pyobs_flipro/gui.py +0 -0
@@ -6,5 +6,10 @@ updates:
6
6
  interval: "weekly"
7
7
  day: "tuesday"
8
8
  target-branch: "develop"
9
+ groups:
10
+ patch-and-minor:
11
+ update-types:
12
+ - "minor"
13
+ - "patch"
9
14
  labels:
10
15
  - "dependencies"
@@ -0,0 +1,24 @@
1
+ name: Dependabot auto-merge
2
+
3
+ on: pull_request
4
+
5
+ permissions:
6
+ contents: write
7
+ pull-requests: write
8
+
9
+ jobs:
10
+ dependabot:
11
+ runs-on: ubuntu-latest
12
+ if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
13
+ steps:
14
+ - name: Fetch Dependabot metadata
15
+ id: metadata
16
+ uses: dependabot/fetch-metadata@v2
17
+ with:
18
+ compat-lookup: true
19
+ - name: Enable auto-merge for patch and minor updates
20
+ if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' }}
21
+ run: gh pr merge --auto --merge "$PR_URL"
22
+ env:
23
+ PR_URL: ${{ github.event.pull_request.html_url }}
24
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -56,7 +56,7 @@ jobs:
56
56
  - name: Set up Python
57
57
  uses: astral-sh/setup-uv@v5
58
58
  with:
59
- enable-cache: true
59
+ enable-cache: false
60
60
  python-version: "3.13"
61
61
 
62
62
  - name: Publish
@@ -0,0 +1,26 @@
1
+ name: pyrefly
2
+ on: push
3
+
4
+ jobs:
5
+ pyrefly:
6
+ runs-on: ubuntu-latest
7
+ timeout-minutes: 10
8
+
9
+ steps:
10
+ - name: Check out repository code
11
+ uses: actions/checkout@v4
12
+
13
+ - name: Set up Python
14
+ uses: astral-sh/setup-uv@v5
15
+ with:
16
+ enable-cache: true
17
+ python-version: "3.13"
18
+
19
+ - name: Install system dependencies
20
+ run: sudo apt-get install -y libcfitsio-dev libusb-1.0-0-dev
21
+
22
+ - name: Install packages
23
+ run: uv sync --all-extras --dev
24
+
25
+ - name: Run pyrefly
26
+ run: uv run pyrefly check
@@ -0,0 +1,28 @@
1
+ name: PyTest
2
+ on: push
3
+
4
+ jobs:
5
+ test:
6
+ runs-on: ubuntu-latest
7
+ timeout-minutes: 10
8
+
9
+ steps:
10
+ - name: Check out repository code
11
+ uses: actions/checkout@v4
12
+
13
+ - name: Set up Python
14
+ uses: astral-sh/setup-uv@v5
15
+ with:
16
+ enable-cache: true
17
+ python-version: "3.13"
18
+
19
+ - name: Install system dependencies
20
+ run: sudo apt-get install -y libcfitsio-dev libusb-1.0-0-dev
21
+
22
+ - name: Install packages
23
+ run: uv sync --all-extras --dev
24
+
25
+ - name: Run tests
26
+ run: uv run pytest tests
27
+ env:
28
+ CI: true
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyobs-flipro
3
- Version: 2.0.0.dev8
3
+ Version: 2.0.0.dev10
4
4
  Summary: pyobs module for FLIPRO cameras
5
5
  Author-Email: Tim-Oliver Husser <thusser@uni-goettingen.de>
6
6
  License-Expression: MIT
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  import asyncio
2
4
  import logging
3
5
  import math
@@ -5,18 +7,21 @@ import threading
5
7
  import time
6
8
  from collections.abc import Callable
7
9
  from datetime import UTC, datetime
8
- from typing import Any, TypeVar, cast
10
+ from typing import TYPE_CHECKING, Any, TypeVar, cast
9
11
 
10
12
  import numpy as np
11
13
  from pyobs.images import Image
12
14
  from pyobs.interfaces import IAbortable, IBinning, ICamera, ICooling, ITemperatures, IWindow
13
- from pyobs.interfaces.IBinning import BinningCapabilities, BinningState
15
+ from pyobs.interfaces.IBinning import Binning, BinningCapabilities, BinningState
14
16
  from pyobs.interfaces.ICooling import CoolingState
15
17
  from pyobs.interfaces.ITemperatures import SensorReading, TemperaturesState
16
18
  from pyobs.interfaces.IWindow import WindowCapabilities, WindowState
17
19
  from pyobs.modules.camera.basecamera import BaseCamera
18
20
  from pyobs.utils.enums import ExposureStatus
19
21
 
22
+ if TYPE_CHECKING:
23
+ from .fliprodriver import DeviceCaps, DeviceInfo, FliProDriver
24
+
20
25
  log = logging.getLogger(__name__)
21
26
 
22
27
  _T = TypeVar("_T")
@@ -46,7 +51,6 @@ class FliProCamera(BaseCamera, ICamera, IAbortable, IWindow, IBinning, ICooling,
46
51
  setpoint: Cooling temperature setpoint.
47
52
  """
48
53
  BaseCamera.__init__(self, **kwargs)
49
- from .fliprodriver import DeviceCaps, DeviceInfo, FliProDriver # type: ignore
50
54
 
51
55
  # variables
52
56
  self._driver: FliProDriver | None = None
@@ -62,6 +66,10 @@ class FliProCamera(BaseCamera, ICamera, IAbortable, IWindow, IBinning, ICooling,
62
66
  # cooling state
63
67
  self._cooling_enabled = False
64
68
 
69
+ # serializes all FLIPRO SDK calls; the SDK's own thread-safety is unverified, and the
70
+ # cooling-poll task and exposure threads share the same handle.
71
+ self._sdk_lock = threading.Lock()
72
+
65
73
  # background task for polling cooling/temperature
66
74
  self.add_background_task(self._poll_cooling)
67
75
 
@@ -74,6 +82,9 @@ class FliProCamera(BaseCamera, ICamera, IAbortable, IWindow, IBinning, ICooling,
74
82
 
75
83
  Returns:
76
84
  True if func completed within timeout, False if it's still running in the background.
85
+
86
+ Raises:
87
+ The exception raised by func, if any.
77
88
  """
78
89
  loop = asyncio.get_running_loop()
79
90
  future: asyncio.Future[None] = loop.create_future()
@@ -81,7 +92,9 @@ class FliProCamera(BaseCamera, ICamera, IAbortable, IWindow, IBinning, ICooling,
81
92
  def _wrapper() -> None:
82
93
  try:
83
94
  func()
84
- finally:
95
+ except BaseException as e:
96
+ loop.call_soon_threadsafe(future.set_exception, e)
97
+ else:
85
98
  loop.call_soon_threadsafe(future.set_result, None)
86
99
 
87
100
  threading.Thread(target=_wrapper, daemon=True).start()
@@ -102,10 +115,11 @@ class FliProCamera(BaseCamera, ICamera, IAbortable, IWindow, IBinning, ICooling,
102
115
  outcome: list[Any] = []
103
116
 
104
117
  def _wrapper() -> None:
105
- try:
106
- outcome.append(func())
107
- except BaseException as e:
108
- outcome.append(e)
118
+ with self._sdk_lock:
119
+ try:
120
+ outcome.append(func())
121
+ except BaseException as e:
122
+ outcome.append(e)
109
123
 
110
124
  if not await self._run_blocking(_wrapper, timeout=timeout):
111
125
  raise TimeoutError(f"Timed out waiting for FLIPRO SDK call after {timeout}s.")
@@ -136,7 +150,12 @@ class FliProCamera(BaseCamera, ICamera, IAbortable, IWindow, IBinning, ICooling,
136
150
  raise ValueError(f"Could not open FLIPRO camera: {e}")
137
151
 
138
152
  # get caps
139
- self._caps = self._driver.get_capabilities()
153
+ try:
154
+ self._caps = self._driver.get_capabilities()
155
+ except Exception:
156
+ self._driver.close()
157
+ self._driver = None
158
+ raise
140
159
  self._log_capabilities()
141
160
 
142
161
  # store full frame from caps
@@ -173,10 +192,10 @@ class FliProCamera(BaseCamera, ICamera, IAbortable, IWindow, IBinning, ICooling,
173
192
  IBinning,
174
193
  BinningCapabilities(
175
194
  binnings=[
176
- BinningState(x=1, y=1),
177
- BinningState(x=2, y=2),
178
- BinningState(x=3, y=3),
179
- BinningState(x=4, y=4),
195
+ Binning(x=1, y=1),
196
+ Binning(x=2, y=2),
197
+ Binning(x=3, y=3),
198
+ Binning(x=4, y=4),
180
199
  ]
181
200
  ),
182
201
  )
@@ -189,8 +208,16 @@ class FliProCamera(BaseCamera, ICamera, IAbortable, IWindow, IBinning, ICooling,
189
208
  if self._driver is not None:
190
209
  driver = self._driver
191
210
  self._driver = None
192
- if not await self._run_blocking(driver.close):
193
- log.error("Timed out closing FLIPRO camera after %.1fs.", _SDK_CALL_TIMEOUT)
211
+
212
+ def _close() -> None:
213
+ with self._sdk_lock:
214
+ driver.close()
215
+
216
+ try:
217
+ if not await self._run_blocking(_close):
218
+ log.error("Timed out closing FLIPRO camera after %.1fs.", _SDK_CALL_TIMEOUT)
219
+ except Exception:
220
+ log.exception("Failed to close FLIPRO camera.")
194
221
 
195
222
  def _log_device_info(self) -> None:
196
223
  log.info("Device info:")
@@ -354,7 +381,7 @@ class FliProCamera(BaseCamera, ICamera, IAbortable, IWindow, IBinning, ICooling,
354
381
  """Abort the running exposure."""
355
382
  if self._driver is None:
356
383
  raise ValueError("No camera driver.")
357
- await self._run_blocking_or_raise(self._driver.cancel_exposure)
384
+ await self._run_blocking_or_raise(self._driver.stop_exposure)
358
385
 
359
386
  async def set_window(self, left: int, top: int, width: int, height: int, **kwargs: Any) -> None:
360
387
  """Set the camera window.
@@ -3,8 +3,9 @@
3
3
  from collections import namedtuple
4
4
  from enum import Enum
5
5
  from typing import Tuple, List, Optional
6
+ from cpython.unicode cimport PyUnicode_FromWideChar
6
7
  from libc.stdlib cimport malloc, free
7
- from libc.string cimport memcpy
8
+ from libc.string cimport memcpy, memset
8
9
 
9
10
  import numpy as np
10
11
  cimport numpy as np
@@ -19,22 +20,22 @@ cdef class DeviceInfo:
19
20
  def __init__(self, obj):
20
21
  self.obj = obj
21
22
 
22
- def __decode(self, w):
23
- b = bytes(w)
24
- b = b[:b.index(b"\x00")]
25
- return b.decode('utf-8')
23
+ cdef str _decode(self, wchar_t* buf):
24
+ # buf is a NUL-terminated wide string; decode it as such rather than as a narrow C string
25
+ # (which would truncate at the zero padding byte after the first character)
26
+ return PyUnicode_FromWideChar(buf, -1)
26
27
 
27
28
  @property
28
29
  def friendly_name(self):
29
- return self.__decode(self.obj.cFriendlyName)
30
+ return self._decode(self.obj.cFriendlyName)
30
31
 
31
32
  @property
32
33
  def serial_number(self):
33
- return self.__decode(self.obj.cSerialNo)
34
+ return self._decode(self.obj.cSerialNo)
34
35
 
35
36
  @property
36
37
  def device_path(self):
37
- return self.__decode(self.obj.cDevicePath)
38
+ return self._decode(self.obj.cDevicePath)
38
39
 
39
40
  @property
40
41
  def conn_type(self):
@@ -94,15 +95,26 @@ cdef class FliProDriver:
94
95
  cdef wchar_t[100] version
95
96
  cdef uint32_t length = 100
96
97
 
97
- success = FPROCam_GetAPIVersion(version, length)
98
+ memset(version, 0, sizeof(version))
99
+ with nogil:
100
+ success = FPROCam_GetAPIVersion(version, length)
101
+ if success < 0:
102
+ raise ValueError('Could not fetch API version.')
103
+ # version is a wchar_t buffer; treat it as a NUL-terminated wide string rather than a
104
+ # narrow C string, so multi-byte wchar_t code units (4 bytes on Linux) don't truncate
105
+ # the result at the first zero padding byte after the first character
106
+ return PyUnicode_FromWideChar(<wchar_t*>version, -1)
98
107
 
99
108
  @staticmethod
100
109
  def list_devices() -> List[DeviceInfo]:
101
110
  cdef FPRODEVICEINFO pDeviceInfo[10]
102
111
  cdef uint32_t pNumDevices = 10
112
+ cdef LIBFLIPRO_API success
103
113
 
104
114
  # get list of cameras
105
- if FPROCam_GetCameraList(pDeviceInfo, &pNumDevices) < 0:
115
+ with nogil:
116
+ success = FPROCam_GetCameraList(pDeviceInfo, &pNumDevices)
117
+ if success < 0:
106
118
  raise ValueError('Could not fetch list of devices.')
107
119
 
108
120
  # return DeviceInfos
@@ -119,50 +131,81 @@ cdef class FliProDriver:
119
131
  return self._device_info
120
132
 
121
133
  def open(self):
122
- if FPROCam_Open(&self._device, &self._handle) < 0:
134
+ cdef LIBFLIPRO_API success
135
+ with nogil:
136
+ success = FPROCam_Open(&self._device, &self._handle)
137
+ if success < 0:
123
138
  raise ValueError('Could not open camera.')
124
139
 
125
140
  def close(self):
126
- if FPROCam_Close(self._handle) < 0:
141
+ cdef LIBFLIPRO_API success
142
+ with nogil:
143
+ success = FPROCam_Close(self._handle)
144
+ if success < 0:
127
145
  raise ValueError('Could not close camera.')
128
146
 
129
147
  def get_capabilities(self):
130
148
  cdef FPROCAP pCap
131
149
  cdef uint32_t pCapLength = sizeof(FPROCAP)
132
- if FPROSensor_GetCapabilities(self._handle, &pCap, &pCapLength) < 0:
150
+ cdef LIBFLIPRO_API success
151
+ with nogil:
152
+ success = FPROSensor_GetCapabilities(self._handle, &pCap, &pCapLength)
153
+ if success < 0:
133
154
  raise ValueError('Could not fetch camera capabalities.')
134
155
  return DeviceCaps(pCap)
135
156
 
136
157
  def get_image_area(self) -> Tuple[int, int, int, int]:
137
158
  cdef uint32_t pColOffset, pRowOffset, pWidth, pHeight
138
- if FPROFrame_GetImageArea(self._handle, &pColOffset, &pRowOffset, &pWidth, &pHeight) < 0:
159
+ cdef LIBFLIPRO_API success
160
+ with nogil:
161
+ success = FPROFrame_GetImageArea(self._handle, &pColOffset, &pRowOffset, &pWidth, &pHeight)
162
+ if success < 0:
139
163
  raise ValueError('Could not fetch image area.')
140
164
  return pColOffset, pRowOffset, pWidth, pHeight
141
165
 
142
166
  def set_image_area(self, col_offset, row_offset, width, height):
143
- if FPROFrame_SetImageArea(self._handle, col_offset, row_offset, width, height) < 0:
167
+ cdef uint32_t col_c = col_offset
168
+ cdef uint32_t row_c = row_offset
169
+ cdef uint32_t width_c = width
170
+ cdef uint32_t height_c = height
171
+ cdef LIBFLIPRO_API success
172
+ with nogil:
173
+ success = FPROFrame_SetImageArea(self._handle, col_c, row_c, width_c, height_c)
174
+ if success < 0:
144
175
  raise ValueError('Could not set image area.')
145
176
 
146
177
  def get_exposure_time(self) -> int:
147
178
  cdef uint64_t pExposureTime, pDelay
148
179
  cdef bool immediately
149
- if FPROCtrl_GetExposure(self._handle, &pExposureTime, &pDelay, &immediately) < 0:
180
+ cdef LIBFLIPRO_API success
181
+ with nogil:
182
+ success = FPROCtrl_GetExposure(self._handle, &pExposureTime, &pDelay, &immediately)
183
+ if success < 0:
150
184
  raise ValueError('Could not fetch exposure time.')
151
185
  return pExposureTime
152
186
 
153
187
  def set_exposure_time(self, exptime_ns: int):
154
188
  cdef LIBFLIPRO_API success
155
189
  cdef bool immediately = False
156
- if FPROCtrl_SetExposure(self._handle, exptime_ns, 0, immediately) < 0:
190
+ cdef uint64_t exptime_c = exptime_ns
191
+ with nogil:
192
+ success = FPROCtrl_SetExposure(self._handle, exptime_c, 0, immediately)
193
+ if success < 0:
157
194
  raise ValueError('Could not set exposure time.')
158
195
 
159
196
  def get_frame_size(self):
160
197
  # calculate size of the frame to retrieve from camera
161
- return FPROFrame_ComputeFrameSize(self._handle)
198
+ cdef LIBFLIPRO_API size
199
+ with nogil:
200
+ size = FPROFrame_ComputeFrameSize(self._handle)
201
+ return size
162
202
 
163
203
  def start_exposure(self):
164
204
  # start exposure
165
- if FPROFrame_CaptureStart(self._handle, 1) < 0:
205
+ cdef LIBFLIPRO_API success
206
+ with nogil:
207
+ success = FPROFrame_CaptureStart(self._handle, 1)
208
+ if success < 0:
166
209
  raise ValueError('Could not start exposure.')
167
210
 
168
211
  def read_exposure(self, frame_size):
@@ -195,7 +238,10 @@ cdef class FliProDriver:
195
238
 
196
239
  # read frame
197
240
  # TODO: this fails on images that have not full width of sensor
198
- if FPROFrame_GetVideoFrameUnpacked(self._handle, frame_data, &c_frame_size, 100, &buffers, &stats) < 0:
241
+ cdef LIBFLIPRO_API success
242
+ with nogil:
243
+ success = FPROFrame_GetVideoFrameUnpacked(self._handle, frame_data, &c_frame_size, 100, &buffers, &stats)
244
+ if success < 0:
199
245
  raise ValueError('Could not fetch frame.')
200
246
 
201
247
  # check size
@@ -211,55 +257,85 @@ cdef class FliProDriver:
211
257
 
212
258
  # clean up and return image
213
259
  free(frame_data)
214
- FPROFrame_FreeUnpackedBuffers(&buffers)
260
+ with nogil:
261
+ FPROFrame_FreeUnpackedBuffers(&buffers)
215
262
  return data
216
263
 
217
264
  def stop_exposure(self):
218
265
  # start exposure
219
- if FPROFrame_CaptureStop(self._handle) < 0:
266
+ cdef LIBFLIPRO_API success
267
+ with nogil:
268
+ success = FPROFrame_CaptureStop(self._handle)
269
+ if success < 0:
220
270
  raise ValueError('Could not stop exposure.')
221
271
 
222
272
  def is_available(self):
223
273
  cdef bool pAvailable
224
- if FPROFrame_IsAvailable(self._handle, &pAvailable) < 0:
274
+ cdef LIBFLIPRO_API success
275
+ with nogil:
276
+ success = FPROFrame_IsAvailable(self._handle, &pAvailable)
277
+ if success < 0:
225
278
  raise ValueError('Could not fetch exposure status.')
226
279
  return pAvailable
227
280
 
228
281
  def get_sensor_temperature(self):
229
282
  cdef int32_t pTemp
230
- if FPROCtrl_GetSensorTemperature(self._handle, &pTemp) < 0:
283
+ cdef LIBFLIPRO_API success
284
+ with nogil:
285
+ success = FPROCtrl_GetSensorTemperature(self._handle, &pTemp)
286
+ if success < 0:
231
287
  raise ValueError('Could not fetch sensor temperature.')
232
288
  return pTemp
233
289
 
234
290
  def get_temperatures(self):
235
291
  cdef double pAmbientTemp, pBaseTemp, pCoolerTemp
236
- if FPROCtrl_GetTemperatures(self._handle, &pAmbientTemp, &pBaseTemp, &pCoolerTemp) < 0:
292
+ cdef LIBFLIPRO_API success
293
+ with nogil:
294
+ success = FPROCtrl_GetTemperatures(self._handle, &pAmbientTemp, &pBaseTemp, &pCoolerTemp)
295
+ if success < 0:
237
296
  raise ValueError('Could not fetch temperatures.')
238
297
  return pAmbientTemp, pBaseTemp, pCoolerTemp
239
298
 
240
299
  def get_temperature_set_point(self):
241
300
  cdef double pSetPoint
242
- if FPROCtrl_GetTemperatureSetPoint(self._handle, &pSetPoint) < 0:
301
+ cdef LIBFLIPRO_API success
302
+ with nogil:
303
+ success = FPROCtrl_GetTemperatureSetPoint(self._handle, &pSetPoint)
304
+ if success < 0:
243
305
  raise ValueError('Could not get setpoint temperature.')
244
306
  return pSetPoint
245
307
 
246
308
  def set_temperature_set_point(self, temp):
247
309
  cdef double dblSetPoint = temp
248
- if FPROCtrl_SetTemperatureSetPoint(self._handle, dblSetPoint) < 0:
310
+ cdef LIBFLIPRO_API success
311
+ with nogil:
312
+ success = FPROCtrl_SetTemperatureSetPoint(self._handle, dblSetPoint)
313
+ if success < 0:
249
314
  raise ValueError('Could not fetch setpoint temperature.')
250
315
 
251
316
  def get_cooler_duty_cycle(self):
252
317
  cdef uint32_t pDutyCycle
253
- if FPROCtrl_GetCoolerDutyCycle(self._handle, &pDutyCycle) < 0:
318
+ cdef LIBFLIPRO_API success
319
+ with nogil:
320
+ success = FPROCtrl_GetCoolerDutyCycle(self._handle, &pDutyCycle)
321
+ if success < 0:
254
322
  raise ValueError('Could not fetch cooler duty cycle.')
255
323
  return pDutyCycle
256
324
 
257
325
  def get_binning(self):
258
326
  cdef uint32_t pXBin, pYBin
259
- if FPROSensor_GetBinning(self._handle, &pXBin, &pYBin) < 0:
327
+ cdef LIBFLIPRO_API success
328
+ with nogil:
329
+ success = FPROSensor_GetBinning(self._handle, &pXBin, &pYBin)
330
+ if success < 0:
260
331
  raise ValueError('Could not fetch binning.')
261
332
  return pXBin, pYBin
262
333
 
263
334
  def set_binning(self, x, y):
264
- if FPROSensor_SetBinning(self._handle, x, y) < 0:
335
+ cdef uint32_t x_c = x
336
+ cdef uint32_t y_c = y
337
+ cdef LIBFLIPRO_API success
338
+ with nogil:
339
+ success = FPROSensor_SetBinning(self._handle, x_c, y_c)
340
+ if success < 0:
265
341
  raise ValueError('Could not set binning.')
@@ -3,7 +3,7 @@ from libc.stddef cimport wchar_t
3
3
  from libcpp cimport bool
4
4
 
5
5
 
6
- cdef extern from "../lib/libflipro.h":
6
+ cdef extern from "../lib/libflipro.h" nogil:
7
7
  ctypedef int32_t LIBFLIPRO_API
8
8
  ctypedef void LIBFLIPRO_VOID
9
9
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pyobs-flipro"
3
- version = "2.0.0.dev8"
3
+ version = "2.0.0.dev10"
4
4
  description = "pyobs module for FLIPRO cameras"
5
5
  authors = [{ name = "Tim-Oliver Husser", email = "thusser@uni-goettingen.de" }]
6
6
  requires-python = ">=3.11"
@@ -23,6 +23,8 @@ dev = [
23
23
  "pre-commit>=4.2.0,<5",
24
24
  "ruff>=0.9.0",
25
25
  "pyrefly>=1.1.1",
26
+ "pytest>=8.0.0",
27
+ "pytest-asyncio>=0.24.0",
26
28
  ]
27
29
 
28
30
  [project.scripts]
@@ -58,3 +60,7 @@ select = ["E", "F", "W", "I", "UP", "G"]
58
60
  [tool.pyrefly]
59
61
  python-version = "3.11"
60
62
  ignore-missing-imports = []
63
+ project-excludes = ["pyobs_flipro/gui.py"]
64
+
65
+ [tool.pytest.ini_options]
66
+ asyncio_mode = "strict"
@@ -0,0 +1,104 @@
1
+ # Plan: Release the GIL around libflipro calls
2
+
3
+ Status: in progress
4
+
5
+ Tracks: https://github.com/pyobs/pyobs-flipro/issues/29
6
+
7
+ ## Problem
8
+
9
+ A hung FLI Pro device freezes the whole module, including XMPP. `FliProCamera` already runs
10
+ every FLIPRO SDK call in a daemon thread bounded by `asyncio.wait_for(...)` via
11
+ `_run_blocking`/`_run_blocking_or_raise` (`pyobs_flipro/fliprocamera.py`) — the correct
12
+ mitigation for a blocking vendor SDK call made from an `async def` method. It doesn't actually
13
+ bound a hung call, because `libflipro.pxd` declares `FPROCam_Open`, `FPROCam_GetCameraList`,
14
+ `FPROFrame_GetVideoFrameUnpacked`, etc. without `nogil`. Cython calls into a non-`nogil` C
15
+ function while still holding the GIL, so when the call blocks (unresponsive device), the daemon
16
+ thread holds the GIL for the entire hang. The event loop thread cannot run *anything* on that
17
+ GIL, including the `asyncio.wait_for` timeout machinery meant to bound the call. The timeout
18
+ never fires; the module goes fully unresponsive (same shape as `pyobs/pyobs-fli#75`, fixed there
19
+ in `pyobs/pyobs-fli#76`).
20
+
21
+ ## Decision
22
+
23
+ Mark the libflipro C functions `nogil` in `libflipro.pxd`, and wrap each call site in
24
+ `fliprodriver.pyx` in `with nogil:` so the GIL is actually released while the call runs. This
25
+ restores the daemon-thread timeout's ability to fire, since the event loop thread can run while
26
+ the SDK call blocks.
27
+
28
+ Considered and rejected: running FLIPRO calls in a subprocess. Same reasoning as
29
+ `pyobs/pyobs-fli#76` — a much larger change (IPC, serialization of frame buffers, process
30
+ lifecycle) for the same practical outcome. Revisit only if a `with nogil:` call still wedges
31
+ (e.g. the SDK deadlocks internally in a way that isn't a simple blocking wait).
32
+
33
+ ## Design
34
+
35
+ ### `libflipro.pxd`
36
+
37
+ Change the whole `cdef extern from "../lib/libflipro.h":` block to
38
+ `cdef extern from "../lib/libflipro.h" nogil:`. This marks every declared function `nogil` at
39
+ once, including ones not yet called from `fliprodriver.pyx`, so new call sites added later don't
40
+ silently regress. Safe for the whole block: libflipro is a pure hardware-I/O C library, none of
41
+ its functions take a Python object or call back into the interpreter.
42
+
43
+ ### `fliprodriver.pyx`
44
+
45
+ `nogil` only changes what's *allowed* inside `with nogil:` — it does not by itself move existing
46
+ calls off the GIL. Every call site needs a `with nogil:` around the actual `FPRO*()`/`LIBFLIPRO_*`
47
+ call, and anything inside that block that isn't a C primitive has to move outside it first:
48
+
49
+ - **Typed-arg unboxing** (`set_image_area`'s `col_offset`/`row_offset`/`width`/`height`,
50
+ `set_exposure_time`'s `exptime_ns`, `set_binning`'s `x`/`y`): read into local `cdef` C
51
+ variables before the `with nogil:` block, since Python->C unboxing touches the GIL.
52
+ (`set_temperature_set_point` already hoisted `temp` into `cdef double dblSetPoint`.)
53
+ - **`self._handle` / `self._device`**: no change needed. They are C-typed (`cdef int32_t` /
54
+ `cdef FPRODEVICEINFO`) fields of a `cdef class`, so reading them inside `with nogil:` is a
55
+ direct field access, not a Python attribute lookup.
56
+ - **`read_exposure()`**: `frame_data`, `c_frame_size`, `buffers`, `stats` are all C locals; only
57
+ the `FPROFrame_GetVideoFrameUnpacked` and `FPROFrame_FreeUnpackedBuffers` calls need wrapping.
58
+ Buffer bookkeeping (`malloc`, `memcpy`, `free`) stays where it is — the `libc` declarations
59
+ are `nogil` anyway.
60
+ - **Results**: every call's return value is captured in a `cdef LIBFLIPRO_API success` local
61
+ inside the `with nogil:` block and checked after it, preserving the existing
62
+ `if success < 0: raise ValueError(...)` behavior.
63
+
64
+ Cython raises a compile-time error for any Python-object touch inside a `with nogil:` block, so
65
+ this is self-checking: if an extraction is missed, `cython` on `fliprodriver.pyx` fails before
66
+ any build/link step.
67
+
68
+ ### `_wait_exposure()` in `fliprocamera.py`
69
+
70
+ No change needed here: the poll loop already runs `is_available()` inside a single
71
+ `_run_blocking_or_raise` call rather than polling per-tick on the event loop, so only the
72
+ underlying `FPROFrame_IsAvailable` call in `fliprodriver.pyx` needed the `nogil` wrapping.
73
+
74
+ ## Verification
75
+
76
+ No existing test suite exercises the Cython extension (no way to run libflipro calls without
77
+ real hardware). Verification is:
78
+
79
+ 1. `cython pyobs_flipro/fliprodriver.pyx -I pyobs_flipro` compiles clean (catches any missed
80
+ nogil extraction as a hard error, not just a lint).
81
+ 2. Full `uv sync` (scikit-build-core/CMake) build succeeds, the generated C shows
82
+ `PyEval_SaveThread()`/`PyEval_RestoreThread()` around every SDK call, and the resulting
83
+ extension imports.
84
+ 3. `pytest tests` passes (regression: `_run_blocking`/`_run_blocking_or_raise` wrappers and
85
+ constructor/setter behavior unchanged).
86
+ 4. Manual read-through confirming every `FPRO*`/`LIBFLIPRO_*` call site in the diff is inside a
87
+ `with nogil:` block, and that nothing added to `libflipro.pxd`'s `nogil` block passes a Python
88
+ object by reference to a C function that could retain/mutate it — none of the current API does.
89
+
90
+ No hardware-in-the-loop test is possible from here; actual freeze recovery on a hung FLI Pro
91
+ device can only be confirmed on-site.
92
+
93
+ ## Implementation checklist
94
+
95
+ - [x] `libflipro.pxd`: add `nogil` to the `cdef extern from "../lib/libflipro.h":` line.
96
+ - [x] `fliprodriver.pyx`: wrap every `FPRO*`/`LIBFLIPRO_*` call site in `with nogil:`, hoisting
97
+ typed-arg reads above the block as described in Design.
98
+ - [x] `cython pyobs_flipro/fliprodriver.pyx -I pyobs_flipro` compiles with no errors.
99
+ - [x] Full build (`uv sync`) succeeds; the generated C releases the GIL around each SDK call and
100
+ the extension imports.
101
+ - [x] `pytest tests` passes.
102
+ - [x] Open a PR against `develop` (matches this repo's branch convention — dependabot/feature
103
+ PRs land on `develop`, which then gets version-bumped into `main`). Opened as #36.
104
+ - [ ] Update this doc's `Status:` to `implemented` once merged.
@@ -0,0 +1,108 @@
1
+ """Unit tests for the non-hardware logic in FliProCamera: constructor defaults, the
2
+ window/binning setters, and the _run_blocking/_run_blocking_or_raise thread wrappers.
3
+
4
+ Hardware I/O (opening, exposing, reading out) is out of scope here.
5
+ """
6
+
7
+ import asyncio
8
+ import threading
9
+ from unittest.mock import AsyncMock
10
+
11
+ import pytest
12
+ from pyobs.interfaces import IBinning, IWindow
13
+
14
+ from pyobs_flipro import FliProCamera
15
+
16
+
17
+ def test_constructor_defaults() -> None:
18
+ camera = FliProCamera(-20.0)
19
+ assert camera._temp_setpoint == -20.0
20
+ assert camera._cooling_enabled is False
21
+ assert camera._window == (0, 0, 0, 0)
22
+ assert camera._binning == (1, 1)
23
+ assert camera._driver is None
24
+ assert camera._device is None
25
+
26
+
27
+ @pytest.mark.asyncio
28
+ async def test_set_window() -> None:
29
+ camera = FliProCamera(-20.0)
30
+ camera.comm.set_state = AsyncMock() # type: ignore[method-assign]
31
+
32
+ await camera.set_window(10, 20, 100, 200)
33
+
34
+ assert camera._window == (10, 20, 100, 200)
35
+ assert camera.comm.set_state.await_args is not None
36
+ interface, state = camera.comm.set_state.await_args.args
37
+ assert interface is IWindow
38
+ assert (state.x, state.y, state.width, state.height) == (10, 20, 100, 200)
39
+
40
+
41
+ @pytest.mark.asyncio
42
+ async def test_set_binning() -> None:
43
+ camera = FliProCamera(-20.0)
44
+ camera.comm.set_state = AsyncMock() # type: ignore[method-assign]
45
+
46
+ await camera.set_binning(2, 3)
47
+
48
+ assert camera._binning == (2, 3)
49
+ assert camera.comm.set_state.await_args is not None
50
+ interface, state = camera.comm.set_state.await_args.args
51
+ assert interface is IBinning
52
+ assert (state.x, state.y) == (2, 3)
53
+
54
+
55
+ @pytest.mark.asyncio
56
+ async def test_set_cooling_requires_driver() -> None:
57
+ camera = FliProCamera(-20.0)
58
+ with pytest.raises(ValueError):
59
+ await camera.set_cooling(True, -20.0)
60
+
61
+
62
+ @pytest.mark.asyncio
63
+ async def test_run_blocking_runs_func_and_returns_true() -> None:
64
+ ran: list[bool] = []
65
+
66
+ def fast() -> None:
67
+ ran.append(True)
68
+
69
+ assert await FliProCamera._run_blocking(fast) is True
70
+ assert ran == [True]
71
+
72
+
73
+ @pytest.mark.asyncio
74
+ async def test_run_blocking_times_out() -> None:
75
+ done = threading.Event()
76
+
77
+ def slow() -> None:
78
+ done.wait()
79
+
80
+ assert await FliProCamera._run_blocking(slow, timeout=0.01) is False
81
+ done.set()
82
+ await asyncio.sleep(0.05)
83
+
84
+
85
+ @pytest.mark.asyncio
86
+ async def test_run_blocking_reraises() -> None:
87
+ def boom() -> None:
88
+ raise ValueError("boom")
89
+
90
+ with pytest.raises(ValueError):
91
+ await FliProCamera._run_blocking(boom)
92
+
93
+
94
+ @pytest.mark.asyncio
95
+ async def test_run_blocking_or_raise_returns_value() -> None:
96
+ camera = FliProCamera(-20.0)
97
+ assert await camera._run_blocking_or_raise(lambda: 42) == 42
98
+
99
+
100
+ @pytest.mark.asyncio
101
+ async def test_run_blocking_or_raise_reraises() -> None:
102
+ camera = FliProCamera(-20.0)
103
+
104
+ def boom() -> int:
105
+ raise ValueError("boom")
106
+
107
+ with pytest.raises(ValueError):
108
+ await camera._run_blocking_or_raise(boom)
@@ -0,0 +1,23 @@
1
+ """Smoke tests: import the driver and instantiate it without hardware, asserting the
2
+ interfaces it claims.
3
+
4
+ The Cython extension (fliprodriver) links the bundled FLIPRO .so libraries during
5
+ install, but device enumeration/opening only happens inside open(), so instantiation
6
+ is safe with no FLIPRO hardware attached.
7
+ """
8
+
9
+ from pyobs.interfaces import IAbortable, IBinning, ICamera, ICooling, ITemperatures, IWindow
10
+ from pyobs.modules import Module
11
+
12
+ from pyobs_flipro import FliProCamera
13
+
14
+
15
+ def test_instantiate_camera() -> None:
16
+ camera = FliProCamera(-20.0)
17
+ assert isinstance(camera, Module)
18
+ assert isinstance(camera, ICamera)
19
+ assert isinstance(camera, IWindow)
20
+ assert isinstance(camera, IBinning)
21
+ assert isinstance(camera, ICooling)
22
+ assert isinstance(camera, ITemperatures)
23
+ assert isinstance(camera, IAbortable)
@@ -1006,6 +1006,15 @@ wheels = [
1006
1006
  { url = "https://files.pythonhosted.org/packages/7f/ec/6b120b4a86f6fadc7ddb1d7c7cdcb15bcfb332deb022ab60df51bcd4494c/influxdb_client-1.50.0-py3-none-any.whl", hash = "sha256:f172975cf7f0c95bfe74f288b31273393b164d2c58a948de55497d9956ab49be", size = 746289, upload-time = "2026-01-23T09:39:37.377Z" },
1007
1007
  ]
1008
1008
 
1009
+ [[package]]
1010
+ name = "iniconfig"
1011
+ version = "2.3.0"
1012
+ source = { registry = "https://pypi.org/simple" }
1013
+ sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" }
1014
+ wheels = [
1015
+ { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" },
1016
+ ]
1017
+
1009
1018
  [[package]]
1010
1019
  name = "invoke"
1011
1020
  version = "3.0.3"
@@ -1855,6 +1864,15 @@ wheels = [
1855
1864
  { url = "https://files.pythonhosted.org/packages/49/e2/4e6eee633809c376c024821b91ade709cbfd040ec53939ffbcc292aa7eee/platformdirs-4.11.2-py3-none-any.whl", hash = "sha256:7f89089b6ea71bda7962953edcf784b2e2d9d285b40ad88be2bb75c6e9d82ab4", size = 23361, upload-time = "2026-08-10T15:48:04.855Z" },
1856
1865
  ]
1857
1866
 
1867
+ [[package]]
1868
+ name = "pluggy"
1869
+ version = "1.6.0"
1870
+ source = { registry = "https://pypi.org/simple" }
1871
+ sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" }
1872
+ wheels = [
1873
+ { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" },
1874
+ ]
1875
+
1858
1876
  [[package]]
1859
1877
  name = "pre-commit"
1860
1878
  version = "4.6.2"
@@ -2256,6 +2274,15 @@ wheels = [
2256
2274
  { url = "https://files.pythonhosted.org/packages/b4/11/97233cf23ad5411ac6f13b1d6ee3888f90ace4f974d9bf9db887aa428912/pyerfa-2.0.1.5-cp39-abi3-win_amd64.whl", hash = "sha256:66292d437dcf75925b694977aa06eb697126e7b86553e620371ed3e48b5e0ad0", size = 349410, upload-time = "2024-11-11T15:22:24.817Z" },
2257
2275
  ]
2258
2276
 
2277
+ [[package]]
2278
+ name = "pygments"
2279
+ version = "2.20.0"
2280
+ source = { registry = "https://pypi.org/simple" }
2281
+ sdist = { url = "https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz", hash = "sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f", size = 4955991, upload-time = "2026-03-29T13:29:33.898Z" }
2282
+ wheels = [
2283
+ { url = "https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl", hash = "sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176", size = 1231151, upload-time = "2026-03-29T13:29:30.038Z" },
2284
+ ]
2285
+
2259
2286
  [[package]]
2260
2287
  name = "pynacl"
2261
2288
  version = "1.6.2"
@@ -2339,7 +2366,7 @@ gui = [
2339
2366
 
2340
2367
  [[package]]
2341
2368
  name = "pyobs-flipro"
2342
- version = "2.0.0.dev8"
2369
+ version = "2.0.0.dev10"
2343
2370
  source = { editable = "." }
2344
2371
  dependencies = [
2345
2372
  { name = "astropy" },
@@ -2359,6 +2386,8 @@ dev = [
2359
2386
  { name = "black" },
2360
2387
  { name = "pre-commit" },
2361
2388
  { name = "pyrefly" },
2389
+ { name = "pytest" },
2390
+ { name = "pytest-asyncio" },
2362
2391
  { name = "ruff" },
2363
2392
  ]
2364
2393
 
@@ -2377,6 +2406,8 @@ dev = [
2377
2406
  { name = "black", specifier = ">=25.1.0,<27" },
2378
2407
  { name = "pre-commit", specifier = ">=4.2.0,<5" },
2379
2408
  { name = "pyrefly", specifier = ">=1.1.1" },
2409
+ { name = "pytest", specifier = ">=8.0.0" },
2410
+ { name = "pytest-asyncio", specifier = ">=0.24.0" },
2380
2411
  { name = "ruff", specifier = ">=0.9.0" },
2381
2412
  ]
2382
2413
 
@@ -2456,6 +2487,35 @@ wheels = [
2456
2487
  { url = "https://files.pythonhosted.org/packages/f1/12/eb6723faf5cb7fa581145da1c15f40d641b96e080f0491af2f1859fdeedb/pyside6_essentials-6.11.1-cp310-abi3-win_arm64.whl", hash = "sha256:11253ea52aabecefe9febddbbe78b43a824129e3af1cec98431028fba7fa954f", size = 57964512, upload-time = "2026-05-13T09:43:52.968Z" },
2457
2488
  ]
2458
2489
 
2490
+ [[package]]
2491
+ name = "pytest"
2492
+ version = "9.1.1"
2493
+ source = { registry = "https://pypi.org/simple" }
2494
+ dependencies = [
2495
+ { name = "colorama", marker = "sys_platform == 'win32'" },
2496
+ { name = "iniconfig" },
2497
+ { name = "packaging" },
2498
+ { name = "pluggy" },
2499
+ { name = "pygments" },
2500
+ ]
2501
+ sdist = { url = "https://files.pythonhosted.org/packages/e4/47/b9efed96c114afcfa3c9d3fe98a76a1d14c74a9e266d397cf6eb64be5e01/pytest-9.1.1.tar.gz", hash = "sha256:1088fbde8f2b49d95a549a195707afa7a76a3ce9bcadc26b6d71f0ffda5fe313", size = 1636369, upload-time = "2026-06-19T10:58:32.857Z" }
2502
+ wheels = [
2503
+ { url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536, upload-time = "2026-06-19T10:58:31.347Z" },
2504
+ ]
2505
+
2506
+ [[package]]
2507
+ name = "pytest-asyncio"
2508
+ version = "1.4.0"
2509
+ source = { registry = "https://pypi.org/simple" }
2510
+ dependencies = [
2511
+ { name = "pytest" },
2512
+ { name = "typing-extensions", marker = "python_full_version < '3.13'" },
2513
+ ]
2514
+ sdist = { url = "https://files.pythonhosted.org/packages/43/7c/d36d04db312ecf4298932ef77e6e4a9e8ad017906e24e34f0b0c361a2473/pytest_asyncio-1.4.0.tar.gz", hash = "sha256:c6c0d2259945122819f171a32ecea2c349ead889ee28176caaf492143424be42", size = 58514, upload-time = "2026-05-26T09:56:04.083Z" }
2515
+ wheels = [
2516
+ { url = "https://files.pythonhosted.org/packages/03/e2/08a497ef684b88559c9cc5f4ad53a37e7b99e727094a86d6ea32536d5d3c/pytest_asyncio-1.4.0-py3-none-any.whl", hash = "sha256:933ca923a23075a87fb7070c0ec272a6848489824d887c85c812670932835aa1", size = 16930, upload-time = "2026-05-26T09:56:02.576Z" },
2517
+ ]
2518
+
2459
2519
  [[package]]
2460
2520
  name = "python-dateutil"
2461
2521
  version = "2.9.0.post0"