Skip to content

Commit 7d86648

Browse files
committed
build: drop Python 3.10, prepare for Python 3.12, 3.13
- CI previously tested only on Python 3.11; updated to test 3.11, 3.12, 3.13. - asyncio.get_event_loop() behavior changed (Py 3.12+) - In Python 3.12, asyncio.get_event_loop() raises RuntimeError when no current event loop is set in the main thread. - Examples updated to explicitly create an event loop with asyncio.new_event_loop() and pass it to IntegrationAPI.
1 parent f44656f commit 7d86648

File tree

8 files changed

+17
-10
lines changed

8 files changed

+17
-10
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,18 @@ permissions:
2020
jobs:
2121
test:
2222
runs-on: ubuntu-24.04
23+
strategy:
24+
matrix:
25+
python-version: ["3.11", "3.12", "3.13"]
2326
steps:
2427
- name: Checkout
2528
uses: actions/checkout@v5
2629

27-
- name: Set up Python
30+
- name: Set up Python ${{ matrix.python-version }}
2831
uses: actions/setup-python@v6
2932
with:
30-
python-version: "3.11"
33+
python-version: ${{ matrix.python-version }}
34+
cache: "pip"
3135

3236
- name: Install pip
3337
run: |

.github/workflows/python-code-format.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,18 @@ permissions:
2020
jobs:
2121
test:
2222
runs-on: ubuntu-24.04
23+
strategy:
24+
matrix:
25+
python-version: ["3.11", "3.12", "3.13"]
2326

2427
name: Check Python code formatting
2528
steps:
2629
- uses: actions/checkout@v5
2730

28-
- name: Set up Python
31+
- name: Set up Python ${{ matrix.python-version }}
2932
uses: actions/setup-python@v6
3033
with:
31-
python-version: "3.11"
34+
python-version: ${{ matrix.python-version }}
3235

3336
- name: Install dependencies
3437
run: |

.idea/integration-python-library.iml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Not yet supported:
2020
- Token based authentication
2121

2222
Requirements:
23-
- Python 3.10 or newer
23+
- Python 3.11 or newer
2424

2525
## Installation
2626

examples/hello_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import ucapi
88

9-
loop = asyncio.get_event_loop()
9+
loop = asyncio.new_event_loop()
1010
api = ucapi.IntegrationAPI(loop)
1111

1212

examples/remote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
create_ui_text,
2121
)
2222

23-
loop = asyncio.get_event_loop()
23+
loop = asyncio.new_event_loop()
2424
api = ucapi.IntegrationAPI(loop)
2525

2626
# Simple commands which are supported by this example remote-entity

examples/setup_flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import ucapi
88

9-
loop = asyncio.get_event_loop()
9+
loop = asyncio.new_event_loop()
1010
api = ucapi.IntegrationAPI(loop)
1111

1212

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ classifiers = [
1616
"Operating System :: OS Independent",
1717
"Topic :: Software Development :: Libraries",
1818
"Topic :: Home Automation",
19-
"Programming Language :: Python :: 3.10",
2019
"Programming Language :: Python :: 3.11",
2120
]
22-
requires-python = ">=3.10"
21+
requires-python = ">=3.11"
2322
dependencies = [
2423
"pyee>=9.0",
2524
"websockets>=14.0",

0 commit comments

Comments
 (0)