[issue34762] Change contextvars C API to use PyObject

2018-09-27 Thread Yury Selivanov
Yury Selivanov added the comment: Thank you Serhiy, for re-opening this! I've pushed fixes to 3.7 and master branches. -- stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue34762] Change contextvars C API to use PyObject

2018-09-27 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 24cb7de15d3a5979425b281ab4f600f7c2b401f2 by Yury Selivanov in branch '3.7': [3.7] bpo-34762: Update PyContext* refs to PyObject* in asyncio and decimal (GH-9610) https://github.com/python/cpython/commit/24cb7de15d3a5979425b281ab4f600f7c2b401f2

[issue34762] Change contextvars C API to use PyObject

2018-09-27 Thread Yury Selivanov
Change by Yury Selivanov : -- pull_requests: +9008 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34762] Change contextvars C API to use PyObject

2018-09-27 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 994269ccee5574f03cda6b018399347fc52bf330 by Yury Selivanov in branch 'master': bpo-34762: Update PyContext* to PyObject* in asyncio and decimal (GH-9609) https://github.com/python/cpython/commit/994269ccee5574f03cda6b018399347fc52bf330

[issue34762] Change contextvars C API to use PyObject

2018-09-27 Thread Yury Selivanov
Change by Yury Selivanov : -- pull_requests: +9007 stage: resolved -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue34762] Change contextvars C API to use PyObject

2018-09-27 Thread Yury Selivanov
Yury Selivanov added the comment: Right, I'll make a PR. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34762] Change contextvars C API to use PyObject

2018-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps this change caused new compiler warnings: In file included from ./Include/pytime.h:6:0, from ./Include/Python.h:68, from /home/serhiy/py/cpython/Modules/_asynciomodule.c:1:

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: Fixed in master and 3.7. Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: PEP update: https://github.com/python/peps/commit/977a94d1a79b71336568119eb689b277d2ffec80 -- ___ Python tracker ___

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread miss-islington
miss-islington added the comment: New changeset 187f2dd256a917c20bf55954d019fd35fb46ab08 by Miss Islington (bot) in branch '3.7': bpo-34762: Fix contextvars C API to use PyObject* pointer types. (GH-9473) https://github.com/python/cpython/commit/187f2dd256a917c20bf55954d019fd35fb46ab08

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +8890 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 2ec872b31e25cee1f983fe07991fb53f3fd1cbac by Yury Selivanov in branch 'master': bpo-34762: Fix contextvars C API to use PyObject* pointer types. (GH-9473) https://github.com/python/cpython/commit/2ec872b31e25cee1f983fe07991fb53f3fd1cbac

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Ned Deily
Ned Deily added the comment: Since we've already delayed 3.7.1rc cutoff for a few days, let's get it into 3.7.1 if you have the time, Yury. -- ___ Python tracker ___

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Stefan Behnel
Stefan Behnel added the comment: > because Py_buffer isn't a PyObject at all :) It owns a PyObject reference to the buffer owner, though. -- nosy: +scoder ___ Python tracker

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: > > one of the things we want to fix is to eliminate non-PyObject > pointer types from public APIs entirely. > A notable exception is Py_buffer. [1] Right, because Py_buffer isn't a PyObject at all :) > Using PyObject for contextvars makes sense (for the

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Eric Snow
Eric Snow added the comment: > one of the things we want to fix is to eliminate non-PyObject > pointer types from public APIs entirely. A notable exception is Py_buffer. [1] As well, cross-interpreter data must not be PyObject, though that isn't much of an issue (yet). :) At some point it

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: >> We'll need to make a prominent notice in the release notes though. > Something can be added at: https://docs.python.org/dev/whatsnew/3.7.html#notable-changes-in-python-3-7-1 Yeah, thank you for suggestion, I'll do that. I'll also update the PEP, docs in

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread STINNER Victor
STINNER Victor added the comment: > We'll need to make a prominent notice in the release notes though. Something can be added at: https://docs.python.org/dev/whatsnew/3.7.html#notable-changes-in-python-3-7-1 -- ___ Python tracker

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur that the sooner the change is applied, the better it will be for everyone. We'll need to make a prominent notice in the release notes though. -- nosy: +rhettinger ___ Python tracker

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Guido van Rossum
Guido van Rossum added the comment: Let’s change it ASAP. It’s still up to Ned whether to hold up 3.7.1, if he won’t it should go into 3.7.2. On Fri, Sep 21, 2018 at 8:28 AM STINNER Victor wrote: > > STINNER Victor added the comment: > > IMHO it's not too late to change the public C API in

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread STINNER Victor
STINNER Victor added the comment: IMHO it's not too late to change the public C API in Python 3.7.1, since it's a very new API, I don't expect many users, and I only expect compiler warnings nor hard error if existing code pass PyContextVar* instead of PyObject*. I agree that it's way

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Yury Selivanov
Yury Selivanov added the comment: Just to add to this issue: I originally realized that something is wrong with the design when we had a super hard to track memory leak in uvloop, caused by Cython being unable to automatically manage increfs/decrefs for PyContext* pointers. So I do believe

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +8886 stage: -> patch review ___ Python tracker ___ ___

[issue34762] Change contextvars C API to use PyObject

2018-09-21 Thread Yury Selivanov
New submission from Yury Selivanov : Unfortunately, the current C API for PEP 567 has a flaw: it uses non-PyObject pointers. This causes problems with integrating with tools like Cython, where PyObject is special and a lot of machinery recognizes it and manages refcounts correctly. It