[Python-Dev] Re: PEP 689 – Semi-stable C API tier

2022-04-29 Thread MRAB
On 2022-04-30 03:17, Greg Ewing wrote: On 30/04/22 5:25 am, MRAB wrote: I was going to suggest "metastable". Too late? :-) What, the API is balanced on a knife edge and likely to collapse into something else if you sneeze too hard? There's a possibility that the universe might be metastable,

[Python-Dev] Re: PEP 689 – Semi-stable C API tier

2022-04-29 Thread Greg Ewing
On 30/04/22 5:25 am, MRAB wrote: I was going to suggest "metastable". Too late? :-) What, the API is balanced on a knife edge and likely to collapse into something else if you sneeze too hard? -- Greg ___ Python-Dev mailing list --

[Python-Dev] Re: Proto-PEP part 4: The wonderful third option

2022-04-29 Thread Guido van Rossum
FWIW, Carl presented a talk about his proposed way forward using PEP 649 with some small enhancements to handle cases like dataclasses (*), and it was well received by those present. I personally hope that this means the end of the "forward class declarations" proposals (no matter how wonderful),

[Python-Dev] Re: PEP 689 – Semi-stable C API tier

2022-04-29 Thread Glenn Linderman
On 4/29/2022 11:42 AM, Stephen J. Turnbull wrote: MRAB writes: > On 2022-04-29 18:02, Guido van Rossum wrote: > > On Fri, Apr 29, 2022 at 10:15 AM Petr Viktorin > > wrote: > > > > On 29. 04. 22 16:32, Victor Stinner wrote: > > > Ok, let me start with

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-04-29 Thread Denis Kotov
> From huge codebase experience with C++, it does not cause significantly better (1) Readabillity or (2) Maintainability on its own compared to C I would argue with you on that ... RAII is fundamental C++ feature that improves Maintainability !! Also readability is much better because you work

[Python-Dev] Re: PEP 689 – Semi-stable C API tier

2022-04-29 Thread Stephen J. Turnbull
MRAB writes: > On 2022-04-29 18:02, Guido van Rossum wrote: > > On Fri, Apr 29, 2022 at 10:15 AM Petr Viktorin > > wrote: > > > > On 29. 04. 22 16:32, Victor Stinner wrote: > > > Ok, let me start with the serious business: API name. > > > > > >

[Python-Dev] Summary of Python tracker Issues

2022-04-29 Thread Python tracker
ACTIVITY SUMMARY (2022-04-22 - 2022-04-29) Python tracker at https://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open7146 ( +0) closed 51841 ( +0) total 58987 ( +0) Open issues

[Python-Dev] Re: PEP 689 – Semi-stable C API tier

2022-04-29 Thread MRAB
On 2022-04-29 18:02, Guido van Rossum wrote: On Fri, Apr 29, 2022 at 10:15 AM Petr Viktorin > wrote: On 29. 04. 22 16:32, Victor Stinner wrote: > Ok, let me start with the serious business: API name. > > I'm not comfortable with "semi-stable". Python

[Python-Dev] Re: PEP 689 – Semi-stable C API tier

2022-04-29 Thread Victor Stinner
I think that the main advantage of "unstable" over "semi-stable" is that it's a single word :-D It avoids the really hard question (!) about the separator between "semi" and "stable" ;-) (semistable? semi-stable? semi_stable?). Victor ___ Python-Dev

[Python-Dev] Re: PEP 689 – Semi-stable C API tier

2022-04-29 Thread Guido van Rossum
On Fri, Apr 29, 2022 at 10:15 AM Petr Viktorin wrote: > On 29. 04. 22 16:32, Victor Stinner wrote: > > Ok, let me start with the serious business: API name. > > > > I'm not comfortable with "semi-stable". Python already has a "limited > > API" and a "stable ABI". Just by its name, it's unclear

[Python-Dev] Re: PEP 689 – Semi-stable C API tier

2022-04-29 Thread Petr Viktorin
On 29. 04. 22 16:32, Victor Stinner wrote: Ok, let me start with the serious business: API name. I'm not comfortable with "semi-stable". Python already has a "limited API" and a "stable ABI". Just by its name, it's unclear what "semi-stable" means. Honestly, I would be more comfortable with

[Python-Dev] Re: PEP 689 – Semi-stable C API tier

2022-04-29 Thread Victor Stinner
> Rejected Ideas > == > > It might be good to add a similar tier in the Python (not C) API, > e.g. for ``types.CodeType``. > However, the opt-in mechanism would need to be different (if any). > This is outside the scope of the PEP. For types.CodeType constructor, would it be possible

[Python-Dev] Re: PEP 689 – Semi-stable C API tier

2022-04-29 Thread Victor Stinner
Ok, let me start with the serious business: API name. I'm not comfortable with "semi-stable". Python already has a "limited API" and a "stable ABI". Just by its name, it's unclear what "semi-stable" means. Honestly, I would be more comfortable with the name: "unstable API". It would be clear

[Python-Dev] Re: Using the Python C API in C++

2022-04-29 Thread Victor Stinner
Hi, The C++ version was discussed in the 2nd link that I gave in my first message: https://github.com/python/cpython/issues/91321 Gregory wrote "If we can conditionally test new things based on C++XX version, accumulating modern issue regression tests seems useful. Otherwise 11 at minimum."

[Python-Dev] Re: Decreasing refcount for locals before popping frame

2022-04-29 Thread Thomas Grainger
Can you ping me on the airflow PR for this change? (@graingert) On Fri, Apr 29, 2022, 7:54 AM Malthe wrote: > On Fri, 29 Apr 2022 at 06:50, Thomas Grainger wrote: > > You can use a `__del__` method that warns on collection - like an > unawaited coroutine > > > > Also if you're in control of

[Python-Dev] Re: Decreasing refcount for locals before popping frame

2022-04-29 Thread Thomas Grainger
Does this only apply to DAGfiles? Eg https://airflow.apache.org/docs/apache-airflow/1.10.12/concepts.html#scope You can use a `__del__` method that warns on collection - like an unawaited coroutine Also if you're in control of importing the dagfile you can record all created dags and report any

[Python-Dev] Re: Decreasing refcount for locals before popping frame

2022-04-29 Thread Malthe
On Fri, 29 Apr 2022 at 06:50, Thomas Grainger wrote: > You can use a `__del__` method that warns on collection - like an unawaited > coroutine > > Also if you're in control of importing the dagfile you can record all created > dags and report any that are missing from the globals of the module

[Python-Dev] Re: Decreasing refcount for locals before popping frame

2022-04-29 Thread Malthe
On Fri, 29 Apr 2022 at 06:38, Thomas Grainger wrote: > Can you show a run-able example of the successful and unsuccessful usage of > `with DAG(): ... `? from airflow import DAG # correct: dag = DAG("my_dag") # incorrect: DAG("my_dag") The with construct really has nothing to do with it, but

[Python-Dev] Re: Decreasing refcount for locals before popping frame

2022-04-29 Thread Thomas Grainger
Can you show a run-able example of the successful and unsuccessful usage of `with DAG(): ... `? On Fri, Apr 29, 2022, 6:31 AM Malthe wrote: > Pablo Galindo Salgado wrote: > > As it has been mentioned there is no guarantee that your variable will > even > > be finalized (or even destroyed) after