[issue11610] Improving property to accept abstract methods

2011-06-10 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue11610] Improving property to accept abstract methods

2011-05-27 Thread Darren Dale
Darren Dale added the comment: Thank you for the suggestion. I will follow up at python-dev, but it will probably be a few weeks before I have time to do a proper job of it. -- ___ Python tracker

[issue11610] Improving property to accept abstract methods

2011-05-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: FWIW, if you still want to advance this, you could bring it up on Python-dev. I still feel uncomfortable with the API but could be convinced with others thought it was the best solution. -- ___ Python tracker <

[issue11610] Improving property to accept abstract methods

2011-05-17 Thread Ned Deily
Changes by Ned Deily : -- nosy: -ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue11610] Improving property to accept abstract methods

2011-05-14 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +stutzbach ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue11610] Improving property to accept abstract methods

2011-05-14 Thread Darren Dale
Darren Dale added the comment: It just occurred to me, there is a potential problem with abstractproperty and the decorator syntax in my patch: class Foo: @abstractproperty def p(self): pass # p is abstract, but has no abstract methods @p.setter def p(self, val): pass

[issue11610] Improving property to accept abstract methods

2011-05-14 Thread Darren Dale
Darren Dale added the comment: On Sat, May 14, 2011 at 6:24 PM, Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > 2011/5/14 Darren Dale : >> >> Darren Dale added the comment: >> >> It definitely is a common case, and always will be. You can't begin >> using abstractpropert

[issue11610] Improving property to accept abstract methods

2011-05-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/5/14 Darren Dale : > > Darren Dale added the comment: > > On Sat, May 14, 2011 at 5:55 PM, Benjamin Peterson > wrote: >> >> Benjamin Peterson added the comment: >> >> Okay: how about this. We retain the passing of @abstractmethod to >> abstractpropert

[issue11610] Improving property to accept abstract methods

2011-05-14 Thread Darren Dale
Darren Dale added the comment: On Sat, May 14, 2011 at 5:55 PM, Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > Okay: how about this. We retain the passing of @abstractmethod to > abstractpropert(), but @abstractgetter decorates the method for you. That can work, althoug

[issue11610] Improving property to accept abstract methods

2011-05-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: Okay: how about this. We retain the passing of @abstractmethod to abstractpropert(), but @abstractgetter decorates the method for you. 2011/5/14 Darren Dale : > > Darren Dale added the comment: > > On Sat, May 14, 2011 at 5:17 PM, Benjamin Peterson > wrote

[issue11610] Improving property to accept abstract methods

2011-05-14 Thread Darren Dale
Darren Dale added the comment: On Sat, May 14, 2011 at 5:17 PM, Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > 2011/5/14 Darren Dale : >> >> Darren Dale added the comment: >> >> On Sat, May 14, 2011 at 4:28 PM, Benjamin Peterson >> wrote: >>> >>> Benjamin Peterson add

[issue11610] Improving property to accept abstract methods

2011-05-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/5/14 Darren Dale : > > Darren Dale added the comment: > > On Sat, May 14, 2011 at 4:28 PM, Benjamin Peterson > wrote: >> >> Benjamin Peterson added the comment: >> >> I still dislike the reduntancy of having abstractmethod and abstractproperty >> on

[issue11610] Improving property to accept abstract methods

2011-05-14 Thread Darren Dale
Darren Dale added the comment: On Sat, May 14, 2011 at 4:28 PM, Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > I still dislike the reduntancy of having abstractmethod and abstractproperty > on a method. I think a better idea is having > abstractproperty.abstract(getter

[issue11610] Improving property to accept abstract methods

2011-05-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: I still dislike the reduntancy of having abstractmethod and abstractproperty on a method. I think a better idea is having abstractproperty.abstract(getter/setter/deleter). -- ___ Python tracker

[issue11610] Improving property to accept abstract methods

2011-05-14 Thread Darren Dale
Darren Dale added the comment: On Sat, May 14, 2011 at 12:20 PM, Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > 2011/5/14 Darren Dale : >> >> Darren Dale added the comment: >> >> Is there anything preventing this patch from being merged? > > I have to make time to think

[issue11610] Improving property to accept abstract methods

2011-05-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/5/14 Darren Dale : > > Darren Dale added the comment: > > Is there anything preventing this patch from being merged? I have to make time to think about the API a bit more. -- ___ Python tracker

[issue11610] Improving property to accept abstract methods

2011-05-14 Thread Darren Dale
Darren Dale added the comment: Is there anything preventing this patch from being merged? -- nosy: +Darren.Dale ___ Python tracker ___ __

[issue11610] Improving property to accept abstract methods

2011-04-10 Thread Darren Dale
Darren Dale added the comment: So, are there objections to this patch, or can it be merged? -- ___ Python tracker ___ ___ Python-bugs

[issue11610] Improving property to accept abstract methods

2011-03-29 Thread Darren Dale
Darren Dale added the comment: On Tue, Mar 29, 2011 at 10:24 PM, Darren Dale wrote: > > Darren Dale added the comment: > > On Tue, Mar 29, 2011 at 9:31 PM, Benjamin Peterson > wrote: >> 2011/3/29 Darren Dale : >>> The benefit of abstractproperty.abstract{...} is that one decorator is >>> req

[issue11610] Improving property to accept abstract methods

2011-03-29 Thread Darren Dale
Darren Dale added the comment: On Tue, Mar 29, 2011 at 9:31 PM, Benjamin Peterson wrote: > 2011/3/29 Darren Dale : >> The benefit of abstractproperty.abstract{...} is that one decorator is >> required instead of two, right? Are there others? > > Mostly it doesn't create a weird asymmetry betwe

[issue11610] Improving property to accept abstract methods

2011-03-29 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/3/29 Darren Dale : > > Darren Dale added the comment: > > I see some problems with this approach, but maybe I haven't fully appreciated > it. Let me summarize the goals and constraints as I see them: > > 1) compatible with long-form and decorator synta

[issue11610] Improving property to accept abstract methods

2011-03-29 Thread Darren Dale
Darren Dale added the comment: I see some problems with this approach, but maybe I haven't fully appreciated it. Let me summarize the goals and constraints as I see them: 1) compatible with long-form and decorator syntax of {abstract}property declaration 2) backwards compatible, no change in

[issue11610] Improving property to accept abstract methods

2011-03-29 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/3/29 Darren Dale : > > Darren Dale added the comment: > > Benjamin: have you thought this idea through? Perhaps inadequately? -- ___ Python tracker _

[issue11610] Improving property to accept abstract methods

2011-03-29 Thread Darren Dale
Darren Dale added the comment: Benjamin: have you thought this idea through? -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue11610] Improving property to accept abstract methods

2011-03-29 Thread Benjamin Peterson
Benjamin Peterson added the comment: I have an idea. How about instead of reusing abstractmethod for abstract getters and setters, you add abstractproperty.abstractgetter/setter/deleter? -- ___ Python tracker ___

[issue11610] Improving property to accept abstract methods

2011-03-28 Thread Ned Deily
Ned Deily added the comment: (Darren, I'm not sure why you are running into problems with that setup. I test with what sounds to be a very similar one including a MacPorts gettext port providing libintl although I do install ports as +universal (i386, x86_64) by default. And I don't know wh

[issue11610] Improving property to accept abstract methods

2011-03-28 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue11610] Improving property to accept abstract methods

2011-03-24 Thread Darren Dale
Darren Dale added the comment: (Ned, I'm running 10.6.6 with a 64-bit kernel. I've tried running ./configure without any arguments, and also with --prefix=/opt/local, since I install essentially everything with MacPorts.) -- ___ Python tracker

[issue11610] Improving property to accept abstract methods

2011-03-24 Thread Ned Deily
Ned Deily added the comment: (Darren, what version of OS X and what arguments did you use for ./configure ? In general, for testing purposes, a vanilla ./configure with no args should work fine for building a Python that works right from your source build directory. If you want to build som

[issue11610] Improving property to accept abstract methods

2011-03-24 Thread Darren Dale
Darren Dale added the comment: Here is a new version of the patch. I think it addresses all of the issues that have been raised to date. I had to comment out the -lintl line in Modules/Setup to build on OS X, this seems to be a similar issue to http://bugs.python.org/issue6154 . So I don't h

[issue11610] Improving property to accept abstract methods

2011-03-20 Thread Darren Dale
Changes by Darren Dale : Removed file: http://bugs.python.org/file21295/property_with_abstractmethod_v2.patch ___ Python tracker ___ ___ Pyth

[issue11610] Improving property to accept abstract methods

2011-03-20 Thread Darren Dale
Changes by Darren Dale : Removed file: http://bugs.python.org/file21293/property_with_abstractmethod.patch ___ Python tracker ___ ___ Python-

[issue11610] Improving property to accept abstract methods

2011-03-20 Thread Darren Dale
Darren Dale added the comment: Thank you Daniel and Benjamin for the helpful feedback. I think the attached patch is a much better approach. It only touches abc.abstractproperty (instead of the builtin property), and uses a class method as a factory to return instances of either property or a

[issue11610] Improving property to accept abstract methods

2011-03-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/3/20 Darren Dale : > > Darren Dale added the comment: > > On Sun, Mar 20, 2011 at 5:18 AM, Daniel Urban wrote: >> >> Daniel Urban added the comment: >> >> I tried to test your patch, but the build dies with this error: >> Fatal Python error: Py_Initia

[issue11610] Improving property to accept abstract methods

2011-03-20 Thread Darren Dale
Darren Dale added the comment: On Sun, Mar 20, 2011 at 5:18 AM, Daniel Urban wrote: > > Daniel Urban added the comment: > > I tried to test your patch, but the build dies with this error: > Fatal Python error: Py_Initialize: can't initialize sys standard streams > Traceback (most recent call l

[issue11610] Improving property to accept abstract methods

2011-03-20 Thread Darren Dale
Darren Dale added the comment: On Sun, Mar 20, 2011 at 12:19 PM, Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > I think a better idea would be to override getter and friends on the > abstractproperty class. I just suggested the same at python-ideas. I'll work on an alt

[issue11610] Improving property to accept abstract methods

2011-03-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think a better idea would be to override getter and friends on the abstractproperty class. -- nosy: +benjamin.peterson ___ Python tracker ___

[issue11610] Improving property to accept abstract methods

2011-03-20 Thread Darren Dale
Darren Dale added the comment: On Sun, Mar 20, 2011 at 5:18 AM, Daniel Urban wrote: > > Daniel Urban added the comment: > > I tried to test your patch, but the build dies with this error: > Fatal Python error: Py_Initialize: can't initialize sys standard streams > Traceback (most recent call l

[issue11610] Improving property to accept abstract methods

2011-03-20 Thread Daniel Urban
Daniel Urban added the comment: I tried to test your patch, but the build dies with this error: Fatal Python error: Py_Initialize: can't initialize sys standard streams Traceback (most recent call last): File ".../cpython/Lib/io.py", line 60, in Aborted I don't know why is this, but I get th

[issue11610] Improving property to accept abstract methods

2011-03-19 Thread Darren Dale
Darren Dale added the comment: Here is a new patch that addresses a couple problems found in review: * Unit tests contained a typo (Property instead of property) * DeprecationWarning would be issued when importing abc rather than when creating abstractproperty. (whether abstractproperty should

[issue11610] Improving property to accept abstract methods

2011-03-19 Thread Daniel Urban
Daniel Urban added the comment: I looked at the patch (I didn't test it yet), my comments are on Rietveld. -- ___ Python tracker ___

[issue11610] Improving property to accept abstract methods

2011-03-19 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue11610] Improving property to accept abstract methods

2011-03-19 Thread Darren Dale
Darren Dale added the comment: The discussion on python-ideas: http://mail.python.org/pipermail/python-ideas/2011-March/009411.html -- ___ Python tracker ___ __

[issue11610] Improving property to accept abstract methods

2011-03-19 Thread Darren Dale
New submission from Darren Dale : I posted a suggestion at python-ideas that the declaration of abstract properties could be improved in such a way that they could be declared with either the long-form or decorator syntax using the built-in property and abc.abstractmethod: {{{ class MyPropert