<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Objects/weakrefobject.c, branch enum-lost-fixes</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-44720: Don't crash when calling weakref.proxy(not_an_iterator).__next__ (GH-27316) (GH-27324)</title>
<updated>2021-07-24T09:45:13+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2021-07-24T09:45:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=659030c7d56a329c1aa559678f2df15e306215e4'/>
<id>659030c7d56a329c1aa559678f2df15e306215e4</id>
<content type='text'>
(cherry picked from commit 5370f0a82aaa4ba617070d5c71d2b18236096ac0)

Co-authored-by: Dennis Sweeney &lt;36520290+sweeneyde@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 5370f0a82aaa4ba617070d5c71d2b18236096ac0)

Co-authored-by: Dennis Sweeney &lt;36520290+sweeneyde@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-44523: Remove the pass-through for hash() in weakref proxy objects (GH-26950)</title>
<updated>2021-06-29T23:19:06+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2021-06-29T23:19:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=2df13e1211cf420bf6557df02e694bf1653a0ebe'/>
<id>2df13e1211cf420bf6557df02e694bf1653a0ebe</id>
<content type='text'>
(cherry picked from commit e2fea101fd5517f33371b04432842b971021c3bf)

Co-authored-by: Pablo Galindo &lt;Pablogsal@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit e2fea101fd5517f33371b04432842b971021c3bf)

Co-authored-by: Pablo Galindo &lt;Pablogsal@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40523: Add pass-throughs for hash() and reversed() to weakref.proxy objects (GH-19946)</title>
<updated>2020-05-05T21:58:19+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2020-05-05T21:58:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=96074de573f82fc66a2bd73c36905141a3f1d5c1'/>
<id>96074de573f82fc66a2bd73c36905141a3f1d5c1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40268: Remove unused structmember.h includes (GH-19530)</title>
<updated>2020-04-15T00:35:41+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-04-15T00:35:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=4a21e57fe55076c77b0ee454e1994ca544d09dc0'/>
<id>4a21e57fe55076c77b0ee454e1994ca544d09dc0</id>
<content type='text'>
If only offsetof() is needed: include stddef.h instead.

When structmember.h is used, add a comment explaining that
PyMemberDef is used.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If only offsetof() is needed: include stddef.h instead.

When structmember.h is used, add a comment explaining that
PyMemberDef is used.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-39481: Make weakref and WeakSet generic (GH-19497)</title>
<updated>2020-04-14T04:54:40+00:00</updated>
<author>
<name>Ethan Smith</name>
<email>ethan@ethanhs.me</email>
</author>
<published>2020-04-14T04:54:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=8ef875028a3644a329c87ce420a73793e315143f'/>
<id>8ef875028a3644a329c87ce420a73793e315143f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40170: PyObject_GET_WEAKREFS_LISTPTR() becomes a function (GH-19377)</title>
<updated>2020-04-06T12:07:02+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-04-06T12:07:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=38aefc585f60a77d66f4fbe5a37594a488b53474'/>
<id>38aefc585f60a77d66f4fbe5a37594a488b53474</id>
<content type='text'>
Convert the PyObject_GET_WEAKREFS_LISTPTR() macro to a function to
hide implementation details: the macro accessed directly to the
PyTypeObject.tp_weaklistoffset member.

Add _PyObject_GET_WEAKREFS_LISTPTR() static inline function to the
internal C API.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert the PyObject_GET_WEAKREFS_LISTPTR() macro to a function to
hide implementation details: the macro accessed directly to the
PyTypeObject.tp_weaklistoffset member.

