Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation warnings #3529

Open
6 of 8 tasks
Stonedestroyer opened this issue Feb 8, 2020 · 6 comments
Open
6 of 8 tasks

Deprecation warnings #3529

Stonedestroyer opened this issue Feb 8, 2020 · 6 comments
Labels
Blocked By: Dependency Blocked by a package listed as a dependency. Status: Accepted We want this Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.

Comments

@Stonedestroyer
Copy link
Contributor

Stonedestroyer commented Feb 8, 2020

Deprecation warnings.

<frozen importlib._bootstrap>:219: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  • Bug in CPython, no tracking issue
C:\Python39\lib\asyncio\subprocess.py:196: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.
  stdin, stdout, stderr = await tasks.gather(stdin, stdout, stderr,
..venv/lib/site-packages/redbot/core/config.py:513: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
  self, current: collections.Mapping, defaults: Dict[str, Any] = ...
..venv/lib/site-packages/aiohttp/connector.py:964: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.
  hosts = await asyncio.shield(self._resolve_host(
..venv/lib/site-packages/aiohttp/helpers.py:107: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
  def noop(*args, **kwargs):  # type: ignore
..venv/lib/site-packages/aiohttp/locks.py:21: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.
  self._event = asyncio.Event(loop=loop)
..venv/lib/site-packages/websockets/client.py:407: DeprecationWarning: rename klass to create_protocol
  warnings.warn("rename klass to create_protocol", DeprecationWarning)
..venv/lib/site-packages/websockets/client.py:535: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.
  transport, protocol = await self._create_connection()

I know most of these are packages we have no control over but some are Red.

@Stonedestroyer Stonedestroyer added the Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing. label Feb 8, 2020
@github-actions github-actions bot added the Status: Needs Triage This has not been labeled or discussed for handling yet. label Feb 8, 2020
@Jackenmen
Copy link
Member

Jackenmen commented Feb 23, 2020

These warnings are related to aiohttp, related pull request: aio-libs/aiohttp#4570

..venv\lib\site-packages\aiohttp\helpers.py:107: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
  def noop(*args, **kwargs):  # type: ignore
..venv\lib\site-packages\aiohttp\connector.py:964: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.
  hosts = await asyncio.shield(self._resolve_host(
..venv\lib\site-packages\aiohttp\locks.py:21: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.
  self._event = asyncio.Event(loop=loop)

This warning is related to d.py using klass kwarg instead of create_protocol, related issue: Rapptz/discord.py#2574
I know they have to keep backwards-compatibility so if needed, we can always silence it.

..venv\lib\site-packages\websockets\client.py:407: DeprecationWarning: rename klass to create_protocol
  warnings.warn("rename klass to create_protocol", DeprecationWarning)

This error is a problem with Python 3.8 built-in library (3.8.2 still affected) it seems, see bpo-39015:

<frozen importlib._bootstrap>:219: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.

This one should be fixed in #3610:

.redbot\core\config.py:513: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
  self, current: collections.Mapping, defaults: Dict[str, Any] = ...

@Jackenmen Jackenmen added Blocked By: Dependency Blocked by a package listed as a dependency. Status: Accepted We want this and removed Status: Needs Triage This has not been labeled or discussed for handling yet. labels Feb 24, 2020
@Drapersniper
Copy link
Contributor

/envs/battlebreakers/lib/python3.8/site-packages/aioredis/stream.py:23: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.

@Drapersniper
Copy link
Contributor

c:\users\guyre\.virtualenvs\red\lib\site-packages\win32\lib\pywintypes.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp, sys, os

@Harmon758
Copy link

Harmon758 commented Nov 8, 2020

Rapptz/discord.py#2574 has been closed, as discord.py v1.4.0 was released in August, dropping websockets.

@Jackenmen
Copy link
Member

Thanks for letting us know, I've just updated the issue.

@Drapersniper
Copy link
Contributor

Drapersniper commented May 22, 2022

/home/draper/venvs/g310/lib/python3.10/site-packages/aiohttp_json_rpc/rpc.py:162: DeprecationWarning: There is no current event loop
   self.loop = loop or asyncio.get_event_loop()

/home/draper/venvs/g310/lib/python3.10/site-packages/aiohttp_json_rpc/threading.py:8: DeprecationWarning: There is no current event loop
   self.loop = loop or asyncio.get_event_loop()
[WARNING] py.warnings: <frozen importlib._bootstrap>:283: DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked By: Dependency Blocked by a package listed as a dependency. Status: Accepted We want this Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.
Projects
None yet
Development

No branches or pull requests

4 participants