bolha.us is one of the many independent Mastodon servers you can use to participate in the fediverse.
We're a Brazilian IT Community. We love IT/DevOps/Cloud, but we also love to talk about life, the universe, and more. | Nós somos uma comunidade de TI Brasileira, gostamos de Dev/DevOps/Cloud e mais!

Server stats:

254
active users

#asyncio

0 posts0 participants0 posts today
aiohttp<p>Thanks to months of consistent contributions by <br><span class="h-card" translate="no"><a href="https://fosstodon.org/@lysnikolaou" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>lysnikolaou</span></a></span>, all of the mandatory <span class="h-card" translate="no"><a href="https://fosstodon.org/@aio_libs" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>aio_libs</span></a></span> dependencies of <a href="https://fosstodon.org/tags/aiohttp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>aiohttp</span></a> now ship free-threaded variants of <a href="https://fosstodon.org/tags/wheels" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>wheels</span></a>!</p><p>This unblocks doing the same in aiohttp eventually!</p><p>Find a minute to thank him, will you?</p><p><a href="https://fosstodon.org/tags/aio_libs" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>aio_libs</span></a> <a href="https://fosstodon.org/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a> <a href="https://fosstodon.org/tags/Packaging" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Packaging</span></a> <a href="https://fosstodon.org/tags/asyncio" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>asyncio</span></a></p>
Jeffrey04<p><a href="https://kitfucoda.medium.com/writing-a-telegram-bot-in-python-866972ab63f5" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kitfucoda.medium.com/writing-a</span><span class="invisible">-telegram-bot-in-python-866972ab63f5</span></a></p><p>I've just finished writing up a deep dive into building a Telegram bot with a FastAPI web application, and it was quite the journey into asynchronous Python! 🐍</p><p>The project started with a desire to run chatbots across multiple platforms, but quickly evolved into a focused exploration of asyncio. I found myself wrestling with event loops, queues, and the nuances of asyncio.create_task vs. asyncio.to_thread. It became very clear that understanding the difference between concurrency and parallelism is absolutely crucial in this space. Clever scheduling can mitigate blocking, but over-scheduling will inevitably lead to performance issues.</p><p>Architectural considerations became a major focus. I learned firsthand that cramming everything into a single process, while tempting, isn't always the best approach. Separating processes for scalability and future enhancements is something I'll definitely keep in mind for future projects.</p><p>This project was a great learning experience, and I'm looking forward to applying these lessons to future projects. If you're interested in asyncio, webhooks, or building chatbots, I'd love to hear your thoughts!<br><a href="https://hachyderm.io/tags/python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>python</span></a> <a href="https://hachyderm.io/tags/asyncio" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>asyncio</span></a> <a href="https://hachyderm.io/tags/telegrambot" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>telegrambot</span></a> <a href="https://hachyderm.io/tags/fastapi" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>fastapi</span></a> <a href="https://hachyderm.io/tags/webdevelopment" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>webdevelopment</span></a> <a href="https://hachyderm.io/tags/programming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>programming</span></a> <a href="https://hachyderm.io/tags/opentowork" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>opentowork</span></a> <a href="https://hachyderm.io/tags/fedihire" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>fedihire</span></a></p>
Augier (fr & en) 🏴☭<p>Does someone knows a good <a href="https://diaspodon.fr/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a> <a href="https://diaspodon.fr/tags/asyncio" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>asyncio</span></a> shutil alternative? I want to be able to copy entire filesystem trees while tracking and displaying progress and not code this by hand.</p><p>Edit: I'll also accept D-Bus APIs like Udisks2, but Udisks2 doesn't seem to provide this feature.</p><p>Edit 2: anything like an easy-to-use wrapper around something like rsync is fine too, as long as I still get to track and report progress.</p>
Sijmen Mulder<p>To me it seems that user-level threads (like async in C#) and system-level threads are mostly an implementation distinction, a distinction that shouldn't permeate the language as it tends to do. </p><p>Isn't his whole 'blocking vs async' duality is ridiculous if you think about it? In both cases, you wait for something to happen. For a high-level language, by what mechanism that waiting happens can be a runtime concern and exposed through common abstractions (e.g. for futures).</p><p><a href="https://bsd.network/tags/programming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>programming</span></a> <a href="https://bsd.network/tags/asyncio" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>asyncio</span></a></p>
Andrea Peltrin<p>Phenomenal article about Python's long trek from generators to async/await, with examples. <br><a href="https://tenthousandmeters.com/blog/python-behind-the-scenes-12-how-asyncawait-works-in-python/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">tenthousandmeters.com/blog/pyt</span><span class="invisible">hon-behind-the-scenes-12-how-asyncawait-works-in-python/</span></a></p><p><a href="https://functional.cafe/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a> <a href="https://functional.cafe/tags/asyncio" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>asyncio</span></a></p>
Lenny<p>The fact that each and every async function in <a href="https://digitalcourage.social/tags/Rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Rust</span></a> declares what happens when its cancelled is so important and so good!</p><p>I remember how much of a PITA <a href="https://digitalcourage.social/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a>'s <a href="https://digitalcourage.social/tags/asyncio" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>asyncio</span></a> task cancellation was, at least back in the 3.4 times.</p>
The Polish Dispatch<p>I need some obscure python help, fellow mastodonians:</p><p>I have a nested async function inside a regular function.</p><p>I need to test whether to await on it inside a decorator, but neither of `inspect` or `asyncio` helpers work, and .__code__.co_flags do not indicate it being a coroutine/awaitable/...</p><p>Right now I've added a flag to my decorator to manually control wrapped function behavior, but it's just a workaround.</p><p>Any tips? Thanks.</p><p><a href="https://mstdn.social/tags/python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>python</span></a> <a href="https://mstdn.social/tags/asyncio" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>asyncio</span></a> <a href="https://mstdn.social/tags/coroutine" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>coroutine</span></a> <a href="https://mstdn.social/tags/async" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>async</span></a> <a href="https://mstdn.social/tags/programming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>programming</span></a> <a href="https://mstdn.social/tags/fedihelp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>fedihelp</span></a></p>
John-Mark Gurney<p>Just realized that Python's asyncio doesn't map to libev well. It appears (I can't find it in docs, and haven't confirmed in source) that with libev, you can set multiple watches of a specific type on a single FD.</p><p>With asyncio, when you remove a reader/writer, you only specify the fd, implying that you remove all callbacks. I just realized it is undocumented what happens if you call add_{reader,writer} on the same fd, but w/ a different callback. Does it chain? Replace?</p><p><a href="https://flyovercountry.social/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a> <a href="https://flyovercountry.social/tags/asyncio" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>asyncio</span></a></p>
Michael Simons<p>Databases and OS driven by mutual hate… </p><p><a href="https://www.youtube.com/watch?v=vD-0dw4gUhw" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">youtube.com/watch?v=vD-0dw4gUh</span><span class="invisible">w</span></a></p><p><span class="h-card" translate="no"><a href="https://discuss.systems/@andy_pavlo" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>andy_pavlo</span></a></span> at P99 Conf.</p><p><a href="https://mastodon.social/tags/asyncIO" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>asyncIO</span></a> <a href="https://mastodon.social/tags/databases" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>databases</span></a></p>
John-Mark Gurney<p>Actually, I take that back. I can't retire it. The reason is that my async tester does a little more than the default does. Mine adds a timeout and prints out a stack trace of where the function was when it was canceled by the timeout.</p><p>It's easy to end up w/ a deadlock or similar w/ asyncio and this helps catch those failures.</p><p><a href="https://flyovercountry.social/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a> <a href="https://flyovercountry.social/tags/asyncio" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>asyncio</span></a></p>