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. One heavy user's experience

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

2017-07-11 Thread Nick Coghlan
Commenting more on specific technical details rather than just tone this time :) On 11 July 2017 at 20:19, Victor Stinner wrote: > PEP: xxx > Title: Hide implementation details in the C API > Version: $Revision$ > Last-Modified: $Date$ > Author: Victor Stinner , > Status: Draft > Type: Standards

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

2017-07-11 Thread Barry Scott
This is a great idea. The suggestions in your first draft would help clean up some of the uglier corners of the PyCXX code. I'd suggest that you might want to add at least 1 PyCXX based extension to your testing. PyCXX aims to expose all the C API as C++ classes. (I'm missing the class variable

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

2017-07-11 Thread Eric Snow
On Tue, Jul 11, 2017 at 4:19 AM, Victor Stinner wrote: > Step 1: split Include/ into subdirectories > -- > > Split the ``Include/`` directory of CPython: > > * ``python`` API: ``Include/Python.h`` remains the default C API > * ``core`` API: ``Include/core/Py

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 implementation

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 optionally allow Python scri

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

2017-07-11 Thread Nick Coghlan
On 11 July 2017 at 20: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 optimizations > themself are out of the scope

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

2017-07-11 Thread Victor Stinner
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 optimizations themself are out of the scope of the PEP, but some examples are listed to explain why thes