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

relax requirement for netifaces #522

Closed
rdenham opened this issue Jul 19, 2024 · 2 comments · Fixed by #519
Closed

relax requirement for netifaces #522

rdenham opened this issue Jul 19, 2024 · 2 comments · Fixed by #519

Comments

@rdenham
Copy link

rdenham commented Jul 19, 2024

Recently a change was made to make netifaces a dependency. I've got some issues installing netifaces on my chromebook, and since I don't need the scanning part there, I'm ok if I don't have it.

I think you've written the code in a way that means the package is still functional without netifaces, I can see:

try:
    import netifaces # pylint: disable=E0401
    NETIFLIBS = True
except ImportError:
    NETIFLIBS = False

in scanner.py anyway. So I was wondering if you'd consider making netifaces and extra dependency. So users could install it without needing netifcases, something like:

pip install tinytuya # wouldn't have netifaces

pip install tinytuya[netiface] # if you need it.

Probably would have been nicer the othe way around, so users could opt out of netifiaces, while the default would be to include it, but I'm not sure pip has an opt-out approach, just an opt in one.

@uzlonewolf
Copy link
Collaborator

Yeah, I keep going back and forth on it being a hard requirement. It's basically a requirement on multi-interface machines, but I'm not sure how many people actually have multi-interface machines. For now I have removed it in #519. Let's see what @jasonacox thinks.

@jasonacox
Copy link
Owner

I agree. Reducing the dependencies is a good move. Thanks @uzlonewolf and @rdenham - let's get that merged and released as a minor update.

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 a pull request may close this issue.

3 participants