Re: [Python-ideas] PEP: Hide implementation details in the C API

2017-07-13 Thread Nick Coghlan
On 14 July 2017 at 02:29, Brett Cannon wrote: > On Thu, 13 Jul 2017 at 09:12 Ronald Oussoren wrote: >> I don’t understand. Moving too functions instead of macros for some thing >> doesn’t really help with keeping the public API stable (for the non-stable >> ABI). > > > Sorry, I didn't specify whi

Re: [Python-ideas] PEP: Hide implementation details in the C API

2017-07-13 Thread Nick Coghlan
On 14 July 2017 at 01:35, Victor Stinner wrote: > 2017-07-13 15:21 GMT+02:00 Nick Coghlan : >> As far as I know, this isn't really why folks find the stable ABI hard >> to switch to. Rather, I believe it's because switching to the stable >> ABI means completely changing how you define classes to b

Re: [Python-ideas] PEP: Hide implementation details in the C API

2017-07-13 Thread Ronald Oussoren
> On 13 Jul 2017, at 13:46, Victor Stinner wrote: > > 2017-07-12 20:51 GMT+02:00 Brett Cannon : >> I also think the motivation doesn't have to be performance but simply >> cleaning up how we expose our C APIs to users as shown by the fact we have >> messed up the stable API by making it opt-out

Re: [Python-ideas] PEP: Hide implementation details in the C API

2017-07-13 Thread Brett Cannon
On Thu, 13 Jul 2017 at 09:12 Ronald Oussoren wrote: > On 12 Jul 2017, at 20:51, Brett Cannon wrote: > > > > On Wed, 12 Jul 2017 at 01:25 Ronald Oussoren > wrote: > >> >> > On 11 Jul 2017, at 12:19, Victor Stinner >> wrote: >> > [SNIP] > > > >> > Step 3: first pass of implementation detail remo

Re: [Python-ideas] PEP: Hide implementation details in the C API

2017-07-13 Thread Ronald Oussoren
> On 12 Jul 2017, at 20:51, Brett Cannon wrote: > > > > On Wed, 12 Jul 2017 at 01:25 Ronald Oussoren > wrote: > > > On 11 Jul 2017, at 12:19, Victor Stinner > > wrote: > > > > Hi, > > > > This is the first draft of a big (?) pr

Re: [Python-ideas] PEP: Hide implementation details in the C API

2017-07-13 Thread Victor Stinner
2017-07-13 15:21 GMT+02:00 Nick Coghlan : > As far as I know, this isn't really why folks find the stable ABI hard > to switch to. Rather, I believe it's because switching to the stable > ABI means completely changing how you define classes to be closer to > the way you define them from Python code

Re: [Python-ideas] PEP: Hide implementation details in the C API

2017-07-13 Thread Nick Coghlan
On 13 July 2017 at 21:46, Victor Stinner wrote: > 2017-07-12 20:51 GMT+02:00 Brett Cannon : >> I think Victor has long-term plans to try and hide the struct details at a >> higher-level and so that would make macros a bad thing. But ignoring the >> specific Py_INCREF/DECREF example, switching to f

Re: [Python-ideas] PEP: Hide implementation details in the C API

2017-07-13 Thread Victor Stinner
2017-07-12 20:51 GMT+02:00 Brett Cannon : > I also think the motivation doesn't have to be performance but simply > cleaning up how we expose our C APIs to users as shown by the fact we have > messed up the stable API by making it opt-out instead of opt-in. It's hard to sell a "cleanup" to users w

Re: [Python-ideas] PEP: Hide implementation details in the C API

2017-07-13 Thread Victor Stinner
2017-07-13 0:23 GMT+02:00 Stefan Behnel : > From a Cython perspective, it's (not great but) ok if these "implementation > details" were moved somewhere else, but it would be a problem if they > became entirely unavailable for external modules. Cython uses some of the > internals for performance rea