[Python-Dev] Re: PEP 689 – Unstable C API tier (was: Semi-stable C API tier)

2022-05-06 Thread Nick Coghlan
On Fri, 6 May 2022 at 22:50, Petr Viktorin  wrote:
> IMO it's fine to delay formalizing this until 3.12, so we can have a
> proper discussion.
> However, if someone has the time, it would be nice to ensure the use
> cases from PEP 523 are possible with the 3.11 API.
> Specifically, AFAIK, struct _PyInterpreterFrame needs to be exposed
> (as an incomplete, opaque struct) to make _PyFrameEvalFunction usable,
> _PyFrame_GetFrameObject needs to be exposed, and a
> PyEval_EvalFrameDefault that takes PyFrameObject should be added.
> Also, the What's New currently says “See PEP 523 for more details of
> how to use [_PyFrameEvalFunction]”, which isn't very helpful.

Given the proximity of beta1, I think affected projects are going to
need to define Py_BUILD_CORE for the Python 3.11 series - at least
some of them have already been updated to declare that during the
alpha cycle to handle the frame API changes.

PEP 689 can then be informed by feedback from those projects regarding
what breaks for them if they *don't* declare Py_BUILD_CORE.

That said, one slightly awkward consequence of this approach is
affected projects would end up needing to include CPython's
"patchlevel.h" [1] directly, so they can query PY_VERSION_HEX *before*
including "Python.h". Something like:

#include "patchlevel.h"  # CPython's version declaration header
#if Py_VERSION_HEX+0 >= 0x030c  # CPython 3.12+
#define Py_USING_UNSTABLE_API
#elif Py_VERSION_HEX+0 >= 0x030b # CPython 3.11.x
#define Py_BUILD_CORE
#endif
#include "Python.h"

So maybe it would be worth asking the SC for an exception to the beta
freeze, and allow the unstable API tier to land during the beta
period?

Cheers,
Nick.

[1] https://github.com/python/cpython/blob/main/Include/patchlevel.h

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/KG56QXYVEPDUSPIGDDUDEDZLMYXOXPQG/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Summary of Python tracker Issues

2022-05-06 Thread Python tracker

ACTIVITY SUMMARY (2022-04-29 - 2022-05-06)
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 with patches: 2890 


Most recent 15 issues with no replies (15)
==

#47258: Python 3.10 hang at exit in drop_gil() (due to resource warnin
https://bugs.python.org/issue47258

#47256: re: limit the maximum capturing group to 1,073,741,823, reduce
https://bugs.python.org/issue47256

#47253: LOAD_GLOBAL instruction with wrong source position
https://bugs.python.org/issue47253

#47252: socket.makefile documentation is missing data regarding the 'b
https://bugs.python.org/issue47252

#47251: Merge BINARY_SUBSCR_LIST_INT with BINARY_SUBSCR_LIST_TUPLE
https://bugs.python.org/issue47251

#47244: email.utils.formataddr does not respect double spaces
https://bugs.python.org/issue47244

#47242: Annoying white bar in IDLE (line 457 in sidebar.py)
https://bugs.python.org/issue47242

#47241: [C API] Move the PyCodeObject structure to the internal C API 
https://bugs.python.org/issue47241

#47238: Python threading.Event().wait() depends on the system time
https://bugs.python.org/issue47238

#47236: Document types.CodeType.replace() changes about co_exceptionta
https://bugs.python.org/issue47236

#47228: Document that na??ve datetime objects represent local time
https://bugs.python.org/issue47228

#47222: subprocess.Popen() should allow capturing output and sending i
https://bugs.python.org/issue47222

#47219: asyncio with two interpreter instances
https://bugs.python.org/issue47219

#47218: adding name to lzmafile
https://bugs.python.org/issue47218

#47217: adding name to BZ2File
https://bugs.python.org/issue47217



Most recent 15 issues waiting for review (15)
=

#47256: re: limit the maximum capturing group to 1,073,741,823, reduce
https://bugs.python.org/issue47256

#47255: Many broken :meth: roles in the docs
https://bugs.python.org/issue47255

#47254: enhanced dir?
https://bugs.python.org/issue47254

#47251: Merge BINARY_SUBSCR_LIST_INT with BINARY_SUBSCR_LIST_TUPLE
https://bugs.python.org/issue47251

#47243: Duplicate entry in 'Objects/unicodetype_db.h'
https://bugs.python.org/issue47243

#47233: show_caches option affects code positions reported by dis.get_
https://bugs.python.org/issue47233

#47222: subprocess.Popen() should allow capturing output and sending i
https://bugs.python.org/issue47222

#47218: adding name to lzmafile
https://bugs.python.org/issue47218

#47217: adding name to BZ2File
https://bugs.python.org/issue47217

#47216: adding mtime option to gzip open()
https://bugs.python.org/issue47216

#47215: Add "unstable" frame stack api
https://bugs.python.org/issue47215

#47208: Support libffi implementations that cannot support invocations
https://bugs.python.org/issue47208

#47205: posix.sched_{get|set}affinity(-1) no longer returns ProcessLoo
https://bugs.python.org/issue47205

#47200: Add ZipInfo.mode property
https://bugs.python.org/issue47200

#47199: multiprocessing: micro-optimize Connection.send_bytes() method
https://bugs.python.org/issue47199
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/NPP3DJ5OLV6UWD76FQUMFYU7OPHGZIVL/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: [python-committers] Release of Python 3.11 beta 1 is currently blocked

2022-05-06 Thread Victor Stinner
On Fri, May 6, 2022 at 2:14 PM Pablo Galindo Salgado
 wrote:
> Today we need to start the release of Python 3.11 beta 1. Currently, we have 
> the following blockers:
>
> * https://github.com/python/cpython/issues/91162 (was deferred blocker - but 
> all deferred blockers are bumped to release blockers on beta1).

"PEP 646: Decide on substitution behavior" where PEP 646 is "PEP 646 –
Variadic Generics", so something about typing.

Who can take this decision?


> * https://github.com/python/cpython/issues/91350

The main branch got a fix. The backport to 3.8 was missing because the
Docs CI failed: I repaired the PR #32250 which is now waiting for
Lukasz (Python 3.8 release manager) to merge it.


> * We have 3 buildbots failing: 
> https://buildbot.python.org/all/#/release_status (some of the failures are 
> due to flaky tests but others look real).

The FreeBSD buildbot has no working C compiler: I contacted Koobs who
maintains it. It's unrelated to Python itself.

TraceRefs: I wrote https://github.com/python/cpython/pull/92396 to fix
it => merged

A SSL test of test_asyncio failed on x86 Gentoo Non-Debug with X 3.x:
this buildbot is very slow, and the timeout is hardcoded to 30
seconds. I proposed https://github.com/python/cpython/pull/92402 to
use a timeout of 5 minutes (or longer, it's adapted to buildbot
--timeout argument).

Victor
-- 
Night gathers, and now my watch begins. It shall not end until my death.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/V6MVCOL5S7TWJA46INVNZGI7OCGT27MK/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: PEP 689 – Unstable C API tier (was: Semi-stable C API tier)

2022-05-06 Thread Petr Viktorin
Hi,
Unfortunately my newborn child is taking up even more time than I
expected, so I won't be able to get the unstable API tier into Python
3.11 even if it's accepted today.
(If anyone else would like to try, feel free to add yourself as
Author, make any changes necessary and talk to Pablo (the RM) and the
SC.)

IMO it's fine to delay formalizing this until 3.12, so we can have a
proper discussion.
However, if someone has the time, it would be nice to ensure the use
cases from PEP 523 are possible with the 3.11 API.
Specifically, AFAIK, struct _PyInterpreterFrame needs to be exposed
(as an incomplete, opaque struct) to make _PyFrameEvalFunction usable,
_PyFrame_GetFrameObject needs to be exposed, and a
PyEval_EvalFrameDefault that takes PyFrameObject should be added.
Also, the What's New currently says “See PEP 523 for more details of
how to use [_PyFrameEvalFunction]”, which isn't very helpful.

