Skip to content

Commit 4af906e

Browse files
Revnoplexpre-commit-ci[bot]Dorukyum
authored
fix: replace deprecated argument type in ws_connect() (#3105)
* fix: replace deprecated argument in ws_connect() * changelog entry for #3105 * style(pre-commit): auto fixes from pre-commit.com hooks * Simplify changelog entry for #3105 Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Signed-off-by: Revnoplex <62947003+Revnoplex@users.noreply.github.com> --------- Signed-off-by: Revnoplex <62947003+Revnoplex@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com>
1 parent 8fbfa20 commit 4af906e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ These changes are available on the `master` branch, but have not yet been releas
2424

2525
- Fixed some `Item` attributes not being set correctly.
2626
([#3102](https://github.com/Pycord-Development/pycord/pull/3102))
27+
- Fixed use of deprecated `float` type for `timeout=...` in `ws_connect()`.
28+
([#3105](https://github.com/Pycord-Development/pycord/pull/3105))
2729

2830
### Deprecated
2931

discord/http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ async def ws_connect(self, url: str, *, compress: int = 0) -> Any:
218218
"proxy_auth": self.proxy_auth,
219219
"proxy": self.proxy,
220220
"max_msg_size": 0,
221-
"timeout": 30.0,
221+
"timeout": aiohttp.ClientWSTimeout(ws_close=30.0),
222222
"autoclose": False,
223223
"headers": {
224224
"User-Agent": self.user_agent,

0 commit comments

Comments
 (0)