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

isort-py is old and fails being used on py310 #1160

Open
nieder opened this issue Sep 11, 2024 · 1 comment
Open

isort-py is old and fails being used on py310 #1160

nieder opened this issue Sep 11, 2024 · 1 comment
Assignees
Labels
bug new upstream Package has an updated upstream version

Comments

@nieder
Copy link
Member

nieder commented Sep 11, 2024

From a pymod I'm packaging that uses isort-py:

    import isort.api
  File "/sw/lib/python3.10/site-packages/isort/__init__.py", line 25, in <module>
    from . import settings  # noqa: F401
  File "/sw/lib/python3.10/site-packages/isort/settings.py", line 34, in <module>
    from .pie_slice import itemsview, lru_cache, native_str
  File "/sw/lib/python3.10/site-packages/isort/pie_slice.py", line 362, in <module>
    class OrderedSet(collections.MutableSet):
AttributeError: module 'collections' has no attribute 'MutableSet'

MutableSet is now in collections.abc
https://www.datasciencelearner.com/python-exceptions/attributeerror/attributeerror-module-collections-has-no-attribute-mutablemapping/

This was fixed in upstream isort a while ago:
PyCQA/isort#756

Our isort 4.3.4is old, from early 2018. Barring dependencies, should be able to upgrade to 4.3.21 for py27-py36, 5.11.5 for py37, and 5.13.2 for py38+

@nieder nieder added bug new upstream Package has an updated upstream version labels Sep 11, 2024
nieder added a commit that referenced this issue Sep 12, 2024
Use upstream patch so that this runs when any py310 uses this code.
See #1160
@nieder
Copy link
Member Author

nieder commented Sep 12, 2024

I've pushed the MutableSet fix from upstream so that isort-py310 actually works now. Leaving this open to deal with upgrading isort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug new upstream Package has an updated upstream version
Projects
None yet
Development

No branches or pull requests

2 participants