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

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

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

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

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 >>

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

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

2017-07-12 Thread Nick Coghlan
On 13 July 2017 at 08:23, Stefan Behnel wrote: > The general rule of thumb in Cython core development is that it's ok to > exploit internals as long as there is a generic fallback through some C-API > operations which can be used in other Python implementations. I'd be happy

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

2017-07-12 Thread Stefan Behnel
Victor Stinner schrieb am 11.07.2017 um 12:19: > Split the ``Include/`` directory of CPython: > > * ``python`` API: ``Include/Python.h`` remains the default C API > * ``core`` API: ``Include/core/Python.h`` is a new C API designed for > building Python > * ``stable`` API:

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

2017-07-12 Thread Brett Cannon
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 (?) project to prepare CPython to be > > able to "modernize" its implementation.

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

2017-07-12 Thread Ronald Oussoren
> On 11 Jul 2017, at 12:19, Victor Stinner wrote: > > Hi, > > This is the first draft of a big (?) project to prepare CPython to be > able to "modernize" its implementation. Proposed changes should allow > to make CPython more efficient in the future. The

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

2017-07-11 Thread Terry Reedy
On 7/11/2017 11:30 PM, Nick Coghlan wrote: Commenting more on specific technical details rather than just tone this time :) On 11 July 2017 at 20:19, Victor Stinner wrote: Reference counting may be emulated in a future implementation for backward compatibility.

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

2017-07-11 Thread Victor Stinner
> Step 3: first pass of implementation detail removal > --- > > Modify the ``python`` API: > > * Add a new ``API`` subdirectory in the Python source code which will > "implement" the Python C API > * Replace macros with functions. The

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

2017-07-11 Thread Paul Moore
On 11 July 2017 at 11:19, Victor Stinner wrote: > XXX should we abandon the stable ABI? Never really used by anyone. Please don't. On Windows, embedding Python is a pain because a new version of Python requires a recompile (which isn't ideal for apps that just want to