Skip to content
Merged
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
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
runs-on: ${{ matrix.os }}

steps:
Expand Down Expand Up @@ -49,7 +50,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"

- name: Install build dependencies
run: |
Expand Down
2 changes: 2 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Summary

The Frequenz SDK now supports Python 3.11.

## Upgrading

## New Features
Expand Down
12 changes: 6 additions & 6 deletions minimum-requirements-ci.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# CI must ensure these dependency versions are supported
frequenz-api-microgrid==0.11.0
frequenz-channels==0.11.0
google-api-python-client==2.15
grpcio==1.47
grpcio-tools==1.47
google-api-python-client==2.71
grpcio==1.51.1
grpcio-tools==1.51.1
networkx==2.8
pandas==1.3.5
protobuf==3.20.2
pyarrow==6.0.0
pandas==1.5.2
protobuf==4.21.12
pyarrow==10.0.1
pydantic==1.9.0
sympy==1.10.1
toml==0.10
Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ requires-python = ">= 3.8, < 4"
dependencies = [
"frequenz-api-microgrid >= 0.11.0, < 0.12.0",
"frequenz-channels >= 0.11.0, < 0.12.0",
"google-api-python-client >= 2.15, < 3",
"grpcio >= 1.47, < 2",
"grpcio-tools >= 1.47, < 2",
"google-api-python-client >= 2.71, < 3",
"grpcio >= 1.51.1, < 2",
"grpcio-tools >= 1.51.1, < 2",
"networkx >= 2.8, < 3",
"pandas >= 1.3.5, < 2",
"protobuf >= 3.20, < 4",
"pyarrow >= 6.0.0, < 6.1",
"pandas >= 1.5.2, < 2",
"protobuf >= 4.21, < 5",
"pyarrow >= 10.0.1, < 11",
"pydantic >= 1.9",
"sympy >= 1.10.1, < 2",
"toml >= 0.10",
Expand Down
30 changes: 20 additions & 10 deletions tests/actor/test_power_distributing.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ async def test_power_distributor_one_user(
await client_handle.send(request)

done, pending = await asyncio.wait(
[client_handle.receive()], timeout=SAFETY_TIMEOUT
[asyncio.create_task(client_handle.receive())],
timeout=SAFETY_TIMEOUT,
)
await distributor._stop() # type: ignore # pylint: disable=no-member

Expand Down Expand Up @@ -337,7 +338,11 @@ async def test_power_distributor_two_users(
await asyncio.gather(*[task1, task2])

done, pending = await asyncio.wait(
[user1_handle.receive(), user2_handle.receive()], timeout=SAFETY_TIMEOUT
[
asyncio.create_task(user1_handle.receive()),
asyncio.create_task(user2_handle.receive()),
],
timeout=SAFETY_TIMEOUT,
)
await distributor._stop() # type: ignore # pylint: disable=no-member

Expand Down Expand Up @@ -394,7 +399,8 @@ async def test_power_distributor_invalid_battery_id(self) -> None:
await user1_handle.send(request)

done, _ = await asyncio.wait(
[user1_handle.receive()], timeout=SAFETY_TIMEOUT
[asyncio.create_task(user1_handle.receive())],
timeout=SAFETY_TIMEOUT,
)
await distributor._stop() # type: ignore # pylint: disable=no-member

Expand Down Expand Up @@ -476,9 +482,9 @@ async def test_power_distributor_overlapping_batteries(self) -> None:

done, _ = await asyncio.wait(
[
user1_handle.receive(),
user2_handle.receive(),
user3_handle.receive(),
asyncio.create_task(user1_handle.receive()),
asyncio.create_task(user2_handle.receive()),
asyncio.create_task(user3_handle.receive()),
],
timeout=SAFETY_TIMEOUT,
)
Expand Down Expand Up @@ -552,7 +558,8 @@ async def test_power_distributor_one_user_adjust_power_consume(
await user1_handle.send(request)

done, pending = await asyncio.wait(
[user1_handle.receive()], timeout=SAFETY_TIMEOUT
[asyncio.create_task(user1_handle.receive())],
timeout=SAFETY_TIMEOUT,
)
await distributor._stop() # type: ignore # pylint: disable=no-member

Expand Down Expand Up @@ -618,7 +625,8 @@ async def test_power_distributor_one_user_adjust_power_supply(
await user1_handle.send(request)

done, pending = await asyncio.wait(
[user1_handle.receive()], timeout=SAFETY_TIMEOUT
[asyncio.create_task(user1_handle.receive())],
timeout=SAFETY_TIMEOUT,
)
await distributor._stop() # type: ignore # pylint: disable=no-member

Expand Down Expand Up @@ -684,7 +692,8 @@ async def test_power_distributor_one_user_adjust_power_success(
await user1_handle.send(request)

done, pending = await asyncio.wait(
[user1_handle.receive()], timeout=SAFETY_TIMEOUT
[asyncio.create_task(user1_handle.receive())],
timeout=SAFETY_TIMEOUT,
)
await distributor._stop() # type: ignore # pylint: disable=no-member

Expand Down Expand Up @@ -743,7 +752,8 @@ async def test_not_all_batteries_are_working(
await client_handle.send(request)

done, pending = await asyncio.wait(
[client_handle.receive()], timeout=SAFETY_TIMEOUT
[asyncio.create_task(client_handle.receive())],
timeout=SAFETY_TIMEOUT,
)
await distributor._stop() # type: ignore # pylint: disable=no-member

Expand Down
4 changes: 2 additions & 2 deletions tests/microgrid/test_microgrid_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ async def test_microgrid_api(
_microgrid.get()

tasks = [
_microgrid.initialize("127.0.0.1", 10001),
_microgrid.initialize("127.0.0.1", 10001),
asyncio.create_task(_microgrid.initialize("127.0.0.1", 10001)),
asyncio.create_task(_microgrid.initialize("127.0.0.1", 10001)),
]
initialize_task = asyncio.wait(tasks, return_when=ALL_COMPLETED)

Expand Down