[RELEASE] Python 3.8.0a1 is now available for testing

I packaged another release. Go get it here: https://www.python.org/downloads/release/python-380a2/
Python 3.8.0a2 is the second of four planned alpha releases of Python 3.8, the next feature release of Python. During the alpha phase, Python 3.8 remains under heavy development: additional features will be added and existing features may be modified or deleted. Please keep in mind that this is a preview release and its use is not recommended for production environments. The next preview release, 3.8.0a3, is planned for 2019-03-25.
This time around the stable buildbots were a bit less green than they should have. This early in the cycle, I didn't postpone the release and I didn't use the revert hammer. But soon enough, I will. Let's make sure future changes keep the buildbots happy.
- Ł

Hi Łukasz,
Thank you for your job.
I have created a Merge Request for the docker image of Barry [1].
I also filled an issue [2] for brotlipy (used by httpbin and requests). The problem is with PyInterpreterState.
Via Twitter, I have proposed to the community to fix the issue [2].
[1]: https://gitlab.com/python-devs/ci-images/merge_requests/7 [2]: https://github.com/python-hyper/brotlipy/issues/147
Thanks again for your job.
Cheers,
Stéphane

Armin Rigo released https://pypi.org/project/cffi/1.12.2/ which is compatible with Python 3.8.0a2.
The issue was related to the PyInterpreterState change: https://bugs.python.org/issue35886#msg336501
Note: "[RELEASE] Python 3.8.0a1 is now available for testing" the correct version is 3.8.0a2 :-)
Victor
Le mar. 26 févr. 2019 à 14:02, Stephane Wirtel stephane@wirtel.be a écrit :
Hi Łukasz,
Thank you for your job.
I have created a Merge Request for the docker image of Barry [1].
I also filled an issue [2] for brotlipy (used by httpbin and requests). The problem is with PyInterpreterState.
Via Twitter, I have proposed to the community to fix the issue [2].
Thanks again for your job.
Cheers,
Stéphane
-- Stéphane Wirtel - https://wirtel.be - @matrixise _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/vstinner%40redhat.com
-- Night gathers, and now my watch begins. It shall not end until my death.

On 2019-02-26, Stephane Wirtel wrote:
I also filled an issue [2] for brotlipy (used by httpbin and requests). The problem is with PyInterpreterState.
I tried compiling psycopg2 today and it has a similar problem:
psycopg/psycopgmodule.c: In function ‘psyco_is_main_interp’: psycopg/psycopgmodule.c:689:18: error: dereferencing pointer to incomplete type ‘PyInterpreterState’ {aka ‘struct _is’} while (interp->next)
That code is inside a function:
/* Return nonzero if the current one is the main interpreter */ static int psyco_is_main_interp(void) ...
I believe the correct fix is to use PEP 3121 per-interpreter module state. I created a new issue:
https://github.com/psycopg/psycopg2/issues/854
I think the fix is not trival as the psycopgmodule.c source code has change a fair bit to use the PEP 3121 APIs.
Regards,
Neil

Hi,
Le ven. 1 mars 2019 à 02:12, Neil Schemenauer nas-python@arctrix.com a écrit :
I believe the correct fix is to use PEP 3121 per-interpreter module state. I created a new issue:
https://github.com/psycopg/psycopg2/issues/854
I think the fix is not trival as the psycopgmodule.c source code has change a fair bit to use the PEP 3121 APIs.
The problem is this function:
/* Return nonzero if the current one is the main interpreter */ static int psyco_is_main_interp(void) { static PyInterpreterState *main_interp = NULL; /* Cached reference */ PyInterpreterState *interp;
if (main_interp) { return (main_interp == PyThreadState_Get()->interp); }
/* No cached value: cache the proper value and try again. */ interp = PyInterpreterState_Head(); while (interp->next) interp = interp->next;
main_interp = interp; assert (main_interp); return psyco_is_main_interp(); }
https://github.com/psycopg/psycopg2/blob/599432552aae4941c2b282e9251330f1357...
I'm not sure that this code is safe. In CPython, iterating on interp->next is protected by a lock:
HEAD_LOCK(); ... HEAD_UNLOCK();
We already expose the main interpreter since Python 3.7: PyInterpreterState_Main(). psycopg can be modified to use directly this function rather than playing black magic with CPython internals.
IMHO it's a good thing that the compilation failed: that such bug is found :-)
Victor
participants (4)
-
Neil Schemenauer
-
Stephane Wirtel
-
Victor Stinner
-
Łukasz Langa