IRC log of #zope for Thursday, 2015-01-29

*** tiwula has quit IRC00:14
*** Arfrever has quit IRC01:17
*** menesis has quit IRC04:28
*** yvl has joined #zope07:37
*** __mac__ has joined #zope08:32
*** bosim has joined #zope09:31
*** fredvd has joined #zope10:11
*** malinoff has joined #zope10:17
*** giacomos has joined #zope10:24
malinoffHi, is there a simple way to inherit docstrings defined in the implemted interface?11:04
mgedminnot that I'm aware of11:05
mgedminsome documentation generation tools can pay attention to zope interfaces (pydoctor, iirc?)11:06
mgedminit ought to be possible to write a class decorator for adding the missing docstrings11:06
mgedminor a Sphinx extension11:06
mgedminhm, google tells me Sphinx extensions for zope interfaces already exist11:07
mgedminI don't know if they do what you want them to do11:07
mgedminI don't know what exactly you want to happen and when :)11:07
malinoffmgedmin, i always work within ipython (and i suggest that most of experienced pythonistas use it), and i want to cut the following sequence: obj.meth? -> q -> find interface defines meth (the most horrible part) -> IMeth.meth? just to obj.meth?11:09
mgedminsounds like a good idea11:09
mgedminI see two solutions: the aforementioned class decorator (which would imply changing all the code that uses interfaces)11:09
mgedminor an ipython plugin11:09
malinoffI just found myself to repeat this stuff over and over again, so the question pops out11:10
mgedminactually, maybe zope.interface could add __doc__ on all the methods during class creation time?11:10
mgedminfeel free to suggest this feature at https://github.com/zopefoundation/zope.interface/issues11:10
mgedminbut I don't think it will happen unless you write a patch (with tests)11:11
malinoffmgedmin, thanks, I won't suggest this to zope.inteface for now, because I can't imagine a simple way to deal with multiple inheritance. I think i'll just go with a decorator11:21
malinoffbut i'll keep that in my mind11:22
mgedmindoes ipython deal with inheritance?  i.e. overridden methods that have no docstrings, do you get to see the docstring from the base class version of the method?11:22
malinoffIf i override a method defined in a base class, no, I won't see the base class' method docstring11:24
mgedminseems like it'd create the same kind of inconvenience11:24
mgedminand maybe could be fixed in the same way you intend to fix docstring inheritance from interfaces11:25
malinoffalright, this http://stackoverflow.com/questions/8100166/inheriting-methods-docstrings-in-python seems to work11:27
malinoffwith one small fix to inspect __implemented__ instead of __bases__11:28
mgedminI'd use API instead of touching the __special__ attributes directly11:30
mgedminzope.interface.implementedBy(cls), IIRC11:30
mgedminbut whatever works :)11:30
malinoffsure, i just outlined the general approach11:30
malinoffmgedmin, thanks - I think one simple class decorator is actually ok11:31
*** menesis has joined #zope11:58
*** maurits has joined #zope12:03
*** tisto has joined #zope12:27
malinoffAlright, made it work. If someone curious about it, here is the whole code: http://pastie.org/private/rwp4axznidjhrqe63dfg12:31
malinoffOh god it saves so much lines of code12:37
malinofferrr13:10
malinoffTypeError: unhashable type when calling implementedBy13:10
*** sashav has joined #zope13:11
*** menesis has quit IRC13:56
mgedminmalinoff, I wonder if http://docs.zope.org/zope.interface/api.html#ISpecification.__iro__ wouldn't be useful for you there14:05
*** maurits1 has joined #zope14:17
*** maurits has quit IRC14:17
malinoffmgedmin, that's what i wanted :) thank you14:22
malinoffwas confused a bit when obj.__mro__ threw AttributeError14:23
malinoffyep, all tests pass14:24
malinoffbtw, zope.interface is awesome, it's soo easy to work with14:27
*** yvl has quit IRC14:30
*** maurits1 has quit IRC14:39
*** yvl has joined #zope14:42
*** menesis has joined #zope15:04
*** maurits has joined #zope15:18
*** maurits has quit IRC15:33
*** maurits has joined #zope15:33
*** projekt01 has joined #zope15:37
*** maurits1 has joined #zope15:53
*** maurits has quit IRC15:53
*** bosim has quit IRC15:59
*** yvl_ has joined #zope16:24
*** yvl has quit IRC16:27
*** yvl_ has quit IRC16:47
*** Arfrever has joined #zope17:44
*** __mac__ has quit IRC18:05
*** __mac__ has joined #zope18:34
*** yvl has joined #zope18:35
malinoffCould someone look at https://github.com/zopefoundation/zope.interface/issues/21, please?18:36
*** tisto has quit IRC18:52
*** sashav has quit IRC19:01
*** sashav has joined #zope19:02
*** yvl has quit IRC19:11
*** giacomos has quit IRC19:20
*** maurits1 has quit IRC19:32
*** projekt01 has quit IRC19:41
*** m8 has joined #zope20:41
*** benji has quit IRC20:46
*** benji has joined #zope20:47
*** menesis has quit IRC21:29
*** fredvd has quit IRC21:33
*** mup has quit IRC21:45
*** mup has joined #zope21:45
*** motto has joined #zope21:47
*** supersheep has joined #zope21:49
*** betabug_ has joined #zope21:51
*** malinoff has quit IRC21:51
*** malinoff has joined #zope21:52
*** roq_1 has joined #zope21:54
*** m8 has quit IRC21:56
*** betabug has quit IRC21:56
*** roq_ has quit IRC21:57
*** malinoff_ has joined #zope22:00
*** malinoff has quit IRC22:01
*** J1m has joined #zope22:15
*** supersheep_ has joined #zope22:26
*** supersheep has quit IRC22:28
*** Arfrever has quit IRC22:28
*** menesis has joined #zope22:37
*** malinoff_ has quit IRC22:54

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!