DanielSank / observed

Observer pattern in python
MIT License
33 stars 4 forks source link

is v0.5 ready for release ? #12

Closed kubaraczkowski closed 9 years ago

kubaraczkowski commented 9 years ago

pip by default installs now version 0.4, though 0.5 (under development I presume) changes the naming of @event etc. Is that ready for release?

DanielSank commented 9 years ago

TBH 0.5 could be released now. I was holding off because I wanted to normalize the way that weak references are handled but that can wait until 0.6 release. I've put updating pypi on my todo list for this weekend.

By the way, how do you feel about the renaming of @event? I found it was necessary, to make the code sane, to have different decorators for functions and methods. Getting around this is hard, but I'm curious how users feel about having @observable_function and @observable_method.

kubaraczkowski commented 9 years ago

I'm just starting with this, so to be honest the name itself - does not really matter. The only difficulty for a noob like me is to accept that you need to use one name for methods and another one for functions. Actually, "event" is kind of vague - nobody actually said that the 'thing' (function/method) is firing an event or so - observability - that's what is expected from it.

On Wed, Feb 4, 2015 at 8:43 PM, Daniel Sank notifications@github.com wrote:

TBH 0.5 could be released now. I was holding off because I wanted to normalize the way that weak references are handled but that can wait until 0.6 release. I've put updating pypi on my todo list for this weekend.

By the way, how do you feel about the renaming of @event? I found it was necessary, to make the code sane, to have different decorators for functions and methods. Getting around this is hard, but I'm curious how users feel about having @observable_function and @observable_method.

— Reply to this email directly or view it on GitHub https://github.com/DanielSank/observed/issues/12#issuecomment-72923969.

DanielSank commented 9 years ago

In a perfect world I would have @event just invoke either the observable_method or observable_function decorators as appropriate (the underlying code for those cases really is different). This is not trivial to do in python though and the tricks required to make it work make the code too hard to understand for other developers, in my opinion.

kubaraczkowski commented 9 years ago

Yep, that's what I understood. No worry, we all know we don't live in a perfect world :D Perhaps one day someone comes up with a brilliant solution.

kubaraczkowski commented 9 years ago

Still a commen on that - would be great if 0.5 could reach PYPI :)