<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Lib/weakref.py, branch master</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-44962: Fix a race in WeakKeyDict, WeakValueDict and WeakSet when two threads attempt to commit the last pending removal (GH-27921)</title>
<updated>2021-08-28T17:07:37+00:00</updated>
<author>
<name>Thomas Grainger</name>
<email>tagrain@gmail.com</email>
</author>
<published>2021-08-28T17:07:37+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=206b21ed9f64fedff67bfea7cf73e423e3e32393'/>
<id>206b21ed9f64fedff67bfea7cf73e423e3e32393</id>
<content type='text'>
Fixes:
Traceback (most recent call last):
  File "/home/graingert/projects/asyncio-demo/demo.py", line 36, in &lt;module&gt;
    sys.exit(main())
  File "/home/graingert/projects/asyncio-demo/demo.py", line 30, in main
    test_all_tasks_threading()
  File "/home/graingert/projects/asyncio-demo/demo.py", line 24, in test_all_tasks_threading
    results.append(f.result())
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 438, in result
    return self.__get_result()
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 390, in __get_result
    raise self._exception
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.10/asyncio/runners.py", line 47, in run
    _cancel_all_tasks(loop)
  File "/usr/lib/python3.10/asyncio/runners.py", line 56, in _cancel_all_tasks
    to_cancel = tasks.all_tasks(loop)
  File "/usr/lib/python3.10/asyncio/tasks.py", line 53, in all_tasks
    tasks = list(_all_tasks)
  File "/usr/lib/python3.10/_weakrefset.py", line 60, in __iter__
    with _IterationGuard(self):
  File "/usr/lib/python3.10/_weakrefset.py", line 33, in __exit__
    w._commit_removals()
  File "/usr/lib/python3.10/_weakrefset.py", line 57, in _commit_removals
    discard(l.pop())
IndexError: pop from empty list

Also fixes:
Exception ignored in: weakref callback &lt;function WeakKeyDictionary.__init__.&lt;locals&gt;.remove at 0x00007fe82245d2e0&gt;
Traceback (most recent call last):
  File "/usr/lib/pypy3/lib-python/3/weakref.py", line 390, in remove
    del self.data[k]
KeyError: &lt;weakref at 0x00007fe76e8d8180; dead&gt;
Exception ignored in: weakref callback &lt;function WeakKeyDictionary.__init__.&lt;locals&gt;.remove at 0x00007fe82245d2e0&gt;
Traceback (most recent call last):
  File "/usr/lib/pypy3/lib-python/3/weakref.py", line 390, in remove
    del self.data[k]
KeyError: &lt;weakref at 0x00007fe76e8d81a0; dead&gt;
Exception ignored in: weakref callback &lt;function WeakKeyDictionary.__init__.&lt;locals&gt;.remove at 0x00007fe82245d2e0&gt;
Traceback (most recent call last):
  File "/usr/lib/pypy3/lib-python/3/weakref.py", line 390, in remove
    del self.data[k]
KeyError: &lt;weakref at 0x000056548f1e24a0; dead&gt;

See: https://github.com/agronholm/anyio/issues/362#issuecomment-904424310
See also: https://bugs.python.org/issue29519

Co-authored-by: Łukasz Langa &lt;lukasz@langa.pl&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes:
Traceback (most recent call last):
  File "/home/graingert/projects/asyncio-demo/demo.py", line 36, in &lt;module&gt;
    sys.exit(main())
  File "/home/graingert/projects/asyncio-demo/demo.py", line 30, in main
    test_all_tasks_threading()
  File "/home/graingert/projects/asyncio-demo/demo.py", line 24, in test_all_tasks_threading
    results.append(f.result())
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 438, in result
    return self.__get_result()
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 390, in __get_result
    raise self._exception
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.10/asyncio/runners.py", line 47, in run
    _cancel_all_tasks(loop)
  File "/usr/lib/python3.10/asyncio/runners.py", line 56, in _cancel_all_tasks
    to_cancel = tasks.all_tasks(loop)
  File "/usr/lib/python3.10/asyncio/tasks.py", line 53, in all_tasks
    tasks = list(_all_tasks)
  File "/usr/lib/python3.10/_weakrefset.py", line 60, in __iter__
    with _IterationGuard(self):
  File "/usr/lib/python3.10/_weakrefset.py", line 33, in __exit__
    w._commit_removals()
  File "/usr/lib/python3.10/_weakrefset.py", line 57, in _commit_removals
    discard(l.pop())
IndexError: pop from empty list

Also fixes:
Exception ignored in: weakref callback &lt;function WeakKeyDictionary.__init__.&lt;locals&gt;.remove at 0x00007fe82245d2e0&gt;
Traceback (most recent call last):
  File "/usr/lib/pypy3/lib-python/3/weakref.py", line 390, in remove
    del self.data[k]
