Skip to content

fix: replace deprecated argument in ws_connect()#3105

Merged
Dorukyum merged 4 commits into
Pycord-Development:masterfrom
Revnoplex:master
Feb 16, 2026
Merged

fix: replace deprecated argument in ws_connect()#3105
Dorukyum merged 4 commits into
Pycord-Development:masterfrom
Revnoplex:master

Conversation

@Revnoplex

@Revnoplex Revnoplex commented Feb 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Directly passing a float to the timeout parameter in aiohttp.ClientSession.ws_connect() has become deprecated and throws this warning:

discord/http.py:229: DeprecationWarning: parameter 'timeout' of type 'float' is deprecated, please use 'timeout=ClientWSTimeout(ws_close=...)'
  return await self.__session.ws_connect(url, **kwargs)

As the warning says timeout=float_value should be replaced with timeout=aiohttp.ClientWSTimeout(ws_close=float_value).

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

@pycord-app

pycord-app Bot commented Feb 15, 2026

Copy link
Copy Markdown

Thanks for opening this pull request!
Please make sure you have read the Contributing Guidelines and Code of Conduct.

This pull request can be checked-out with:

git fetch origin pull/3105/head:pr-3105
git checkout pr-3105

This pull request can be installed with:

pip install git+https://github.com/Pycord-Development/pycord@refs/pull/3105/head

@Revnoplex Revnoplex changed the title fix: replaced deprecated argument in ws_connect() fix: replace deprecated argument in ws_connect() Feb 15, 2026
Comment thread CHANGELOG.md Outdated

@Dorukyum Dorukyum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@Dorukyum
Dorukyum enabled auto-merge (squash) February 15, 2026 07:51
@Paillat-dev
Paillat-dev self-requested a review February 16, 2026 16:27

@Paillat-dev Paillat-dev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR; lgtm

@Dorukyum
Dorukyum merged commit 4af906e into Pycord-Development:master Feb 16, 2026
25 checks passed
@Paillat-dev Paillat-dev added this to the v2.8 milestone Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants