[Python-Dev] Making PyInterpreterState an opaque type

Antoine Pitrou solipsis at pitrou.net
Sat Feb 16 16:32:10 EST 2019


On Sat, 16 Feb 2019 11:15:44 +0100
Jeroen Demeyer <J.Demeyer at UGent.be> wrote:
> On 2019-02-16 00:37, Eric Snow wrote:
> > One thing that would help simplify changes
> > in this area is if PyInterpreterState were defined in
> > Include/internal.  
> 
> How would that help anything? I don't like the idea (in general, I'm not 
> talking about PyInterpreterState specifically) that external modules 
> should be second-class citizens compared to modules inside CPython.
> 
> If you want to break the undocumented API, just break it. I don't mind. 
> But I don't see why it's required to move the include to 
> Include/internal for that.

This sounds like a reasonable design principle: decree the API
non-stable and prone to breakage (it already is, anyway), don't hide it.

It's true that in the PyInterpreterState case specifically, there
doesn't seem much worthy of use by third-party libraries.

Regards

Antoine.




More information about the Python-Dev mailing list