social.dk-libre.fr is a Fediverse instance that uses the ActivityPub protocol. In other words, users at this host can communicate with people that use software like Mastodon, Pleroma, Friendica, etc. all around the world.

This server runs the snac software and there is no automatic sign-up process.

Search results for tag #python

[?]Python Software Foundation » 🌐
@ThePSF@fosstodon.org

🐍💻 Bandit helps keep Python applications secure, and it’s one of the PSF’s Fiscal Sponsorees! When you donate, you’re supporting the devs & maintainers behind tools that make safer and stronger for everyone.

💛 donate today: psfmember.org/civicrm/contribu

Text: “Support Bandit, a Fiscal Sponsoree of the PSF. Your donations make a difference.” Bandit’s raccoon logo on orange, with a yellow snake and PSF logo.

Alt...Text: “Support Bandit, a Fiscal Sponsoree of the PSF. Your donations make a difference.” Bandit’s raccoon logo on orange, with a yellow snake and PSF logo.

    [?]Hugo van Kemenade » 🌐
    @hugovk@mastodon.social

    🐍🚀 Out now: pylast 7.3.0

    * Add support for Python 3.16
    * Add functionality and CLI to export all your scrobbles:

    python -m pylast export your_username

    github.com/pylast/pylast#expor

    ⚠️ But grab an API key and do it before 1st December:

    support.last.fm/t/api-keys-wil

      [?]Marcus Adams » 🌐
      @gerowen@mastodon.social

      Working on renaming and updating a few odds and ends with another ancient, small project of mine. It's a wireless password generator script written in . I wrote it ages ago before routers started building the functionality in, but I figure it might be a good idea to keep it around anyway as a just-in-case. I used to even include easygui to draw simple graphical windows, but realized it was unnecessary for something this straight forward.

      Link: gitlab.com/gerowen/cipherfi

        [?]PyCon CZ :python: 🇨🇿 » 🌐
        @pyconcz@floss.social

        📞 PyCon CZ 2027 is calling for proposals!

        Come share your ideas with the Czech Python community in Pilsen, 16–18 April 2027!

        🐍 We're looking for talks and workshops on Python, web development, data science, AI, community building and more.

        Beginner-friendly topics and first-time speakers are welcome! Mentorship, financial assistance and free childcare available.

        📅 Deadline: 17 January 2027, 23:59 AoE

        Submit your proposal: cz.pycon.org/2027/cfp/

        PyCon CZ 2027 Call for Proposals graphic on a dark grid background with bright lime-green accents. Large white text reads “Call for proposals” and “Speak at PyCon CZ 2027!” Below are the deadline, 17 January 2027, and an “Apply now!” button. A retro flip phone displays “PyCon CZ is calling” on its screen, surrounded by lightning bolts. The PyCon CZ logo appears in the bottom-left corner.

        Alt...PyCon CZ 2027 Call for Proposals graphic on a dark grid background with bright lime-green accents. Large white text reads “Call for proposals” and “Speak at PyCon CZ 2027!” Below are the deadline, 17 January 2027, and an “Apply now!” button. A retro flip phone displays “PyCon CZ is calling” on its screen, surrounded by lightning bolts. The PyCon CZ logo appears in the bottom-left corner.

          [?]Curated Hacker News » 🤖 🌐
          @CuratedHackerNews@mastodon.social

          Adopting Python 3.15's lazy imports: a 4× faster CLI, and where they didn't help

          namegarage.com/blog/python-3-1

            [?]Project Jupyter » 🌐
            @ProjectJupyter@hachyderm.io

            Compute! Paris is a new annual conference for open source computation and data, and Project Jupyter will be there on Nov 25–26. Thanks to the organizing team for bringing it together.

            Fernando Pérez gives the opening keynote. Planet Jupyter is a full track on the Jupyter ecosystem. A sprint and dev all-hands follow for anyone who wants to build with us.

            Join us in person! Sign up here: compute.events/paris2026/

              [?]PyLadies Zurich » 🌐
              @zurich_pyladies@mastodon.social

              you've missed 2026? no problem: you can now watch the talks online: media.ccc.de/search/?q=swiss+p
              enjoy 🍿

                [?]Curated Hacker News » 🤖 🌐
                @CuratedHackerNews@mastodon.social

                Funkycache: A Python library to cache functions in SQLite

                alexwlchan.net/2026/funkycache/

                  [?]PyCon Sweden » 🌐
                  @pyconsweden@fosstodon.org

                  🐍 IT'S HAPPENING!!

                  PyCon Sweden 2026 is officially open! 🎉

                  So many Pythonistas, all in one place, two days — let's go Stockholm! 🇸🇪💙💛

                  See you in the hallways ✨

                    [?]Graham Dumpleton » 🌐
                    @grahamdumpleton@mastodon.social

                    New post in the Muru series: a toolbar on every page.

                    Under muructl run, Muru can add a development toolbar to each HTML page, with the record it kept of the request behind it: its timings, what it logged, any error, and every request the page went on to make. Nothing is installed into the application, so it works the same for Flask, Django or any WSGI or ASGI app, and since Muru keeps the records itself, it works across multiple worker processes.

                    grahamdumpleton.me/posts/2026/

                      [?]codingjoe :django: :python: » 🌐
                      @codingjoe@fosstodon.org

                      Wanna know which supreme leader gets to read your email?

                      relays.to/domain-check/

                      ,

                        [?]Trey Hunner 🐍 » 🌐
                        @treyhunner@mastodon.social

                        Python Tip #323 (of 365):

                        You're allowed to rely on dictionary order.

                        >>> fruit_counts = {"apple": 2, "banana": 4, "mango": 1}
                        >>> for fruit in fruit_counts:
                        ... print(fruit)
                        ...
                        apple
                        banana
                        mango

                        Dictionaries maintain the insertion order of their keys.

                        🧵 (1/3)

                          [?]Jeff Triplett » 🌐
                          @webology@mastodon.social

                          🎉 Congratulations to this year's Malcolm Tredinnick Memorial Prize award winner, @raffaellasuardini

                          Excellent job, and our community is all the better because of your efforts.

                          djangoproject.com/weblog/2026/

                            [?]Paolo Melchiorre » 🌐
                            @paulox@fosstodon.org

                            [?]Trey Hunner 🐍 » 🌐
                            @treyhunner@mastodon.social

                            “Python's textwrap module has a wrap function for wrapping text.”

                            Read more 👉 pym.dev/wrapping-text/

                              [?]andros » 🌐
                              @andros@activity.andros.dev

                              «A Gopher server in 9 lines of Python»

                              There is no better way to learn a specification than implementing it.

                              https://en.andros.dev/blog/cf3110ec/a-gopher-server-in-9-lines-of-python/

                              #Python #Gopher

                                [?]Python Software Foundation » 🌐
                                @ThePSF@fosstodon.org

                                PSF grants have helped communities worldwide grow for over a decade! 🌍

                                This year, the community helped us reopen grants for a special funding round. Help us bring back more grants in 2027 with your donations and memberships 💝

                                Donate today: donate.python.org/

                                  AodeRelay boosted

                                  [?]Luyin [https://pronouns.page/u/luyin] » 🌐
                                  @luyin@lgbtqia.space

                                  docs.python.org/3/whatsnew/3.1

                                  It's already been a couple of days but I just got around to reading the release notes.

                                  I'm most excited about docs.python.org/3/whatsnew/3.1 - the weird double comprehensions has _always_ given me a headache!

                                    [?]Trey Hunner 🐍 » 🌐
                                    @treyhunner@mastodon.social

                                    Python Tip #322 (of 365):

                                    Remove a key that might not exist with a default pop value.

                                    Do this:
                                    session.pop("username", None)

                                    Not this:
                                    if "username" in session:
                                    del session["username"]

                                    The dictionary pop method deletes a key and returns its value. Like "del", it raises a KeyError for a missing key:

                                    >>> rooms = {"Pink": "Room 403", "Ocean": "Room 205"}
                                    >>> rooms.pop("Garden")
                                    Traceback (most recent call last):
                                    ...
                                    KeyError: 'Garden'

                                    🧵 (1/3)

                                      Rodolphe boosted

                                      [?]shonin » 🌐
                                      @shonin@c.im

                                      [?]Graham Dumpleton » 🌐
                                      @grahamdumpleton@mastodon.social

                                      New post in the Muru series: noticing and responding.

                                      Conditions watch Muru's own figures, such as the share of requests from AI crawlers or the health of a payment service, and can trigger an overlay that responds while the condition holds and ends once it is over, leaving nothing to change back.

                                      It also covers a trap where a response hides its own cause from the condition that triggered it.

                                      grahamdumpleton.me/posts/2026/

                                        [?]Python Software Foundation » 🌐
                                        @ThePSF@fosstodon.org

                                        GitHub will block pull_request_target by default in public repos on Dec 2. It runs with your secrets, so workflows running fork PR code can expose them. Background and guidance is on the Alpha-Omega blog; our post has the overview: pyfound.blogspot.com/2026/11/d

                                          [?]Nyx » 🌐
                                          @nyx@lgbtqia.space

                                          Hey Fedi,

                                          I am losing my . I have been applying for positions but the search is not going well for now. If you know anyone who is hiring please do let me know.
                                          I am a self taught with 10-ish years experience. I have lots of experience in , but also in . I am available starting next month in Germany or remote.

                                          If you don't know, please boost for reach?

                                            [?]Python Software Foundation » 🌐
                                            @ThePSF@fosstodon.org

                                            The PSF’s Developer in Residence program has a real impact on . Targeted funding often covers the roles, but not the less visible supporting roles behind their success. Your donations and memberships keep our DiRs hands-on where they are needed.

                                            Donate today: donate.python.org/

                                            Protecting Python: 400+ PyPI projects ship SBOMs, 13 new Python Security Response Team members, 60+ CVEs. Thanks Seth Larson, Brett Smith, the PSRT.

                                            Alt...Protecting Python: 400+ PyPI projects ship SBOMs, 13 new Python Security Response Team members, 60+ CVEs. Thanks Seth Larson, Brett Smith, the PSRT.

                                              [?]PyCon Sweden » 🌐
                                              @pyconsweden@fosstodon.org

                                              🐍 Tomorrow is the day!!

                                              Stockholm, we're coming for you 🇸🇪

                                              If you're joining us at Clarion Hotel — your bags are (hopefully) packed, your schedule is starred, and your brain is ready for two days of Python, people, and good vibes ✨

                                              See you tomorrow! We have an opening at 9:00 AM — don't be late, our speakers aren't waiting for you to find parking 😄

                                              Can't wait to see you all there 💙💛

                                                [?]paulrickards » 🌐
                                                @paulrickards@mastodon.social

                                                January 2016. Almost 11 years ago since I started using a vintage to learn to keep my programming skills sharp.

                                                This is a video from January 2016 using a HP 7470A drawing a "zentangle."

                                                Alt...A beige pen plotter very quickly shuttling a sheet of white paper back and forth as a pen moves side to side drawing a zentangle.

                                                  AodeRelay boosted

                                                  [?]dr.-ing. ⁡jaseg » 🌐
                                                  @jaseg@chaos.social

                                                  The way PyPI claims packages not built at e.g. github or google but on your on infrastructure are "insecure" IMHO runs counter to where we should be going as an open-source ecosystem. Discriminating against e.g. self-hosted or platforms like in favor of github and google is a bad look in 2026.

                                                    [?]Graham Dumpleton » 🌐
                                                    @grahamdumpleton@mastodon.social

                                                    New post in the Muru series: overlays on a schedule.

                                                    A read-only hour for the nightly backup, a maintenance page on Saturday night, a new release at 9am on Monday. Each change is meant to last a while, and usually lives in a cron job or in someone's memory.

                                                    Muru lays changes like these over a site's configuration, by hand or on a schedule, and takes them away afterwards. A timed cutover is skipped if the new release fails its health check.

                                                    grahamdumpleton.me/posts/2026/

                                                      [?]Velda Kiara » 🌐
                                                      @veldakiara@mastodon.social

                                                      Part 2/2 of my CPython internals series is out! 🐍

                                                      Part 1 followed Python source into tokens. This final article picks up at the PEG parser and follows the AST, symbol tables, code generation, optimisations, bytecode, and the evaluation loop.

                                                      All to explain how 3 lines of Python end up printing `42`. Includes CPython source references and commands you can try yourself.

                                                      veldakiara.com/blog/how-cpytho

                                                        [?]Trey Hunner 🐍 » 🌐
                                                        @treyhunner@mastodon.social

                                                        Python Tip #321 (of 365):

                                                        Loop over dictionary keys explicitly with keys().

                                                        >>> counts = {"computers": 2, "cats": 1, "ducks": 3}
                                                        >>> for name in counts.keys():
                                                        ... print(name)
                                                        ...
                                                        computers
                                                        cats
                                                        ducks

                                                        Looping over a dictionary gives keys (see tip #45), so that keys method call is unnecessary.

                                                        It isn't meaningfully slower: keys returns a view, not a copy.

                                                        mastodon.social/@treyhunner/11

                                                        🧵 (1/2)

                                                          [?]Hugo van Kemenade » 🌐
                                                          @hugovk@mastodon.social

                                                          What's New in Python 3.15:

                                                          resource

                                                          * Add new constants: RLIMIT_NTHR, RLIMIT_UMTXP, RLIMIT_THREADS, RLIM_SAVED_CUR, and RLIM_SAVED_MAX. (Contributed by Serhiy Storchaka.)

                                                          docs.python.org/3.15/whatsnew/

                                                            [?]Python Software Foundation » 🌐
                                                            @ThePSF@fosstodon.org

                                                            As we close out 2026, the PSF is running our annual fundraiser with an important message: Python is for everyone 💛🐍🌏💙

                                                            Your support helps keep open & thriving for everyone, including our 20 incredible Fiscal Sponsorees!

                                                            Donate today 👉 linktr.ee/thepsf

                                                            Cartoon yellow snake printed with “Python is for everyone.” Text: “Join the PSF’s 2026 end-of-year fundraiser & membership drive!” PSF logo at top.

                                                            Alt...Cartoon yellow snake printed with “Python is for everyone.” Text: “Join the PSF’s 2026 end-of-year fundraiser & membership drive!” PSF logo at top.

                                                              [?]Hugo van Kemenade » 🌐
                                                              @hugovk@mastodon.social

                                                              🐍🚀 Out now: PrettyTable 3.19.0

                                                              Displays tabular data in a ASCII table format.

                                                              💧 Drop EOL Python 3.10
                                                              🔧 Fix a couple of bugs, one a regression in 3.18.0

                                                              github.com/prettytable/prettyt

                                                              Non-user facing stuff:

                                                              🔒 Lock GitHub Actions: hugovk.dev/blog/2026/lock-gith
                                                              〰️ Use ubuntu-slim for lightweight jobs
                                                              🪢 prek priorities for parallel performance
                                                              🏎️ Faster mypy and coverage.py

                                                              github.com/prettytable/prettyt

                                                                [?]Hugo van Kemenade » 🌐
                                                                @hugovk@mastodon.social

                                                                Just released! 🚀

                                                                🪑 PrettyTable 3.17.0

                                                                github.com/prettytable/prettyt

                                                                Add support for Python 3.15, drop 3.9, test 3.13t-3.15t
                                                                Set dicts with column-specific config for all column-specific attrs
                                                                Update type hints
                                                                Replace pre-commit with prek
                                                                & more!

                                                                  [?]Hugo van Kemenade » 🌐
                                                                  @hugovk@mastodon.social

                                                                  🐍🚀 Out now: Python 3.15 alpha 7!

                                                                  This is the first one with lazy imports (PEP 810) and frozendict (PEP 814)! Try it out and give us feedback.

                                                                  discuss.python.org/t/python-3-

                                                                  ☃️ Just one alpha left until the feature freeze! Core team: get your PEPs in!

                                                                  PEP810

                                                                    [?]Hugo van Kemenade » 🌐
                                                                    @hugovk@mastodon.social

                                                                    🐍🚀 Out now: the final 3.15 beta, live from the sprints!

                                                                    All the same goodies as beta 3, plus the official macOS installer now also installs the free-threaded `python3.15t` binary.

                                                                    And thanks to 3.16 RM @savannah for helping out!

                                                                    discuss.python.org/t/python-3-

                                                                    People discussions and working on laptops in the EuroPython sprint room.

                                                                    Alt...People discussions and working on laptops in the EuroPython sprint room.

                                                                      [?]Graham Dumpleton » 🌐
                                                                      @grahamdumpleton@mastodon.social

                                                                      New post in the Muru series: scaling to zero.

                                                                      Most Python web servers keep every worker they start, so a server hosting small sites and previews holds memory for applications nobody is using.

                                                                      The Muru daemon first drops an idle release to no workers, keeping the host that has already imported the app, so waking it only needs a fork. When memory matters more, the host stops too.

                                                                      grahamdumpleton.me/posts/2026/

                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                        @treyhunner@mastodon.social

                                                                        Python Tip #320 (of 365):

                                                                        Use "in" to check whether a dictionary has a key.

                                                                        Don't use the get method when you really need a containment check.

                                                                        Do this:
                                                                        if color not in quantities:
                                                                        print(f"Uh oh! There's no value for {color}")

                                                                        Not this:
                                                                        if not quantities.get(color):
                                                                        print(f"Uh oh! There's no value for {color}")

                                                                        More on this:
                                                                        pym.dev/using-dictionaries-in-

                                                                        🧵 (1/3)

                                                                          [?]codingjoe :django: :python: » 🌐
                                                                          @codingjoe@fosstodon.org

                                                                          I wrote a tool to grade you email domain setup… in Django! :)

                                                                          how do you score?

                                                                          relays.to/domain-check/codingj

                                                                            [?]Kaa :linux: 🧶 [she/her (elle)] » 🌐
                                                                            @kfort@social.sciences.re

                                                                            Progéniture commence Python (en maths... bon) et le prof leur fait faire direct des fonctions !! C'est courant de faire ça en maths ? parce que moi, les fonctions, je ne les introduis qu'après bcp d'autres notions (comme les variables, les types, les listes, voir les fichiers...). Ca n'a pas l'air de géner Progéniture, mais à la fois, c'est Progéniture... Je me demande si c'est ok pour les débutant·es de faire ça (je veux dire, s'iels arrivent à comprendre le concept). Des idées ?

                                                                              [?]Joshua Kevins » 🌐
                                                                              @joshuakevins@mastodon.social

                                                                              Am learning and I think the first chapter is done anyone who wants to study with me or offer some ideas the door is open.

                                                                              A screen of termux where I run python commands

                                                                              Alt...A screen of termux where I run python commands

                                                                                Wolf boosted

                                                                                [?]Runtime Arguments » 🌐
                                                                                @RuntimeArguments@hachyderm.io

                                                                                Episode 41 of @RuntimeArguments is live at RuntimeArguments.fm: "Efficiency at Any Scale, with Marlon Dutra". Our first-ever guest! Longtime friend Marlon Dutra of Meta, whom Jim @jammcq met on IRC back in the LTSP days, leads a practical tour of software efficiency, and his case is that it isn't just for huge systems: your code may run on a five-year-old phone, in a car for decades, or up a cloud bill. Efficiency also isn't performance. Make something 20% slower and 10x cheaper, and if nobody notices, that's a win. Measure first (even a text file beats no data), then CPU (big O, hot paths, profilers, CPU time vs. wall time), memory (by Marlon's rough count, about 75% of the cost of a server rack, plus cache lines and locality), I/O (N+1 queries, Parquet, SSD wear) and networking (batch your round trips, and back off exponentially so your retries don't take down your own servers). Wolf @YesJustWolf brings a story of profiling an accidentally quadratic docs build that dropped from 20 minutes to 24 seconds. Marlon's five-line code examples are on our GitHub: github.com/Runtime-Arguments/e. Also: the show has passed 5,000 downloads. Thank you for listening!

                                                                                As always, we want to know what you think:

                                                                                feedback@RuntimeArguments.fm

                                                                                buzzsprout.com/2469780/episode

                                                                                  mmu_man boosted

                                                                                  [?]paulrickards » 🌐
                                                                                  @paulrickards@mastodon.social

                                                                                  A movie clip rendered with hatch shading for pen plotter using .

                                                                                  Alt...A short clip from Blade Runner rendered in a CMYK pen plotter hatch style showing a dark, rainy street with lots of colorful neon. The street is crowded with people with umbrellas.

                                                                                    [?]Debacle [they/he/she/whatever] » 🌐
                                                                                    @debacle@framapiaf.org

                                                                                    Dear , please me:
                                                                                    Is there a converter from syntax to ?
                                                                                    It's probably not hard to write one in , but I don't like to reinvent the wheel.
                                                                                    !

                                                                                      [?]Python Software Foundation » 🌐
                                                                                      @ThePSF@fosstodon.org

                                                                                      Since 2015, the PSF Grants Program has awarded $3M+ to support Pythonistas worldwide. Thanks to you, we reopened in 2026 for a special funding round. Help us bring back more grants in 2027 with donations & memberships 💛💙

                                                                                      Read grantee stories and donate: donate.python.org/

                                                                                      Quote on PSF grant supporting accessible, inclusive spaces for PyCon Chile. Six smiling PyLadies pose by a banner; snake forms a heart.

                                                                                      Alt...Quote on PSF grant supporting accessible, inclusive spaces for PyCon Chile. Six smiling PyLadies pose by a banner; snake forms a heart.

                                                                                        [?]Stephanie [She/her] » 🌐
                                                                                        @stephanie@fosstodon.org

                                                                                        Please I want some more feminine & non-binary energy in my / "blogs to check out" list --> drop rec's??

                                                                                        It's fine to link your own blog and bonus points if self-promotion usually gives you the ick: I explicitly want to hear from you quieter folks lurking around in the django/python communities too.

                                                                                        Also definitely no need to be an exclusively technical blog either; we humans are multi-faceted after all <3

                                                                                          AodeRelay boosted

                                                                                          [?]~/mEDI $ ▍:archlinux: :tux: » 🌐
                                                                                          @mEDI@nerdculture.de

                                                                                          NEF File Manager 1.2 ist da! 🎉

                                                                                          Neu u. a.:
                                                                                          • Admin-Modus: ein Lister bekommt für eine Weile Root-Rechte
                                                                                          • Markdown- & Mermaid-Vorschau
                                                                                          • Flat View: Dateien aus allen Unterordnern in einer Liste
                                                                                          • PDF: Text markieren, durchsuchen, auf Seitenbreite zoomen
                                                                                          • Oberflächensprache in den Einstellungen wählbar
                                                                                          • Viele Fixes, besonders für Windows

                                                                                          codeberg.org/mEDI/nef-filemana

                                                                                            AodeRelay boosted

                                                                                            [?]arosano 🇩🇰 🇮🇱 » 🌐
                                                                                            @arosano@mastodon.bsd.cafe

                                                                                            @stefano Give him an old with and start him learning

                                                                                              [?]Arthur Vuillard » 🌐
                                                                                              @arthru@framapiaf.org

                                                                                              Je viens de libérer 33Go d'espace sur mon disque dur en faisant `rm -rf ~/.virtualenvs`

                                                                                              Le virtualenv le plus ancien datait de 2013

                                                                                                [?]🇺🇦 Sviatoslav Sydorenko » 🌐
                                                                                                @webknjaz@mastodon.social

                                                                                                RE: mastodon.social/@sirosen/11762

                                                                                                📢 @sirosen just cut a new release of — v7.7.0! It's the first one shipped from its new home under the 🎉

                                                                                                $ python3.15 -Im pip install --upgrade pip-tools

                                                                                                🎷➡️ 📦 I wrote up how we moved it out of Jazzband: webknjaz.me/prose/pip-tools-mo

                                                                                                🕰️ And you can find Stephen's account of this at sirosen.net/2026/11/15/pip-too

                                                                                                📝 pip-tools.pypa.io/en/stable/ch

                                                                                                🔏 pypi.org/project/pip-tools/7.7

                                                                                                🐍 📦

                                                                                                👥 github.com/sponsors/sirosen / github.com/sponsors/webknjaz 💰

                                                                                                [?]Stephen Rosen » 🌐
                                                                                                @sirosen@mastodon.social

                                                                                                Yo! pip-tools v7.7.0 is here. It is good. it fixes bugs and it drops old Python and pip versions. It continues to work. It does the same thing it has done for years.

                                                                                                If you want to read about it, I wrote up a retrospective: sirosen.net/2026/11/15/pip-too

                                                                                                And @webknjaz has one as well:
                                                                                                webknjaz.me/prose/pip-tools-mo

                                                                                                We're out here, trying to build friendships and community and software that lasts.

                                                                                                    [?]Graham Dumpleton » 🌐
                                                                                                    @grahamdumpleton@mastodon.social

                                                                                                    New post: Muru: scaling from what the workers report.

                                                                                                    Adding workers when they are all busy isn't new. What the Muru daemon adds is a diagnosis of why requests are waiting, from what the workers report, which can say the answer is more threads, fewer threads because of the GIL, less garbage, not blocking the event loop, or a worker group for one slow endpoint.

                                                                                                    grahamdumpleton.me/posts/2026/

                                                                                                      Bite Code! boosted

                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                      @treyhunner@mastodon.social

                                                                                                      Python Tip #319 (of 365):

                                                                                                      Name your regular expression capture groups.

                                                                                                      Capture groups are neat, but it can be confusing figuring out what the group numbers represent:

                                                                                                      >>> match = re‍.search(r"(\d{2})/(\d{2})/(\d{4})", "from 12/22/1629")
                                                                                                      >>> match[3]
                                                                                                      '1629'

                                                                                                      🧵 (1/3)

                                                                                                        [?]PyData Helsinki » 🌐
                                                                                                        @pydata_helsinki@fosstodon.org

                                                                                                        The next is on Tuesday, 24 November 2026 at Sievo, right next to the Helsinki Central railway station.

                                                                                                        We'll hear how you model the mass movement of a population during an evacuation, why "the average" is a trickier question than it looks, and how to make your algorithms faster, plus one more talk still to be announced.

                                                                                                        And as always, the PyData Helsinki will not leave us alone.

                                                                                                        pydata-helsinki.fi/events/2026

                                                                                                          [?]Mike Driscoll » 🌐
                                                                                                          @driscollis@mastodon.social

                                                                                                          Who's using the walrus operator in lately?

                                                                                                          If you don't know, it's also called an assignment expression.

                                                                                                          Here are some examples:

                                                                                                            [?]Graham Dumpleton » 🌐
                                                                                                            @grahamdumpleton@mastodon.social

                                                                                                            New post: Muru: working with Kubernetes, not around it.

                                                                                                            Kubernetes already handles rollouts, traffic and scaling, so Muru aims to fit in rather than duplicate any of it. The post covers a shutdown delay in place of a preStop hook, restarting and resizing a container in place, autoscaling on busy worker slots rather than CPU, and running migrations as a Job.

                                                                                                            grahamdumpleton.me/posts/2026/

                                                                                                              [?]Johnny Graber » 🌐
                                                                                                              @JGraber@mastodon.social

                                                                                                              Pep boosted

                                                                                                              [?]FSMK » 🌐
                                                                                                              @fsmk_org@mastodon.social

                                                                                                              Remembering Tim Peters (1952–2026), author of the Zen of Python (PEP 20) and creator of Timsort.

                                                                                                              His code shaped a language, and his wisdom inspired a community.

                                                                                                              The code remains. The inspiration lives on. 🕊️

                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                @treyhunner@mastodon.social

                                                                                                                “As the Zen of Python says, explicit is better than implicit.”

                                                                                                                Read more 👉 pym.dev/unnecessary-syntax/

                                                                                                                  [?]Hynek Schlawack » 🌐
                                                                                                                  @hynek@mastodon.social

                                                                                                                  Happy to announce bgt 26.3.0, the best way to reliably run background threads in that comes with only one, but really cool change: easy async work units!

                                                                                                                  github.com/hynek/bgt/releases/

                                                                                                                    [?]Ned Batchelder » 🌐
                                                                                                                    @nedbat@hachyderm.io

                                                                                                                    Jump scare from the Discord server: "pyproject.pdf"

                                                                                                                    :D

                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                      @treyhunner@mastodon.social

                                                                                                                      Python Tip #225 (of 365):

                                                                                                                      Avoid creating local variables that share a name with a global variable.

                                                                                                                      This is called SHADOWING, and it can make for confusing code.

                                                                                                                      Assigning to a variable inside a function normally makes a LOCAL variable:

                                                                                                                      >>> phrase = "Hi!"
                                                                                                                      >>> def set_phrase(name):
                                                                                                                      ... phrase = f"Hello {name}"
                                                                                                                      >>> set_phrase("Trey")
                                                                                                                      >>> phrase
                                                                                                                      'Hi!'

                                                                                                                      The global phrase never changed. The function makes a LOCAL phrase that disappears when it returns.

                                                                                                                      🧵 (1/3)

                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                        @treyhunner@mastodon.social

                                                                                                                        Python Tip #318 (of 365):

                                                                                                                        Don't shadow built-in names like list, sum, and input.

                                                                                                                        Python ALLOWS you to use list as a variable name, but then you can't use the list function from the same scope:

                                                                                                                        >>> list = ["apple", "banana", "cherry"]
                                                                                                                        >>> numbers = list(range(10))
                                                                                                                        Traceback (most recent call last):
                                                                                                                        ...
                                                                                                                        TypeError: 'list' object is not callable

                                                                                                                        🧵 (1/5)

                                                                                                                          [?]Hugo van Kemenade » 🌐
                                                                                                                          @hugovk@mastodon.social

                                                                                                                          Just merged: Python 3.16's http module will support the new HTTP QUERY method from RFC 10008.

                                                                                                                          docs.python.org/dev/whatsnew/3
                                                                                                                          github.com/python/cpython/pull
                                                                                                                          github.com/python/cpython/issu

                                                                                                                          You can test it out in December's 3.16 alpha 3, or build from source.

                                                                                                                            [?]DjangoCon Europe » 🌐
                                                                                                                            @djangoconeurope@fosstodon.org

                                                                                                                            Tomorrow. 👀

                                                                                                                            The DjangoCon Europe 2027 CFP closes on 15 November.

                                                                                                                            Last chance to send us your talk or workshop idea. One final push.

                                                                                                                            You know what to do → pretalx.evolutio.pt/djangocon- 🎤

                                                                                                                              [?]Graham Dumpleton » 🌐
                                                                                                                              @grahamdumpleton@mastodon.social

                                                                                                                              New post: Muru: a better tenant in a container.

                                                                                                                              Running gunicorn or uvicorn in a container usually means doing a lot by hand. Under muructl serve, Muru checks your worker settings against the container's limits, replaces a worker before the container runs out of memory, answers probes on a port of its own, shuts down cleanly on SIGTERM, and runs with a read-only root as any user.

                                                                                                                              grahamdumpleton.me/posts/2026/

                                                                                                                                [?]James Bennett [he/him] » 🌐
                                                                                                                                @ubernostrum@infosec.exchange

                                                                                                                                The latest release of pip supports installing specific dependency groups from a standard lock file, which means I can simplify the last little rough edge of my recommended “boring” dependency management setup. I’ve updated the blog post to cover how it works:

                                                                                                                                b-list.org/weblog/2022/may/13/

                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                  Python Tip #317 (of 365):

                                                                                                                                  For complex substitutions, pass a function to re.sub.

                                                                                                                                  Python's re.sub performs a regular expression substitution, replacing matches with replacement text.

                                                                                                                                  But it'll also take a FUNCTION, which accepts a match object and returns replacement text:

                                                                                                                                  >>> def lowercase_match(match):
                                                                                                                                  ... return match‍.group().lower()
                                                                                                                                  ...
                                                                                                                                  >>> "don't know".title()
                                                                                                                                  "Don'T Know"
                                                                                                                                  >>> re.sub(r"[a-z]'[A-Z]", lowercase_match, "Don'T Know")
                                                                                                                                  "Don't Know"

                                                                                                                                  🧵 (1/3)

                                                                                                                                    [?]Python Software Foundation » 🌐
                                                                                                                                    @ThePSF@fosstodon.org

                                                                                                                                    Curious what the PSF has been up to in 2026? Check out our ✨ fundraiser launch blog post ✨ that includes some of our highlights from 2026! pyfound.blogspot.com/2026/11/p

                                                                                                                                      [?]Python Software Foundation » 🌐
                                                                                                                                      @ThePSF@fosstodon.org

                                                                                                                                      There are 3 ways to join the PSF's 2026 fundraiser:
                                                                                                                                      - Donate directly 🎁
                                                                                                                                      - Become a member 🪪
                                                                                                                                      - Share this post 🔄 bonus points for quote posting with your story!
                                                                                                                                      Learn more and donate: donate.python.org/

                                                                                                                                        [?]Python Software Foundation » 🌐
                                                                                                                                        @ThePSF@fosstodon.org

                                                                                                                                        The PSF's 2026 end-of-year fundraiser is live 🐍🚀

                                                                                                                                        is for everyone—and it takes everyone to keep it thriving. Support the PSF, the Python community, and the language we love.

                                                                                                                                        Join in today 💛💙 donate.python.org/

                                                                                                                                        PSF graphic: cartoon yellow snake printed with “Python is for everyone.” Text: “Join the PSF’s 2026 end-of-year fundraiser & membership drive!”

                                                                                                                                        Alt...PSF graphic: cartoon yellow snake printed with “Python is for everyone.” Text: “Join the PSF’s 2026 end-of-year fundraiser & membership drive!”

                                                                                                                                          [?]Fabien LOISON (FLOZz) » 🌐
                                                                                                                                          @FLOZz@mastodon.social

                                                                                                                                          🚀️ YOGA v1.4.0 released!

                                                                                                                                          This new version adds support of 3.15 and the Assimp library was updated to v6.0.6.

                                                                                                                                          ➡️ github.com/wanadev/yoga/releas

                                                                                                                                          Enjoy! 😁️

                                                                                                                                            [?]Graham Dumpleton » 🌐
                                                                                                                                            @grahamdumpleton@mastodon.social

                                                                                                                                            New post: Muru: canaries without a service mesh.

                                                                                                                                            Starting a new release beside the old one protects you from a release which can't start, but not from one which starts fine and then fails some of its requests. Under the Muru daemon, a new release can be given a share of the traffic, judged against the release already serving, and rolled back by itself if it does worse.

                                                                                                                                            grahamdumpleton.me/posts/2026/

                                                                                                                                              [?]Hynek Schlawack » 🌐
                                                                                                                                              @hynek@mastodon.social

                                                                                                                                              To rid myself of the new incomplete provenance red badge of shame on PyPI, here's argon2-cffi-bindings 26.2.0!

                                                                                                                                              As a bonus it comes with stable ABI drivers for free-threaded Python 3.15 and later.

                                                                                                                                              Special thanks to Kraken, Privacy Solutions GmbH and Klaviyo for supporting me as Dedicated Organization tier patrons! 💛 I can't stress enough how important the support of every single sponsor (💖 github.com/sponsors/hynek/ 💖) is for unpleasant work like this.

                                                                                                                                              github.com/hynek/argon2-cffi-b

                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                “Some code is unnecessary but not unhelpful.”

                                                                                                                                                Read more 👉 pym.dev/unnecessary-syntax/

                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                  Python Tip #316 (of 365):

                                                                                                                                                  Time code with time.perf_counter.

                                                                                                                                                  Do this:
                                                                                                                                                  from time import perf_counter

                                                                                                                                                  start = perf_counter()
                                                                                                                                                  process(data)
                                                                                                                                                  elapsed = perf_counter() - start

                                                                                                                                                  Not this:
                                                                                                                                                  from time import time

                                                                                                                                                  start = time()
                                                                                                                                                  process(data)
                                                                                                                                                  elapsed = time() - start

                                                                                                                                                  time.time returns the current time, as the operating system's clock reports it. That clock can be adjusted while your code runs (by your OS syncing it for example).

                                                                                                                                                  🧵 (1/3)

                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                    🐍🚀 Out now: Humanize 4.17.0

                                                                                                                                                    Does stuff like duration into "3 minutes ago".

                                                                                                                                                    github.com/python-humanize/hum

                                                                                                                                                    🇱🇰 Add Sinhala (si_LK) locale
                                                                                                                                                    🔄 Add support for Python 3.16, drop EOL 3.10
                                                                                                                                                    🧰 Fix 20 bugs

                                                                                                                                                    ⛔ Doesn't include 36 closed PRs, mostly LLM stuff. Many of which were duplicate PRs of other PRs.

                                                                                                                                                    github.com/python-humanize/hum

                                                                                                                                                    It's not so much fun when your project is an example in agentic repos. Surprise, people just run the command and open another dupe!

                                                                                                                                                    github.com/python-humanize/hum

                                                                                                                                                      [?]Graham Dumpleton » 🌐
                                                                                                                                                      @grahamdumpleton@mastodon.social

                                                                                                                                                      New post: "Muru: releases, not restarts"

                                                                                                                                                      With gunicorn or mod_wsgi, a deploy usually means new code over the old and a reload. Under the Muru daemon each deploy is a release of its own, started beside the one serving. Traffic moves once it is ready, and the old release is kept warm, so rolling back is a routing change. The daemon itself can even be restarted without the releases noticing.

                                                                                                                                                      grahamdumpleton.me/posts/2026/

                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                        Python Tip #315 (of 365):

                                                                                                                                                        Don't reach for random.random.

                                                                                                                                                        Need a random integer? Don't multiply a random float and convert the result. The randint function does that more directly.

                                                                                                                                                        Do this:
                                                                                                                                                        random.randint(1, 6)

                                                                                                                                                        Not this:
                                                                                                                                                        int(random.random() * 6) + 1

                                                                                                                                                        In JavaScript, Math.random is the random number generation utility. Need a random integer? Use Math.random. Need a random item from an array? Use Math.random.

                                                                                                                                                        More on this:
                                                                                                                                                        pym.dev/random-numbers/

                                                                                                                                                        🧵 (1/3)

                                                                                                                                                          [?]Lobsters » 🤖 🌐
                                                                                                                                                          @lobsters@mastodon.social

                                                                                                                                                          [?]Marcos Dione » 🌐
                                                                                                                                                          @mdione@en.osm.town

                                                                                                                                                          RE: mastodon.social/@glyph/1175963

                                                                                                                                                          Glyph is right, but beware of this:

                                                                                                                                                          ```
                                                                                                                                                          In [1]: a = 'foo'

                                                                                                                                                          In [2]: type(a)
                                                                                                                                                          Out[2]: str

                                                                                                                                                          In [3]: b = a[0]

                                                                                                                                                          In [4]: type(b)
                                                                                                                                                          Out[4]: str

                                                                                                                                                          In [5]: s = a.encode()

                                                                                                                                                          In [6]: type(s)
                                                                                                                                                          Out[6]: bytes

                                                                                                                                                          In [7]: t = s[0]

                                                                                                                                                          In [8]: type(t)
                                                                                                                                                          Out[8]: int
                                                                                                                                                          ```

                                                                                                                                                          I mean, `Out[4]`.

                                                                                                                                                          [?]Glyph » 🌐
                                                                                                                                                          @glyph@mastodon.social

                                                                                                                                                          @thecybersecguru as I am reading this, the most basic type annotation possible would have caught this bug (you’ll get an int, not a bytes!) not to mention testing. how on earth did this make it through an audit

                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                              “In Python, the syntax for calling a function is the same as the syntax for making a new class instance.”

                                                                                                                                                              Read more 👉 pym.dev/class-or-function/

                                                                                                                                                                [?]The CyberSec Guru » 🤖 🌐
                                                                                                                                                                @thecybersecguru@mastox.eu

                                                                                                                                                                How a 1-line Python bug destroyed 18 months of security audit trust, forced a major Certificate Authority (CA) to shut down its public TLS business, and turned 384-bit crypto keys into single-byte integers you could brute-force in microseconds.

                                                                                                                                                                eMudhra's custom key-migration script:key_bytes[0] instead of a full slice or 48-byte buffer. Modern HSMs didn't fail. Cryptography didn't break. The bug sliced off all but the FIRST byte of 48-byte ECDSA private scalars, generating "compromised" 8-bit keys like 4, 56, and 155. Anyone with the public key could reverse-engineer the private key in milliseconds. 🤯

                                                                                                                                                                Worst part? They operated like this for 18 months through TWO WebTrust audits. It only got caught because of a third-party researcher.

                                                                                                                                                                Read the absolute madness of how it went down ⬇️ thecybersecguru.com/news/emudh

                                                                                                                                                                  9x0rg boosted

                                                                                                                                                                  [?]paulrickards » 🌐
                                                                                                                                                                  @paulrickards@mastodon.social

                                                                                                                                                                  Back in 2021, I created this animation that shows the differential growth of disinformation on Twitter.

                                                                                                                                                                  Edit: removed audio track so it plays like a GIF, I think?

                                                                                                                                                                  Alt...Animation that starts with the words disinformation in an outlined Helvetica font. The shapes of the letters begin to grow, turn, and fold upon one another looking like coral. The growth ends as it fills a boundary in the shape of the Twitter bird logo.

                                                                                                                                                                    [?]codingjoe :django: :python: » 🌐
                                                                                                                                                                    @codingjoe@fosstodon.org

                                                                                                                                                                    Another day, another supply chain attack. This time, the edition. We'll never catch a break… 😮‍💨

                                                                                                                                                                    github.com/jazzband/help/issue

                                                                                                                                                                      [?]PyCon Sweden » 🌐
                                                                                                                                                                      @pyconsweden@fosstodon.org

                                                                                                                                                                      🐍 CALL FOR VOLUNTEERS — PyCon Sweden 2026!

                                                                                                                                                                      8 days to go and we need YOU! PyCon Sweden is built entirely by passionate volunteers — no corporate machine, just people who love this community.

                                                                                                                                                                      ✅ Free conference access
                                                                                                                                                                      ✅ Behind the scenes of a real community event
                                                                                                                                                                      ✅ No experience needed — just enthusiasm!

                                                                                                                                                                      📩 info@pycon.se or DM us!

                                                                                                                                                                      Nov 19–20 | Stockholm 🇸🇪

                                                                                                                                                                        [?]Graham Dumpleton » 🌐
                                                                                                                                                                        @grahamdumpleton@mastodon.social

                                                                                                                                                                        Had another fun day of programming today. A month into building Muru with AI, seven days a week, and I can't remember the last time something was engaging, fulfilling and fun all at the same time. I still get out for a walk and do the gardening too.

                                                                                                                                                                        I wrote about why it feels like a lifestyle choice as I edge towards retirement. If Muru sounds like something you would use, I would love to hear what you need from it.

                                                                                                                                                                        grahamdumpleton.me/posts/2026/

                                                                                                                                                                          Jason boosted

                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                          Python Tip #314 (of 365):

                                                                                                                                                                          Split on multiple separators with re.split.

                                                                                                                                                                          >>> import re
                                                                                                                                                                          >>> tags = "python;regex,strings"
                                                                                                                                                                          >>> re.split(r'[,;]', tags)
                                                                                                                                                                          ['python', 'regex', 'strings']

                                                                                                                                                                          The string split method can split on only one separator string.

                                                                                                                                                                          The re.split function splits on a regular expression, which makes it great for splitting on multiple separators.

                                                                                                                                                                          🧵 (1/2)

                                                                                                                                                                            [?]Graham Dumpleton » 🌐
                                                                                                                                                                            @grahamdumpleton@mastodon.social

                                                                                                                                                                            Many WSGI apps eventually need websockets, which usually means running a separate ASGI server behind a proxy, or porting everything to ASGI.

                                                                                                                                                                            In the latest Muru post, a Flask view instead hands the request to an ASGI application in the same worker, so it can still check the user is logged in first. I also cover mounting ASGI beside WSGI and serving gRPC.

                                                                                                                                                                            grahamdumpleton.me/posts/2026/

                                                                                                                                                                              [?]Graham Dumpleton » 🌐
                                                                                                                                                                              @grahamdumpleton@mastodon.social

                                                                                                                                                                              Many WSGI apps eventually need websockets, which usually means running a separate ASGI server behind a proxy, or porting everything to ASGI.

                                                                                                                                                                              In the latest Muru post, a Flask view instead hands the request to an ASGI application in the same worker, so it can still check the user is logged in first. I also cover mounting ASGI beside WSGI and serving gRPC.

                                                                                                                                                                              grahamdumpleton.me/posts/2026/

                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                “The Car class isn't technically a subclass of Goose, but it's seen as a sort of virtual subclass.”

                                                                                                                                                                                Read more 👉 pym.dev/goose-typing/

                                                                                                                                                                                  [?]Python Software Foundation » 🌐
                                                                                                                                                                                  @ThePSF@fosstodon.org

                                                                                                                                                                                  The November edition of the PSF Board Office Hour is about to begin 🐍 🗒️ 2 PM UTC. Join us to share how we can help your community, express your perspectives, and provide feedback for the PSF!
                                                                                                                                                                                  pyfound.blogspot.com/2026/10/m

                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                    Python Tip #313 (of 365):

                                                                                                                                                                                    Don't use match-case as a switch statement.

                                                                                                                                                                                    Do this:
                                                                                                                                                                                    if day in ("saturday", "sunday"):
                                                                                                                                                                                    return "weekend"
                                                                                                                                                                                    else:
                                                                                                                                                                                    return "weekday"

                                                                                                                                                                                    Not this:
                                                                                                                                                                                    match day:
                                                                                                                                                                                    case "saturday" | "sunday":
                                                                                                                                                                                    return "weekend"
                                                                                                                                                                                    case _:
                                                                                                                                                                                    return "weekday"

                                                                                                                                                                                    The match version adds indentation and doesn't even rely on the "structural" part of structural pattern matching.

                                                                                                                                                                                    More on this:
                                                                                                                                                                                    pym.dev/switch-case-in-python/

                                                                                                                                                                                    🧵 (1/2)

                                                                                                                                                                                      [?]Graham Dumpleton » 🌐
                                                                                                                                                                                      @grahamdumpleton@mastodon.social

                                                                                                                                                                                      Most Python web applications are developed over plain HTTP and deployed behind HTTPS, so Secure cookies, HTTP/2 and generated URLs only get properly exercised once deployed. Testing that locally usually means a proxy and a certificate to set up, which few people bother with.

                                                                                                                                                                                      With a Muru development run you add --https and it generates the certificate for you. If you use mkcert your browser already trusts it, and there is no proxy to configure.

                                                                                                                                                                                      grahamdumpleton.me/posts/2026/

                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                        “For example, what if you wanted to launch another program from within Python, pass it inputs, and then capture its output?”

                                                                                                                                                                                        Read more 👉 pym.dev/running-subprocesses-i

                                                                                                                                                                                          [?]Marsh Ray » 🌐
                                                                                                                                                                                          @marshray@infosec.exchange

                                                                                                                                                                                          question: I have a couple of scripts (custom commands for building Rust projects). They don't rely on any pip dependencies, but there's a dir with a few modules.
                                                                                                                                                                                          An installation step should be unnecessary and I have no need to distribute this via PyPI. Inclusion as a git submodule under the projects where they're needed seems sufficient.
                                                                                                                                                                                          I'm not stuck, but I thought I'd ask in case anyone had advice or similar examples?

                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                            Python Tip #312 (of 365):

                                                                                                                                                                                            Use the "utf-8-sig" encoding for CSV files.

                                                                                                                                                                                            Many CSV files start with an invisible byte order mark (BOM).

                                                                                                                                                                                            When read as "utf-8", the first column name starts with a UTF-8 BOM character:

                                                                                                                                                                                            >>> rows[0]
                                                                                                                                                                                            {'\ufeffdate': '2026-10-01', 'kwh': '12.5'}

                                                                                                                                                                                            🧵 (1/3)

                                                                                                                                                                                              [?]Graham Dumpleton » 🌐
                                                                                                                                                                                              @grahamdumpleton@mastodon.social

                                                                                                                                                                                              Today's Muru post looks at importing a Python web application once and forking the workers from it, something I always wanted for mod_wsgi daemon mode but couldn't have.

                                                                                                                                                                                              Preloading can quietly break applications that open a socket or start a thread at import time, so Muru checks what the import left behind, falls back to per-worker imports if needed, and tells you what to fix. Processes, threads and free-threaded Python get a look too.

                                                                                                                                                                                              grahamdumpleton.me/posts/2026/

                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                “Python 3.15 also has a big syntax addition: explicit lazy imports.”

                                                                                                                                                                                                Read more 👉 pym.dev/python315/

                                                                                                                                                                                                  Bite Code! boosted

                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                  Python Tip #311 (of 365):

                                                                                                                                                                                                  Make directories with parents and exist_ok.

                                                                                                                                                                                                  Like this:
                                                                                                                                                                                                  pathlib.Path("reports/2026").mkdir(parents=True, exist_ok=True)

                                                                                                                                                                                                  Without "parents=True", the mkdir method raises an exception when parent directories are missing:

                                                                                                                                                                                                  >>> reports = Path("reports/2026")
                                                                                                                                                                                                  >>> reports.mkdir()
                                                                                                                                                                                                  FileNotFoundError: [Errno 2] No such file or directory: 'reports/2026'

                                                                                                                                                                                                  Passing "parents=True" will create missing parent directories.

                                                                                                                                                                                                  🧵 (1/3)

                                                                                                                                                                                                    [?]Graham Dumpleton » 🌐
                                                                                                                                                                                                    @grahamdumpleton@mastodon.social

                                                                                                                                                                                                    New post in my series on Muru: how it fits together.

                                                                                                                                                                                                    It explains the edge, controller, host and workers, and the path a request takes through them. Because each part is separate, each can be replaced without disturbing the others, which is what makes reloads, blue/green deploys and canaries possible. After years of mod_wsgi under Apache, that's what I most wanted to get right.

                                                                                                                                                                                                    grahamdumpleton.me/posts/2026/

                                                                                                                                                                                                      [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                      @hugovk@mastodon.social

                                                                                                                                                                                                      What's New in Python 3.15:

                                                                                                                                                                                                      warnings

                                                                                                                                                                                                      * Improve filtering by module in warnings.warn_explicit() if no module argument is passed. It now tests the module regular expression in the warnings filter not only against the filename with .py stripped, but also against module names constructed starting from different parent directories of the filename (with /__init__.py, .py and, on Windows, .pyw stripped). (Contributed by Serhiy Storchaka.)

                                                                                                                                                                                                      docs.python.org/3.15/whatsnew/

                                                                                                                                                                                                        [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                        @hugovk@mastodon.social

                                                                                                                                                                                                        What's New in Python 3.15:

                                                                                                                                                                                                        Upgraded JIT compiler

                                                                                                                                                                                                        Results from pyperformance suite: 8-9% geometric mean performance improvement over the standard CPython interpreter built with all optimisations enabled on x86-64 Linux.

                                                                                                                                                                                                        On AArch64 macOS, 12-13% speedup over the tail calling interpreter with all optimisations enabled.

                                                                                                                                                                                                        The speedups versus no JIT builds range from roughly 15% slowdown to over 100% speedup on x86-64 Linux and AArch64 macOS.

                                                                                                                                                                                                        docs.python.org/3.15/whatsnew/

                                                                                                                                                                                                          [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                          @hugovk@mastodon.social

                                                                                                                                                                                                          @kfdm @pganssle six has now dropped out of the last week's top 20: pypistats.org/top

                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                            Python Tip #310 (of 365):

                                                                                                                                                                                                            Match objects by their type and attributes with match-case.

                                                                                                                                                                                                            With a Point dataclass:
                                                                                                                                                                                                            >>> point = Point(x=0, y=4)
                                                                                                                                                                                                            >>> match point:
                                                                                                                                                                                                            ... case Point(x=0, y=0):
                                                                                                                                                                                                            ... print("At the origin")
                                                                                                                                                                                                            ... case Point(x=0, y=y):
                                                                                                                                                                                                            ... print(f"On the y-axis at {y}")
                                                                                                                                                                                                            ... case Point(x=x, y=y):
                                                                                                                                                                                                            ... print(f"At ({x}, {y})")
                                                                                                                                                                                                            ...
                                                                                                                                                                                                            On the y-axis at 4

                                                                                                                                                                                                            More on this:
                                                                                                                                                                                                            pym.dev/match-case-parsing-pyt

                                                                                                                                                                                                            🧵 (1/3)

                                                                                                                                                                                                              [?]Julien Palard » 🌐
                                                                                                                                                                                                              @mdk@mamot.fr

                                                                                                                                                                                                              3.14 vient de dépasser 3.10

                                                                                                                                                                                                              3.13 vient de dépasser 3.11

                                                                                                                                                                                                              et dans quelques jours 3.15 dépasse 3.7, ma préférée, tristesse…

                                                                                                                                                                                                              git.afpy.org/mdk/python-versio

                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                Python Tip #309 (of 365):

                                                                                                                                                                                                                Match dictionaries by their keys with match-case.

                                                                                                                                                                                                                >>> response = {"type": "rectangle", "width": 3, "height": 4}
                                                                                                                                                                                                                >>> match response:
                                                                                                                                                                                                                ... case {"type": kind}:
                                                                                                                                                                                                                ... print(f"Object is {kind}")
                                                                                                                                                                                                                ... case {"error": message}:
                                                                                                                                                                                                                ... print(f"Error: {message}")
                                                                                                                                                                                                                ... case _:
                                                                                                                                                                                                                ... print("Unknown response")
                                                                                                                                                                                                                ...
                                                                                                                                                                                                                Object is rectangle

                                                                                                                                                                                                                🧵 (1/3)

                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                  Python Tip #309 (of 365):

                                                                                                                                                                                                                  Match dictionaries by their keys with match-case.

                                                                                                                                                                                                                  >>> response = {"type": "rectangle", "width": 3, "height": 4}
                                                                                                                                                                                                                  >>> match response:
                                                                                                                                                                                                                  ... case {"type": kind}:
                                                                                                                                                                                                                  ... print(f"Object is {kind}")
                                                                                                                                                                                                                  ... case {"error": message}:
                                                                                                                                                                                                                  ... print(f"Error: {message}")
                                                                                                                                                                                                                  ... case _:
                                                                                                                                                                                                                  ... print("Unknown response")
                                                                                                                                                                                                                  ...
                                                                                                                                                                                                                  Object is rectangle

                                                                                                                                                                                                                  🧵 (1/3)

                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                    “Python code is meant to be read and understood by humans as well as the Python interpreter.”

                                                                                                                                                                                                                    Read more 👉 pym.dev/unnecessary-syntax/

                                                                                                                                                                                                                      AodeRelay boosted

                                                                                                                                                                                                                      [?]unterwegssein » 🌐
                                                                                                                                                                                                                      @unterwegssein@mastodon.social

                                                                                                                                                                                                                      CPU-Auslastung in Linux anzuzeigen, geht es auch mit top oder dessen neueren Programme. Aber einen zeitlichen Verlauf dafür gibt es ein anderes Programm.

                                                                                                                                                                                                                      In meinem aktuellen Blogeintrag schreibe ich über dieses Programm und wie man es mit Python kombinieren kann.

                                                                                                                                                                                                                      sven-essen.de/2026/11/05/sysst

                                                                                                                                                                                                                      Mit dem Programm sysstat kann den Prozessor auslesen und mit Python, was in dem angehängten Blogbeitrag beschrieben haben, kann man es auch visuell auslesen. Dazu braucht man bei Python einige Bibliotheken, die Python-Programmierer alle gut kennen.

                                                                                                                                                                                                                      Alt...Mit dem Programm sysstat kann den Prozessor auslesen und mit Python, was in dem angehängten Blogbeitrag beschrieben haben, kann man es auch visuell auslesen. Dazu braucht man bei Python einige Bibliotheken, die Python-Programmierer alle gut kennen.

                                                                                                                                                                                                                        [?]Tim Schilling » 🌐
                                                                                                                                                                                                                        @CodenameTim@mastodon.social

                                                                                                                                                                                                                        On Tuesday Nov 24th, I'll be at IndyPy (hosted by @sixfeetup) presenting "What's new in the Django community?" Spoiler, it's going to consist of a bunch of questions and for each question the audience gets right, I'll make a donation to the DSF. If you like Django, trick questions or snarky, self-deprecating humor, come join!

                                                                                                                                                                                                                        It's a hybrid event, so as long as you're awake you can join in and participate. Please register ahead of time though.

                                                                                                                                                                                                                        meetup.com/indypy/events/31185

                                                                                                                                                                                                                          [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                          @ThePSF@fosstodon.org

                                                                                                                                                                                                                          When the eMudhra Intermediate CA was compromised, the ecosystem had to move fast.

                                                                                                                                                                                                                          Within two days, fixes shipped for certifi, Python, pip, uv, sigstore, virtualenv, conda & more, with PyPI and python.org patched as well.

                                                                                                                                                                                                                          Read how PSF staffing made the difference, and what’s next:
                                                                                                                                                                                                                          pyfound.blogspot.com/2026/11/h

                                                                                                                                                                                                                            [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                            @hugovk@mastodon.social

                                                                                                                                                                                                                            @kfdm @pganssle It's already showing up: six has dropped from the last day's top 20: pypistats.org/top

                                                                                                                                                                                                                            And there's a dip in the daily downloads: pypistats.org/packages/six?smo

                                                                                                                                                                                                                            (Chart with seven-day smoothing to mask the weekend dips, zoomed to exclude the old metadata counts before August: blog.pypi.org/posts/2026-08-31)

                                                                                                                                                                                                                            Daily downloads quantity of six package, by Python major version. Python 3 downloads increase from 26 million at the end of August, to 37 million at the end of October, and have now dipped to 33 million. Python 2 downloads flat almost zero, in relative terms. Downloads for "null", likely unknown Python version, is flat and just a bit above Python 2.

                                                                                                                                                                                                                            Alt...Daily downloads quantity of six package, by Python major version. Python 3 downloads increase from 26 million at the end of August, to 37 million at the end of October, and have now dipped to 33 million. Python 2 downloads flat almost zero, in relative terms. Downloads for "null", likely unknown Python version, is flat and just a bit above Python 2.

                                                                                                                                                                                                                              [?]Paolo Melchiorre » 🌐
                                                                                                                                                                                                                              @paulox@fosstodon.org

                                                                                                                                                                                                                              @wsvincent opened a thread on modernizing Django’s APIs (DEP 0017), and @carlton joined in.

                                                                                                                                                                                                                              I linked my earlier proposal for a pluggable JSON backend. It tackles a different layer, but could be complementary.

                                                                                                                                                                                                                              What should Django handle in core, and what should stay flexible? I’d love your thoughts on both topics in the forum!

                                                                                                                                                                                                                              forum.djangoproject.com/t/a-pa

                                                                                                                                                                                                                                [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                @hugovk@mastodon.social

                                                                                                                                                                                                                                @cinebox Yes:

                                                                                                                                                                                                                                'This way, if you run unaudited code in an environment that cares about FIPS, the code will raise exceptions if it uses a non-valid hash, but during code audit the callsites can be marked clearly as "usedforsecurity=False", and be used as before.

                                                                                                                                                                                                                                'In non-FIPS environments, the flag would be ignored.'
                                                                                                                                                                                                                                github.com/python/cpython/issu

                                                                                                                                                                                                                                  [?]Andrew [He/Him] » 🌐
                                                                                                                                                                                                                                  @cinebox@masto.hackers.town

                                                                                                                                                                                                                                  Huh, I assumed the hashlib’s “usedforsecurity” argument switched it over to some constant-time algorithm, but it seems more like its just there so FIPS-compliant environments can reject weak algorithms?

                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                    Python Tip #308 (of 365):

                                                                                                                                                                                                                                    Match tuple-like data by shape with match-case.

                                                                                                                                                                                                                                    >>> point = (3, 4)
                                                                                                                                                                                                                                    >>> match point:
                                                                                                                                                                                                                                    ... case (x, y):
                                                                                                                                                                                                                                    ... print(f"2D point ({x}, {y})")
                                                                                                                                                                                                                                    ... case (x, y, z):
                                                                                                                                                                                                                                    ... print(f"3D point ({x}, {y}, {z})")
                                                                                                                                                                                                                                    ...
                                                                                                                                                                                                                                    2D point (3, 4)

                                                                                                                                                                                                                                    🧵 (1/3)

                                                                                                                                                                                                                                      [?]Graham Dumpleton » 🌐
                                                                                                                                                                                                                                      @grahamdumpleton@mastodon.social

                                                                                                                                                                                                                                      In my last post I wrote about where Muru, my new Python web hosting project, came from. Now it's time to see it running.

                                                                                                                                                                                                                                      This first look covers development mode: serving a WSGI app with one command, an access log that separates time spent queueing from time spent in your code, and reloads that start a new release beside the old one, so a broken import never takes the server down.

                                                                                                                                                                                                                                      grahamdumpleton.me/posts/2026/

                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                        “There's also now an official way to invent your own sentinel values in Python.”

                                                                                                                                                                                                                                        Read more 👉 pym.dev/python315/

                                                                                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                                                                                          Should you delete Python syntax that isn't strictly necessary?

                                                                                                                                                                                                                                          Not always. An explicit "return None", an "else" after a "return", using the keyword for an argument, and trailing commas are all technically unnecessary, but all of those can make code easier to read and understand.

                                                                                                                                                                                                                                          I just published a new article on different kinds of "unnecessary" syntax in Python and why I often prefer to use these.

                                                                                                                                                                                                                                          The TL;DR: explicit is better than implicit

                                                                                                                                                                                                                                          pym.dev/unnecessary-syntax/

                                                                                                                                                                                                                                            [?]LWN.net » 🌐
                                                                                                                                                                                                                                            @lwn@fedi.lwn.net

                                                                                                                                                                                                                                            [$] Portable Python scripts with dependencies

                                                                                                                                                                                                                                            A basic Python script is portable: it can be copied between machines with little concern about compatibility. A script that depends on third-party packages requires quite a bit mor [...]

                                                                                                                                                                                                                                            lwn.net/Articles/1104646/

                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                              RE: fedi.lwn.net/@lwn/117558707586

                                                                                                                                                                                                                                              I wrote another article for LWN. This one is on maintaining a portable Python script that has third-party dependencies. It's less messy than it used to be.

                                                                                                                                                                                                                                              The article is subscriber-only right now but you can use this link to read it:
                                                                                                                                                                                                                                              lwn.net/SubscriberLink/1104646

                                                                                                                                                                                                                                                [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                We’re excited to welcome Joshua Mcshannon as the PSF’s newest Infrastructure Engineer! Joshua will help support python.org, @pypi, and @pycon US infrastructure and add much-needed on-call redundancy.

                                                                                                                                                                                                                                                Say hello when you see him in the repos 🐍 👋

                                                                                                                                                                                                                                                pyfound.blogspot.com/2026/11/j

                                                                                                                                                                                                                                                  [?]Graham Dumpleton » 🌐
                                                                                                                                                                                                                                                  @grahamdumpleton@mastodon.social

                                                                                                                                                                                                                                                  Twenty years ago the idea for mod_wsgi was taking shape. It did the best it could within the constraints of Apache, but there was always a list of things I wanted to do and couldn't.

                                                                                                                                                                                                                                                  Now on sabbatical, and with AI tools taking on the coding, I've started on Muru, a new system for hosting Python web apps. It handles WSGI, ASGI and gRPC, and is built around what Python apps need in production.

                                                                                                                                                                                                                                                  grahamdumpleton.me/posts/2026/

                                                                                                                                                                                                                                                    [?]Jannis Leidel » 🌐
                                                                                                                                                                                                                                                    @jezdez@publicidentity.net

                                                                                                                                                                                                                                                    RE: publicidentity.net/@jezdez/117

                                                                                                                                                                                                                                                    Quick update on the wind-down work on Jazzband since last week:

                                                                                                                                                                                                                                                    pip-tools has moved to PyPA, wagtailmenus to Wagtail Nest, and sorl-thumbnail back to Mario-César Señoranis.

                                                                                                                                                                                                                                                    Of the 82 projects I'm tracking, 11 are marked as complete, 4 as archived, and 11 are preparing to move. More moves are under discussion, including proposals for Django Commons (27 projects are currently in the preparation or decision phase).

                                                                                                                                                                                                                                                    Thanks to everyone helping!

                                                                                                                                                                                                                                                    [?]Jannis Leidel » 🌐
                                                                                                                                                                                                                                                    @jezdez@publicidentity.net

                                                                                                                                                                                                                                                    I've kicked off the wind-down work on @jazzband and have sent out emails to most (all?) project leads and people involved.

                                                                                                                                                                                                                                                    In case there is a Jazzband project you care about, please check out the dedicated project board and engage: github.com/orgs/jazzband/proje

                                                                                                                                                                                                                                                    -commons

                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                        16 digits of pi not enough?

                                                                                                                                                                                                                                                        >>> import math
                                                                                                                                                                                                                                                        >>> print(math.pi)
                                                                                                                                                                                                                                                        3.141592653589793

                                                                                                                                                                                                                                                        You can ask Python for more digits and it'll tell you a bunch more... and they'll be mostly incorrect!

                                                                                                                                                                                                                                                        >>> print(f"{math.pi:.47f}")
                                                                                                                                                                                                                                                        3.14159265358979311599796346854418516159057617188

                                                                                                                                                                                                                                                        Notice the difference?

                                                                                                                                                                                                                                                        3.141592653589793238462643383279502884197169399

                                                                                                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                                                                                                          Python Tip #307 (of 365):

                                                                                                                                                                                                                                                          Make dataclasses instead of named tuples.

                                                                                                                                                                                                                                                          Do this:
                                                                                                                                                                                                                                                          @dataclass
                                                                                                                                                                                                                                                          class Room:
                                                                                                                                                                                                                                                          name: str
                                                                                                                                                                                                                                                          number: int

                                                                                                                                                                                                                                                          Not this:
                                                                                                                                                                                                                                                          class Room(NamedTuple):
                                                                                                                                                                                                                                                          name: str
                                                                                                                                                                                                                                                          number: int

                                                                                                                                                                                                                                                          The biggest problem with named tuples is that... they're tuples.

                                                                                                                                                                                                                                                          They support ALL tuple behaviors, even concatenation:

                                                                                                                                                                                                                                                          >>> purple = Room("Purple", 301)
                                                                                                                                                                                                                                                          >>> blue = Room("Blue", 401)
                                                                                                                                                                                                                                                          >>> purple + blue
                                                                                                                                                                                                                                                          ('Purple', 301, 'Blue', 401)

                                                                                                                                                                                                                                                          🧵 (1/3)

                                                                                                                                                                                                                                                            [?]Luc Sorel-Giffo » 🌐
                                                                                                                                                                                                                                                            @lucsorelgiffo@floss.social

                                                                                                                                                                                                                                                            une vidéo étonnante où une personne arrive à localiser un extrait d'une vidéo de caméra extérieure de surveillance grâce aux effets doppler de sons d'avion se cachant dans le fond sonore et aux données ouvertes des tracés de vol des avions de ligne : youtube.com/watch?v=UytYrhYLOKI

                                                                                                                                                                                                                                                            La démarche est outillée en Python, mais la vidéo met surtout l'accent sur la compréhension des phénomènes physiques et sur l'OSINT : le renseignement basé sur l'opensource.

                                                                                                                                                                                                                                                              [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                              @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                              We’re excited to welcome Brett Smith as the PSF’s new Security Developer 🐍🔒 Brett joins @sethmlarson and @miketheman to help scale response for the ecosystem.

                                                                                                                                                                                                                                                              pyfound.blogspot.com/2026/10/a

                                                                                                                                                                                                                                                                [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                @hugovk@mastodon.social

                                                                                                                                                                                                                                                                🐍🚀 Out now: UltraJSON 6.1.0

                                                                                                                                                                                                                                                                No functional changes, only in binary wheels released to PyPI.

                                                                                                                                                                                                                                                                9 new:

                                                                                                                                                                                                                                                                GraalPy 3.13:
                                                                                                                                                                                                                                                                macOS arm64
                                                                                                                                                                                                                                                                Linux x86_64 (manylinux_2_28)
                                                                                                                                                                                                                                                                Linux x86_64 (manylinux_2_28)
                                                                                                                                                                                                                                                                Windows x86_64

                                                                                                                                                                                                                                                                PyPy3.12:
                                                                                                                                                                                                                                                                macOS x86_64
                                                                                                                                                                                                                                                                macOS arm64
                                                                                                                                                                                                                                                                Linux x86_64 (manylinux_2_28)
                                                                                                                                                                                                                                                                Linux aarch64 (manylinux_2_28)
                                                                                                                                                                                                                                                                Windows x86_64

                                                                                                                                                                                                                                                                5 changed:

                                                                                                                                                                                                                                                                PyPy 3.11 wheels re-tagged from pp73 to pp80

                                                                                                                                                                                                                                                                3 removed:

                                                                                                                                                                                                                                                                PyPy3.11 wheels that PyPy v8.0 can't target

                                                                                                                                                                                                                                                                github.com/ultrajson/ultrajson

                                                                                                                                                                                                                                                                  [?]DjangoCon Europe » 🌐
                                                                                                                                                                                                                                                                  @djangoconeurope@fosstodon.org

                                                                                                                                                                                                                                                                  🎤 You could be on this stage. Have an idea you've been wanting to share?

                                                                                                                                                                                                                                                                  DjangoCon Europe 2027 is looking for speakers.

                                                                                                                                                                                                                                                                  Your idea doesn't need to be perfect. It just needs to start somewhere. Got a talk in mind? 👀

                                                                                                                                                                                                                                                                  pretalx.evolutio.pt/djangocon-

                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                    Python Tip #306 (of 365):

                                                                                                                                                                                                                                                                    Don't use tuples for list-like data.

                                                                                                                                                                                                                                                                    Do this:
                                                                                                                                                                                                                                                                    colors = ["pink", "purple", "green", "blue"]

                                                                                                                                                                                                                                                                    Not this:
                                                                                                                                                                                                                                                                    colors = ("pink", "purple", "green", "blue")

                                                                                                                                                                                                                                                                    Tuples are TECHNICALLY just immutable lists, but their immutability isn't the primary reason that we use them.

                                                                                                                                                                                                                                                                    We mostly use tuples to distinguish list-like data from tuple-like data.

                                                                                                                                                                                                                                                                    🧵 (1/3)

                                                                                                                                                                                                                                                                      [?]Dan Neuman 🇨🇦 [He/Him] » 🌐
                                                                                                                                                                                                                                                                      @dan613@ottawa.place

                                                                                                                                                                                                                                                                      # programming, AI

                                                                                                                                                                                                                                                                      I don’t know how I feel about this, but I just whipped up a web app using Python and a new tool I had heard about, niceGUI. It’s a clever name. It abstracts away most of the work in setting up a web server, but keeps the logic in Python, which makes it pretty easy for me. You just write in a simple layout container and what controls go in it and you are pretty much done. Unless you want to change the look. Then you are stuck trying to figure out what CSS classes to use because they are defined by other projects, Tailwind and Quasar, which assume you know your way around CSS.

                                                                                                                                                                                                                                                                      While spending an hour searching for answers I found myself on Deepwiki.com. This uses a large language model (they call it Devin) which had already indexed the niceGUI documents and code on the GitHub repository. I had hit a dead end, so I asked it my formatting question. And 10 seconds later it gave me the exact answer, with an explanation, and a couple of examples, plus links to the code. I tried another one, and it answered just as easily, adding to the previous results. I was able to fix my page in with 5 queries, and the answers worked every time.

                                                                                                                                                                                                                                                                      So here’s an example of an LLM that I could check that really helped me in my task. It didn’t write my code, but it simplified my work enormously. Am I wasting resources? I can only hope these LLMs get more efficient over time. China is learning to do this simply because the USA won’t let them use powerful chips. The next year will be interesting.

                                                                                                                                                                                                                                                                        [?]Paolo Melchiorre » 🌐
                                                                                                                                                                                                                                                                        @paulox@fosstodon.org

                                                                                                                                                                                                                                                                        If you're interested in similar stories you can watch the recording of my PyCon US 2026 talk
                                                                                                                                                                                                                                                                        youtu.be/EKayPgbD6J0?is=53oTaj

                                                                                                                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                          “Even though we typically use duck typing in Python, this is one of the few cases where we actually practice strong type-checking.”

                                                                                                                                                                                                                                                                          Read more 👉 pym.dev/when-to-use-notimpleme

                                                                                                                                                                                                                                                                            [?]Paolo Melchiorre » 🌐
                                                                                                                                                                                                                                                                            @paulox@fosstodon.org

                                                                                                                                                                                                                                                                            Another Python project hit by a problem I discussed at PyCon US 2026: AI makes producing reports cheap, while reviewing, validating and fixing them still takes real maintainer time.

                                                                                                                                                                                                                                                                            After 17 years, Andi Albrecht has decided to stop maintaining sqlparse, used by Django and many other projects.

                                                                                                                                                                                                                                                                            Thank you Andi for all these years of work ❤️

                                                                                                                                                                                                                                                                            github.com/andialbrecht/sqlpar

                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                              What's New in Python 3.15:

                                                                                                                                                                                                                                                                              ast

                                                                                                                                                                                                                                                                              * Add color parameter to dump(). If True, the returned string is syntax highlighted using ANSI escape sequences. If False (the default), colored output is always disabled. (Contributed by @stanfromireland.)

                                                                                                                                                                                                                                                                              * The command-line output is now syntax highlighted by default. This can be controlled using environment variables. (Contributed by @stanfromireland.)

                                                                                                                                                                                                                                                                              docs.python.org/3.15/whatsnew/

                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                Python Tip #305 (of 365):

                                                                                                                                                                                                                                                                                Split only as much as you need with maxsplit.

                                                                                                                                                                                                                                                                                Do this:
                                                                                                                                                                                                                                                                                key, value = line.split("=", maxsplit=1)

                                                                                                                                                                                                                                                                                Not this:
                                                                                                                                                                                                                                                                                key, *rest = line.split("=")
                                                                                                                                                                                                                                                                                value = "=".join(rest)

                                                                                                                                                                                                                                                                                Calling split without maxsplit breaks when the value contains the separator:

                                                                                                                                                                                                                                                                                >>> line = "API_KEY=3q2+7w=="
                                                                                                                                                                                                                                                                                >>> key, value = line.split("=")
                                                                                                                                                                                                                                                                                Traceback (most recent call last):
                                                                                                                                                                                                                                                                                ...
                                                                                                                                                                                                                                                                                ValueError: too many values to unpack (expected 2, got 4)

                                                                                                                                                                                                                                                                                🧵 (1/3)

                                                                                                                                                                                                                                                                                  Matt Marcha boosted

                                                                                                                                                                                                                                                                                  [?]Brian Pepple :fedora: :python: » 🌐
                                                                                                                                                                                                                                                                                  @brian@pepple.us

                                                                                                                                                                                                                                                                                  Spent some time this weekend working on izaya, a Django htmx autocomplete widget. I couldn't find an existing one that did what I needed: single and multi-select, relevance ranking and per-lookup access control.

                                                                                                                                                                                                                                                                                  If you're looking for something similar, give it a look. It needs Python 3.14+ and Django 6.0+.

                                                                                                                                                                                                                                                                                  github.com/Metron-Project/izaya

                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                    “Compared to the very slow tracing profiler, the sampling profiler has basically no overhead at all.”

                                                                                                                                                                                                                                                                                    Read more 👉 pym.dev/python315/

                                                                                                                                                                                                                                                                                      [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                      @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                      It's happened! @pganssle has released a new dateutil:

                                                                                                                                                                                                                                                                                      "dateutil 4.0 requires Python 3.11 or later and no longer depends on six."

                                                                                                                                                                                                                                                                                      github.com/dateutil/dateutil/r

                                                                                                                                                                                                                                                                                      PyPI downloads in October: hugovk.dev/top-pypi-packages/

                                                                                                                                                                                                                                                                                      15. python-dateutil 1,126,142,541
                                                                                                                                                                                                                                                                                      16. six 1,096,144,423

                                                                                                                                                                                                                                                                                      Expect six to drop towards zero.

                                                                                                                                                                                                                                                                                      ❯ uvx pipdeptree --reverse -p six
                                                                                                                                                                                                                                                                                      No packages matched using the following patterns: six

                                                                                                                                                                                                                                                                                        [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                        @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                        This , I made 7 releases, when 2 were originally planned for October. Altogether, we made 16 Python releases, when 5 were originally planned. Just 1 of the extras (3.15rc3) was not a security release.

                                                                                                                                                                                                                                                                                        1 x 3.16
                                                                                                                                                                                                                                                                                        4 x 3.15
                                                                                                                                                                                                                                                                                        3 x 3.14
                                                                                                                                                                                                                                                                                        3 x 3.13
                                                                                                                                                                                                                                                                                        2 x 3.12
                                                                                                                                                                                                                                                                                        2 x 3.11
                                                                                                                                                                                                                                                                                        1 x 3.10

                                                                                                                                                                                                                                                                                        Huge thanks to @sovtechfund for supporting my work. Also the other release managers @savannah, @Yhg1s, Pablo, and Ned for all the macOS builds, and @sethmlarson helping coordinate all this security.

                                                                                                                                                                                                                                                                                          [?]paulrickards » 🌐
                                                                                                                                                                                                                                                                                          @paulrickards@mastodon.social

                                                                                                                                                                                                                                                                                          Throw back to 2017, plotting an illustration of a skeleton in three views by J.G. Heck (1852). Plotted on a HP DraftPro DXL (24”x36”).

                                                                                                                                                                                                                                                                                          Happy Halloween! 💀

                                                                                                                                                                                                                                                                                          A large format plot of three skeletons in black ink.

                                                                                                                                                                                                                                                                                          Alt...A large format plot of three skeletons in black ink.

                                                                                                                                                                                                                                                                                          Detail of the head and shoulders of a skeleton as plotted parsley with lines in black ink.

                                                                                                                                                                                                                                                                                          Alt...Detail of the head and shoulders of a skeleton as plotted parsley with lines in black ink.

                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                            Python Tip #257 (of 365):

                                                                                                                                                                                                                                                                                            Consider "import datetime as dt".

                                                                                                                                                                                                                                                                                            The fact that the datetime module and the datetime class are spelled the same way is VERY confusing.

                                                                                                                                                                                                                                                                                            You could use a "from" import:

                                                                                                                                                                                                                                                                                            from datetime import datetime

                                                                                                                                                                                                                                                                                            Now datetime means the class.

                                                                                                                                                                                                                                                                                            But if later on you also want the date class, you're importing that name too, and hoping no local date variable ever shadows it. I definitely use the variable name date, so this is a problem for me.

                                                                                                                                                                                                                                                                                            🧵 (1/3)

                                                                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                              Python Tip #304 (of 365):

                                                                                                                                                                                                                                                                                              Import the whole module when a name isn't clear.

                                                                                                                                                                                                                                                                                              Do this:
                                                                                                                                                                                                                                                                                              import random

                                                                                                                                                                                                                                                                                              color = random.choice(colors)

                                                                                                                                                                                                                                                                                              Not this:
                                                                                                                                                                                                                                                                                              from random import choice

                                                                                                                                                                                                                                                                                              color = choice(colors)

                                                                                                                                                                                                                                                                                              More on this:
                                                                                                                                                                                                                                                                                              pym.dev/4-ways-import-module-p

                                                                                                                                                                                                                                                                                              🧵 (1/3)

                                                                                                                                                                                                                                                                                                [?]Julien Palard » 🌐
                                                                                                                                                                                                                                                                                                @mdk@mamot.fr

                                                                                                                                                                                                                                                                                                Tu habites pas loin de Biarritz, tu fais du Python (ou tu voudrais) ?

                                                                                                                                                                                                                                                                                                Tu ne savais pas que la PyConFR c'était ce week-end ? C'est pas grave : l'événement est gratuit, viens, on gère ton inscription a l'accueil !

                                                                                                                                                                                                                                                                                                pycon.fr/2026/fr/venue.html

                                                                                                                                                                                                                                                                                                (Et fais passer le pouet a tes voisins)

                                                                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                  Python Tip #303 (of 365):

                                                                                                                                                                                                                                                                                                  Remember that strings are iterables of strings.

                                                                                                                                                                                                                                                                                                  Python doesn't have a character type, which usually makes things easier.

                                                                                                                                                                                                                                                                                                  If name is a string, name[0] returns a string, and strings have a lower method:

                                                                                                                                                                                                                                                                                                  >>> name = "Ada"
                                                                                                                                                                                                                                                                                                  >>> name[0].lower()
                                                                                                                                                                                                                                                                                                  'a'

                                                                                                                                                                                                                                                                                                  🧵 (1/6)

                                                                                                                                                                                                                                                                                                    [?]codingjoe :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                    @codingjoe@fosstodon.org

                                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                    Python Tip #302 (of 365):

                                                                                                                                                                                                                                                                                                    Use // instead of truncating with int.

                                                                                                                                                                                                                                                                                                    Do this:
                                                                                                                                                                                                                                                                                                    mid_point = len(sequence) // 2

                                                                                                                                                                                                                                                                                                    Not this:
                                                                                                                                                                                                                                                                                                    mid_point = int(len(sequence) / 2)

                                                                                                                                                                                                                                                                                                    Between two integers, // divides and returns an integer directly.

                                                                                                                                                                                                                                                                                                    It's also a bit more efficient than dividing to get a floating point number and then converting that back to an integer.

                                                                                                                                                                                                                                                                                                    More on this:
                                                                                                                                                                                                                                                                                                    pym.dev/integer-division/

                                                                                                                                                                                                                                                                                                    🧵 (1/2)

                                                                                                                                                                                                                                                                                                      David Gerard boosted

                                                                                                                                                                                                                                                                                                      [?]Edgar Walthert :NoWar: » 🌐
                                                                                                                                                                                                                                                                                                      @eWalthert@typo.social

                                                                                                                                                                                                                                                                                                      „Torvalds’s first publicly released chatbot code was in January this year, when he vibe-coded a project in Python because he didn’t know enough Python. The programming language kids learn in high school. The guy who runs the kernel couldn’t get his head around .“


                                                                                                                                                                                                                                                                                                      @davidgerard

                                                                                                                                                                                                                                                                                                      pivot-to-ai.com/2026/10/14/lin

                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                        “In Python 3.15, the open function uses UTF-8 as its default encoding on every operating system, so a file written on one machine reads the same on every other machine.”

                                                                                                                                                                                                                                                                                                        Read more 👉 pym.dev/python315/

                                                                                                                                                                                                                                                                                                          [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                          @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                          Congratulations to the newest PSF Community Service Award recipients!

                                                                                                                                                                                                                                                                                                          Abhijeet, Elena, @hugovk, @khorn, and @sabderemane have each made lasting contributions to the Python community. From conferences to founding initiatives to education worldwide, their service to the community deserves recognition and celebration!

                                                                                                                                                                                                                                                                                                          pyfound.blogspot.com/2026/10/a

                                                                                                                                                                                                                                                                                                            [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                            @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                            🐍🛡️🎙️ Check out PSF Security Developer in Residence @sethmlarson on the Real Python Podcast!

                                                                                                                                                                                                                                                                                                            Hear about the latest in : LLMs and vulnerability triage, trusted publishing on PyPI, PEP 770 SBOMs, and CI/CD tips.

                                                                                                                                                                                                                                                                                                            realpython.com/podcasts/rpp/31

                                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                              🚀 It's out!

                                                                                                                                                                                                                                                                                                              🥧 Please install and enjoy Python 3.14!

                                                                                                                                                                                                                                                                                                              discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                              Two snakes enjoying a pie with 3.14 on the top and π crimping.

                                                                                                                                                                                                                                                                                                              Alt...Two snakes enjoying a pie with 3.14 on the top and π crimping.

                                                                                                                                                                                                                                                                                                                [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                🐍🚀 Out now: Tablib 3.11.0

                                                                                                                                                                                                                                                                                                                Python Module for Tabular Datasets in XLS, CSV, JSON, YAML, &c.

                                                                                                                                                                                                                                                                                                                Drop EOL Python 3.10
                                                                                                                                                                                                                                                                                                                Fix a bug with lazy imports on 3.15
                                                                                                                                                                                                                                                                                                                A couple of other bugfixes

                                                                                                                                                                                                                                                                                                                Not included:
                                                                                                                                                                                                                                                                                                                16 closed LLM PRs (several duplicating each other)

                                                                                                                                                                                                                                                                                                                github.com/jazzband/tablib/rel

                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                  Forget* about Python 3.14, all the cool kids are trying out Python 3.15.0 alpha 1 (but not on production)! 🚀

                                                                                                                                                                                                                                                                                                                  🔬 PEP 799: A dedicated profiling package for Python profiling tools
                                                                                                                                                                                                                                                                                                                  💬 PEP 686: Python now uses UTF-8 as the default encoding
                                                                                                                                                                                                                                                                                                                  🌊 PEP 782: A new PyBytesWriter C API to create a Python bytes object
                                                                                                                                                                                                                                                                                                                  ⚠️ Better error messages

                                                                                                                                                                                                                                                                                                                  discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                  * Please don't forget about 3.14...

                                                                                                                                                                                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                    Just released! 🚀

                                                                                                                                                                                                                                                                                                                    📜 Python Docs Sphinx Theme, with added Arabic, French, Romanian and Russian translations.

                                                                                                                                                                                                                                                                                                                    github.com/python/python-docs-

                                                                                                                                                                                                                                                                                                                      [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                      @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                      Just released! 🚀

                                                                                                                                                                                                                                                                                                                      🎨 termcolor 3.2.0

                                                                                                                                                                                                                                                                                                                      github.com/termcolor/termcolor

                                                                                                                                                                                                                                                                                                                      🟣 Expose `can_colorize` as public API
                                                                                                                                                                                                                                                                                                                      🟢 Add support for Python 3.15 (🥉 at pyreadiness.org/3.15/)
                                                                                                                                                                                                                                                                                                                      🔴 Drop support for EOLish Python 3.9

                                                                                                                                                                                                                                                                                                                        [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                        @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                        Out now: pepotron 1.6.0, with the new Python 3.16 schedule:

                                                                                                                                                                                                                                                                                                                        ❯ pep 3.16
                                                                                                                                                                                                                                                                                                                        peps.python.org/pep-0826/

                                                                                                                                                                                                                                                                                                                        ❯ pep 8
                                                                                                                                                                                                                                                                                                                        peps.python.org/pep-0008/

                                                                                                                                                                                                                                                                                                                        ❯ pep lazy
                                                                                                                                                                                                                                                                                                                        Score Result
                                                                                                                                                                                                                                                                                                                        90 PEP 810: Explicit lazy imports
                                                                                                                                                                                                                                                                                                                        73 PEP 690: Lazy Imports
                                                                                                                                                                                                                                                                                                                        68 PEP 217: Display Hook for Interactive Use
                                                                                                                                                                                                                                                                                                                        68 PEP 802: Display Syntax for the Empty Set
                                                                                                                                                                                                                                                                                                                        57 PEP 227: Statically Nested Scopes

                                                                                                                                                                                                                                                                                                                        peps.python.org/pep-0810/

                                                                                                                                                                                                                                                                                                                        ❯ uvx pepotron 3.16
                                                                                                                                                                                                                                                                                                                        peps.python.org/pep-0826/

                                                                                                                                                                                                                                                                                                                        mastodon.social/@peps@feedsin.

                                                                                                                                                                                                                                                                                                                          [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                          @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                          🐍🚀 Out now: pylast 7.1.0!

                                                                                                                                                                                                                                                                                                                          pylast is a Python interface to last.fm and libre.fm

                                                                                                                                                                                                                                                                                                                          🎹 Replace HTTPX with HTTPX2
                                                                                                                                                                                                                                                                                                                          🎶 Remove legacy Python 2 code
                                                                                                                                                                                                                                                                                                                          🪇 And five bug fixes

                                                                                                                                                                                                                                                                                                                          github.com/pylast/pylast/relea

                                                                                                                                                                                                                                                                                                                            [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                            @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                            🐍🚀 Out now: Humanize 4.16!

                                                                                                                                                                                                                                                                                                                            Add Latvian language localization
                                                                                                                                                                                                                                                                                                                            Add i18n support for naturalsize() and French translation

                                                                                                                                                                                                                                                                                                                            Performance improvements: 1.07x - 8.4x
                                                                                                                                                                                                                                                                                                                            Lazy imports for Python 3.15+
                                                                                                                                                                                                                                                                                                                            Drop experimental Python 3.13 free-threaded
                                                                                                                                                                                                                                                                                                                            Refactor: simplify scientific() and extract _SUPERSCRIPT_MAP constant

                                                                                                                                                                                                                                                                                                                            And seven assorted bug fixes!

                                                                                                                                                                                                                                                                                                                            github.com/python-humanize/hum

                                                                                                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                              Python Tip #301 (of 365):

                                                                                                                                                                                                                                                                                                                              Don't delete "unnecessary" syntax that makes code more readable.

                                                                                                                                                                                                                                                                                                                              def earliest_date(date1, date2):
                                                                                                                                                                                                                                                                                                                              if parse(date1) < parse(date2):
                                                                                                                                                                                                                                                                                                                              return date1
                                                                                                                                                                                                                                                                                                                              else:
                                                                                                                                                                                                                                                                                                                              return date2

                                                                                                                                                                                                                                                                                                                              We don't necessarily NEED that "else"! We could delete it and outdent that last "return":

                                                                                                                                                                                                                                                                                                                              if parse(date1) < parse(date2):
                                                                                                                                                                                                                                                                                                                              return date1
                                                                                                                                                                                                                                                                                                                              return date2

                                                                                                                                                                                                                                                                                                                              But SHOULD we?

                                                                                                                                                                                                                                                                                                                              More on this:
                                                                                                                                                                                                                                                                                                                              pym.dev/unnecessary-else-state

                                                                                                                                                                                                                                                                                                                              🧵 (1/4)

                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                “In Python, it's not always easy to tell the difference between a class and a function...”

                                                                                                                                                                                                                                                                                                                                Read more 👉 pym.dev/class-or-function/

                                                                                                                                                                                                                                                                                                                                  [?]Mariatta 🤦🏻‍♀️ :python: » 🌐
                                                                                                                                                                                                                                                                                                                                  @mariatta@fosstodon.org

                                                                                                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                  I just launched a new Python Morsels course: Lazy Looping in Python 🔁

                                                                                                                                                                                                                                                                                                                                  Python's "for" loops can only loop forward one item at a time, so we use looping helpers (like zip) to augment our loops.

                                                                                                                                                                                                                                                                                                                                  This course teaches how to build your own looping helpers with generators and iterators.

                                                                                                                                                                                                                                                                                                                                  It also includes a Daily Recall pack: spaced repetition questions that unlock as you progress, so you actually REMEMBER what you learn.

                                                                                                                                                                                                                                                                                                                                  The first section is free.

                                                                                                                                                                                                                                                                                                                                  pym.dev/courses/lazy-looping/o

                                                                                                                                                                                                                                                                                                                                    [?]Nicolas Delsaux » 🌐
                                                                                                                                                                                                                                                                                                                                    @Riduidel@framapiaf.org

                                                                                                                                                                                                                                                                                                                                    Ca a l'air d'une solution sympathique pour aider deux parties du monde qui ne veulent pas trop se parler à se parler bien. github.com/MattHandzel/gdoc-sy

                                                                                                                                                                                                                                                                                                                                      [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                      @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                      Inspired by Astral's tooling, and thanks to Zanie for implementing, the CPython project now has a couple of labels to help us deal with low-quality AI contributions.

                                                                                                                                                                                                                                                                                                                                      If we add "AI-needs-explanation" to a PR or issue, the Bedevere bot will ask the author to explain their changes in their own words, and links to the policy.

                                                                                                                                                                                                                                                                                                                                      "AI-guidelines-not-met" is similar, but also closes it.

                                                                                                                                                                                                                                                                                                                                      discuss.python.org/t/updated-t

                                                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                        Python Tip #300 (of 365):

                                                                                                                                                                                                                                                                                                                                        Separate the steps of a function with blank lines.

                                                                                                                                                                                                                                                                                                                                        If you're using an auto-formatter like ruff or Black, you won't have control over most of your whitespace.

                                                                                                                                                                                                                                                                                                                                        But how you use blank lines within functions is still up to you.

                                                                                                                                                                                                                                                                                                                                        More on this:
                                                                                                                                                                                                                                                                                                                                        pym.dev/embrace-whitespace/

                                                                                                                                                                                                                                                                                                                                        🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                          [?]Internet Deer » 🌐
                                                                                                                                                                                                                                                                                                                                          @Rye@kind.social

                                                                                                                                                                                                                                                                                                                                          I need to maintain a version of python 3.12 locally, indefinitely.
                                                                                                                                                                                                                                                                                                                                          What is the best way to do this, so I can build it on a new system OR docker.

                                                                                                                                                                                                                                                                                                                                            [?]🍂 David Zaslavsky 🍂 » 🌐
                                                                                                                                                                                                                                                                                                                                            @diazona@techhub.social

                                                                                                                                                                                                                                                                                                                                            @Rye If you really mean indefinitely, I would put it in a container (like Docker) now. Both because, as another reply said, you'll probably wind up having to deal with more and more out of date software components as time goes on, and because if your thing gets hacked in the future (which becomes more likely the more out of date components you use), you can probably limit the damage to within the container.

                                                                                                                                                                                                                                                                                                                                            That bring said, I have personally found pyenv to do quite a good job at conveniently installing old Python versions for local use. uv presumably works well too, I just don't have much experience with using it for this purpose.

                                                                                                                                                                                                                                                                                                                                              [?]Anže » 🌐
                                                                                                                                                                                                                                                                                                                                              @anze3db@fosstodon.org

                                                                                                                                                                                                                                                                                                                                              django-tui 26.2 needs no setup 🎉

                                                                                                                                                                                                                                                                                                                                              cd into any Django project and run:

                                                                                                                                                                                                                                                                                                                                              uvx django-tui

                                                                                                                                                                                                                                                                                                                                              No pip install, no INSTALLED_APPS. It finds your manage.py (even from a subdirectory), loads your .env files and uses the project’s own virtualenv, so your Django version and apps are the ones running.

                                                                                                                                                                                                                                                                                                                                              Then browse and run your management commands, or query your models in the shell.

                                                                                                                                                                                                                                                                                                                                              github.com/anze3db/django-tui

                                                                                                                                                                                                                                                                                                                                              Alt...A terminal in a Django project called pollsite. ls shows manage.py, .env and .venv, and requirements.txt only lists Django. Running “uvx django-tui” opens a text interface listing the project’s management commands. Typing “closepoll 1” fills in the command’s form, and running it prints “Successfully closed poll 1”. Then the shell tab runs Question.objects.all() and lists the project’s polls.

                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                “The utilities in the textwrap module are meant to operate on text that represents just one paragraph.”

                                                                                                                                                                                                                                                                                                                                                Read more 👉 pym.dev/wrapping-text/

                                                                                                                                                                                                                                                                                                                                                  [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                  @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                  🐍📢 Get 30+ titles for only $18 with The Ultimate Python, Machine Learning & AI Engineering Humble Bundle! You can customize your donation split: click "Adjust Donation" → "Custom Amount" to boost the % going to the PSF! humblebundle.com/software/ulti

                                                                                                                                                                                                                                                                                                                                                  The Ultimate Python, Machine Learning & AI Engineering Bundle 2026
Supporting: Python Software Foundation

                                                                                                                                                                                                                                                                                                                                                  Alt...The Ultimate Python, Machine Learning & AI Engineering Bundle 2026 Supporting: Python Software Foundation

                                                                                                                                                                                                                                                                                                                                                    AodeRelay boosted

                                                                                                                                                                                                                                                                                                                                                    [?]:omya_linux: sinza [e/em/eirs or vi/vim/vis] » 🌐
                                                                                                                                                                                                                                                                                                                                                    @sinza@oldbytes.space

                                                                                                                                                                                                                                                                                                                                                    Hi! I'm looking for a job or gig! I live in the US (Central Indiana), and would much much rather work remotely.

                                                                                                                                                                                                                                                                                                                                                    I have system administration experience with , , and professionally. I strongly prefer the family of OSes and am willing to work with and professionally and have played with them off the job. I have done this for about three years.

                                                                                                                                                                                                                                                                                                                                                    I also know graphic design. My preferred programs are and , but I can use or if need be. I have done this for a decade.

                                                                                                                                                                                                                                                                                                                                                    I have skills in development, especially web development, and have professionally developed with , , and . I also am trying to familiarize myself with for legacy maintenance. I also have experience working with Microsoft databases, as well as played with other major SQL servers. I've also played with many other languages. I'm also willing to familiarize myself with a tech stack on the fly. As implied, I am willing to touch legacy code.

                                                                                                                                                                                                                                                                                                                                                    I have also designed websites, and am quite familiar with and . I also got to play nicely as well.

                                                                                                                                                                                                                                                                                                                                                    I am a jack of all trades, with my strongest skills I feel be in system administration and graphic design.

                                                                                                                                                                                                                                                                                                                                                    LLMs and generative AI are something I prefer to avoid where possible. I have experience with working under tight deadlines with a micromanaging boss before recent hype around LLMs, though I'd rather avoid such things if possible.

                                                                                                                                                                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                      Python Tip #299 (of 365):

                                                                                                                                                                                                                                                                                                                                                      Return Boolean expressions directly.

                                                                                                                                                                                                                                                                                                                                                      Do this:
                                                                                                                                                                                                                                                                                                                                                      def is_even(n):
                                                                                                                                                                                                                                                                                                                                                      return n % 2 == 0

                                                                                                                                                                                                                                                                                                                                                      Not this:
                                                                                                                                                                                                                                                                                                                                                      def is_even(n):
                                                                                                                                                                                                                                                                                                                                                      if n % 2 == 0:
                                                                                                                                                                                                                                                                                                                                                      return True
                                                                                                                                                                                                                                                                                                                                                      else:
                                                                                                                                                                                                                                                                                                                                                      return False

                                                                                                                                                                                                                                                                                                                                                      That "n % 2 == 0" condition will have a value of either True or False... which is also what we then return.

                                                                                                                                                                                                                                                                                                                                                      So there's no need for an "if" statement and returning the result of the boolean expression directly is clearer.

                                                                                                                                                                                                                                                                                                                                                      🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                        “The print function is handy for showing output at the terminal, but that's not its only use.”

                                                                                                                                                                                                                                                                                                                                                        Read more 👉 pym.dev/print-features/

                                                                                                                                                                                                                                                                                                                                                          [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                          @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                          🐍🚀 Out now: a full sweep of security releases of Python 3.11-3.15

                                                                                                                                                                                                                                                                                                                                                          🔒📜 They address the compromised eMudhra intermediate CA keys. These keys are now blocked by the ssl module as a last resort against their use. Normal uses of pip, including to upgrade pip itself, are now safe from attacks based on those compromised keys, even if pip hasn’t been updated yet.

                                                                                                                                                                                                                                                                                                                                                          discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                                                            [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                            @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                            🐍🚀 Out now: Python 3.15 beta 3!

                                                                                                                                                                                                                                                                                                                                                            💤 Lazy imports!
                                                                                                                                                                                                                                                                                                                                                            🧊 frozendict builtin!
                                                                                                                                                                                                                                                                                                                                                            💂 sentinel builtin!
                                                                                                                                                                                                                                                                                                                                                            📉 Tachyon profiler!
                                                                                                                                                                                                                                                                                                                                                            🖼️ Frame pointers everywhere!
                                                                                                                                                                                                                                                                                                                                                            🛅 Unpacking in comprehensions!
                                                                                                                                                                                                                                                                                                                                                            🗣️ UTF-8 as the default encoding!
                                                                                                                                                                                                                                                                                                                                                            🆕 Package startup config files!
                                                                                                                                                                                                                                                                                                                                                            ⌨️ TypedDict and TypeForm!
                                                                                                                                                                                                                                                                                                                                                            🐎 Faster JIT!
                                                                                                                                                                                                                                                                                                                                                            🎨 More colour!
                                                                                                                                                                                                                                                                                                                                                            🚌 & more!

                                                                                                                                                                                                                                                                                                                                                            Library maintainer? We *strongly encourage* you to add 3.15 to your CI and test during the beta. And send us those bugs reports!

                                                                                                                                                                                                                                                                                                                                                            discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                                                              AodeRelay boosted

                                                                                                                                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                              “Something to keep in mind is that sys.platform actually represents the operating system that your Python interpreter was built for, while platform.system() returns the operating system that your Python interpreter is currently running on.”

                                                                                                                                                                                                                                                                                                                                                              Read more 👉 pym.dev/operating-system-check

                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                Python Tip #298 (of 365):

                                                                                                                                                                                                                                                                                                                                                                When creating lots of class instances, save memory with __slots__.

                                                                                                                                                                                                                                                                                                                                                                class Point:
                                                                                                                                                                                                                                                                                                                                                                __slots__ = ("x", "y", "z")

                                                                                                                                                                                                                                                                                                                                                                def __init__(self, x, y, z):
                                                                                                                                                                                                                                                                                                                                                                (self.x, self.y, self.z) = (x, y, z)

                                                                                                                                                                                                                                                                                                                                                                🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                  [?]PyLadies Zurich » 🌐
                                                                                                                                                                                                                                                                                                                                                                  @zurich_pyladies@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                  At , Olena Kutsenko showed us how data in real-time pipelines can turn into gremlins if not anonymized properly 😬

                                                                                                                                                                                                                                                                                                                                                                  Olena Kutsenko on stage, slide showing an image of Gizmo with the label "data", and a gremlin

                                                                                                                                                                                                                                                                                                                                                                  Alt...Olena Kutsenko on stage, slide showing an image of Gizmo with the label "data", and a gremlin

                                                                                                                                                                                                                                                                                                                                                                    [?]Lobsters » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                    @lobsters@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                    “When it comes to code readability, whitespace is your friend.”

                                                                                                                                                                                                                                                                                                                                                                    Read more 👉 pym.dev/embrace-whitespace/

                                                                                                                                                                                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                      Python Tip #297 (of 365):

                                                                                                                                                                                                                                                                                                                                                                      Avoid making metaclasses if you can.

                                                                                                                                                                                                                                                                                                                                                                      There's usually an easier tool for the job.

                                                                                                                                                                                                                                                                                                                                                                      Metaclasses customize the behavior of CLASSES the same way classes customize the behavior of their instances. They're powerful, but they can also make for code that's overly complex and hard to understand.

                                                                                                                                                                                                                                                                                                                                                                      Fortunately, many problems that COULD be solved with a metaclass often have a simpler solution.

                                                                                                                                                                                                                                                                                                                                                                      🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                        “I find that I very rarely need the random function, because I often need random integers, not random floating point numbers.”

                                                                                                                                                                                                                                                                                                                                                                        Read more 👉 pym.dev/random-numbers/

                                                                                                                                                                                                                                                                                                                                                                          Marcos Dione boosted

                                                                                                                                                                                                                                                                                                                                                                          [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                          @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                          In response to the eMudhra / emSign certificate security incident we've published guidance for Python users to update CA certificates: discuss.python.org/t/informati

                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                            Python Tip #296 (of 365):

                                                                                                                                                                                                                                                                                                                                                                            Always use functools.wraps when making a decorator.

                                                                                                                                                                                                                                                                                                                                                                            from functools import wraps
                                                                                                                                                                                                                                                                                                                                                                            from time import perf_counter

                                                                                                                                                                                                                                                                                                                                                                            def time_runs(func):
                                                                                                                                                                                                                                                                                                                                                                            @wraps(func)
                                                                                                                                                                                                                                                                                                                                                                            def wrapper(*args, **kwargs):
                                                                                                                                                                                                                                                                                                                                                                            start = perf_counter()
                                                                                                                                                                                                                                                                                                                                                                            return_value = func(*args, **kwargs)
                                                                                                                                                                                                                                                                                                                                                                            print(f"{func.__name__} ran in {perf_counter()-start} seconds")
                                                                                                                                                                                                                                                                                                                                                                            return return_value
                                                                                                                                                                                                                                                                                                                                                                            return wrapper

                                                                                                                                                                                                                                                                                                                                                                            🧵 (1/4)

                                                                                                                                                                                                                                                                                                                                                                              [?]Paolo Melchiorre » 🌐
                                                                                                                                                                                                                                                                                                                                                                              @paulox@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                              Hey @carlton thanks for the report. I'm happy to see the @caleb PR merged and being part of their new asgiref release.

                                                                                                                                                                                                                                                                                                                                                                                [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                @thejoyraises Configure the bot with a cooldown so there's time to detect and contain malware. In this case, the malicious wheels and images were removed within three hours.
                                                                                                                                                                                                                                                                                                                                                                                blog.yossarian.net/2025/11/21/

                                                                                                                                                                                                                                                                                                                                                                                  [?]Teddy / Domingo (🇨🇵/🇬🇧) » 🌐
                                                                                                                                                                                                                                                                                                                                                                                  @TeddyTheBest@framapiaf.org

                                                                                                                                                                                                                                                                                                                                                                                  Capslocktober rose chez les manchots : la  journée de célébration principale pour la communauté du a eu lieu ce mercredi 21 octobre avec la participation enthousiaste de , , , Traffic Server, Pillow, , et bien sûr
                                                                                                                                                                                                                                                                                                                                                                                  linuxfr.org/users/krunch/journ

                                                                                                                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                    “Another reason I tend to avoid implicit string concatenation is that it can sometimes cause bugs by accidentally using it.”

                                                                                                                                                                                                                                                                                                                                                                                    Read more 👉 pym.dev/implicit-string-concat

                                                                                                                                                                                                                                                                                                                                                                                      [?]Mariatta 🤦🏻‍♀️ :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                      @mariatta@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                      Recap blog post from Day 3 of Python Core Sprint, my last day of the sprint.
                                                                                                                                                                                                                                                                                                                                                                                      Now I'm going to focus my energy for !
                                                                                                                                                                                                                                                                                                                                                                                      mariatta.ca/posts/python-core-

                                                                                                                                                                                                                                                                                                                                                                                        [?]Adrian Tombu » 🌐
                                                                                                                                                                                                                                                                                                                                                                                        @to@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                        La suite avec une présentation de Igor Laborie sur l'interopérabilité entre Rust et Python avec PyO3

                                                                                                                                                                                                                                                                                                                                                                                          [?]🇺🇦 Sviatoslav Sydorenko » 🌐
                                                                                                                                                                                                                                                                                                                                                                                          @webknjaz@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                          Cut a new security-focused release of `pypi-publish` v1.14.3. It features my deptree hash-pinning work and on top of it, @sethmlarson also removed some revoked CAs from certifi-shipped TLS trust store in the deptree that might affect Sigstore-related components.

                                                                                                                                                                                                                                                                                                                                                                                          Upgrade, please!

                                                                                                                                                                                                                                                                                                                                                                                          github.com/pypa/gh-action-pypi

                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                            Python Tip #295 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                            Avoid needless deep copying.

                                                                                                                                                                                                                                                                                                                                                                                            Often a deepcopy call can be replaced by a comprehension, a slice, or some other operation that makes new objects.

                                                                                                                                                                                                                                                                                                                                                                                            When you copy a list of dictionaries, you get a NEW list pointing to the SAME dictionaries.

                                                                                                                                                                                                                                                                                                                                                                                            So if you plan to mutate those dictionaries, a shallow copy isn't enough.

                                                                                                                                                                                                                                                                                                                                                                                            🧵 (1/4)

                                                                                                                                                                                                                                                                                                                                                                                              AodeRelay boosted

                                                                                                                                                                                                                                                                                                                                                                                              [?]TUXEDO Computers » 🌐
                                                                                                                                                                                                                                                                                                                                                                                              @tuxedocomputers@mastodontech.de

                                                                                                                                                                                                                                                                                                                                                                                              💻 Computer und Programmierung mal anders – mit Linux für Schülerinnen und Schüler!

                                                                                                                                                                                                                                                                                                                                                                                              TUXEDO ist Teil der Code Week Bayern!

                                                                                                                                                                                                                                                                                                                                                                                              Mach mit bei unseren Workshops in Augsburg:
                                                                                                                                                                                                                                                                                                                                                                                              🔧 29.10.2026 – Hardware zum Anfassen
                                                                                                                                                                                                                                                                                                                                                                                              🐍 05.11.2026 – Erste Schritte mit Python

                                                                                                                                                                                                                                                                                                                                                                                              📅 Wann? Jeweils von 16:30 bis 18:30 Uhr
                                                                                                                                                                                                                                                                                                                                                                                              📍 Wo? TUXEDO Headquarters, Alter Postweg 101, 86159 Augsburg, 12. Stock

                                                                                                                                                                                                                                                                                                                                                                                              👉 Bitte melde dich vorher an!
                                                                                                                                                                                                                                                                                                                                                                                              my.tuxedocomputers.com/event/l

                                                                                                                                                                                                                                                                                                                                                                                              Linux-Workshop zur Code Week Bayern 2026 mit TUXEDO-Logo; Termin: 29. Oktober 2026, 16:30 Uhr, Ort: TUXEDO HQ Augsburg; Anmeldung erforderlich; kostenfrei.

                                                                                                                                                                                                                                                                                                                                                                                              Alt...Linux-Workshop zur Code Week Bayern 2026 mit TUXEDO-Logo; Termin: 29. Oktober 2026, 16:30 Uhr, Ort: TUXEDO HQ Augsburg; Anmeldung erforderlich; kostenfrei.

                                                                                                                                                                                                                                                                                                                                                                                                [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                Na próxima semana, o Grupo de Trabalho de Diversidade e Inclusão da PSF terá seu horário de atendimento mensal no Discord da PSF! Junte-se em October 27, 10 PM UTC, no -diversity para conversar, fazer perguntas e compartilhar seus projetos 🐍🗺️ pyfound.blogspot.com/2026/07/t

                                                                                                                                                                                                                                                                                                                                                                                                  [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                  @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                  The PSF Diversity & Inclusion Workgroup monthly office hours are next week on the PSF Discord! Join us on Tuesday October 27th, 10 PM UTC, in -diversity to chat, ask questions, and share what you're working on 🐍🗺️ pyfound.blogspot.com/2026/07/t

                                                                                                                                                                                                                                                                                                                                                                                                    [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                    @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                    The newest PSF Board is excited to continue monthly PSF Board Office Hours into 2027! We welcome you to join these sessions to share with us how we can help your community, express your perspectives, and provide feedback for the PSF 🐍📣
                                                                                                                                                                                                                                                                                                                                                                                                    pyfound.blogspot.com/2026/10/m

                                                                                                                                                                                                                                                                                                                                                                                                      [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                      @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                      RE: fosstodon.org/@ThePSF/11748003

                                                                                                                                                                                                                                                                                                                                                                                                      On macOS, Mole can clear out your .venv and venv dirs, in case you have old certifi.

                                                                                                                                                                                                                                                                                                                                                                                                      github.com/tw93/mole#purge

                                                                                                                                                                                                                                                                                                                                                                                                      $ brew install mole
                                                                                                                                                                                                                                                                                                                                                                                                      $ mo purge --dry-run # review first
                                                                                                                                                                                                                                                                                                                                                                                                      $ mo purge # interactive
                                                                                                                                                                                                                                                                                                                                                                                                      $ mo purge --yes # non-interactive
                                                                                                                                                                                                                                                                                                                                                                                                      ...
                                                                                                                                                                                                                                                                                                                                                                                                      Estimated space freed: 13.33GB | Items: 399

                                                                                                                                                                                                                                                                                                                                                                                                      You may need to point to your dev dir with --paths

                                                                                                                                                                                                                                                                                                                                                                                                      It also cleans out things like .tox, .nox, __pycache__, .pytest_cache, .mypy_cache, .ruff_cache build, dist, node_modules.

                                                                                                                                                                                                                                                                                                                                                                                                      Marcos Dione boosted

                                                                                                                                                                                                                                                                                                                                                                                                      [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                      @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                      In response to the eMudhra / emSign certificate security incident we've published guidance for Python users to update CA certificates: discuss.python.org/t/informati

                                                                                                                                                                                                                                                                                                                                                                                                          [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                          @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                          And @pganssle has published dateutil 3.0.0:

                                                                                                                                                                                                                                                                                                                                                                                                          "This is the last major version of dateutil that will support any version of Python older than 3.11. The next release will be the 4.x series, which will support Python 3.11 and later."

                                                                                                                                                                                                                                                                                                                                                                                                          github.com/dateutil/dateutil/r

                                                                                                                                                                                                                                                                                                                                                                                                          dateutil has 905k PyPI downloads/month, and is the main dependant of six (895k):

                                                                                                                                                                                                                                                                                                                                                                                                          hugovk.dev/top-pypi-packages/

                                                                                                                                                                                                                                                                                                                                                                                                          🧹 PR "Drop support for Python < 3.11 and remove six" is +355 -1,447:

                                                                                                                                                                                                                                                                                                                                                                                                          github.com/dateutil/dateutil/p

                                                                                                                                                                                                                                                                                                                                                                                                            AodeRelay boosted

                                                                                                                                                                                                                                                                                                                                                                                                            [?]Linux statt Windows » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                            @LinuxStattWindows@troet.cafe

                                                                                                                                                                                                                                                                                                                                                                                                            „pip install“ ins System-Python klappt unter Ubuntu 26.04 nicht mehr. Das System-Python ist als „externally managed“ markiert (PEP 668).

                                                                                                                                                                                                                                                                                                                                                                                                            Für Kommandozeilen-Werkzeuge nimmt man pipx:
                                                                                                                                                                                                                                                                                                                                                                                                            sudo apt install pipx
                                                                                                                                                                                                                                                                                                                                                                                                            pipx install yt-dlp

                                                                                                                                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                              🐍🚀 Out now: expedited security releases of Python 3.15 and 3.14, and a special security release of 3.13

                                                                                                                                                                                                                                                                                                                                                                                                              They all upgrade the bundled pip to version 26.2.2, which includes certifi 2026.10.19 to address the eMudhra / emSign CA certificate security incident.

                                                                                                                                                                                                                                                                                                                                                                                                              discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                                                                                                                [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                Just released: Python Docs Sphinx Theme 2025.9! 🚀

                                                                                                                                                                                                                                                                                                                                                                                                                This enables translations of the theme and adds translations for:

                                                                                                                                                                                                                                                                                                                                                                                                                Brazilian Portuguese
                                                                                                                                                                                                                                                                                                                                                                                                                Greek
                                                                                                                                                                                                                                                                                                                                                                                                                Japanese
                                                                                                                                                                                                                                                                                                                                                                                                                Polish
                                                                                                                                                                                                                                                                                                                                                                                                                Simplified Chinese
                                                                                                                                                                                                                                                                                                                                                                                                                Spanish
                                                                                                                                                                                                                                                                                                                                                                                                                Swedish
                                                                                                                                                                                                                                                                                                                                                                                                                Traditional Chinese
                                                                                                                                                                                                                                                                                                                                                                                                                Turkish

                                                                                                                                                                                                                                                                                                                                                                                                                Thanks to all our translators!

                                                                                                                                                                                                                                                                                                                                                                                                                github.com/python/python-docs-

                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                  Just released: Python Docs Sphinx Theme 2025.9.2! 🚀

                                                                                                                                                                                                                                                                                                                                                                                                                  Add German, Korean and Indonesian translations
                                                                                                                                                                                                                                                                                                                                                                                                                  Fix html page translation
                                                                                                                                                                                                                                                                                                                                                                                                                  Fix Copy button copying line numbers
                                                                                                                                                                                                                                                                                                                                                                                                                  Fix search button cutting off long translations

                                                                                                                                                                                                                                                                                                                                                                                                                  github.com/python/python-docs-

                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                    Just released: Python 3.14.0 release candidate 3! 🚀🐍

                                                                                                                                                                                                                                                                                                                                                                                                                    🪄 Finally, the final release candidate

                                                                                                                                                                                                                                                                                                                                                                                                                    🪄 We fixed *another* bug that required the ".pyc magic number" to be increased

                                                                                                                                                                                                                                                                                                                                                                                                                    🪄 The ABI isn't changing, and wheels built for rc1 and rc2 should still work

                                                                                                                                                                                                                                                                                                                                                                                                                    👤 This was the first release @savannah shadowed!

                                                                                                                                                                                                                                                                                                                                                                                                                    🏆 Please test and report bugs!

                                                                                                                                                                                                                                                                                                                                                                                                                    discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                      @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                      Just released! 🚀

                                                                                                                                                                                                                                                                                                                                                                                                                      🎶 pylast 6.0.0

                                                                                                                                                                                                                                                                                                                                                                                                                      🎤 A Python interface to Last.fm and Libre.fm

                                                                                                                                                                                                                                                                                                                                                                                                                      📯 Restore proxy support (potential breaking change: proxies are now always stored as a dict, before it was a str or dict)

                                                                                                                                                                                                                                                                                                                                                                                                                      🪇 Drop support for almost-EOL Python 3.9

                                                                                                                                                                                                                                                                                                                                                                                                                      github.com/pylast/pylast/relea

                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                        @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                        Just released! 🚀

                                                                                                                                                                                                                                                                                                                                                                                                                        em-keyboard 5.3.0

                                                                                                                                                                                                                                                                                                                                                                                                                        🎲 Pick a random emoji from a search. For example:

                                                                                                                                                                                                                                                                                                                                                                                                                        ❯ em --search music --random
                                                                                                                                                                                                                                                                                                                                                                                                                        Copied! 👩‍🎤 woman_singer

                                                                                                                                                                                                                                                                                                                                                                                                                        🧛‍♂️ Drop support for Python 3.9

                                                                                                                                                                                                                                                                                                                                                                                                                        github.com/hugovk/em-keyboard/

                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                          @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                          Just released! 🚀

                                                                                                                                                                                                                                                                                                                                                                                                                          flake8-implicit-str-concat 0.6.0

                                                                                                                                                                                                                                                                                                                                                                                                                          A Flake8 plugin to identify those unjoined strings that a first Black run leaves behind:
                                                                                                                                                                                                                                                                                                                                                                                                                          "111111111111111111111" "222222222222222222222"

                                                                                                                                                                                                                                                                                                                                                                                                                          I hear there's another big release tomorrow? This release adds support for Python 3.14 and for once code changes were needed due to AST deprecation removals.

                                                                                                                                                                                                                                                                                                                                                                                                                          Also drop support for almost-very-nearly-EOL Python 3.9.

                                                                                                                                                                                                                                                                                                                                                                                                                          github.com/flake8-implicit-str

                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                            @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                            Just released: Python 3.15.0a4 and look at those JIT numbers!

                                                                                                                                                                                                                                                                                                                                                                                                                            discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                              I heard you like alphas?

                                                                                                                                                                                                                                                                                                                                                                                                                              Just released! Python 3.15.0a5, this time built against `main` from today instead of last month! 🚀

                                                                                                                                                                                                                                                                                                                                                                                                                              discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                By popular demand (@miketheman), pypistats now has a `--sort` option so you can sort by other columns such as date, rather than the default downloads.

                                                                                                                                                                                                                                                                                                                                                                                                                                github.com/hugovk/pypistats/re

                                                                                                                                                                                                                                                                                                                                                                                                                                Output of running "pypistats overall pytest-socket --monthly --mirrors without".

It's a table with category, date, percent and downloads headers. The rows are sorted by downloads, highest first.

                                                                                                                                                                                                                                                                                                                                                                                                                                Alt...Output of running "pypistats overall pytest-socket --monthly --mirrors without". It's a table with category, date, percent and downloads headers. The rows are sorted by downloads, highest first.

                                                                                                                                                                                                                                                                                                                                                                                                                                Output of running the same command but with "--sort date".

The rows are now sorted by date, earliest first.

                                                                                                                                                                                                                                                                                                                                                                                                                                Alt...Output of running the same command but with "--sort date". The rows are now sorted by date, earliest first.

                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                  🐍🅰️ Out now, Python 3.15 alpha 6!

                                                                                                                                                                                                                                                                                                                                                                                                                                  PEP 799: A high-frequency, low-overhead, statistical sampling profiler
                                                                                                                                                                                                                                                                                                                                                                                                                                  PEP 798: Unpacking in comprehensions with * and **
                                                                                                                                                                                                                                                                                                                                                                                                                                  PEP 686: Python now uses UTF-8 as the default encoding
                                                                                                                                                                                                                                                                                                                                                                                                                                  PEP 782: A new PyBytesWriter C API to create a Python bytes object
                                                                                                                                                                                                                                                                                                                                                                                                                                  PEP 728: TypedDict with typed extra items
                                                                                                                                                                                                                                                                                                                                                                                                                                  The JIT compiler has been significantly upgraded with up to 7-8% speedup

                                                                                                                                                                                                                                                                                                                                                                                                                                  🧊 Just two more alphas until the feature freeze! 🧊

                                                                                                                                                                                                                                                                                                                                                                                                                                  discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                    🐍🚀 Out now: Python 3.15 beta 2!

                                                                                                                                                                                                                                                                                                                                                                                                                                    Still all this good stuff:

                                                                                                                                                                                                                                                                                                                                                                                                                                    💤 Lazy imports!
                                                                                                                                                                                                                                                                                                                                                                                                                                    🧊 frozendict builtin!
                                                                                                                                                                                                                                                                                                                                                                                                                                    💂 sentinel builtin!
                                                                                                                                                                                                                                                                                                                                                                                                                                    📉 Tachyon profiler!
                                                                                                                                                                                                                                                                                                                                                                                                                                    🖼️ Frame pointers everywhere!
                                                                                                                                                                                                                                                                                                                                                                                                                                    🧳 Unpacking in comprehensions!
                                                                                                                                                                                                                                                                                                                                                                                                                                    8️⃣ UTF-8 default encoding!
                                                                                                                                                                                                                                                                                                                                                                                                                                    🆕 Startup config files!
                                                                                                                                                                                                                                                                                                                                                                                                                                    ⌨️ Loadsa typing!
                                                                                                                                                                                                                                                                                                                                                                                                                                    🎨 More colour!
                                                                                                                                                                                                                                                                                                                                                                                                                                    🚌 & more!

                                                                                                                                                                                                                                                                                                                                                                                                                                    Library maintainer? Add 3.15 to your CI and keep those bug reports coming!

                                                                                                                                                                                                                                                                                                                                                                                                                                    discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                      @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                      Out now: Python 3.14.6 and 3.13.14!

                                                                                                                                                                                                                                                                                                                                                                                                                                      A day late to include a last-minute OpenSSL release in the installers. Thanks to @standupmaths for the help with the release notes :)

                                                                                                                                                                                                                                                                                                                                                                                                                                      discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                        @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                        Out now: PrettyTable 3.18!

                                                                                                                                                                                                                                                                                                                                                                                                                                        Library to display tabular data in a visually appealing ASCII table format.

                                                                                                                                                                                                                                                                                                                                                                                                                                        Lots of stuff here, including performance improvements, some thanks to improvements in wcwidth dependency.

                                                                                                                                                                                                                                                                                                                                                                                                                                        Add support for:
                                                                                                                                                                                                                                                                                                                                                                                                                                        Python 3.16
                                                                                                                                                                                                                                                                                                                                                                                                                                        reStructuredText tables
                                                                                                                                                                                                                                                                                                                                                                                                                                        multiline headers
                                                                                                                                                                                                                                                                                                                                                                                                                                        captions in Markdown

                                                                                                                                                                                                                                                                                                                                                                                                                                        And more!

                                                                                                                                                                                                                                                                                                                                                                                                                                        github.com/prettytable/prettyt

                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                          @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                          Out now: linkotron 0.7!

                                                                                                                                                                                                                                                                                                                                                                                                                                          CLI to format links in a shorter format.

                                                                                                                                                                                                                                                                                                                                                                                                                                          🖇️ Format regular links
                                                                                                                                                                                                                                                                                                                                                                                                                                          🔗 Format GHSA links -- thanks @stanfromireland!
                                                                                                                                                                                                                                                                                                                                                                                                                                          🖇️ Add support for Python 3.15-3.16
                                                                                                                                                                                                                                                                                                                                                                                                                                          🔗 Stop testing experimental 3.13t

                                                                                                                                                                                                                                                                                                                                                                                                                                          Maybe one day I'll remember how to write reStructuredText links but now I don't need to:

                                                                                                                                                                                                                                                                                                                                                                                                                                          ❯ linkotron example.com --rst
                                                                                                                                                                                                                                                                                                                                                                                                                                          Copied! `example.com <example.com>`__

                                                                                                                                                                                                                                                                                                                                                                                                                                          github.com/hugovk/linkotron/re

                                                                                                                                                                                                                                                                                                                                                                                                                                            Marcos Dione boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                            @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                            In response to the eMudhra / emSign certificate security incident we've published guidance for Python users to update CA certificates: discuss.python.org/t/informati

                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Mariatta 🤦🏻‍♀️ :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                              @mariatta@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                              Recap blog post from Day 2 of Python Core Sprint.
                                                                                                                                                                                                                                                                                                                                                                                                                                              Tl;dr: The bots are migrated over to Cabotage (from Heroku) smoothly without anyone noticing any downtime.

                                                                                                                                                                                                                                                                                                                                                                                                                                              Read for more details
                                                                                                                                                                                                                                                                                                                                                                                                                                              mariatta.ca/posts/python-core-

                                                                                                                                                                                                                                                                                                                                                                                                                                                Marcos Dione boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                The PSF is hiring a CPython Developer in Residence! Full-time, remote, $70K–170K (US) or comparable contractor rates abroad. Help keep Python’s core healthy and support the volunteers who maintain it. Apply by Nov 19:
                                                                                                                                                                                                                                                                                                                                                                                                                                                pythonsoftwarefoundation.apply

                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Python Tip #294 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Use exceptions to pass error messages to users.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  You can use exceptions to transmit error messages to an end user from arbitrary places within your program's call stack without messily calling sys.exit all over the place.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Catch exceptions with messages users shouldn't see, and raise your own exception with a message they SHOULD see:

                                                                                                                                                                                                                                                                                                                                                                                                                                                  class WeatherError(Exception):
                                                                                                                                                                                                                                                                                                                                                                                                                                                  """Raised when we can't show the user a forecast."""

                                                                                                                                                                                                                                                                                                                                                                                                                                                  🧵 (1/5)

                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]codingjoe :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                    @codingjoe@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Django Pictures 2.0.1 and 1.9.1 ship with a fix for Pillow 13 and multi-line alt-texts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Special thanks to @amureki for discovering this one.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    github.com/codingjoe/django-pi

                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Mariusz Felisiak » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                      @felixxm@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                      I know exactly what I will be doing for the next few hours, right? 🤦 I'm looking at you 4 🔥👀

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Remember to upgrade `uv`, `pip`, and `certifi` folks!

                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]🇺🇦 Sviatoslav Sydorenko » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                        @webknjaz@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Cut a new security-focused release of `pypi-publish` v1.14.3. It features my deptree hash-pinning work and on top of it, @sethmlarson also removed some revoked CAs from certifi-shipped TLS trust store in the deptree that might affect Sigstore-related components.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Upgrade, please!

                                                                                                                                                                                                                                                                                                                                                                                                                                                        github.com/pypa/gh-action-pypi

                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Mariatta 🤦🏻‍♀️ :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                          @mariatta@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Recap blog post of day 1 (and 0) of my experience at PyCon Core Sprint.

                                                                                                                                                                                                                                                                                                                                                                                                                                                          mariatta.ca/posts/python-core-

                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Python Tip #293 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Write context managers with contextlib.contextmanager.

                                                                                                                                                                                                                                                                                                                                                                                                                                                            Instead of making a class with __enter__ and __exit__ methods, we can make a context manager out of a function:

                                                                                                                                                                                                                                                                                                                                                                                                                                                            🧵 (1/4)

                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Jannis Leidel » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                              @jezdez@publicidentity.net

                                                                                                                                                                                                                                                                                                                                                                                                                                                              I've kicked off the wind-down work on @jazzband and have sent out emails to most (all?) project leads and people involved.

                                                                                                                                                                                                                                                                                                                                                                                                                                                              In case there is a Jazzband project you care about, please check out the dedicated project board and engage: github.com/orgs/jazzband/proje

                                                                                                                                                                                                                                                                                                                                                                                                                                                              -commons

                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Jannis Leidel » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                @jezdez@publicidentity.net

                                                                                                                                                                                                                                                                                                                                                                                                                                                                RE: publicidentity.net/@jezdez/117

                                                                                                                                                                                                                                                                                                                                                                                                                                                                Quick update on the wind-down work on Jazzband since last week:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                pip-tools has moved to PyPA, wagtailmenus to Wagtail Nest, and sorl-thumbnail back to Mario-César Señoranis.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                Of the 82 projects I'm tracking, 11 are marked as complete, 4 as archived, and 11 are preparing to move. More moves are under discussion, including proposals for Django Commons (27 projects are currently in the preparation or decision phase).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                Thanks to everyone helping!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Jannis Leidel » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                @jezdez@publicidentity.net

                                                                                                                                                                                                                                                                                                                                                                                                                                                                I've kicked off the wind-down work on @jazzband and have sent out emails to most (all?) project leads and people involved.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                In case there is a Jazzband project you care about, please check out the dedicated project board and engage: github.com/orgs/jazzband/proje

                                                                                                                                                                                                                                                                                                                                                                                                                                                                -commons

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    AodeRelay boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Willing to cut a deal. . . [First-person: I / Second-person: you / Third-person: he / Indefinite: Someone] » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @vor@lgbtqia.space

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @john

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    I see your follow request, and I'm considering.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    In the mid-1990s, I headed up the support team for a dialup ISP that I co-owned with a couple other guys. Our servers ran , and I put it on my desktop (with ) when IBM gave up on OS/2. In the 2010s, I got tired of being an admin, so I switched to .

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Right now, I'm enrolled at a state university to upgrade my associate's to a bachelor's so that I can use financial aid to pay for student insurance. No one is gonna hire me for anything because I'm old. I tried jobhunting for an entire year, and I can't live without insurance.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    I volunteer coteach to over Zoom, and I serve as a judge for most elections.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    I'm doing my best, and I don't have bandwidth for extra homework right now. I also don't store stuff on computers — mine or other people's. Ghu gave us external drives for a *reason*.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      After getting another burst of PRs from a single account in a short period, we've set a limit of a max 3 PRs (including drafts) per account.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This does not affect members of the core or triage teams.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      If you have more than 3 PRs already open, they stay open, but you won’t be able to open another before dropping below the limit.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      discuss.python.org/t/pull-requ

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        PEP corner:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        "After further discussion, we have decided to withdraw PEP 836. The Steering Council rightly sets a high bar for a proposal of this scope, and we don’t feel we have the personal bandwidth to carry the current version forward. We continue to believe in the technical direction outlined in the PEP, including free-threaded support and a method-based frontend, and remain optimistic about the JIT’s potential in CPython."

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        discuss.python.org/t/pep-836-j

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          It's the Python CoreSprint in San Francisco this week! I'm not there, but I can see the repo is already busy!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Here's a handy diagram @pganssle has just added to the pathlib docs:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          docs.python.org/3/library/path

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          For p = PurePosixPath('/srv/holy/grail.tar.gz'), p.parent is PurePosixPath('/srv/holy'), p.name is 'grail.tar.gz', p.stem is 'grail.tar', and p.suffix is '.gz'.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Alt...For p = PurePosixPath('/srv/holy/grail.tar.gz'), p.parent is PurePosixPath('/srv/holy'), p.name is 'grail.tar.gz', p.stem is 'grail.tar', and p.suffix is '.gz'.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            RE: mastodon.social/@hugovk/117365

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Do you prefer reading Python 3.15 livetoot threads in blogpost form?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Good news!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            hugovk.dev/blog/2026/releasing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Python 3.15.0 release day!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            First blocker, we're getting 503s on docs.python.org and buildbot.python.org, the latter of which is needed to check the tier 1 and 2 buildbots are passing, needed for a release.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            It's a certificate issue from an incompatible pyOpenSSL upgrade. We're waiting for the US to wake up and poke it with a stick.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            buildbot.python.org: 503 Service Unavailable

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Alt...buildbot.python.org: 503 Service Unavailable

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            docs.python.org: 503 Service Unavailable

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Alt...docs.python.org: 503 Service Unavailable

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]codingjoe :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @codingjoe@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Any FOSS or other non-profit project or community that sends email?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                I am happy to help :)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                relays.to/open-source/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  “This will allow us to close the file and then pass the temporary file's filename to wherever it needs to be, and then when the context manager exits, the file will be deleted automatically:”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Read more 👉 pym.dev/temporary-files/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    I don't know what you're doing on the first Tuesday of even months for the next two years, but I've just planned out mine:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    peps.python.org/pep-0790/#bugf

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    You can add Python releases to your calendar with this iCal:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    peps.python.org/api/#release-s

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python Tip #292 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Keep "try" blocks small with an "else" clause.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      try:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      count = int(text)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      except ValueError:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      print("That's not a number")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      else:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      print(f"Counting to {count}")

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The "else" block runs only if the "try" block finished without raising an exception.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Why not put that print call at the bottom of the "try" block instead?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      try:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      count = int(text)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      print(f"Counting to {count}")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      except ValueError:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      print("That's not a number")

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @ThePSF Congrats dongheena@fosstodon.org and @pfmoore, thanks for all your work on ! 🎉

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Please congratulate our newest PSF Fellow Members for Q3, 2026! Their continued contributions to the Python ecosystem are so very important to our community.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          pyfound.blogspot.com/2026/10/a

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Python Tip #107 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Use the walrus operator to simplify "while" loops.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This generator function reads a file in chunks:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            def read_in_chunks(path):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            with open(path, mode="rb") as file:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            chunk = file.‍read(8192)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            while chunk:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            yield chunk
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            chunk = file.‍read(8192)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Notice that "chunk = file.‍read(8192)" appears twice: once before the loop and once at the end.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This is a somewhat common pattern with "while" loops.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Python Tip #291 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Check regex matches with the walrus operator.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Do this:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              if match := UNITS_RE‍.search(string):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              return match.groups()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Not this:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              match = UNITS_RE‍.search(string)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              if match:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              return match.groups()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              More on this:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              pym.dev/using-walrus-operator/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                “Using __slots__ can save memory because each instance of your class won't use a dictionary to store its attributes.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Read more 👉 pym.dev/__slots__/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  “But this fuzziness is consistent with Python's embrace of duck typing.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Read more 👉 pym.dev/class-or-function/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Feth 🎉 boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Python Tip #290 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Pretty-print data structures with pp.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    >>> from pprint import pp
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    >>> pp(user)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    {'name': 'Trey',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    'languages': ['Python', 'JavaScript'],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    'address': {'city': 'San Diego', 'state': 'CA'}}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    🧵 (1/4)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🗳

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Julien Palard » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @mdk@mamot.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python quizz of the day:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ```python
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      l = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      l.append(l)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      m = []
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      m.append(m)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      l == m
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ```

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      True:0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      False:1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RecursionError: maximum recursion depth exceeded:3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Stack overflow:0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @adamchainz Nice writeup, glad you like it!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        I also find it useful for checking stuff like release dates, latest patch versions, and looking up Ubuntu codenames <-> versions.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        💡 Tip: you can check a few on one go:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        $ eol django python postgresql

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ✍️ New post on using @hugovk’s norwegianblue tool to check end-of-life dates relevant to Django developers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          adamj.eu/tech/2026/10/16/djang

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            “NotImplemented is basically a way to signal to Python: I don't know how to perform this operation, go ask the other object instead.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Read more 👉 pym.dev/when-to-use-notimpleme

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Python Tip #289 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Add context to exceptions with add_note.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              def load_config(path):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              try:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              return json.loads(Path(path).read_text())
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              except json.JSONDecodeError as error:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              error.add_note(f"While parsing {path}")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              raise

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🧵 (1/4)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Marcos Dione » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @mdione@en.osm.town

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Thinking of writing all my strings with escape codes and interpolations as `f""`, and all the others as `r''` (yes, I kinda like `bash`'s differentiation).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Django News » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @djangonews@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @xahteiwi This year was "Europe’s largest Python, AI & software engineering conference"... 2026.pycon.de/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Florian Haas [he/him] » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @xahteiwi@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    "The leading conference for applied AI with Open Source" is rather odd branding for a conf.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Edit: ... and their `og:description` says "largest", which makes it doubly weird.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    pycon.de/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]clew » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @clew@ecoevo.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Looking for recommendations for really, truly beginner teach yourself resources. Teenager friend is cautiously curious.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      I’d like to point them to in-browser tutorials first while we work out what’s safe now for someone with only one computer.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      I’ve liked RealPython before - still good?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      I can do some sysadminning and over the shoulder, but would rather set them up to investigate independently, the way we learned

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Ever wondered about the history of Python's 2 modules for randomness?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        I wrote an article for LWN about that recently. It's now available for non-subscribers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        lwn.net/Articles/1097468/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Python Tip #288 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Show a value's repr with "!r" in f-strings.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          >>> name = "Trey"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          >>> print(f"Name: {name}")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Name: Trey
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          >>> print(f"Name: {name!r}")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Name: 'Trey'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          By default, f-strings use the human-readable representation of an object (str instead of repr). The "!r" suffix forces the repr version.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Most objects have the same str and repr, but some (like strings and datetime‍.date objects) don't.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          🧵 (1/4)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            “When we pipe the output of this program to a file, by default, only the standard output stream will be piped to that file:”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Read more 👉 pym.dev/standard-error/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Alex Willmer » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @alex@social.moreati.org.uk

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              strtoolz now includes `replace_count()`, `replace_exactly()`, & `replace_nth()` pypi.org/project/strtoolz/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> strtoolz.replace_counted('A man, a plan, a canal, Panama', 'an', 'AN')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ('A mAN, a plAN, a cANal, PANama', 4)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> strtoolz.replace_exactly('A man, a plan, a canal, Panama', 'an', 'AN', count=5)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ValueError: Only 4 occurrences could be replaced, required 5

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> strtoolz.replace_nth('A man, a plan, a canal, Panama', 'an', 'AN', n=1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              'A man, a plAN, a canal, Panama'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Carlton Gibson » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @carlton@chaos.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                With a little bit of working around pytest-asyncio not quite working yet, asgiref works with Python 3.16a1:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                py316-test: OK (14.54=setup[0.96]+cmd[13.58] seconds)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                congratulations :) (14.61 seconds)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ✅

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Python 3.10 reached end of life a couple weeks ago.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  If you maintain a library and you're wondering what's in Python 3.11 that you can use, here's a cheat sheet.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Upgrading to Python 3.14 because you like to stay one Python version behind at all times? This cheat sheet's for you too.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  It's nowhere near comprehensive. I've tried to make short but useful.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The printable version shows more features and a support timeline More cheat sheets at pym.dev/cheat-sheets

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  What's New in Python
Every supported version, 3.11 to 3.15

Python 3.15 — supported until October 2031

[*row for row in rows]          # flatten nested lists
lazy import json                # load json on first use
MISSING = sentinel("MISSING")   # nicer than object()
frozendict(a=1, b=2)            # an immutable dict

Python 3.14 — supported until October 2030

path.copy(target)               # pathlib.Path, also move
date.strptime(text, "%Y-%m-%d") # also time.strptime
except ValueError, TypeError:   # parentheses optional
t"Hello {name}"                 # template strings

Python 3.13 — supported until October 2029

copy.replace(point, x=0)        # copy with x changed
@warnings.deprecated("Use g()") # warn callers to switch
batched(rows, 3, strict=True)   # error on a partial batch
python -m random 6              # roll a die

Python 3.12 — supported until October 2028

f"{", ".join(names)}"           # reuse quotes in f-strings
type Point = tuple[int, int]    # define a type alias
batched(names, 2)               # loop in groups of 2
path.walk()                     # os.walk for pathlib.Path

Python 3.11 — supported until October 2027 (Safe for libraries today)

tomllib.load(file)              # read TOML files
err.add_note("row 5")           # note shown in traceback
class Color(enum.StrEnum):      # members are strings
async with TaskGroup() as tg:   # cancel the rest on error

The full printable cheat sheet: pym.dev/cheat-sheets

© Trey Hunner
Python Morsels

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Alt...What's New in Python Every supported version, 3.11 to 3.15 Python 3.15 — supported until October 2031 [*row for row in rows] # flatten nested lists lazy import json # load json on first use MISSING = sentinel("MISSING") # nicer than object() frozendict(a=1, b=2) # an immutable dict Python 3.14 — supported until October 2030 path.copy(target) # pathlib.Path, also move date.strptime(text, "%Y-%m-%d") # also time.strptime except ValueError, TypeError: # parentheses optional t"Hello {name}" # template strings Python 3.13 — supported until October 2029 copy.replace(point, x=0) # copy with x changed @warnings.deprecated("Use g()") # warn callers to switch batched(rows, 3, strict=True) # error on a partial batch python -m random 6 # roll a die Python 3.12 — supported until October 2028 f"{", ".join(names)}" # reuse quotes in f-strings type Point = tuple[int, int] # define a type alias batched(names, 2) # loop in groups of 2 path.walk() # os.walk for pathlib.Path Python 3.11 — supported until October 2027 (Safe for libraries today) tomllib.load(file) # read TOML files err.add_note("row 5") # note shown in traceback class Color(enum.StrEnum): # members are strings async with TaskGroup() as tg: # cancel the rest on error The full printable cheat sheet: pym.dev/cheat-sheets © Trey Hunner Python Morsels

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Python Tip #287 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Read tracebacks from the bottom up.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Traceback (most recent call last):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File "/home/trey/count.py", line 12, in <module>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    main()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ~~~~^^
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File "/home/trey/count.py", line 9, in main
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    count_to(stop)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ~~~~~~~~^^^^^^
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    File "/home/trey/count.py", line 4, in count_to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    for n in range(1, number+1):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ~~~~~~^~
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    TypeError: can only concatenate str (not "int") to str

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    🧵 (1/4)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      “If something feels more like a function than a class, we often just call it a function.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Read more 👉 pym.dev/class-or-function/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Marcos Dione » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @mdione@en.osm.town

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Marcos Dione » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @mdione@en.osm.town

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        I plan to teach my daughter programming next year or so. But she doesn't read/write English.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        A few months ago I saw a talk by/about a woman in tech, where she mentioned a localizable language (will find the video later).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Meanwhile, there exist modules for parsing Python code, so in theory one could localize the syntax. An extra step would be to localize the stdlib.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Now I just need 48h days w/o health impacts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Marcos Dione » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @mdione@en.osm.town

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          So 3.15's new sentinels are... like Lisp symbols? Is there any fundamental difference?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Sounds similar to creating an empty class and using the class (and not a singleton instance) as value (but I see now it would make typing impossible)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          And what does this mean? `total: None | float | NOTHING = NOTHING` (from mathspp.com/blog/pydonts/senti )

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Cyril Brulebois » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @CyrilBrulebois@mamot.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            I suppose it's never too late to get to know 's `argparse` module a little bit better…

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            > The parse_args() method by default allows long options to be abbreviated to a prefix, if the abbreviation is unambiguous (the prefix matches a unique option): […]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            And indeed:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            > allow_abbrev - Allows long options to be abbreviated if the abbreviation is unambiguous (default: True)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Maybe that's something new? YMMV…

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            > Changed in version 3.5: allow_abbrev parameter was added.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Pini boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Freexian :debian: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @freexian@hachyderm.io

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The September 2026 contributions report, covering contributions to by collaborators, is now available at freexian.com/blog/debian-contr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Read about the new experimental backend for autopkgtest using pconr, the site visit in preparation for DebConf 27 and more.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              We thank the organizations subscribing to our Long Term Support contracts (freexian.com/lts/?utm_source=m) and consulting services (freexian.com/services/?utm_sou) for making this possible.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                “You can use Python sets for removing duplicates, as long as you don't care about maintaining the order of your items.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Read more 👉 pym.dev/practical-uses-of-sets/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The October edition of the PSF Board Office Hour is about to begin 🐍 🗒️ 9 PM UTC. Join us to share how we can help your community, express your perspectives, and provide feedback for the PSF!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  pyfound.blogspot.com/2025/10/a

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Python Tip #286 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Know your way around the Python docs.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The docs at docs.python.org/3/ have many different types of pages.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    It's helpful to note which kind of page you're on and consider whether you're in the right place.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    🧵 (1/4)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      controlc boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Marcos Dione » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @mdione@en.osm.town

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Is importable from ? Has anyone tried?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      We do a lot of tooling with Ansible, but sometimes we wrap it with Python code, and we have to do the equivalent of `os.system()` to use one from the other.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Jannis Leidel » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @jezdez@publicidentity.net

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        I've kicked off the wind-down work on @jazzband and have sent out emails to most (all?) project leads and people involved.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        In case there is a Jazzband project you care about, please check out the dedicated project board and engage: github.com/orgs/jazzband/proje

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        -commons

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]jbz » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @jbz@indieweb.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          How well do you know Python 3.15's new features?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          I made a quiz of some of my favorite features so you can test yourself.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          pym.dev/quiz/python-3.15/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Comic from Pablo:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            bsky.app/profile/did:plc:3cfty

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (And a secret final message on the 3.10 tag)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            github.com/python/cpython/rele

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Comic:
Death: "IT IS TIME TO GO."
Halo labelled python3.10: Was I a good python release
Death: NO.
DEATH: YOU WERE THE BEST.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Alt...Comic: Death: "IT IS TIME TO GO." Halo labelled python3.10: Was I a good python release Death: NO. DEATH: YOU WERE THE BEST.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Python Tip #285 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Learn to use the help function.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> help(print)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Help on built-in function print in module builtins:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              print(*args, sep=' ', end='\n', file=None, flush=False)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Prints the values to a stream, or to sys.stdout by default.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Note that help works offline. Even if you're stuck without Internet access, you can still read documentation.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Lobsters » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @lobsters@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                AodeRelay boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]unterwegssein » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @unterwegssein@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Wenn man wissen möchte, wie lange der Linuxrechner eingeschaltet war, kann man das mit dem Programm "last" machen.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Wenn man eine grafische Auswertung haben möchte, bietet sich Python dazu an. Wie man das machen könnte, zeige ich hier:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                sven-essen.de/2026/04/22/syste

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Grafik der Bootzeit von meinem Linux-Rechner der letzten Tage. Ich verwende hier AlmaLinux. Das Script kommt mit Python und verschiedenen Bibliotheken.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Alt...Grafik der Bootzeit von meinem Linux-Rechner der letzten Tage. Ich verwende hier AlmaLinux. Das Script kommt mit Python und verschiedenen Bibliotheken.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Ned Batchelder » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @nedbat@hachyderm.io

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RE: mastodon.social/@y2mango/11742

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Holy cow, how have I not known about this before? Jump directly to the function you're looking for! Or details of >1000 third-party packages!!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  pyref.dev/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @f_dion 💡 Tip: before Python 3.15 is your minimum, instead of the lazy keyword, you can use __lazy_modules__ instead:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    __lazy_modules__ = {"json"}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import json
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import sys

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Python 3.14 and earlier will ignore it, and 3.15+ does the lazy thing.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    docs.python.org/3/whatsnew/3.1

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    docs.python.org/3/reference/da

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      “Dictionaries are meant to make it easy to look up the value that corresponds to a particular key.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Read more 👉 pym.dev/using-dictionaries-in-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Ash_Crow boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Python Tip #284 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Import from another directory by adding it to sys.path.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        from pathlib import Path
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import sys

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        our_directory = Path(__file__).parent
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        sys.path.insert(0, str(our_directory / "vendored_utils"))

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        This is a bit of a hack. It works great in your own project, but I wouldn't want to see it in an installable package.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Marcos Dione » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @mdione@en.osm.town

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          I just noticed `ensure_contours.cpython-313.pyc`. Is this for 3.13 or Python 31.3? :-P

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]codingjoe :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @codingjoe@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            🚨 Important Announcement 🚨

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Going forward all my packages will only "officially" support maintained versions. Meaning since October only 3.14 and now 3.15.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This has no effect on Django version support.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            CVEs will be backported to older 🐍 release.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              “Whether something happens to be implemented as a class or a function is often just an implementation detail.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Read more 👉 pym.dev/class-or-function/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Python Tip #283 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Delay slow imports until they're needed.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Say your command-line tool has a "--plot" option that uses matplotlib.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                If "import matplotlib.pyplot" sits at the top of your module, every run of your tool takes about 0.4 seconds to import matplotlib... even runs that never plot anything!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                That's ~25 times longer than Python takes to start!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🧵 (1/4)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]🇺🇦 Sviatoslav Sydorenko » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @webknjaz@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RE: mastodon.social/@hugovk/117288

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Great release thread! 🧵

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The @aio_libs @aiohttp ecosystem also supports 3.15, by the way!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Two weeks until Python 3.15.0 final!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  hugovk.dev/next-release/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Linuxiac » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @linuxiac@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python 3.15 introduces lazy imports, UTF-8 as the default encoding, faster experimental JIT performance, and new profiling tools.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      linuxiac.com/python-3-15-relea

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python 3.15 introduces lazy imports, UTF-8 as the default encoding, faster experimental JIT performance, and new profiling tools.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Alt...Python 3.15 introduces lazy imports, UTF-8 as the default encoding, faster experimental JIT performance, and new profiling tools.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Fred de CLX boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]benzogaga33 :verified: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @benzogaga33@mamot.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Paolo Melchiorre » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @paulox@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Wonderful proof of what you can achieve in a 3 morning long Open Source sprint in person, with the right people in the room, and enough time to relax. 🚀

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Great job @carlton @lilyf @jacobtylerwalls @samueljsb @meshy @caleb and Simon 👏

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        chaos.social/@carlton/11740952

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Carlton Gibson » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @carlton@chaos.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        This month's Stack Report is going out now: Towards Async Transactions in Django

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        (And yes, it's also an advert for Django on the Med 🏖️).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        noumenal.es/stack-report/towar

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Before 3.14, if we wanted to copy or move a file, we had to use Python's shutil module

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Read more 👉 trey.io/flfwr9

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              I made a 14 question quiz on some hand-picked Python 3.15 features:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              pym.dev/quiz/python-3.15

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Take it before watching my video on 3.15 to see how many you already knew.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Guessing before you learn something helps learning stick better, even when the guesses are wrong (sometimes called the pretesting effect).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              I doubt you'll get most of them right, even after the video. I just took it and got 13/14... and I made the quiz and have been studying these features for a while now.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                I just played a text adventure game all about Python 3.15's new features.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                uvx --python 3.15 whatsnewt

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Score 299 of 375
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Puzzles 14 of 18
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Souvenirs 6 of 8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Rooms 14 of 15
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Curiosities 0 of 11
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Moves 26

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                I apparently left behind an abi3t badge and a swatch of colors.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                And I never found xyzzy, plugh, newt, spam, zen, barry, thomas, pablo, donghee, savannah, or hugo.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                That was fun, despite the noticeable Claudisms in the text.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                pypi.org/project/whatsnewt/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  also

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ✅ update 3.15 label:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  github.com/python/cpython/labe
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ✅ rebuild devguide to update:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  devguide.python.org/versions/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ✅ unlock 3.15 branch

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  And I think that's it!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Hey, @savannah, you're up next with the first 3.16 alpha on Tuesday! 🚀

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  hugovk.dev/next-release/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Curated Hacker News » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @CuratedHackerNews@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    It's not over yet!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    I updated PEP 790 github.com/python/peps/pull/51, which also updates the PEPs API, which is used to point the docs at /3/ to 3.15, kicked off a docs build: docs.python.org/3/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Unpin mastodon.social/@hugovk/115333 and pin mastodon.social/@hugovk/117411 to my profile.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (3.14 might not be the newest, but we can still celebrate with pie!)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    And then unlock the 3.15 branch so the core team can start merging 185 PRs that didn't get in during RC:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    github.com/python/cpython/pull

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🐍🚀 Out now: Python 3.15.0 final!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      💤 Lazy imports!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🧊 frozendict builtin!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      💂 sentinel builtin!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      📉 Tachyon profiler!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🖼️ Frame pointers everywhere!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🛅 Unpacking in comprehensions!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🗣️ UTF-8 as the default encoding!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🛞 Stable ABI for free-threading!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🆕 Package startup config files!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ⌨️ TypedDict & TypeForm!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🐎 Faster JIT!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🎨 More colour!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🚌 & more!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Huge thanks to @sovtechfund supporting my work as release manager and enabling another smooth release!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python 3.15 logo: a purple heart with "3.15" in blue and yellow, flanked by a blue and a yellow snake, with lightning bolts, pink clouds and laurel branches, framed by the release's headline features.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Alt...Python 3.15 logo: a purple heart with "3.15" in blue and yellow, flanked by a blue and a yellow snake, with lightning bolts, pink clouds and laurel branches, framed by the release's headline features.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Jeff Triplett » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @webology@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        RE: mastodon.social/@hugovk/117411

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🎉 Happy 3.15 release to those who have been testing it in CI, and to everyone who prepped for it!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🐍🚀 Out now: Python 3.15.0 final!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        💤 Lazy imports!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🧊 frozendict builtin!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        💂 sentinel builtin!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        📉 Tachyon profiler!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🖼️ Frame pointers everywhere!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🛅 Unpacking in comprehensions!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🗣️ UTF-8 as the default encoding!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🛞 Stable ABI for free-threading!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🆕 Package startup config files!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ⌨️ TypedDict & TypeForm!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🐎 Faster JIT!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🎨 More colour!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🚌 & more!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Huge thanks to @sovtechfund supporting my work as release manager and enabling another smooth release!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Python 3.15 logo: a purple heart with "3.15" in blue and yellow, flanked by a blue and a yellow snake, with lightning bolts, pink clouds and laurel branches, framed by the release's headline features.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Alt...Python 3.15 logo: a purple heart with "3.15" in blue and yellow, flanked by a blue and a yellow snake, with lightning bolts, pink clouds and laurel branches, framed by the release's headline features.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Python 3.15 is now out! 🐍🎉

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            My favorite new features include:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • UTF-8 default file encoding everywhere (less buggy cross-platform reads/writes!)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • a new sampling profiler with nearly no overhead
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • explicit lazy imports: lazy import json
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • unpacking in comprehensions: [*sub for sub in nested]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • a built-in sentinel type
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • frozendict
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • pprint(data, expand=True)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • re.prefixmatch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • more helpful error messages & more color

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            A short demo of all my favorites:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            youtu.be/OD0QObnCZmA

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🐍🚀 Out now: Python 3.15.0 final!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              💤 Lazy imports!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🧊 frozendict builtin!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              💂 sentinel builtin!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              📉 Tachyon profiler!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🖼️ Frame pointers everywhere!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🛅 Unpacking in comprehensions!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🗣️ UTF-8 as the default encoding!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🛞 Stable ABI for free-threading!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🆕 Package startup config files!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ⌨️ TypedDict & TypeForm!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🐎 Faster JIT!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🎨 More colour!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🚌 & more!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Huge thanks to @sovtechfund supporting my work as release manager and enabling another smooth release!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Python 3.15 logo: a purple heart with "3.15" in blue and yellow, flanked by a blue and a yellow snake, with lightning bolts, pink clouds and laurel branches, framed by the release's headline features.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Alt...Python 3.15 logo: a purple heart with "3.15" in blue and yellow, flanked by a blue and a yellow snake, with lightning bolts, pink clouds and laurel branches, framed by the release's headline features.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Windows complete, tags pushed upstream, Sigstore signing done, adding files to python.org... nearly there...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Python Tip #282 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Read your package's data files with importlib.resources.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >>> from importlib import resources
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >>> resources.files("dinner").joinpath("recipes.json").read_text()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  '{"tacos": ["tortillas", "beans", "salsa"]}\n'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    In the meantime, the GitHub Actions build has finished, SBOMs created and some things uploaded.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The Windows process has paused a couple of times, awaiting button clicks to approve signing of binaries. The whole release team gets emails about this, so no sneaking out signed releases. 🥷

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Release logs showing GHA artifacts have been downloaded, SBOMs generated and uploaded. Now:
Waiting for files: Linux ✅  Windows ❌  Mac ❌

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Alt...Release logs showing GHA artifacts have been downloaded, SBOMs generated and uploaded. Now: Waiting for files: Linux ✅ Windows ❌ Mac ❌

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Azure Pipelines: "1 approval needs your review before this run can continue to Sign binaries" and a "Review" button.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Alt...Azure Pipelines: "1 approval needs your review before this run can continue to Sign binaries" and a "Review" button.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Azure Pipelines: "1 approval needs your review before this run can continue to Pack" and a "Review" button.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Alt...Azure Pipelines: "1 approval needs your review before this run can continue to Pack" and a "Review" button.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The release artifact build failed, need to bump blurb in that lockfile too:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      github.com/python/release-tool

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Like this:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      github.com/python/release-tool

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Now restarted that workflow with the existing CPython tag, no need for retag.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This builds source+docs tarballs and Android+iOS artifacts. Takes ~30 mins.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      github.com/python/release-tool

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Ned Deily has started the macOS installer builds. And I've started the Windows installer builds, takes ~2 hours:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      dev.azure.com/Python/cpython/_

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      GitHub Actions building docs, source, iOS and Android artifacts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Alt...GitHub Actions building docs, source, iOS and Android artifacts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Windows build on Azure Pipelines, currently doing doing PGO builds to make the compiled C code faster.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Alt...Windows build on Azure Pipelines, currently doing doing PGO builds to make the compiled C code faster.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Django News » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @djangonews@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        📰 Issue 358: Django 6.1.2, 6.0.9, and 5.2.18 Security Releases and Djangonaut Space Session 7

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        django-news.com/archive/issue-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          OK, merged and released (really easy using Trusted Publishing, docs.pypi.org/trusted-publishe), lockfile updated and backported.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          github.com/python/cpython/pull
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          github.com/python/cpython/pull

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Restarted the release and that's better now.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          A temporary branch and tag has been pushed to my fork, and I need to verify the release commit does not contain any unexpected changes:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          github.com/hugovk/cpython/comm

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          All looks good. Next to start the installer and artifact builds.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Pushing the big launch button:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            .venv/bin/python run_release.py --repository ../cpython --ssh-user hugovk --release 3.15.0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ... and immediately ran into a bug with our changelog tool `blurb`, because we've had no new NEWS fragments since rc3 :)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This needs a fix in blurb, a new PyPI release, and then the docs lockfile regenerated and backported to 3.15.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Fix PR: github.com/python/blurb/pull/92

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Start of release logs after running the command. A bunch of green checks pass, then a traceback begins.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Alt...Start of release logs after running the command. A bunch of green checks pass, then a traceback begins.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Traceback ending with:

blurb._blurb_file.BlurbError: Error in Misc/NEWS.d/3.15.0.rst:8:
Invalid gh-issue number: '0' (must be >= 32426)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Alt...Traceback ending with: blurb._blurb_file.BlurbError: Error in Misc/NEWS.d/3.15.0.rst:8: Invalid gh-issue number: '0' (must be >= 32426)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Pydantic finally added support for Python 3.15 yesterday, and aiohttp on Monday, so I *could* use Python 3.15 rc3 to run the release scripts and release Python 3.15.0 final!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              But... I'm going to respect our seven-day cooldown, and stick with 3.14.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              You also use cooldowns for your dependencies, right?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              blog.yossarian.net/2025/11/21/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Python 3.15.0 release day (second attempt)!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ✅ Release date updated in What's New in Python 3.15 github.com/python/cpython/pull

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ✅ No release blockers github.com/python/cpython/labe

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ✅ No deferred blockers github.com/python/cpython/labe

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ✅ Buildbots all green buildbot.python.org/release-st

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Python Release Status Dashboard.
All green from 3.16 to 3.11, and importantly 3.15 is green.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Alt...Python Release Status Dashboard. All green from 3.16 to 3.11, and importantly 3.15 is green.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  What's New in Python 3.15:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  tomllib

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  tomllib now supports TOML 1.1.0, a backwards compatible update:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  * Newlines and trailing commas allowed in inline tables: tbl = { key = "a string", moar-tbl = { key = 1, }, }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  * \xHH escapes for codepoints under 255, and \e for the escape character: csi = "\e["

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  * Seconds optional in datetime and time values: dt = 2010-02-03 14:15

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (Contributed by Taneli Hukkinen.)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  docs.python.org/3.15/whatsnew/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    AodeRelay boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]dewomser » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @dewomser@social.tchncs.de

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Wasserstand-Script angepasst. Es werden jetzt die Pegel der 2 berühmtesten Nebenflüsse des Rheins bei Worms in Echtzeit hingeschrieben, Pfrimm und Eisbach

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Wenn sie keine API anbieten ,…
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    github.com/dewomser/baeche-in-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]James Bennett [he/him] » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @ubernostrum@infosec.exchange

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Would people be interested in a blog post or perhaps a series of posts walking through the process of making some contributions to ?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      I have some free time (i.e., unemployed), and a couple things I’d like to do, mostly in documentation, and I figured if there’s interest I can write it up.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Paco Hope boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Moriel 🏳️‍⚧️ » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @moriel@chaosfem.tw

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        i woke up this morning at 4:30am to use the bathroom and could not get back to sleep afterwards. As i lay in bed in the pre-dawn dark my mind went down strange pathways and i found myself having a revelation: there is an unmet need in the world for a program that can sort files - at the bit level! Thus, i wrote sortbits.py a simple command line tool to let you sort all of the bits in a file. You can either sort it in ascending order so the zeros come before the ones, or you can sort it in descending order so the ones come before the zeros. Once your file is sorted you will be able to use efficient search algorithms to find the exact bit that you are looking for. So here is the script for all to use and enjoy!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        You're welcome.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        moriels-musings.com/wp-content

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          “The TemporaryDirectory context manager is great if you need to temporarily change your current working directory or if you need anything more complex than a single temporary filename.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Read more 👉 pym.dev/temporary-files/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Ned Batchelder » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @nedbat@hachyderm.io

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            An unexpected perk of running a meetup: When a member brings you a gift from Armenia:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            A bottle of "Python" branded vodka.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Alt...A bottle of "Python" branded vodka.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]anarcat » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @Anarcat@kolektiva.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              PSA: Europe changes time forward soon, North America next, for the last time? anarc.at/blog/2026-10-08-dst-w -planet -planet

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Python Tip #281 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Bundle your package into one runnable file with zipapp.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                $ python3 -m zipapp src -m "greet.cli:main" -p "/usr/bin/env python3" -o greet.pyz
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                $ python3 greet.pyz
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Hello from greet!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                $ ./greet.pyz
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Hello from greet!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                That ".pyz" file is a zip file holding everything in src (here, yesterday's greet package) plus a __main__‍.py file that zipapp writes at its root:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                # -*- coding: utf-8 -*-
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                import greet.cli
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                greet.cli.main()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Python 3.6 added the "secrets" module to Python about 10 years ago. At that point, it had a "random" module for many years already.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  If you've ever wondered why Python has two different modules for generating random numbers, you might enjoy this article I wrote about it for LWN.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  It's subscriber-only at the moment, but this link will give you access to read it: lwn.net/SubscriberLink/1097468

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    RE: mastodon.social/@hugovk/117401

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    if you're also looking forward to 3.15's (hopeful) release day tomorrow, check out Hugo's thread on what's new tibdits.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    I've learned about a few things I'm definitely going to be using once I upgrade.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    What's New in Python 3.15:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    🦋 pprint 🖨️

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * Add an expand keyword argument for pprint.pprint(), pprint.pformat(), pprint.pp(). If true, the output will be formatted similar to pretty-printed json.dumps() when indent is supplied. (Contributed by Stefan Todoran, Semyon Moroz and Hugo van Kemenade.)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    * Add t-string support to pprint. (Contributed by Loïc Simon and Hugo van Kemenade.)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    docs.python.org/3.15/whatsnew/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        📺 Watch PSF Executive Director @baconandcoconut close out with a fireside chat on stewarding Rust and Python: AI's impact, security, governance, and leading global communities. youtu.be/z5_tEecNkRs?si=EFL6hA

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Clément "KPTN" OUDOT » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @clementoudot@framapiaf.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Python Tip #253 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Avoid import side effects in your Python modules.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          As a general rule, the top level of a module should only DEFINE things. Define functions, classes, constants and any other objects meant to be accessed after import. But don't print, prompt for input, write to files, etc.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Python Tip #280 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Make your package runnable with a __main__‍.py file.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            greet
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ├── cli‍.py
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ├── __init__‍.py
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            └── __main__‍.py

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            When you run a package with "python3 -m", Python runs its __main__‍.py file:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            $ python3 -m greet
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Hello from greet!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Without that file, the package can't be run directly:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            $ python3 -m food_utils
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No module named food_utils.__main__; 'food_utils' is a package and cannot be directly executed

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              What's New in Python 3.15:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🦋 pprint 🖨️

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              * Add an expand keyword argument for pprint.pprint(), pprint.pformat(), pprint.pp(). If true, the output will be formatted similar to pretty-printed json.dumps() when indent is supplied. (Contributed by Stefan Todoran, Semyon Moroz and Hugo van Kemenade.)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              * Add t-string support to pprint. (Contributed by Loïc Simon and Hugo van Kemenade.)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              docs.python.org/3.15/whatsnew/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                “The next time you need to hard-wrap text in Python, check out the textwrap module's wrap and fill functions.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Read more 👉 pym.dev/wrapping-text/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  🗞️🐍check your inboxes, a new PSF newsletter shipped!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Want to stay up to date on the latest PSF, @pycon US, @pypi, and news? Subscribe today: python.org/psf/newsletter/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Wolf » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @YesJustWolf@hachyderm.io

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    I'm super excited! My `layout uv` PR was merged into direnv and shipped in v2.38.1. Jonas Chevalier was the final reviewer, decider, and he merged and released my PR. Many people contributed advice. I tried to write something that I needed myself, and in such a way it would be useful to everyone else and fit into the tool I was trying to grow.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    If your Python project uses uv, put `layout uv` in your .envrc. When you cd into the project, direnv syncs the environment from your lockfile and puts it on your PATH, and it all unwinds when you leave.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    direnv install: direnv.net/docs/installation.h

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    uv: docs.astral.sh/uv/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The PR (now closed, but for historical context): github.com/direnv/direnv/pull/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      “For most applications of random numbers, the random module is good enough.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Read more 👉 pym.dev/random-numbers/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]codingjoe :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @codingjoe@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Did you know, that GitHub Markdown support Django template highlighting? Just use html+django for your next code block:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ```html+django
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <a href="{% url "home" %}>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ```

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Python Tip #279 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Simplify your package's interface with __init__‍.py.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Yesterday's tip noted that an empty __init__‍.py file is common and completely fine.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          But that file doesn't HAVE to be empty.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Python's json module is actually a package, and its __init__‍.py file imports all the objects relevant to json module users:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          from .decoder import JSONDecoder, JSONDecodeError
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          from .encoder import JSONEncoder

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            What's New in Python 3.14:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            "The import time for several standard library modules has been improved, including annotationlib, ast, asyncio, base64, cmd, csv, gettext, importlib.util, locale, mimetypes, optparse, pickle, pprint, pstats, shlex, socket, string, subprocess, threading, tomllib, types, and zipfile."

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            docs.python.org/3.14/whatsnew/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Python Tip #278 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Always include a __init__‍.py file in your Python packages. Even an empty one.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              food_utils
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ├── fruits‍.py
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ├── __init__‍.py
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              └── non_fruits‍.py

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              A package is a directory that Python treats like a module.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              When you import the package, the module you get back IS the __init__‍.py file:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> import food_utils
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> food_utils
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <module 'food_utils' from '/home/trey/food_utils/__init__‍.py'>

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                “The break statement in that inner loop will only break out of the inner loop.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Read more 👉 pym.dev/breaking-out-of-a-loop/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  AodeRelay boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]TUXEDO Computers » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @tuxedocomputers@mastodontech.de

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Linux, Hardware & Programmieren – selbst ausprobieren!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Im Rahmen der Code Week Bayern lädt TUXEDO Schülerinnen und Schüler zu zwei Workshops ein:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  29.10.2026: Hardware zum Anfassen – Laptop öffnen, Komponenten kennenlernen und selbst arbeiten.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  05.11.2026: Erste Schritte mit Python – programmieren lernen ohne Vorkenntnisse.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  📅 Jeweils 16:30–18:30 Uhr
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  📍 TUXEDO Headquarter, Alter Postweg 101, Augsburg

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Bitte vorher anmelden.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  bayern.codeweek.de/programm/ev

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Fabien LOISON (FLOZz) » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @FLOZz@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    🚀 rst2gemtext v0.7.1 released

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    rst2gemtext converts reStructuredText to Gemtext (Gemini markup format).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This version adds support for csv-table with irregular column counts across rows.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ➡️ github.com/flozz/rst2gemtext/r

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python Tip #277 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      For substring checks, use the "in" operator.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python has a special operator that's meant JUST for checking whether one thing is contained inside another:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >>> part = "Python"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >>> whole = "I enjoy writing Python code."
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >>> part in whole
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      True

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      More on this:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      pym.dev/substring-check/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        “I almost always need a temporary file with an actual name, so I pretty much always use NamedTemporaryFile instead of TemporaryFile.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Read more 👉 pym.dev/temporary-files/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Python Tip #276 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Make self positional-only when accepting "**kwargs".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          This class accepts arbitrary keyword arguments... except for self:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          >>> class Namespace:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ... def __init__(self, **kwargs):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ... for name, value in kwargs.items():
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ... setattr(self, name, value)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          >>> space = Namespace(other=2, self=1)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Traceback (most recent call last):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          TypeError: Namespace.__init__() got multiple values for argument 'self'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            “Sophisticated isn't bad, but don't use a more complex option when a simpler one might be easier to read and easier to maintain.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Read more 👉 pym.dev/default-dictionary-val

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Fun test improvement by @akx for @pillow recently:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Use an id in pytest.param to prevent 30,000 Xs showing in the test logs!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              github.com/python-pillow/Pillo

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Test logs beginning with some test names, followed by the word "PASSED".

Then Tests/test_imagemorph.py::test_pattern_syntax_error followed by 30,000 "X" characters in a row, then finally "PASSED".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Alt...Test logs beginning with some test names, followed by the word "PASSED". Then Tests/test_imagemorph.py::test_pattern_syntax_error followed by 30,000 "X" characters in a row, then finally "PASSED".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Python Tip #275 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Pre-fill arguments with functools.partial.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> from functools import partial
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> hex_to_int = partial(int, base=16)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> hex_to_int("CAFE")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                51966

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                This is sometimes called "partially evaluating" a function.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                I prefer this:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                hex_to_int = partial(int, base=16)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Instead of this:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                hex_to_int = lambda s: int(s, base=16)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                partial is more specialized than "lambda": its only purpose is to call a callable with certain arguments preset.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Get yer rc3 here!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  You know the drill: please test and report bugs!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Library maintainers, join the Cool Testers' Club 😎 and add 3.15 to your test matrix:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  hugovk.dev/blog/2026/help-test

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Python 3.15.0 final planned for 2026-10-09.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The three lazy blockers are finally merged into `main`, two have been backported to `3.15`, but wait, the third failed, because it depends on some tests not yet backported.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    github.com/python/cpython/pull

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Okay, backport created, merge conflict fixed, CI is now spinning, and automerge enabled. That'll merge in about 15 mins, then we can update it into the last blocker PR, that should merge about 30 mins later, and rc3 can begin!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    github.com/python/cpython/pull

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      “Interestingly, negative numbers do work for self-concatenation, they'll just always give an empty string.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Read more 👉 pym.dev/self-concatenation/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Ned Batchelder » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @nedbat@hachyderm.io

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Now there's an official time complexities page in the docs: docs.python.org/3/builtins/tim
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        You don't have to point to the old wiki page (wiki.python.org/moin/TimeCompl) any more!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          JP Mens™ boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Kevin P. Fleming [he/him] » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @kevin@mastodon.km6g.us

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          /me begins removing support for Python 3.10 from his open source projects

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Python Tip #274 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Prefer to name your functions.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Instead of this:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >>> sorted(items, key=lambda item: int(item.split()[0]))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ['1 avocado', '2 tomatoes', '4 clementines', '6 bananas']

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            I'd usually write this:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >>> def by_quantity(item):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ... quantity, name = item.split()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ... return int(quantity)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >>> sorted(items, key=by_quantity)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ['1 avocado', '2 tomatoes', '4 clementines', '6 bananas']

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Following recent tradition, I’m going to add a surprise third release candidate!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              It makes sense to include the last-minute lazy-import fixes in 3.15.0 final.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              It also makes sense to give time to test them properly, so today’s planned 3.15.0 final is postponed, and I’m going to release a 3.15.0rc3 tomorrow, assuming everything is in place.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              And then 3.15.0 final will follow about week later. Exact date to be announced.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              We’re nearly there! 🤞

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              discuss.python.org/t/python-3-

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                “This makes our code a little bit shorter as we're debugging, and also makes the output a little bit more helpful.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Read more 👉 pym.dev/debugging-with-f-strin

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]halcy​ :icosahedron: [He/Him] » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @halcy@icosahedron.website

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  new post: QR codes that can be read multiple different ways!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Including a \\ world first // (?) four different payloads in a single QR code!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  halcy.de/blog/2026/10/01/qr-co

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]codingjoe :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @codingjoe@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    django-letter 0.5 gets a new `attached_static` template tag, a "tracking blocker" mode and a face lift.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    github.com/codingjoe/django-le

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Lobsters » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @lobsters@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      django-modern-rest@0.16.0 release lobste.rs/s/fujfew

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Nicolas Évrard » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @nicoe@mamot.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        It's been 25 years I program in and while I understand the name mangling behind the double underscore variables and everything, I still can't find why I would want to use it.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        From my point of view this is one historical quirk that will stay forever but shouldn't be used.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Python Software Foundation » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @ThePSF@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          In July 2026 Python core developers and special guests sat down at the Language Summit at 2026, to discuss the future of the Python programming language including free-threading, , garbage collection, and namespaces. Find a summary on the PSF blog ⬇️
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          pyfound.blogspot.com/2026/09/p

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            That passed, the buildbots are back to green ✅

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            buildbot.python.org/release-st

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Next, issues/PRs with release-blocker label:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            github.com/python/cpython/labe

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            One is a straightforward docs update, I marked as blocker so I don't forget, to change future tense to present.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Then three last-minute lazy import blockers that need a closer look.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Release dashboard: 3.16 yellow, 3.15-3.11 green.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Alt...Release dashboard: 3.16 yellow, 3.15-3.11 green.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Issues and PRs with release-blocker labels.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Alt...Issues and PRs with release-blocker labels.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              RuntimeError: join took too long: <Process name='Process-2107' pid=2290504 parent=2276730 started daemon>

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              buildbot.python.org/#/builders

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Looks like a flaky test, and github.com/python/cpython/issu has a fix to increase a timeout. Will try restarting for now.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              buildbot.python.org/#/builders

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The US woke up and they're both back up!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                github.com/python/psf-salt/pul

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Now, there's one tier 1 failure to check.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                buildbot.python.org/release-st

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Buildbot status: 3.16 yellow, 3.15 unreleasable, 3.14-4.11 green.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Alt...Buildbot status: 3.16 yellow, 3.15 unreleasable, 3.14-4.11 green.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                "AMD64 Fedora Stable Refleaks 3.15" is failing.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Alt..."AMD64 Fedora Stable Refleaks 3.15" is failing.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Python 3.15.0 release day!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  First blocker, we're getting 503s on docs.python.org and buildbot.python.org, the latter of which is needed to check the tier 1 and 2 buildbots are passing, needed for a release.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  It's a certificate issue from an incompatible pyOpenSSL upgrade. We're waiting for the US to wake up and poke it with a stick.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  buildbot.python.org: 503 Service Unavailable

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Alt...buildbot.python.org: 503 Service Unavailable

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  docs.python.org: 503 Service Unavailable

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Alt...docs.python.org: 503 Service Unavailable

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Ian Kluft ✅🖥️📡 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @KO6YQ@pnw.zone

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    "One namespace to namespace them all" by @ThePSF - summary of presentation by Pablo Galindo Salgado from Python Language Summit 2026 in July. 🐍 is considering a standard library reserved namespace "std" to prevent files in a user's package search path from accidentally overriding them. Pros & cons discussed: can't break previous packages but could allow future standard packages to require it. Possible to unbundle std packages to PyPI. blog.python.org/2026/09/langua

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Graham Dumpleton » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @grahamdumpleton@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python 3.15 ships a sampling profiler, Tachyon, as profiling.sampling. I wrote a set of hands-on JupyterLab workshops to learn it myself, mostly to find out whether wrapture could make use of it. Short answer, no, but they turned out to be a good way into the profiler and are now ready for others. 21 workshops over two collections, launchable on Binder with nothing to install.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      grahamdumpleton.me/posts/2026/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Yaal Coop » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @yaal@toot.aquilenet.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Changement de saison, c'est l'heure du bilan. Sous ces chaleurs estivales caniculaires, à quoi a contribué l'équipe de Yaal Coop ?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        On ne vous fait pas languir, à plein de choses comme d'habitude, mais principalement sur les outils dans le cadre de @nlnet @NGIZero avec @IndieHosters en préparation de contributions futures à @lasuite pour une utilisation dans @LaSuiteCoop 🤯

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Yaal Coop » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @yaal@toot.aquilenet.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          New season, time to look back. What did the Yaal Coop team work on during this scorching summer heatwave?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          We won't keep you waiting: lots of things as usual, but mostly tools, funded by @nlnet @NGIZero, together with @IndieHosters. This work prepares future contributions to @lasuite, to be used in @LaSuiteCoop 🤯

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          yaal.coop/en/blog/dernieres-co

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Trey Hunner 🐍 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @treyhunner@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            “Fortunately, as of Python 3.12, instead of specifying delete=False, we can just specify delete_on_close=False:”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Read more 👉 pym.dev/temporary-files/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Hugo van Kemenade » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @hugovk@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              What's New in Python 3.15:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ⚙️ sys ⚙️

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              * Add sys.abi_info namespace to improve access to ABI information. (Contributed by Klaus Zimmermann.)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              docs.python.org/3.15/whatsnew/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Paul :python: :django: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @pbx@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                We're still at PowerDash! Are you a full stack engineer with a strong / bent who is into ? (Or do you know one?)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                It's a great little company in an important sector.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The office is in Cambridge MA (Harvard Square), with full use of the adjoining Workbar co-working space. Role is on-site or hybrid.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Senior Full Stack Software Engineer: apply.workable.com/powerdash/j

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Julien Palard » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @mdk@mamot.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Bon c’est bien beau mais on fait quoi de python.fr ?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  discuss.afpy.org/t/que-faire-d

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  (partage si t’as pas d’idées, les autres en ont :D)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Mike Driscoll » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @driscollis@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Who's still using black? If you don't know what I'm talking about, black is a code formatter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Jochie 👨🏻‍💻🏳️‍🌈 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @jochie@strangeweb.page

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      TIL (, ):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      1. When styling a particular UI element in generic fashion in the main application, that will impact the same UI element in, for instance, a temporary modal/popup.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2. Apparently the Select and SelectionList UI elements use OptionList under the hood? Styling it caused the first 2 to be confusingly impacted.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Lessons for me:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      - Avoid styling generic UI elements, unlike most textual.textualize.io/ examples; target the specific ids instead.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      - Revisit textual.textualize.io/guide/CS

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Back to top - More...