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())
T
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 explained
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.fetch
= xml.sax.make_parser()
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in
position 32: ordinal not in range(128)
Is it possible to consume utf8 or unicode using xml.dom.pulldom or
should I try something else?
Thanks,
Simon Willison
--
http://mail.python.org/mailman/listinfo
Follow up question: what's the best way of incrementally consuming XML
in Python that's character encoding aware? I have a very large file to
consume but I'd rather not have to fall back to the raw SAX API.
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 30, 4:43 pm, Paul Boddie [EMAIL PROTECTED] wrote:
I can't reproduce this on Python 2.3.6 or 2.4.4 on RHEL 4. Instead, I
get the usual...
('CHARACTERS', DOM Text node Simon\u2019s XM...)
I'm using Python 2.5.1 on OS X Leopard:
$ python
Python 2.5.1 (r251:54863, Feb 4 2008, 21:48:13)
On Jul 30, 4:59 pm, Simon Willison [EMAIL PROTECTED] wrote:
I just tried it out on Python 2.4.2 on an Ubuntu machine and it worked
fine! I guess this must be an OS X Python bug. How absolutely
infuriating.
Some very useful people in #python on Freenode pointed out that my bug
occurs because
?
Thanks,
Simon Willison
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
I have an API design question. I'm writing a function that can either
succeed or fail. Most of the time the code calling the function won't
care about the reason for the failure, but very occasionally it will.
I can see a number of ways of doing this, but none of them feel
aesthetically
Ilias Lazaridis wrote:
[posted publicly to comp.lang.python, with email notification to 6
recipients relevant to the topic]
I have implemented a simple schema evolution support for django, due to
a need for a personal project. Additionally, I've provided an Audit:
17 matches
Mail list logo