SecKatie / wyzeapy

35 stars 26 forks source link

Cchardet blocked by Home Assistant #66

Closed JoeSchubert closed 1 year ago

JoeSchubert commented 1 year ago

https://github.com/JoshuaMulliken/wyzeapy/blob/466cb527d0d2c212a7ca4aecff35c3efb1d79617/pyproject.toml#L12

As pointed out here: https://github.com/JoshuaMulliken/ha-wyzeapi/issues/462#issuecomment-1444020562

This package is unmaintained and as of last week is now blocked by Home assistant.

This line should be updated to read:

faust-cchardet = "^2.1.18"

I am currently on mobile but will submit a PR as soon as I'm on my computer. Opening this issue as a reminder.

We just need to make sure that the functions being used retained the same names/parameters/returns.

JoeSchubert commented 1 year ago

So I cannot manage to fix this without really breaking my environment it seems right now (might be able to while jumping through hoops).

Basically, I looked through the code. It doesn't even seem that cchardet is still used anywhere... it is simply listed in pyproject.toml's dependency list still.

So, that line needs to be deleted, then poetry needs to be re-run to update the dependencies in the poetry.lock file.

@JoshuaMulliken I assume that you do this whenever you push a new version anyway, so it may be easier for you to simply delete that line and bump the version rather than me trying to get everything setup for poetry to even run (I already made it about 10gb into dependencies for windows then realized that it won't build under Python 3.11 before coming here to update this issue).

brg468 commented 1 year ago

I agree, I didn’t see anything that is actually using cchardet in the current code, but I’m also not real familiar with what it does. Let me know if I can be of more help.

JoeSchubert commented 1 year ago

I agree, I didn’t see anything that is actually using cchardet in the current code, but I’m also not real familiar with what it does. Let me know if I can be of more help.

If you want to give it a try, you should be able to remove that line then run 'poetry remove cchardet' in the project directory. It should rebuild the poetry lock file.

If I don't hear anything back from Josh in the next few days, I'll spin up another dev environment just to do that.

brg468 commented 1 year ago

@JoeSchubert can you take a look? I think it updated correctly, it seems like the formatting of poetry.lock changed when I updated it but I think its correct.

https://github.com/brg468/wyzeapy/tree/update-deps

Edit: Can confirm the integrations loads with no errors on the the latest HA dev branch.

JoeSchubert commented 1 year ago

@brg468 yeah. That all looks fine to me as you removed it and rebuilt the file correctly.

I would probably checkout a new branch from main and just cherry-pick that single commit though for the PR to keep it clean.