py4j / py4j

Py4J enables Python programs to dynamically access arbitrary Java objects

Home Page:https://www.py4j.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ› DeprecationWarning introduced in commit 799ac4e

gabe-l-hart opened this issue Β· comments

Description

The changes made in 799ac4e added this import. In turn, this triggers the following DeprecationWarning from collections:

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

The core python collections library has fully removed this functionality.

Proposed Fix

I believe that the correct solution is to change the imports from

from collections import deque, Callable

to

from collections import deque
from collections.abc import Callable

I can confirm that with 0.10.9.5 we're not seeing the DeprecationWarning anymore on 3.8.8 and nothing seems to have broken. Thanks!