KeyError: &lt;weakref at 0x00007fe76e8d8180; dead&gt;
Exception ignored in: weakref callback &lt;function WeakKeyDictionary.__init__.&lt;locals&gt;.remove at 0x00007fe82245d2e0&gt;
Traceback (most recent call last):
  File "/usr/lib/pypy3/lib-python/3/weakref.py", line 390, in remove
    del self.data[k]
KeyError: &lt;weakref at 0x00007fe76e8d81a0; dead&gt;
Exception ignored in: weakref callback &lt;function WeakKeyDictionary.__init__.&lt;locals&gt;.remove at 0x00007fe82245d2e0&gt;
Traceback (most recent call last):
  File "/usr/lib/pypy3/lib-python/3/weakref.py", line 390, in remove
    del self.data[k]
KeyError: &lt;weakref at 0x000056548f1e24a0; dead&gt;

See: https://github.com/agronholm/anyio/issues/362#issuecomment-904424310
See also: https://bugs.python.org/issue29519

Co-authored-by: Łukasz Langa &lt;lukasz@langa.pl&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Update URLs in comments and metadata to use HTTPS (GH-27458)</title>
<updated>2021-07-30T13:54:46+00:00</updated>
<author>
<name>Noah Kantrowitz</name>
<email>noah@coderanger.net</email>
</author>
<published>2021-07-30T13:54:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=be42c06bb01206209430f3ac08b72643dc7cad1c'/>
<id>be42c06bb01206209430f3ac08b72643dc7cad1c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36144: Add union operators to WeakValueDictionary584 (#19127)</title>
<updated>2020-03-25T01:51:29+00:00</updated>
<author>
<name>Curtis Bucher</name>
<email>cpbucher5@gmail.com</email>
</author>
<published>2020-03-25T01:51:29+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=8f1ed21ecf57cc8b8095d9d1058af2b9b3ed0413'/>
<id>8f1ed21ecf57cc8b8095d9d1058af2b9b3ed0413</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36144: Add union operators to WeakKeyDictionary (#19106)</title>
<updated>2020-03-23T20:49:46+00:00</updated>
<author>
<name>Curtis Bucher</name>
<email>cpbucher5@gmail.com</email>
</author>
<published>2020-03-23T20:49:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=25e580a73c163f472fdeb5489bebef85da21655c'/>
<id>25e580a73c163f472fdeb5489bebef85da21655c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-38761: Register WeakSet as a MutableSet (GH-17104)</title>
<updated>2019-11-11T04:12:04+00:00</updated>
<author>
<name>Raymond Hettinger</name>
<email>rhettinger@users.noreply.github.com</email>
</author>
<published>2019-11-11T04:12:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=84ac4376587e35d16b4d0977c4f330d9d04b690a'/>
<id>84ac4376587e35d16b4d0977c4f330d9d04b690a</id>
<content type='text'>

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-38006: Avoid closure in weakref.WeakValueDictionary (GH-15641)</title>
<updated>2019-09-09T14:55:58+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-09-09T14:55:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=a2af05a0d3f0da06b8d432f52efa3ecf29038532'/>
<id>a2af05a0d3f0da06b8d432f52efa3ecf29038532</id>
<content type='text'>
weakref.WeakValueDictionary defines a local remove() function used as
callback for weak references. This function was created with a
closure.  Modify the implementation to avoid the closure.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
weakref.WeakValueDictionary defines a local remove() function used as
callback for weak references. This function was created with a
closure.  Modify the implementation to avoid the closure.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-37685: Fixed __eq__, __lt__ etc implementations in some classes. (GH-14952)</title>
<updated>2019-08-08T05:42:54+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2019-08-08T05:42:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=662db125cddbca1db68116c547c290eb3943d98e'/>
<id>662db125cddbca1db68116c547c290eb3943d98e</id>
<content type='text'>
They now return NotImplemented for unsupported type of the other operand.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
They now return NotImplemented for unsupported type of the other operand.
</pre>
</div>
</content>
</entry>
<entry>
<title>[3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620)</title>
<updated>2019-06-05T15:22:31+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2019-06-05T15:22:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=142566c028720934325f0b7fe28680afd046e00f'/>
<id>142566c028720934325f0b7fe28680afd046e00f</id>
<content type='text'>
Turn deprecation warnings added in 3.8 into TypeError.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Turn deprecation warnings added in 3.8 into TypeError.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700)</title>
<updated>2019-06-01T08:00:15+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2019-06-01T08:00:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=2085bd0877e17ad4d98a4586d5eabb6faecbb190'/>
<id>2085bd0877e17ad4d98a4586d5eabb6faecbb190</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36542: Allow to overwrite the signature for Python functions. (GH-12705)</title>
<updated>2019-05-06T19:40:27+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2019-05-06T19:40:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=d53cf99dca4605ace4b81b1e585616b3e1b74fa6'/>
<id>d53cf99dca4605ace4b81b1e585616b3e1b74fa6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
