netromdk / vermin

Concurrently detect the minimum Python versions needed to run code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Detection of collections vs. collections.abc

adamjstewart opened this issue · comments

From https://docs.python.org/3/library/collections.html:

Deprecated since version 3.3, will be removed in version 3.10: Moved Collections Abstract Base Classes to the collections.abc module. For backwards compatibility, they continue to be visible in this module through Python 3.9.

If I run vermin -t=3.5-, I would like vermin to tell me that my software won't be compatible with Python 3.10 when it is released.

Thanks for the suggestion. Vermin is mostly about detecting minimum versions required to run code, and not so much about maximum versions. I will take it into consideration. It would require a larger rewrite to support.

In some sense, simply reporting all the findings of deprecated and removed features in the code without giving a conclusion of a concrete "overall maximum version" in the end might already be good enough for developers who care about code compatibility. For that case, pylint already has the functionality to detect deprecated features. So the demand to implement this in vermin doesn't look that strong. However collections.abc stuffs are not detected by pylint as for today. There is an open issue: pylint-dev/pylint#4388.

pylint-dev/pylint#4388 has subsequently been fixed via pylint-dev/pylint#4419.

I'm closing the issue.