On Thu, May 5, 2022 at 1:55 PM Petr Viktorin  wrote:
>
> On Thu, May 5, 2022 at 5:35 AM Thomas Wouters  wrote:
> [...]
> >
> >
> > I've already brought this up to Petr directly, but I would greatly prefer 
> > new unstable API functions have leading underscores, and that existing 
> > functions being moved to the unstable API are _not_ renamed.
> >
> > Renaming existing functions means a lot of unnecessary code churn. It looks 
> > like we have more _-prefixed unstable functions than not, but I don't think 
> > the churn is worth renaming the currently public ones.
> >
> > Leading underscores for unstable API functions (that aren't currently 
> > public) means we keep the widely assumed guarantee that Py*/PY* are part of 
> > the public API. The Py_USING_UNSTABLE_API define is per-file, not per 
> > symbol/use, so I would rather not open the door to unintended or unaware 
> > use of unstable APIs. By giving the functions the leading underscore, we're 
> > forcing people to think about -- or check the documentation -- whether the 
> > specific function is okay to use.
> >
> > The unstable API is intended for specific use-cases, and I think it's 
> > preferable to put the burden of figuring out if a _Py/_PY* symbol is 
> > acceptable for them to use, rather than putting the burden of figuring out 
> > if a Py/PY* symbol is acceptable up use on _everyone else_.
> >
>
> I don't think that's necessary. I still see the unstable API as
> public: it needs more maintenance, but it's not particularly dangerous
> to use it.
> I think defining Py_USING_UNSTABLE_API once is quite enough.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/TKN73JBATGBJHP7THK5G3CPMJITG53T5/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Release of Python 3.11 beta 1 is currently blocked

2022-05-06 Thread Pablo Galindo Salgado
I should have started this email with "Nobody expects the Spanish
inquisition" :)

On Fri, 6 May 2022 at 13:13, Pablo Galindo Salgado 
wrote:

> Hi everyone,
>
> Today we need to start the release of Python 3.11 beta 1. Currently, we
> have the following blockers:
>
> * https://github.com/python/cpython/issues/91162 (was deferred blocker -
> but all deferred blockers are bumped to release blockers on beta1).
> * https://github.com/python/cpython/issues/91350
> * We have 3 buildbots failing:
> https://buildbot.python.org/all/#/release_status (some of the failures
> are due to flaky tests but others look real).
>
> Please, if you are involved in the above issues check if they are resolved
> or if they are not released blockers (notice any semantic change, API
> change,
> public data structure change or grammar change must be done before beta 1
> is released). I will look at the buildbots later today but if you have some
> time to investigate, that would help a lot!
>
> *I am blocking the main branch so only the release team can merge changes*
> until these problems are addressed and we can continue with the release.
>
> Please, add me as a reviewer to any PR that needs to be merged to address
> these issues or any other change that *absolutely needs to go into beta 1*.
>
> Thanks for your help!
>
> Regards from sunny London,
> Pablo Galindo Salgado
>
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/I2NI4VW33O5J5WI3UANJK2QNFWOQCQ4T/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Release of Python 3.11 beta 1 is currently blocked

2022-05-06 Thread Pablo Galindo Salgado
Hi everyone,

Today we need to start the release of Python 3.11 beta 1. Currently, we
have the following blockers:

* https://github.com/python/cpython/issues/91162 (was deferred blocker -
but all deferred blockers are bumped to release blockers on beta1).
* https://github.com/python/cpython/issues/91350
* We have 3 buildbots failing:
https://buildbot.python.org/all/#/release_status (some of the failures are
due to flaky tests but others look real).

Please, if you are involved in the above issues check if they are resolved
or if they are not released blockers (notice any semantic change, API
change,
public data structure change or grammar change must be done before beta 1
is released). I will look at the buildbots later today but if you have some
time to investigate, that would help a lot!

*I am blocking the main branch so only the release team can merge changes*
until these problems are addressed and we can continue with the release.

Please, add me as a reviewer to any PR that needs to be merged to address
these issues or any other change that *absolutely needs to go into beta 1*.

Thanks for your help!

Regards from sunny London,
Pablo Galindo Salgado
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/YQAE62CAEASIBGHQ5LQZKT3JZ4BVIYKJ/
Code of Conduct: http://python.org/psf/codeofconduct/