Skip to content

Commit 0b2a230

Browse files
Bump the non-major-versions group with 3 updates (#133)
* Bump the non-major-versions group with 3 updates --- updated-dependencies: - dependency-name: aiohttp dependency-version: 3.14.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: non-major-versions - dependency-name: pytest-asyncio dependency-version: 1.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: non-major-versions - dependency-name: ruff dependency-version: 0.15.15 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: non-major-versions ... Signed-off-by: dependabot[bot] <support@github.com> * Replace aioresponses with AsyncMock to fix aiohttp 3.14.0 compatibility --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent 5258d45 commit 0b2a230

3 files changed

Lines changed: 13 additions & 10 deletions

File tree

requirements-ci.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
aiohttp==3.13.5
1+
aiohttp==3.14.0
22
requests==2.34.2
33
pytz==2026.2
4-
pytest-asyncio==1.3.0
5-
aioresponses==0.7.8
4+
pytest-asyncio==1.4.0
65
mock==5.2.0
76
pytest==9.0.3
87
yarl==1.24.2
@@ -13,4 +12,4 @@ pylint==4.0.5
1312
isort==8.0.1
1413
pytest-cov==7.1.0
1514
pytest-html==4.2.0
16-
ruff==0.15.14
15+
ruff==0.15.15

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
version=__version__,
1414
name="pirateweather",
1515
packages=find_packages(),
16-
install_requires=["requests==2.34.2", "pytz==2026.2", "aiohttp==3.13.5"],
16+
install_requires=["requests==2.34.2", "pytz==2026.2", "aiohttp==3.14.0"],
1717
description="The Pirate Weather API wrapper",
1818
long_description=open("README.md").read(),
1919
long_description_content_type="text/markdown",

tests/test_forecast.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import asyncio
22
import copy
33
import os
4-
import re
54
import sys
65
from datetime import datetime
76
from unittest import mock
7+
from unittest.mock import AsyncMock
88

99
import aiohttp
10-
import aioresponses
1110
import pytest
1211

1312
from pirate_weather.api import PirateWeather, PirateWeatherAsync
@@ -31,10 +30,15 @@ def forecast_sync():
3130
def forecast_async():
3231
async def get_async_data():
3332
pirate_weather = PirateWeatherAsync("api_key")
34-
with aioresponses.aioresponses() as resp:
35-
resp.get(re.compile(".+"), status=200, payload=copy.deepcopy(DATA))
3633

37-
async with aiohttp.ClientSession() as session:
34+
mock_resp = AsyncMock()
35+
mock_resp.status = 200
36+
mock_resp.json = AsyncMock(return_value=copy.deepcopy(DATA))
37+
mock_resp.__aenter__ = AsyncMock(return_value=mock_resp)
38+
mock_resp.__aexit__ = AsyncMock(return_value=None)
39+
40+
async with aiohttp.ClientSession() as session:
41+
with mock.patch.object(session, "get", return_value=mock_resp):
3842
result = await pirate_weather.get_forecast(
3943
DATA["latitude"],
4044
DATA["longitude"],

0 commit comments

Comments
 (0)