Add _PyObject_GET_WEAKREFS_LISTPTR() static inline function to the
internal C API.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-39245: Switch to public API for Vectorcall (GH-18460)</title>
<updated>2020-02-11T16:46:57+00:00</updated>
<author>
<name>Petr Viktorin</name>
<email>encukou@gmail.com</email>
</author>
<published>2020-02-11T16:46:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=ffd9753a944916ced659b2c77aebe66a6c9fbab5'/>
<id>ffd9753a944916ced659b2c77aebe66a6c9fbab5</id>
<content type='text'>
The bulk of this patch was generated automatically with:

    for name in \
        PyObject_Vectorcall \
        Py_TPFLAGS_HAVE_VECTORCALL \
        PyObject_VectorcallMethod \
        PyVectorcall_Function \
        PyObject_CallOneArg \
        PyObject_CallMethodNoArgs \
        PyObject_CallMethodOneArg \
    ;
    do
        echo $name
        git grep -lwz _$name | xargs -0 sed -i "s/\b_$name\b/$name/g"
    done

    old=_PyObject_FastCallDict
    new=PyObject_VectorcallDict
    git grep -lwz $old | xargs -0 sed -i "s/\b$old\b/$new/g"

and then cleaned up:

- Revert changes to in docs &amp; news
- Revert changes to backcompat defines in headers
- Nudge misaligned comments
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The bulk of this patch was generated automatically with:

    for name in \
        PyObject_Vectorcall \
        Py_TPFLAGS_HAVE_VECTORCALL \
        PyObject_VectorcallMethod \
        PyVectorcall_Function \
        PyObject_CallOneArg \
        PyObject_CallMethodNoArgs \
        PyObject_CallMethodOneArg \
    ;
    do
        echo $name
        git grep -lwz _$name | xargs -0 sed -i "s/\b_$name\b/$name/g"
    done

    old=_PyObject_FastCallDict
    new=PyObject_VectorcallDict
    git grep -lwz $old | xargs -0 sed -i "s/\b$old\b/$new/g"

and then cleaned up:

- Revert changes to in docs &amp; news
- Revert changes to backcompat defines in headers
- Nudge misaligned comments
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-39573: Add Py_SET_TYPE() function (GH-18394)</title>
<updated>2020-02-07T08:17:07+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-02-07T08:17:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=d2ec81a8c99796b51fb8c49b77a7fe369863226f'/>
<id>d2ec81a8c99796b51fb8c49b77a7fe369863226f</id>
<content type='text'>
Add Py_SET_TYPE() function to set the type of an object.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add Py_SET_TYPE() function to set the type of an object.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-39573: Use Py_REFCNT() macro (GH-18388)</title>
<updated>2020-02-06T23:38:59+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-02-06T23:38:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=a93c51e3a8e15f1a486d11d5b55a64f3381babe0'/>
<id>a93c51e3a8e15f1a486d11d5b55a64f3381babe0</id>
<content type='text'>
Replace direct acccess to PyObject.ob_refcnt with usage of the
Py_REFCNT() macro.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace direct acccess to PyObject.ob_refcnt with usage of the
Py_REFCNT() macro.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-38395: Fix ownership in weakref.proxy methods (GH-16632)</title>
<updated>2019-10-08T15:30:50+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2019-10-08T15:30:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=10cd00a9e3c22af37c748ea5a417f6fb66601e21'/>
<id>10cd00a9e3c22af37c748ea5a417f6fb66601e21</id>
<content type='text'>
The implementation of weakref.proxy's methods call back into the Python
API using a borrowed references of the weakly referenced object
(acquired via PyWeakref_GET_OBJECT). This API call may delete the last
reference to the object (either directly or via GC), leaving a dangling
pointer, which can be subsequently dereferenced.

To fix this, claim a temporary ownership of the referenced object when
calling the appropriate method. Some functions because at the moment they
do not need to access the borrowed referent, but to protect against
future changes to these functions, ownership need to be fixed in
all potentially affected methods.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The implementation of weakref.proxy's methods call back into the Python
API using a borrowed references of the weakly referenced object
(acquired via PyWeakref_GET_OBJECT). This API call may delete the last
reference to the object (either directly or via GC), leaving a dangling
pointer, which can be subsequently dereferenced.

To fix this, claim a temporary ownership of the referenced object when
calling the appropriate method. Some functions because at the moment they
do not need to access the borrowed referent, but to protect against
future changes to these functions, ownership need to be fixed in
all potentially affected methods.</pre>
</div>
</content>
</entry>
</feed>
