mastodon.ar.al is one of the many independent Mastodon servers you can use to participate in the fediverse.
This is my personal fediverse server.

Administered by:

Server stats:

1
active users

#python

78 posts74 participants2 posts today
Benjamin Balder Bach<p>Created a ContextVar and a contextmanager in <a href="https://social.data.coop/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a> in order to block event signals:</p><p>```<br>is_disabled = ContextVar("is_disabled", default=False)</p><p>@contextmanager<br>def disable_events():<br> token = is_disabled.set(True)<br> yield<br> is_disabled.reset(token)</p><p>with disable_events():<br> call_method()<br>```</p><p>BUT! it ended up disabling calls in unrelated processes. The ContextVar isn't what it seems (thread local etc) ⁉️</p><p>Using default gunicorn - I'm wondering if it has something to do with preforking?</p>
Thibaud Colas :django:<p>For people who want to dig deeper on digital emissions –&nbsp;here are extended show notes with tons of links and further references from my podcast appearance on Environment Variables ✨ <a href="https://wagtail.org/blog/open-source-carbon-footprints/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">wagtail.org/blog/open-source-c</span><span class="invisible">arbon-footprints/</span></a> </p><p>It was a lovely chat with <span class="h-card" translate="no"><a href="https://mastodon.social/@mrchrisadams" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>mrchrisadams</span></a></span>. Focused on <span class="h-card" translate="no"><a href="https://fosstodon.org/@django" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>django</span></a></span> and <span class="h-card" translate="no"><a href="https://fosstodon.org/@wagtail" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>wagtail</span></a></span> but I really hope this reaches other open source communities, inspires them to take ownership of their emissions, like how for us <span class="h-card" translate="no"><a href="https://mastodon.social/@mozilla" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>mozilla</span></a></span>’s 2020 reporting of Firefox emissions got us moving.</p><p><a href="https://fosstodon.org/tags/Firefox" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Firefox</span></a> <a href="https://fosstodon.org/tags/Django" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Django</span></a> <a href="https://fosstodon.org/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a></p>
Hackread.com<p>NEW 🚨 <a href="https://mstdn.social/tags/BananaSquad" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>BananaSquad</span></a> is back, hiding data-stealing malware in fake GitHub repos disguised as Python tools. Watch out for suspicious code tricks.</p><p>🔗 <a href="https://hackread.com/banana-squad-data-stealing-malware-github-repositories/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">hackread.com/banana-squad-data</span><span class="invisible">-stealing-malware-github-repositories/</span></a></p><p><a href="https://mstdn.social/tags/CyberSecurity" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CyberSecurity</span></a> <a href="https://mstdn.social/tags/CyberAttack" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CyberAttack</span></a> <a href="https://mstdn.social/tags/GitHub" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>GitHub</span></a> <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/Malware" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Malware</span></a></p>
Alexandre B A Villares<p>Code at: <a href="https://github.com/villares/sketch-a-day/tree/main/2025/sketch_2025_06_19" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/villares/sketch-a-d</span><span class="invisible">ay/tree/main/2025/sketch_2025_06_19</span></a><br>More sketch-a-day: <a href="https://abav.lugaralgum.com/sketch-a-day" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">abav.lugaralgum.com/sketch-a-d</span><span class="invisible">ay</span></a><br>If you like this, support my work: <br><a href="https://www.paypal.com/donate/?hosted_button_id=5B4MZ78C9J724" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">paypal.com/donate/?hosted_butt</span><span class="invisible">on_id=5B4MZ78C9J724</span></a><br><a href="https://liberapay.com/Villares" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">liberapay.com/Villares</span><span class="invisible"></span></a><br><a href="https://wise.com/pay/me/alexandrev562" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">wise.com/pay/me/alexandrev562</span><span class="invisible"></span></a> <a href="https://pynews.com.br/tags/Processing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Processing</span></a> <a href="https://pynews.com.br/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a> <a href="https://pynews.com.br/tags/py5" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>py5</span></a> <a href="https://pynews.com.br/tags/CreativeCoding" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CreativeCoding</span></a></p>
kodegeek<p>Can someone explain to me, like a 2 year old, why everybody uses textwrap.dedent() while inspect.cleandoc() produces better results?</p><p><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/inspect" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>inspect</span></a> <a href="https://fosstodon.org/tags/textwrap" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>textwrap</span></a></p>
Anna Dorofeeva<p>I'm probably a little overexcited, but I've recently learned the basics of <a href="https://mastodon.online/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a> and it feels like being a wizard. You write the programmer's equivalent of "abracadabra" and voila! a stunning graph visualising your research data appears.</p>
JB Lièvremont<p>Or donc, <a href="https://mastodon.social/tags/JeChercheUnJob" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JeChercheUnJob</span></a></p><p>Idéalement, où mes 20+ années d'expérience dans "la tech" au sens large pourraient bénéficier à l'<a href="https://mastodon.social/tags/environnement" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>environnement</span></a>, l'<a href="https://mastodon.social/tags/%C3%A9ducation" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>éducation</span></a>, la <a href="https://mastodon.social/tags/sant%C3%A9" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>santé</span></a>.</p><p>Il y a peu de domaines de la tech qui me font peur. J'ai fait du front, du back, de l'embarqué, du desktop, de l'intégration. </p><p>Je connais très bien l'écosystème <a href="https://mastodon.social/tags/Java" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Java</span></a>, un peu moins <a href="https://mastodon.social/tags/Nodejs" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Nodejs</span></a> et <a href="https://mastodon.social/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a> - et j'apprends vite.</p><p>Je me reconnais à 100% dans cette description des "généralistes experts" : <a href="https://martinfowler.com/articles/expert-generalist.html" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">martinfowler.com/articles/expe</span><span class="invisible">rt-generalist.html</span></a></p>
Elio Campitelli<p>Lovely. I managed to install my fledgling <a href="https://mastodon.social/tags/python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>python</span></a> package and I can use it! Except that only in the vscode terminal. If I open a regular terminal it's not there. Why? I suspect because the vscode terminal is using python 3.10.16 and the regular terminal uses python 3.12.4. Why? Who the fuck knows. Both are using the base conda environment which I assumed was there to ensure a consistent environment. </p><p>Obligatory xkcd</p>
Elio Campitelli<p>I think I need some overview of <a href="https://mastodon.social/tags/python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>python</span></a> packaging. pyOpenSci package guide suggests putting package code in src/pkg, but then if I want to test the package interactively I need to go to src, which is a PITA. Then tests are supposed to be in tests; sensible enough. But then pytest cannot find the package. Am I supposed to install the package before testing? pyOpenSci test guide doesn't say this. It just says that running pytest from the test directory should work </p><p> <a href="https://www.pyopensci.org/python-package-guide/tests/test-types.html#unit-tests" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">pyopensci.org/python-package-g</span><span class="invisible">uide/tests/test-types.html#unit-tests</span></a></p>
ocertat<p>ok, you all were right: uv is pretty great <br><a href="https://mastodon.ocert.at/tags/python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>python</span></a></p>
Alexandre B A Villares<p>Code at: <a href="https://github.com/villares/sketch-a-day/tree/main/2025/sketch_2025_06_18" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/villares/sketch-a-d</span><span class="invisible">ay/tree/main/2025/sketch_2025_06_18</span></a><br>More sketch-a-day: <a href="https://abav.lugaralgum.com/sketch-a-day" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">abav.lugaralgum.com/sketch-a-d</span><span class="invisible">ay</span></a><br>If you like this, support my work: <br><a href="https://www.paypal.com/donate/?hosted_button_id=5B4MZ78C9J724" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">paypal.com/donate/?hosted_butt</span><span class="invisible">on_id=5B4MZ78C9J724</span></a><br><a href="https://liberapay.com/Villares" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">liberapay.com/Villares</span><span class="invisible"></span></a><br><a href="https://wise.com/pay/me/alexandrev562" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">wise.com/pay/me/alexandrev562</span><span class="invisible"></span></a> <a href="https://pynews.com.br/tags/Processing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Processing</span></a> <a href="https://pynews.com.br/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a> <a href="https://pynews.com.br/tags/py5" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>py5</span></a> <a href="https://pynews.com.br/tags/CreativeCoding" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CreativeCoding</span></a></p>
Blender Dumbass ( J.Y.Amihud )<p>From: blenderdumbass . org</p><p>This article is published on a website which is powered by BDServer. And I'm trying to make this website support ActivityPub, so you could for example, subscribe to me from your Mastodon account. Yet it is easier said than done.</p><p>If you have any experience with ActivityPub, web-development or Python, please consider helping me. We have BDServ...</p><p>Read: <a href="https://blenderdumbass.org/articles/please_help_me_with_activity_pub" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">blenderdumbass.org/articles/pl</span><span class="invisible">ease_help_me_with_activity_pub</span></a></p><p><a href="https://mastodon.online/tags/activitypub" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>activitypub</span></a> <a href="https://mastodon.online/tags/fediverse" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>fediverse</span></a> <a href="https://mastodon.online/tags/mastodon" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>mastodon</span></a> <a href="https://mastodon.online/tags/bdserver" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>bdserver</span></a> <a href="https://mastodon.online/tags/python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>python</span></a> <a href="https://mastodon.online/tags/programming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>programming</span></a> <a href="https://mastodon.online/tags/webdev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>webdev</span></a> <a href="https://mastodon.online/tags/federation" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>federation</span></a> <a href="https://mastodon.online/tags/API" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>API</span></a></p>
Owen :python: :rust:<p>Just posted up the video on my recent <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>python</span></a> Adelaide meetup talk on asynchronous programming with asyncio here: <a href="https://youtu.be/Z3gK3ox6s2g?si=8Lckvnf4WPYfxu8K&amp;t=215" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">youtu.be/Z3gK3ox6s2g?si=8Lckvn</span><span class="invisible">f4WPYfxu8K&amp;t=215</span></a></p>
Alex Willmer<p>Several deadlines are approaching for deprecated setuptools features</p><p>30th Aug<br>- bdist_wheel with universal=True</p><p>15th Oct<br>- Running `setup.py test`<br>- subclassing wheel.bdist_wheel</p><p>31st Oct<br>- Running `setup.py &lt;anything&gt;`<br>- setuptools.command.easy_install, setuptools.installer, fetch_build_eggs</p><p>For more info and migration guidence see<br>- <a href="https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">blog.ganssle.io/articles/2021/</span><span class="invisible">10/setup-py-deprecated.html</span></a><br>- <a href="https://packaging.python.org/en/latest/guides/modernize-setup-py-project/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">packaging.python.org/en/latest</span><span class="invisible">/guides/modernize-setup-py-project/</span></a></p><p>Thanks to PyPA and everyone involved for their dedication and hard slog.</p><p><a href="https://social.moreati.org.uk/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a></p>
Jaap-Henk Hoepman 🟥 ⬜️ 🟩 ⬛️<p>In <a href="https://someone.elses.computer/tags/python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>python</span></a> you can refer to a global variable v in a different module M as M.v. But you can't in module M itself. This is annoying (and feels inconsistent to me). There is a solution though: import M in M itself. Then M.v is defined in M too!</p><p>For example, if `M.py` contains:</p><p>```<br>import M</p><p>a = 10</p><p>def test():<br> M.a = 20</p><p>test()<br>print(a)<br>```</p><p>Then *importing* `M.py` prints 20. (Running it using `python M.py` prints 20 and them 10.)</p>
Alexandre B A Villares<p>Code at: <a href="https://github.com/villares/sketch-a-day/tree/main/2025/sketch_2025_06_17" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/villares/sketch-a-d</span><span class="invisible">ay/tree/main/2025/sketch_2025_06_17</span></a><br>More sketch-a-day: <a href="https://abav.lugaralgum.com/sketch-a-day" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">abav.lugaralgum.com/sketch-a-d</span><span class="invisible">ay</span></a><br>If you like this, support my work: <br><a href="https://www.paypal.com/donate/?hosted_button_id=5B4MZ78C9J724" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">paypal.com/donate/?hosted_butt</span><span class="invisible">on_id=5B4MZ78C9J724</span></a><br><a href="https://liberapay.com/Villares" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">liberapay.com/Villares</span><span class="invisible"></span></a><br><a href="https://wise.com/pay/me/alexandrev562" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">wise.com/pay/me/alexandrev562</span><span class="invisible"></span></a> <a href="https://pynews.com.br/tags/Processing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Processing</span></a> <a href="https://pynews.com.br/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a> <a href="https://pynews.com.br/tags/py5" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>py5</span></a> <a href="https://pynews.com.br/tags/CreativeCoding" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CreativeCoding</span></a></p>
Henry³<p>I've updated my Python 3.14 post with the new additions in 3.14.0b3: free-threading is no longer experimental, and concurrent.interpreters has been added! I've added a couple of examples: <a href="https://iscinumpy.dev/post/python-314/#interpreters" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">iscinumpy.dev/post/python-314/</span><span class="invisible">#interpreters</span></a> <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>python</span></a></p>
Talk Python Podcast<p>Latest episode with Christopher Trudeau and host <span class="h-card" translate="no"><a href="https://fosstodon.org/@mkennedy" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>mkennedy</span></a></span> on <a href="https://fosstodon.org/tags/polars" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>polars</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/datascience" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>datascience</span></a> </p><p>#510: 10 Polars Tools and Techniques To Level Up Your Data Science</p><p><a href="https://talkpython.fm/episodes/show/510/10-polars-tools-and-techniques-to-level-up-your-data-science" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">talkpython.fm/episodes/show/51</span><span class="invisible">0/10-polars-tools-and-techniques-to-level-up-your-data-science</span></a></p>
μCodery<p>UV IS NOT A PACKAGING TOOL!! It is just an installer! It is not a build backend, it does not know how to build you some wheels, it only knows how to delegate to other build tools. I can’t believe we are repeating this exact trap that pip fell into almost two decades later.</p><p><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/uv" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>uv</span></a> <a href="https://fosstodon.org/tags/rant" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>rant</span></a></p>
Justin Mayer<p>As my first official act as the new maintainer of the SmartyPants <a href="https://ramble.space/tags/typography" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>typography</span></a> library for <a href="https://ramble.space/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a>, I just released version 2.0.2 with a few modernizations.</p><p>Between maintaining Typogrify and now SmartyPants, it seems I have inherited quite the <a href="https://ramble.space/tags/opensource" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>opensource</span></a> typographical legacy, which I shall endeavor to steward as best as I can 🌟</p><p><a href="https://github.com/justinmayer/smartypants.py/releases/tag/v2.0.2" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/justinmayer/smartyp</span><span class="invisible">ants.py/releases/tag/v2.0.2</span></a></p>