kipe / python-onewire

A wrapper for OWFS C-API, compatible with both Python 2.7 and Python 3.x.
MIT License
7 stars 4 forks source link

Tests and fix the infinite recursion issue #5

Closed Emantor closed 7 years ago

Emantor commented 7 years ago

This adds a test for the recursion issue, configures travis and fixes the issue. I'm not entirely sure this is how we want to fix it, but it is one solution to our problem. Feedback highly welcome!

Fix #1

Emantor commented 7 years ago

Ping, any updates on this?

kipe commented 7 years ago

Hey, sorry for the latency, way too busy with work. It looks like this breaks the initial reason for using __getattr__, I'd like this library to be (almost) compatible with the original ow -implementation. In essence, the variables of the sensor / IO should be accessible via Sensor.temperature, which means using __getattr__ and __setattr__ to access the variables.

kipe commented 7 years ago

Forgot to link the original inspiration Python: package ow. The reason why I started re-writing this was that there was no Python3 -compatible version of this.

Emantor commented 7 years ago

Thanks for the update. I'll come up with another solution that does not involve renaming the function, let me think on this 👍

Emantor commented 7 years ago

I removed the rename, please have a look at the PR again.

Emantor commented 7 years ago

Ping, I'd like an update on this, we want to release our library and depend in parts on this module.

kipe commented 7 years ago

Sorry for the delay, been extremely busy with work. This looks fine, don't have time to test it at the moment, but I trust it works ;)

Emantor commented 7 years ago

Thats why I added the test :) Thank you for taking the time! 👍