diff --git a/.github/workflows/code.yml b/.github/workflows/code.yml index 5a999657..beae53c6 100644 --- a/.github/workflows/code.yml +++ b/.github/workflows/code.yml @@ -46,7 +46,7 @@ jobs: - name: Upload Sdist uses: actions/upload-artifact@v4 with: - name: dist-${{ matrix.os }}-${{ matrix.python }} + name: dist path: dist/* build: @@ -56,6 +56,11 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] python: [cp37, cp38, cp39, cp310] + exclude: + # MacOS 14.4.1 for arm64 doesn't support Python < 3.8 + - os: macos-latest + python: "cp37" + include: # Put coverage and results files in the project directory for mac - os: macos-latest @@ -69,6 +74,9 @@ jobs: - os: ubuntu-latest cov_file: /output/coverage.xml results_file: /output/pytest-results.xml + # MacOS 13 required for Python < 3.8 + - os: macos-13 + python: "cp37" name: build/${{ matrix.os }}/${{ matrix.python }} runs-on: ${{ matrix.os }} @@ -84,7 +92,7 @@ jobs: - name: Install Python uses: actions/setup-python@v4 with: - python-version: "3.7" + python-version: "3.12" - name: Install Python Dependencies # Pin cibuildwheel due to https://github.com/pypa/cibuildwheel/issues/962 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e3866cf4..577a4ce0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,16 +17,16 @@ jobs: steps: - name: Checkout Source - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: # require history to get back to last tag for version number of branches fetch-depth: 0 submodules: true - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: "3.7" + python-version: "3.12" - name: Install Python Dependencies run: | diff --git a/tests/test_autosave.py b/tests/test_autosave.py index faf8d0ce..a1dda923 100644 --- a/tests/test_autosave.py +++ b/tests/test_autosave.py @@ -1,5 +1,5 @@ from conftest import get_multiprocessing_context, select_and_recv -from softioc import autosave, builder, softioc, device_core +from softioc import autosave, builder, softioc, device_core, asyncio_dispatcher from unittest.mock import patch import pytest import threading @@ -356,7 +356,8 @@ def check_all_record_types_save_properly(device_name, autosave_dir, conn): builder.WaveformIn("WaveformIn", [1, 2, 3, 4], autosave=True) builder.WaveformOut("WaveformOut", [1, 2, 3, 4], autosave=True) builder.LoadDatabase() - softioc.iocInit() + dispatcher = asyncio_dispatcher.AsyncioDispatcher() + softioc.iocInit(dispatcher) # wait long enough to ensure one save has occurred time.sleep(2) with open(autosave_dir / f"{device_name}.softsav", "r") as f: @@ -403,7 +404,8 @@ def check_autosave_field_names_contain_device_prefix( builder.SetDeviceName(device_name) builder.aOut("AFTER", autosave=["VAL", "EGU"]) builder.LoadDatabase() - softioc.iocInit() + dispatcher = asyncio_dispatcher.AsyncioDispatcher() + softioc.iocInit(dispatcher) time.sleep(2) with open(tmp_path / f"{device_name}.softsav", "r") as f: saved = yaml.full_load(f) @@ -427,6 +429,7 @@ def test_autosave_field_names_contain_device_prefix(tmp_path): def test_context_manager_thread_safety(tmp_path): autosave.configure(tmp_path, DEVICE_NAME) in_cm_event = threading.Event() + def create_pv_in_thread(name): in_cm_event.wait() builder.aOut(name, autosave=False)