Red-DiscordBot icon indicating copy to clipboard operation
Red-DiscordBot copied to clipboard

Deprecation warnings

Open Stonedestroyer opened this issue 4 years ago • 6 comments

Deprecation warnings.

  • [ ] https://bugs.python.org/issue39015
<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,
  • [x] Fixed by https://github.com/Cog-Creators/Red-DiscordBot/pull/3610.
..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] = ...
  • [x] https://github.com/aio-libs/aiohttp/pull/4570 (awaiting bump to aiohttp 3.7+)
..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(
  • [x] https://github.com/aio-libs/aiohttp/pull/4570 (awaiting bump to aiohttp 3.7+)
..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
  • [x] https://github.com/aio-libs/aiohttp/pull/4570 (awaiting bump to aiohttp 3.7+)
..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)
  • [x] Fixed by #3845
..venv/lib/site-packages/websockets/client.py:407: DeprecationWarning: rename klass to create_protocol
  warnings.warn("rename klass to create_protocol", DeprecationWarning)
  • [x] https://github.com/MagicStack/uvloop/pull/327 (awaiting uvloop 0.14.1/0.15.0 release)
..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 avatar Feb 08 '20 17:02 Stonedestroyer

These warnings are related to aiohttp, related pull request: https://github.com/aio-libs/aiohttp/pull/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: https://github.com/Rapptz/discord.py/issues/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 avatar Feb 23 '20 17:02 Jackenmen

/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 avatar Aug 12 '20 13:08 Drapersniper

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

Drapersniper avatar Aug 16 '20 10:08 Drapersniper

https://github.com/Rapptz/discord.py/issues/2574 has been closed, as discord.py v1.4.0 was released in August, dropping websockets.

Harmon758 avatar Nov 08 '20 15:11 Harmon758

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

Jackenmen avatar Nov 08 '20 15:11 Jackenmen

/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

Drapersniper avatar May 22 '22 14:05 Drapersniper