CharlesBlonde / libpurecoollink

Dyson Pure Cool link python library
http://libpurecoollink.readthedocs.io
Other
205 stars 54 forks source link

Remove enum34 dependency #10

Closed balloob closed 7 years ago

balloob commented 7 years ago

Description in the README states that only Python 3.4+ are supported.

Enum34 is a backport of the Enum package from Python 3.4 to older versions:

Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4

And thus it can be removed.

When a new release is done, please update the version in Home Assistant too 👍 We're soon going to block all packages that depend on enum34.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 99.336% when pulling 325b6845e382dce8f910a8be11298c5f94633b57 on balloob:patch-1 into 4b675464da1fecf06d1415c0723ed289e07ce766 on CharlesBlonde:master.

CharlesBlonde commented 7 years ago

Hi @balloob,

I think you are right. It was a legacy dependency because I planned to port the library to Python 2.7 but in fact I dropped this support.

I'll do some tests in order to validate everything is all right, publish a new release and upgrade version in HA.

balloob commented 7 years ago

Thanks!

balloob commented 7 years ago

If you want to support older Pythons in the future, depend on enum-compat and it will only install enum34 on Python versions that need it.

CharlesBlonde commented 7 years ago

Thanks for the PR. Before releasing a new version and submitting a PR in HA, I have 2 issues I would like to fix:

For the first one I know how to fix it but not yet the second one

balloob commented 7 years ago

I'll update it then in my PR. enum34 is breaking other components for our users.

balloob commented 7 years ago

:/ it's not a simple upgrade, it requires changes to the platforms. I'll leave it up to you.

Dyson will be disabled by next release (in 1 week from now) if platform is not upgraded to the latest version.

CharlesBlonde commented 7 years ago

I'll do it this week-end. It should be OK for HA next release. And yes, there is a small change to do in the platform but I already have a branch (not pushed) with the changes.

balloob commented 7 years ago

Why wait pushing changes out if you already have some fixes ready?

CharlesBlonde commented 7 years ago

Because I haven't done all the tests I wanted to do. At this time, it's just prevent issue https://github.com/home-assistant/home-assistant/issues/8569 from happening by setting humidity value to 0 instead of failing but I think the best solution is to return NA => tests must be updated. The main part is done but not the finishes.

CharlesBlonde commented 7 years ago

I just submitted the PR https://github.com/home-assistant/home-assistant/pull/8826

Tests should pass and it will remove enum34 dependency (from libpurecoollink)