Skip to content

Fix deprecation warning#68

Open
jacobperron wants to merge 1 commit intopyreadline:masterfrom
osrf:fix_deprecation_warning
Open

Fix deprecation warning#68
jacobperron wants to merge 1 commit intopyreadline:masterfrom
osrf:fix_deprecation_warning

Conversation

@jacobperron
Copy link

Fixes #65

Signed-off-by: Jacob Perron <[email protected]>
@omry
Copy link

omry commented Dec 16, 2020

Is this project alive? this seems like a trivial fix for a problem causing hard errors for people running with Python 3.9.

@cthoyt
Copy link

cthoyt commented Dec 17, 2020

I think a lot of projects will fail and be unable to updated to py39 until this is accepted and published

@jacobperron
Copy link
Author

It doesn't look like this project has been updated since 2015, so it seems likely it has been abandoned. It's probably best to look for alternatives.

@ahogen
Copy link

ahogen commented Dec 19, 2020

http://ipython.org/pyreadline.html

IPython ... moved away from it for IPython 5.0. PyReadline is not actively developed at the moment (early 2017),

@jacobperron
Copy link
Author

From IPython release notes, they were able to drop the dependency by switching to prompt_toolkit.

@ricardo-reis-1970
Copy link

Dear all,

I hope pyreadline does not disappear because I do a lot of manual experiments on REPL and it comes super handy.

The error

Lately, I've been implementing structured testing in my company and — sure enough — pytest 6.2.5 was issuing this:

pyreadline\py3k_compat.py:8: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
    return isinstance(x, collections.Callable)

The solution

I went to said file and edited line 8 into:

    def callable(x):
        return isinstance(x, collections.abc.Callable)

(Here, lines 7 and 8 are reproduced for context).

Question

Is this project really abandoned? Because this is a useful library and the fix is so tiny that it's really worth the 5 seconds.

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.

collections deprecation warning (potential incompatibility with Python 3.9)

6 participants