Simon Willison added the comment:
It looks like the relevant test is here:
https://github.com/python/cpython/blob/a1092f62492a3fcd6195bea94eccf8d5a300acb1/Lib/test/test_asyncio/test_locks.py#L722-L727
def test_explicit_lock(self):
lock = asyncio.Lock()
cond
Simon Willison added the comment:
I ran across this issue while trying to use the https://pypi.org/project/janus/
locking library with Python 3.10 - see my issue on their tracker here:
https://github.com/aio-libs/janus/issues/358
--
___
Python
New submission from Simon Willison :
In Python 3.10 it is not possible to instantiate an asyncio.Condition that
wraps an asyncio.Lock without raising a "loop argument must agree with lock"
exception.
This code raises that exception:
asyncio.Condition(asyncio.Lock())
This
Change by Simon Willison :
--
keywords: +patch
pull_requests: +22845
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24002
___
Python tracker
<https://bugs.python.org/issu
New submission from Simon Willison :
asyncio.sleep(0) is the recommended idiom for co-operatively yielding control
of the event loop to another task: https://github.com/python/asyncio/issues/284
and https://til.simonwillison.net/python/yielding-in-asyncio
This isn't currently explain
Simon Willison added the comment:
I asked about this on Twitter and got a couple of tips from Google engineers:
https://twitter.com/simonw/status/1258767730263552000
It sounds like a good solution would be to explicitly design the breadcrumbs
using this mechanism:
https
New submission from Simon Willison :
When I search Google for a Python related term (e.g. "sqlite3 row" - see
attached screenshot) I get back two results - one for the Python 2
documentation and one for the Python 3 documentation.
There is currently no indicator which result is
Simon Willison added the comment:
Oh how interesting - yes it looks like this is deliberate behavior introduced
in this commit:
https://github.com/python/cpython/commit/0e3f591aeeef9ed715f8770320f4c4c7332a8794
--
___
Python tracker
<ht
Change by Simon Willison :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue39652>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Simon Willison :
Bit of an obscure bug this one. SQLite allows column names to contain [ and ]
characters, even though those are often used as delimiters in SQLite. Here's
how to create such a database with bash:
```
sqlite3 /tmp/demo.db <
In [5]: cursor.
10 matches
Mail list logo