[Python-Dev] Re: C API: Move PEP 523 "Adding a frame evaluation API to CPython" private C API to the internal C API

2022-04-03 Thread Nick Coghlan
On Fri, 1 Apr 2022, 6:47 pm Victor Stinner, wrote: > On Wed, Mar 30, 2022 at 5:42 PM Guido van Rossum wrote: > > I'm not convinced that advertising an API as being Unstable (in the > documentation?) is going to solve any kind of problem. People love to > use private APIs, and they do it simply b

[Python-Dev] Re: Make HAMT available to python script

2022-04-03 Thread Nick Coghlan
On Sun, 3 Apr 2022, 12:58 pm Steven D'Aprano, wrote: > > I haven't considered pickling, or deep-copying. I don't think there is > any way to get access to the underlying dict and modify it, except > perhaps via ctypes, so I think it is as immutable as it is possible to > get from Python code. Fee

[Python-Dev] Re: Make HAMT available to python script

2022-04-03 Thread Victor Stinner
PEP 603 adds a frozenmap type to collections, implemented as HAMT. For a read-only *dict*, I proposed PEP 416 "Add a frozendict builtin type" in 2012. It was rejected. https://peps.python.org/pep-0416/ The outcome of this PEP was the addition of the types.MappingProxy type (previously, it already

[Python-Dev] Descriptions in unittest and avoiding confusion

2022-04-03 Thread Jason R. Coombs
For the edification of all involved, this post summarizes a somewhat surprising behavior in unittest around docstrings. In bpo-46126, I reported an issue where I’d observed that CPython developers were avoiding the use of docstrings in unittests due to what w

[Python-Dev] Re: C API: Move PEP 523 "Adding a frame evaluation API to CPython" private C API to the internal C API

2022-04-03 Thread Guido van Rossum
+1 to Nick's analysis and proposal. I had been mulling over my own reply but this just about covers it. On Sun, Apr 3, 2022 at 6:29 AM Nick Coghlan wrote: > On Fri, 1 Apr 2022, 6:47 pm Victor Stinner, wrote: > >> On Wed, Mar 30, 2022 at 5:42 PM Guido van Rossum >> wrote: >> >> I'm not convince

[Python-Dev] Re: C API: Move PEP 523 "Adding a frame evaluation API to CPython" private C API to the internal C API

2022-04-03 Thread Itamar O
On Sun, Apr 3, 2022 at 6:32 AM Nick Coghlan wrote: > On Fri, 1 Apr 2022, 6:47 pm Victor Stinner, wrote: > >> On Wed, Mar 30, 2022 at 5:42 PM Guido van Rossum >> wrote: >> >> I'm not convinced that advertising an API as being Unstable (in the >> documentation?) is going to solve any kind of prob