Skip to content

Update/Alias for imports for latest sklearn version and python >3.10Β #67

@minghao51

Description

@minghao51

As per #57 and also https://stackoverflow.com/questions/72032032/importerror-cannot-import-name-iterable-from-collections-in-python

The path for collections.Iterable (python >3.10 ) and sklearn.externals.six (sklearn ) is updated

Currently, for it to play nice with the updated packages, I had to aliases the path

import numpy as np
import collections.abc
import six
import sklearn
collections.Iterable = collections.abc.Iterable
sklearn.externals.six = six
from skrules import SkopeRules

Will there be able update for the path/checks?
perhaps, something like

try:
    from collections.abc import Iterable
except ImportError:
    from collections import Iterable

or another if that checks the versions

I can submit a PR for it if you guys are up for it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions