Re: [Python-Dev] Patches to distutils for 3.6

2016-08-19 Thread Sylvain Corlay
Hi Berker, Thanks for your reply. If `NamedTemporaryFile` has a bug on windows, should it impact the implementation of this? Sylvain > > Adding a has_flag method to CCompiler > > http://bugs.python.org/issue26689 > > > > useful to check if a compiler has certain flags available (such a

[Python-Dev] Patches to distutils for 3.6

2016-08-19 Thread Sylvain Corlay
Hi All, There are a couple of related patches that were submitted to distutils a few months ago that I think would be great to have in before the feature freeze in 3.6b1 A bug fix in CCompiler.has_function http://bugs.python.org/issue25544 Adding a has_flag method to CCompiler http://bug

Re: [Python-Dev] PEP487: Simpler customization of class creation

2016-08-11 Thread Sylvain Corlay
Hi Martin, I think that we are on the same page. The differences in the approaches here makes me think that I should attempt a PEP487-based migration of traitlets and see if there is a major roadblock. After all, that would probably be a good test for the PEP if the aim is to enable usecases like

Re: [Python-Dev] PEP487: Simpler customization of class creation

2016-07-29 Thread Sylvain Corlay
In the traitlets library I mentioned earlier, we do have a need for this. The corresponding function is called `setup_class`. What it does is setting some class attributes that are required for certain types of descriptors to be able to initialize themselves. class MetaHasTraits(MetaHasDescriptor

Re: [Python-Dev] PEP487: Simpler customization of class creation

2016-07-20 Thread Sylvain Corlay
anything else. Regards, Sylvain On Thu, Jul 21, 2016 at 4:53 AM, Nick Coghlan wrote: > On 21 July 2016 at 03:40, Sylvain Corlay wrote: > > My point is that in any real-world implementation of traits, __set_name__ > > will do a lot more than setting the name, which makes the na

Re: [Python-Dev] PEP487: Simpler customization of class creation

2016-07-20 Thread Sylvain Corlay
n wrote: > Hi Sylvain, > > Thanks for getting in touch! The traitlets library sounds interesting, > and provides good additional evidence that this is a capability that > folks are interested in having available. > > On 20 July 2016 at 15:26, Sylvain Corlay wrote: > > My under

Re: [Python-Dev] PEP487: Simpler customization of class creation

2016-07-19 Thread Sylvain Corlay
Hello, This is my first post on python-dev and I hope that I am not breaking any rule. I wanted to react on the discussion regarding PEP487. This year, we have been working on a refactoring of the `traitlets` library, an implementation of the descriptor pattern that is used in Project Jupyter /