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

[?]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/

      [?]Django London » 🌐
      @djangolondon@fosstodon.org

      Django London is back for October! 🐍

      📅 Wed 14 Oct, 6:15pm (a Wednesday this time!)
      📍 Kraken, 182 Oxford Street

      🎤 Who lost our customers? Investigating a human error, by Sofia Fischer

      Why "human error" should never be the root cause of an incident.

      🍕 Thanks to Kraken for sponsoring!

      RSVP: meetup.com/djangolondon/events

        AodeRelay boosted

        [?]David Hagar [he/him/his] » 🌐
        @cyclops@social.moltenaether.com

        Stars in my galactic star map application, generated randomly with real science and math backing them up. Still working on it.

        I need to switch over to a 3D rendering library to minimize data transfer to the client to render the map. Lots, lots, lots, and lots of bugs to fix (I'm up to 120 that I've noticed myself). However, it's coming along nicely.

        Yes, I used and will continue to use AI. Please don't comment about how evil it is or how I'm not really doing anything and yada yada yada. I don't care what you think. For those that want to know, I did code this, for the first 5 versions I used no AI, all the math was by hand, but as much as I studied I could not continue. I am a math teacher, not a coder, so I turned to AI to make my vision come true after going as far as I could without. As an amateur developer, I am using my math skills to research and design the algorithms before I hand off to AI for implementation and I review code by hand as well.

        This is all open sourced under creative commons with attribution.

        github.com/dwhagar/planetGen

        This screenshot shows a digital 3D space-mapping interface set against a deep navy-purple background, divided into three main sections: a wireframe viewport on the left, layer controls in the center, and a data card on the right. The primary visualizer depicts a transparent, cuboid volume bounded by thin purple perspective grid lines, filled with a warm amber haze that fades toward the top. Scattered within this volume are hundreds of small, glowing starlight points, predominantly warm white and amber, with a few notable individual stars glowing bright mint green. A scale indicator in the lower-left corner indicates that the volume spans 1.25 sectors, equivalent to 5 parsecs or 16.3 light-years.

Positioned directly to the right of the viewport is a vertical column labeled "Slabs," which displays eight stacked buttons with connector lines pointing to horizontal layers inside the 3D cube. These buttons track exploration progress from bottom to top: slab number 50, slab number 51, and slab number 52 are each 100 percent charted, while slab number 53 is approximately 99.62 percent charted, slab number 54 is approximately 82.32 percent charted, and slab number 55 is approximately 19.29 percent charted. The top two layers, slab number 56 and slab number 57, are both listed as "Unknown".

The right side of the screen features a dark panel with technical metrics for "Block 76-184 (27 sectors a side)". It details Rings spanning 2052 to 2078, Layers from 149 to 175, Slots in ring 2052 from 4710 to 4735, and Slots in ring 2078 from 5299 to 5327. Total sectors are given as 1.58 times 10 to the 4th power (15,800 sectors), with 1.06 times 10 to the 4th power generated, indicating 67 percent completion. Center coordinates along the x, y, and z axes are negative 6175.9, 5488.1, and 648.0 parsecs, with a distance from the core of 8.26 kiloparsecs, or 2.69 times 10 to the 4th power light-years. The panel concludes with italicized instructions explaining that users can click a slab on the map or select a button beside it, drag or use Shift plus the arrow keys to rotate, right-drag or Shift-drag to move, scroll or pinch to zoom, and select "Reset view" to restore the default perspective.

        Alt...This screenshot shows a digital 3D space-mapping interface set against a deep navy-purple background, divided into three main sections: a wireframe viewport on the left, layer controls in the center, and a data card on the right. The primary visualizer depicts a transparent, cuboid volume bounded by thin purple perspective grid lines, filled with a warm amber haze that fades toward the top. Scattered within this volume are hundreds of small, glowing starlight points, predominantly warm white and amber, with a few notable individual stars glowing bright mint green. A scale indicator in the lower-left corner indicates that the volume spans 1.25 sectors, equivalent to 5 parsecs or 16.3 light-years. Positioned directly to the right of the viewport is a vertical column labeled "Slabs," which displays eight stacked buttons with connector lines pointing to horizontal layers inside the 3D cube. These buttons track exploration progress from bottom to top: slab number 50, slab number 51, and slab number 52 are each 100 percent charted, while slab number 53 is approximately 99.62 percent charted, slab number 54 is approximately 82.32 percent charted, and slab number 55 is approximately 19.29 percent charted. The top two layers, slab number 56 and slab number 57, are both listed as "Unknown". The right side of the screen features a dark panel with technical metrics for "Block 76-184 (27 sectors a side)". It details Rings spanning 2052 to 2078, Layers from 149 to 175, Slots in ring 2052 from 4710 to 4735, and Slots in ring 2078 from 5299 to 5327. Total sectors are given as 1.58 times 10 to the 4th power (15,800 sectors), with 1.06 times 10 to the 4th power generated, indicating 67 percent completion. Center coordinates along the x, y, and z axes are negative 6175.9, 5488.1, and 648.0 parsecs, with a distance from the core of 8.26 kiloparsecs, or 2.69 times 10 to the 4th power light-years. The panel concludes with italicized instructions explaining that users can click a slab on the map or select a button beside it, drag or use Shift plus the arrow keys to rotate, right-drag or Shift-drag to move, scroll or pinch to zoom, and select "Reset view" to restore the default perspective.

          AodeRelay boosted

          [?]Harald Eisenmenger » 🌐
          @eisenmenger@mastodon.social

          Neue VHS-Kurse im 4. Quartal 2026!

          Von Oktober bis Dezember geht es in meinen Kursen u. a. um 🐧 Linux & Open Source, 🤖 KI mit ChatGPT und Mistral Le Chat, 🐍 Python, Netzwerke, VirtualBox und macOS.

          Online und in Präsenz – praxisnah und auch für Einsteiger.

          Alle Termine und Infos:
          eisenmenger.training/meine-kur

            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

              AodeRelay boosted

              [?]Tim Chase » 🌐
              @gumnos@mastodon.bsd.cafe

              @amoroso @deadparrotbbs.com

              Fun read, and definitely touches on many of the reasons I prefer

              With the

              > I do not want a financial workbook turned into a pile of numbers that requires me to reconstruct all the formulas manually

              I actually *want* much of my data in plain-text (usually CSV or TSV, but sometimes recutils¹ format or remind² format for my calendar or plain-text accounting format ³for my finances) separate from the formulae/processes that operate on it. Sometimes that's an or script, for the calendar, remind(1) processes those, and for my finances, ledger(1) or hledger(1) processes those). It brings all those benefits of plain-text to each of those domains, too.

              Similarly

              > A word processor can handle page layout that would be tedious to reproduce manually.

              I've lost countless hours fixing things in Word/LibreOffice/Abiword after moving an image a smidge to the left caused reflow of the entire document, or placing the cursor ended up in bold/italic when I don't expect it to, or modifying "this is what a section-header looks like" got inconsistently applied throughout, or lists got mangled, or some other tweak messed up the entire document.

              So I greatly prefer explicit markup that semantically specifies my intent, then lets some other process mung it for output. I've hand-written HTML for decades (it felt like the Reveal Codes functionality in WordPerfect where I started) so it's my go-to, but I'm also cool with Markdown, LaTeX, or DocBook for the same plain-text reasons. And pandoc makes quick work of converting between formats.

              One additional benefit of plain-text I didn't see in the article is that it compresses ridiculously well, so whether I manually gzip up files, or my OS uses ZFS giving me transparent compression at the file-system layer, it saves me a great deal of disk-space.

              But my conclusion is similar—use plain-text for everything I can where it makes sense gives me longevity of my data (and open formats for the exceptions)

              ⸻
              ¹ gnu.org/software/recutils/
              ² dianne.skoll.ca/projects/remin
              ³ plaintextaccounting.org/

                [?]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

                  Lily boosted

                  [?]Django on the Med 🏖️ » 🌐
                  @djangomed@fosstodon.org

                  Another little bit of Django on the Med 2026 from Pescara 🏖️

                  This time Juliana Nicacio tells us who she is, how she discovered @django and what brought her to Pescara.

                  Juliana is a Django developer, a @djangonaut participant and a familiar face at Django community events, including @djangoconeurope .

                  More voices and moments from our three days together are coming soon 😊

                  Alt...Video interview with Juliana Nicacio in Piazza Sacro Cuore, Pescara, in front of the Django on the Med 2026 venue.

                    [?]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".

                              [?]farseen » 🌐
                              @farseen@fedi.nptr.xyz

                              Hi, I'm looking for paid gigs.
                              I have experience in #Rust, #C, #Python, #Golang, JS/TS and #Zig. I'm also familiar with #C++ and #PHP.
                              My rate is 20 USD/hr.
                              My timezone is GMT+5.30, but I can be available online for syncing for an 8 hour block of your choosing from GMT 4AM to GMT 3PM.
                              I can do the first 16 hours for free, so that you can test the quality of my services before you commit.
                              Here's my resume: https://picoshare.nptr.xyz/-zXhjBYQipy/Resume%20-%20September%202026.pdf

                              #getfedihired #fedijobsearch

                                [?]The Unknown Universe » 🌐
                                @unknownuniverse@unkn.uk

                                Tracking family Navidrome streams without account-hopping 🎵

                                Navidrome is great for streaming self-hosted FLACs, but checking what my kids are listening to meant constantly logging in and out of different accounts and since playback history lives entirely in client apps, past history vanishes into the void.

                                Instead of fighting third-party scrobblers or writing complicated webhooks, I just pointed a tiny Python script straight at the local SQLite DB. Now, a regular cron job drops a clean, zero-tracker static HTML dashboard into an Nginx container. No cloud services, no telemetry, just a local page to see family play counts.

                                Navidrome Dashboard can be found on my tools page here:
                                🔗 https://unknownuniverse.uk/tools


                                #SelfHosting #HomeLab #Navidrome #Python #Linux #FOSS

                                  AodeRelay boosted

                                  [?]Jobs for Developers » 🤖 🌐
                                  @jobsfordevelopers@mastodon.world

                                  [?]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.

                                      AodeRelay boosted

                                      [?]David Hagar [he/him/his] » 🌐
                                      @cyclops@social.moltenaether.com

                                      Getting ready for my next phase of development for my galaxy generator. I'm going to next develop an algorithm to generate the tech level (TL) of a technological civilization and also calculate a habitability index for worlds. Now this is of course mostly for game mechanics reasons but I want it based as much in science with a nod to established SciFi as possible. Here's the research docs.

                                      github.com/dwhagar/planetGen/c

                                        Russ Sharek boosted

                                        [?]mumpkin » 🌐
                                        @mitrouille@mastodon.gamedev.place

                                        Hello ! I'm developing a new image file format, it's originally a joke project but I want to push it as far as possible.

                                        However, I currently need 4 palettes of 31 colors and I know nothing about color theory, can someone provide me some advice about palette creation ?

                                        codeberg.org/UWU-format

                                        A cat UwU

                                        Alt...A cat UwU

                                          [?]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/

                                              [?]DRANE PACA » 🌐
                                              @dranepaca@mastodon.mim-libre.fr

                                              🚀 , plateforme incontournable des de la 6e au post-bac ! 🔢🤖💻

                                              ✅ Accessible via l’ENT, sans compte ni gestion de fichiers
                                              Des milliers de ressources créées par des enseignants
                                              , , , ...

                                              pedagogie.ac-aix-marseille.fr/

                                                mmu_man boosted

                                                [?]Hydrooos 🌍🏞️🌱🔍💧💧🐟🪱🦠 » 🌐
                                                @hydrooos@piaille.fr

                                                Bonjour,
                                                Si jamais vous ou si vous avez dans votre réseau un·e personne maitrisant le qui serait intéréséée pour une mission de presta courte (de 3j environs) sur un projet déjà avancé de données environnementales liées à l'énergie et dispo rapidement faites signe !
                                                (j'ai pas plus de détails mais je fais la mise en relation)
                                                🔄 appréciés

                                                (enfin pas moi)

                                                  [?]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!

                                                    [?]Django on the Med 🏖️ » 🌐
                                                    @djangomed@fosstodon.org

                                                    A week ago today, the third and final day of Django on the Med 2026 was just beginning in Pescara 🏖️

                                                    Here are a few glimpses from those three days together: Django, Abruzzo, conversations, food and plenty of good moments 😊

                                                    We still have lots more to share from Pescara!

                                                    Alt...A collection of short video clips captured during the three days of Django on the Med 2026 in Pescara.

                                                      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

                                                        [?]Seth Larson » 🌐
                                                        @sethmlarson@mastodon.social

                                                        Time to upgrade your versions! 🐍🛡️

                                                        3.14.8, 3.13.16, 3.12.15, 3.11.17, and 3.10.22 were just published and contain significant security fixes (8 CVEs) including 1 critical and 2 high severity fixes. Thanks to the PSRT and RMs for coordinating.

                                                        blog.python.org/2026/10/python

                                                          [?]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

                                                                      [?]Brian Kohan » 🌐
                                                                      @bckohan@fosstodon.org

                                                                      Here's a new sphinxcontrib directive for documenting your enums as tables. dataclass enums and enum-properties tuples are expanded into columns. Has additional goodies like an optional docstring-driven legend and download buttons.

                                                                      github.com/sphinx-contrib/enum

                                                                        [?]Python Rennes » 🌐
                                                                        @pythonrennes@social.breizhcamp.org

                                                                        deux articles-tutoriels de Bob Belderbos pour expliquer comment développer et intégrer un binaire rust dans un paquet Python et s'en servir :
                                                                        - rsbit.es/rust-in-python-pyo3-m : configuration technique
                                                                        - belderbos.dev/blog/how-librari : encapsulation de rust dans Python

                                                                          [?]Ronny Vedrilla » 🌐
                                                                          @GitRon@mastodon.social

                                                                          🐴📬 django-pony-express v3.2.1 is out!

                                                                          This release welcomes a new contributor: thanks to @VerboseFerret for his first PRs! 🎉

                                                                          • Email subjects are always translated into the project language
                                                                          • Language variant normalisation removed

                                                                          github.com/ambient-innovation/

                                                                            Marcos Dione boosted

                                                                            [?]David Lord :python: » 🌐
                                                                            @davidism@mas.to

                                                                            RE: mas.to/@davidism/1172923990498

                                                                            The beginning of the month, when every junk producer's token limit resets, and we get a whole new wave of junk. Turning off PRs helped a lot, but they just started opening "test issue, checking if my API access is broken", or commenting or emailing their patches instead. I really wish I knew how to escape this without turning off community interaction entirely.

                                                                            Dr. Sobek boosted

                                                                            [?]David Lord :python: » 🌐
                                                                            @davidism@mas.to

                                                                            I've turned off pull requests from non-members for Flask, Werkzeug, Jinja, and Click this week, and have enjoyed not waking up to a fresh wave of AI junk every morning. I think I'm going to update our contributing guide to say "introduce yourself and how you use the library in chat first if you want to contribute pull requests". Sad that we had to go here, but aside from conference sprints we weren't really getting outside contribution anyway (which is also sad, but that's been the case a lot longer than AI has been around).

                                                                                [?]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

                                                                                              [?]Python Rennes » 🌐
                                                                                              @pythonrennes@social.breizhcamp.org

                                                                                              deux articles-tutoriels de Bob Belderbos pour expliquer comment développer et intégrer un binaire rust dans un paquet Python et s'en servir :
                                                                                              - rsbit.es/rust-in-python-pyo3-m : configuration technique
                                                                                              - belderbos.dev/blog/how-librari : encapsulation de rust dans Python

                                                                                                [?]Python Rennes » 🌐
                                                                                                @pythonrennes@social.breizhcamp.org

                                                                                                📣 la prochaine session de aura lieu chez (🙏 pour l'accueil et le sponsoring) le lundi 12 octobre à 18h45. Inscription gratuite mais nécessaire sur meetup.com/python-rennes/event
                                                                                                - @pascal_le_merrer nous parlera de VCRpy pour accélérer et fiabiliser les tests d'intégration
                                                                                                - @nledez nous parlera du hack de bugs avec et sans .

                                                                                                [?]Python Rennes » 🌐
                                                                                                @pythonrennes@social.breizhcamp.org

                                                                                                Vous utilisez Redis (redis.io/), et avez besoin d'écrire un script, mais coder en Lua (lua.org/) vous freine dans votre élan ?

                                                                                                Alors regardez du côté de redis-lua-py (github.com/IgnaceMaes/redis-lu), qui vous permet d'écrire votre script en Python (en utilisant les commandes du client Redis), et de le convertir en Lua.

                                                                                                Pratique, sinon pour de la production, au moins pour de l'apprentissage. 🤓

                                                                                                [?]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/

                                                                                                  Lily boosted

                                                                                                  [?]Annabelle Wiegart » 🌐
                                                                                                  @pyanna@fosstodon.org

                                                                                                  my @djangomed 2026 experience 🏖️ was a real confidence boost. you can read more about it in my blog post:

                                                                                                  dev.to/annalauraw/my-django-on

                                                                                                  "django" written in the sand on the beach

                                                                                                  Alt..."django" written in the sand on the beach

                                                                                                    Feth 🎉 boosted

                                                                                                    [?]Sean Gillies » 🌐
                                                                                                    @sgillies@mastodon.social

                                                                                                    Version 1.5.2 of your favorite Python package for reading and writing classic GIS raster data is on PyPI now. It has significant bug fixes, 36 flavors of wheels, and remains 100% slop-free. See github.com/rasterio/rasterio/r for details.

                                                                                                      [?]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/

                                                                                                            [?]Django on the Med 🏖️ » 🌐
                                                                                                            @djangomed@fosstodon.org

                                                                                                            A few moments from day one of Django on the Med 2026 in Pescara 🏖️

                                                                                                            We spent the morning working together on Django, then left the laptops behind for a train ride along the Adriatic coast and a bike ride on the Costa dei Trabocchi 🚲🌊

                                                                                                            Then back to Pescara to finish the day around a table together 😊

                                                                                                            Image 1: Cover image for Django on the Med 2026 in Pescara, with the event logo.

                                                                                                            Alt...Image 1: Cover image for Django on the Med 2026 in Pescara, with the event logo.

                                                                                                            Image 2: First part of a photo collage from day one of Django on the Med 2026 in Pescara, showing moments from the morning sprints and the afternoon activities.

                                                                                                            Alt...Image 2: First part of a photo collage from day one of Django on the Med 2026 in Pescara, showing moments from the morning sprints and the afternoon activities.

                                                                                                            Image 3: Continuation of the day one photo collage, with moments from the Django sprints, the trip along the Adriatic coast and the bike ride on the Costa dei Trabocchi.

                                                                                                            Alt...Image 3: Continuation of the day one photo collage, with moments from the Django sprints, the trip along the Adriatic coast and the bike ride on the Costa dei Trabocchi.

                                                                                                            Image 4: Final part of the photo collage from Django on the Med 2026 in Pescara, with more moments from the first day and the text “Day 1”.

                                                                                                            Alt...Image 4: Final part of the photo collage from Django on the Med 2026 in Pescara, with more moments from the first day and the text “Day 1”.

                                                                                                              [?]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)

                                                                                                                    [?]Django on the Med 🏖️ » 🌐
                                                                                                                    @djangomed@fosstodon.org

                                                                                                                    We’ve just listened to the new @djangochat episode about Django on the Med 🏖️🎙️

                                                                                                                    It’s a lovely recap of the Pescara edition that has just wrapped up, plus plenty of Django chat around it.

                                                                                                                    Thanks @wsvincent and @carlton for sharing the experience with everyone listening 💚

                                                                                                                    🎧 Django Chat: djangochat.com/episodes/django
                                                                                                                    ▶️ YouTube: youtube.com/watch?v=_qbeCG-gkzU

                                                                                                                    Give it a listen, and subscribe to the podcast if you haven’t already!

                                                                                                                      [?]Seth Larson » 🌐
                                                                                                                      @sethmlarson@mastodon.social

                                                                                                                      I've just published 10+ blog posts detailing the Language Summit 2026. The Language Summit was held this year in Kraków, Poland at 2026, with discussions about the future of the Python programming language, including free-threading, , garbage collectors, type annotations, and namespacing.

                                                                                                                      Please enjoy and thank you for your patience:

                                                                                                                      blog.python.org/2026/09/langua

                                                                                                                      Group photo of the attendees of the 2026 Python Language Summit. Notably, Larry Hastings is laying flat on the ground with his eyes closed.

                                                                                                                      Alt...Group photo of the attendees of the 2026 Python Language Summit. Notably, Larry Hastings is laying flat on the ground with his eyes closed.

                                                                                                                        [?]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

                                                                                                                            [?]archipylago » 🌐
                                                                                                                            @archipylago@mementomori.social

                                                                                                                            Our next meetup is Thursday, Nov 12th at Konttori and it's sponsored by ICEYE.

                                                                                                                            meetabit.com/events/archipylag

                                                                                                                              📅

                                                                                                                              [?]Evenemang i Norrbotten » 🌐
                                                                                                                              @evenemang@evenemang.inorrbotten.se

                                                                                                                              Pythonkväll

                                                                                                                              kulturskolan Kiruna, torsdag 15 oktober kl. 17:00 CESTNu är detPythonkväll!Vill du lära dig Python?Vill du se vad andra gör med det?Vill du visa dina Pythonprojekt?Välkommen till Pythonkväll hos hacKRNspace! [SENSITIVE CONTENT]

                                                                                                                              Nu är det

                                                                                                                              Pythonkväll!

                                                                                                                              • Vill du lära dig Python?

                                                                                                                              • Vill du se vad andra gör med det?

                                                                                                                              • Vill du visa dina Pythonprojekt?

                                                                                                                              Välkommen till Pythonkväll hos hacKRNspace!

                                                                                                                              Pythonkväll

                                                                                                                              Alt...Pythonkväll

                                                                                                                              Location: kulturskolan Kiruna, Midnattssolsvägen 23

                                                                                                                              Time: 2026-10-15 17:00:00+02:00 / 19:15:00+02:00

                                                                                                                              Feth 🎉 boosted

                                                                                                                              [?]Athoune 🥕🔪 » 🌐
                                                                                                                              @athoune@mastodon.xyz

                                                                                                                              Python, c'est la vie.
                                                                                                                              C'est aussi un langage simple à apprendre.
                                                                                                                              Même sans lire la documentation : nondocumentation.garambrogne.n

                                                                                                                              Pour les gens qui font du mauvais esprit, non, n'est pas (que) le servile assistant de l'intelligence artificielle.

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

                                                                                                                                Python Tip #272 (of 365):

                                                                                                                                Do something or return something, but not both.

                                                                                                                                The list sort method returns None:

                                                                                                                                >>> numbers = [4, 2, 7, 1, 5]
                                                                                                                                >>> x = numbers.sort()
                                                                                                                                >>> print(x)
                                                                                                                                None
                                                                                                                                >>> numbers
                                                                                                                                [1, 2, 4, 5, 7]

                                                                                                                                The sort method modifies the list IN PLACE: mutating the list is its purpose.

                                                                                                                                Returning nothing indicates that an action happened.

                                                                                                                                append, extend, update, and most other mutating methods/functions follow this convention.

                                                                                                                                🧵 (1/3)

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

                                                                                                                                  Python Tip #273 (of 365):

                                                                                                                                  Avoid needless wrapper functions.

                                                                                                                                  This lambda does nothing but call len:

                                                                                                                                  sorted(words, key=lambda s: len(s))

                                                                                                                                  So pass len itself:

                                                                                                                                  sorted(words, key=len)

                                                                                                                                  🧵 (1/4)

                                                                                                                                    AodeRelay boosted

                                                                                                                                    [?]David Hagar [he/him/his] » 🌐
                                                                                                                                    @cyclops@social.moltenaether.com

                                                                                                                                    I've been working on this for a long while now. It started as a simple script to generate a believable planet for my role playing game. I'm a science and math nerd though, so I wanted to build it with science. I then realized to do that I needed a star, so I built that. Now I've written it to basically generate a segment of a galaxy with sectors, each sector has a density of stars (calculated based on what we observe in our own galaxy) and each star is generated as a system.

                                                                                                                                    github.com/dwhagar/planetGen

                                                                                                                                    DISCLOSURE: While versions 1-4 did not use AI and I coded it entirely by hand, I have been using in version 5. I know this is controversial, but please if you have something negative to say just keep it to yourself. I would never have paid anyone to do this and I am never going to sell this at all.

                                                                                                                                      AodeRelay boosted

                                                                                                                                      [?]Jörg 🇩🇪🇬🇧🇪🇺 » 🌐
                                                                                                                                      @AlienJay@burningboard.net

                                                                                                                                      So langsam fange ich an in reinzukommen. Ich schreibe bestehendes um und muss immer seltener googeln.
                                                                                                                                      Allerdings, dass Blöcke nur durch Einrückung definiert werden finde ich gelinde gesagt bescheiden. Wer sich das ausgedacht hat war kein Freund von Programmierern. Da ist doch totale Grütze.

                                                                                                                                      Naja, mal schauen, wie es weitergeht. Mein aktuelles Script läuft, muss aber gerade eine 30 minütige Zwangspause einlegen. Um 22:04 wird es diese beenden und weiter laufen. Mal sehen.

                                                                                                                                        [?]GeoPandas » 🌐
                                                                                                                                        @geopandas@fosstodon.org

                                                                                                                                        GeoPandas 1.2 is out! This release comes with a new implementation of static plotting, support of GeoParquet 2.0 and the ability to read Parquet files directly via HTTPS, functionality to create planar grids, a way to expose information about file layers and several bug fixes. See the full set of changes at geopandas.org/en/stable/docs/c

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

                                                                                                                                          “A loop that goes on forever is called an infinite loop.”

                                                                                                                                          Read more 👉 pym.dev/while-loops/

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

                                                                                                                                            🐍🚀 Out now!

                                                                                                                                            pepotron:
                                                                                                                                            Open multiple PEPs like `pep 745 790`
                                                                                                                                            Replace ghapi with urllib3
                                                                                                                                            github.com/hugovk/pepotron/rel

                                                                                                                                            linkotron:
                                                                                                                                            If no input given on CLI, read from clipboard
                                                                                                                                            github.com/hugovk/linkotron/re

                                                                                                                                            norwegianblue:
                                                                                                                                            Show cycle name in EOL colour
                                                                                                                                            github.com/hugovk/norwegianblu

                                                                                                                                            pylast:
                                                                                                                                            Only retry transient network failures
                                                                                                                                            github.com/pylast/pylast/relea

                                                                                                                                            all of them:
                                                                                                                                            Drop support for almost-EOL Python 3.10
                                                                                                                                            devguide.python.org/versions/

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

                                                                                                                                              Just released: humanize 4.13.0! 🚀

                                                                                                                                              🤖 Optimise `naturalsize` algorithm by using `math.log`

                                                                                                                                              🤖 Fix `precisedelta` rounding

                                                                                                                                              github.com/python-humanize/hum

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

                                                                                                                                                Just released! 🚀

                                                                                                                                                After one sequential-only CI failure, two artifacts builds, one GitHub outage, two fixes for the Windows installer build, four Windows builds, and a NuGet outage:

                                                                                                                                                🐍 Python 3.15 alpha 2!

                                                                                                                                                🔬 PEP 799: A new high-frequency statistical sampling profiler
                                                                                                                                                💬 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-

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

                                                                                                                                                  Just released! 🚀

                                                                                                                                                  🎶 pylast 7.0.0

                                                                                                                                                  🎤 A interface to @lastfm and Libre.fm

                                                                                                                                                  🗑️ Remove `SCROBBLE_SOURCE_*` and `SCROBBLE_MODE_*` constants. Last used in 2017, you probably weren't using them

                                                                                                                                                  📻 Add `chosen_by_user` parameter to `scrobble`. Set to false if you don't have "direct" control over the source, like radio or a stream.

                                                                                                                                                  🐍 Add support for Python 3.15

                                                                                                                                                  📼 Test against recorded API instead of live

                                                                                                                                                  🦀 Replace pre-commit with prek

                                                                                                                                                  Thanks to @scy!

                                                                                                                                                  github.com/pylast/pylast/relea

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

                                                                                                                                                    Just released! 🚀🐍

                                                                                                                                                    Python 3.14.1

                                                                                                                                                    Waiting for the .1 to upgrade? This one's especially for you!

                                                                                                                                                    🥧 Deferred type annotation evaluation!
                                                                                                                                                    🥧 T-strings!
                                                                                                                                                    🥧 Zstandard!
                                                                                                                                                    🥧 Syntax highlighting in the REPL!
                                                                                                                                                    🥧 Colour in unittest, argparse, json and calendar CLIs!
                                                                                                                                                    🥧 UUID v6-8!
                                                                                                                                                    🥧 And much more!

                                                                                                                                                    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

                                                                                                                                                      Just released! 🚀🐍

                                                                                                                                                      Python 3.14.2 (and 3.13.11)

                                                                                                                                                      Waiting for the .2 to upgrade? This one's especially for you!

                                                                                                                                                      So soon? We found some regressions, so here’s an expedited pair of releases. They also come with bonus security fixes.

                                                                                                                                                      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

                                                                                                                                                        Just released! 🚀

                                                                                                                                                        Python Docs Sphinx Theme

                                                                                                                                                        This is the theme for the Python documentation (and others)

                                                                                                                                                        * Add support for green, red and yellow side borders for code examples
                                                                                                                                                        * Add Portuguese translation
                                                                                                                                                        * Add support for Python 3.15

                                                                                                                                                        github.com/python/python-docs-

                                                                                                                                                        Light mode screenshot showing examples of "good code", with a green border on the left, and "bad code", with red.

                                                                                                                                                        Alt...Light mode screenshot showing examples of "good code", with a green border on the left, and "bad code", with red.

                                                                                                                                                        Same but for dark mode.

                                                                                                                                                        Alt...Same but for dark mode.

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

                                                                                                                                                          Just released! 🚀

                                                                                                                                                          🐍 Python 3.15 alpha 3!

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

                                                                                                                                                          🔬 PEP 799: A new high-frequency statistical sampling profiler and dedicated profiling package
                                                                                                                                                          💬 PEP 686: Python now uses UTF-8 as the default encoding
                                                                                                                                                          🌊 PEP 782: A new PyBytesWriter C API to create a Python bytes object
                                                                                                                                                          🎨 Colour code snippets in argparse help: bsky.app/profile/savannah.dev/
                                                                                                                                                          ⚠️ Better error messages

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

                                                                                                                                                            Just released! 🚀

                                                                                                                                                            🤖 Humanize 4.15.0

                                                                                                                                                            This does stuff like turning a number into a fuzzy human-readable duration ("3 minutes ago")

                                                                                                                                                            github.com/python-humanize/hum

                                                                                                                                                            * Add locale support for decimal separator in `intword`
                                                                                                                                                            * Add support for Python 3.15
                                                                                                                                                            * `naturaldelta`: round the value to nearest unit that makes sense
                                                                                                                                                            * Fix plural form for `intword` and improve performance
                                                                                                                                                            * Replace `Exception` with more specific `FileNotFoundError`
                                                                                                                                                            * Replace pre-commit with prek

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

                                                                                                                                                              Just released! 🚀

                                                                                                                                                              stravavis 0.6.0: create visualisations of Strava activities

                                                                                                                                                              * add option to select visualisations/allow --bbox as file/support 3.13-3.14/drop 3.9

                                                                                                                                                              github.com/marcusvolz/strava_p

                                                                                                                                                              termcolor 3.3.0: ANSI formatting for the terminal

                                                                                                                                                              * add italic/fix error handling

                                                                                                                                                              github.com/termcolor/termcolor

                                                                                                                                                              pylast 7.0.1: A Python interface to Last.fm

                                                                                                                                                              * fix type hints

                                                                                                                                                              github.com/pylast/pylast/relea

                                                                                                                                                              Monochrome heatmap showing lots of Strava activities around greater Helsinki.

                                                                                                                                                              Alt...Monochrome heatmap showing lots of Strava activities around greater Helsinki.

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

                                                                                                                                                                Just released! 🚀

                                                                                                                                                                pypistats 1.12.0

                                                                                                                                                                CLI for PyPI download stats

                                                                                                                                                                support 3.15
                                                                                                                                                                drop 3.9
                                                                                                                                                                improve verbose output
                                                                                                                                                                declare type hints
                                                                                                                                                                replace dateutil+six dependencies with stdlib
                                                                                                                                                                replace httpx with urllib
                                                                                                                                                                replace pre-commit with prek

                                                                                                                                                                github.com/hugovk/pypistats/re

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

                                                                                                                                                                  Just released! 🚀

                                                                                                                                                                  norwegianblue 0.24.0

                                                                                                                                                                  CLI to show end-of-life dates

                                                                                                                                                                  show spinner when querying
                                                                                                                                                                  support 3.15
                                                                                                                                                                  replace dateutil+six dependencies with stdlib
                                                                                                                                                                  replace httpx with urllib3
                                                                                                                                                                  replace pre-commit with prek

                                                                                                                                                                  github.com/hugovk/norwegianblu

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

                                                                                                                                                                    🐍🚀 Out now: Python 3.15 beta 1!

                                                                                                                                                                    🧊 This is the feature freeze, and now it's *your* turn to test out all the amazing things we've been baking for the past 12 months!

                                                                                                                                                                    💤 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!

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

                                                                                                                                                                    Please report bugs, we'll fix for the big October release.

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

                                                                                                                                                                      🐍🚀 Out now: Python 3.14.5 final!

                                                                                                                                                                      ♻️ This now has the new (old) garbage collector, and the official macOS installer has been updated to use Tcl/Tk 9.0.3 instead of 8.6.17.

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

                                                                                                                                                                        [?]Dr. Juande Santander-Vela » 🌐
                                                                                                                                                                        @juandesant@mathstodon.xyz

                                                                                                                                                                        Today I (Re-)Learned about the `sep` and `end` parameters to Python’s `print`.

                                                                                                                                                                        `end=‘’` is useful to allow `print`statements not to add a newline. But you can also use it to add something else instead. That makes more sense if you also consider that…

                                                                                                                                                                        `sep=` allows you to have a separator. For instance, you can print a list vertically with `sep=‘\n’`:

                                                                                                                                                                        `print(*range(1,10), sep=‘\n’, end=‘’)`

                                                                                                                                                                        The `*` before `range` expands the content of `range` into multiple arguments to `print`.

                                                                                                                                                                        And a couple more parameters whose defaults are often OK, but also is good to know about:

                                                                                                                                                                        `flush` défaults to `False`, but using `print(flush=True)` can help get quicker output from a Python script before waiting for automatic flushing of standard out.

                                                                                                                                                                        And `file` defaults to `sys.stdout`, but you might want to use something like `print(“Error or debug info”,file=sys.stderr)` to print to the standard error stream, so that if you pipe stdout somewhere else, you still get the stderr messages (or redirect them separately). Of course, you can also have that file-like object passed from elsewhere.

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

                                                                                                                                                                          Python Tip #271 (of 365):

                                                                                                                                                                          Return, don't print.

                                                                                                                                                                          If your function only seems to "work" in the REPL, it may be printing when it should be RETURNING.

                                                                                                                                                                          The print function "outputs" to the TERMINAL.

                                                                                                                                                                          The return statement "outputs" to the code that called your function.

                                                                                                                                                                          The Python REPL blurs this distinction by printing every non-None return value:

                                                                                                                                                                          >>> nth_fibonacci(20)
                                                                                                                                                                          6765

                                                                                                                                                                          Was that printed, or returned? It's unclear.

                                                                                                                                                                          🧵 (1/3)

                                                                                                                                                                            [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                            @adamchainz@fosstodon.org

                                                                                                                                                                            📣 Join me on Thursday, 8th October, in Lisbon for a small software engineering meetup!

                                                                                                                                                                            Looking forward to meeting more folks out there.

                                                                                                                                                                            adamj.eu/tech/2026/09/28/pytho

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

                                                                                                                                                                              “It has nothing to do with binary numbers or ones and zeroes.”

                                                                                                                                                                              Read more 👉 pym.dev/binary-search/

                                                                                                                                                                                FoxMaSk 🌵 boosted

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

                                                                                                                                                                                Je distribue 8 places gratuites¹ pour la 2026 à Barritz, partage pour tenter ta chance !

                                                                                                                                                                                ¹ : En fait la PyConFR c’est gratuit, j’peux même pas jouer avec ces stratagèmes débiles de 1ère année en école de commerce, mais tu peux partager quand même ?

                                                                                                                                                                                  [?]PyCon NL » 🌐
                                                                                                                                                                                  @pycon_nl@mastodon.social

                                                                                                                                                                                  Our first keynote speaker 🎉

                                                                                                                                                                                  Georgi Ker, Director of the Python Software Foundation, Chair of the PSF Diversity & Inclusion Workgroup, and a builder of PyLadies, PyLadiesCon, Python Asia and PyCon Thailand, on "Sustaining Open Source for the Future".

                                                                                                                                                                                  Through a true story: how communities, companies, foundations and governments can share the responsibility, support contributors, and help new leaders grow 💚

                                                                                                                                                                                  15 October, Jaarbeurs Utrecht 🐍

                                                                                                                                                                                    [?]Laurent Cheylus » 🌐
                                                                                                                                                                                    @lcheylus@bsd.network

                                                                                                                                                                                    After all, a recent version of Ruff (fast Python linter written in Rust) imported in Debian unstable repository tracker.debian.org/pkg/ruff

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

                                                                                                                                                                                      What's New in Python 3.15:

                                                                                                                                                                                      🌊 wave 🌊

                                                                                                                                                                                      * Added support for IEEE floating-point WAVE audio (WAVE_FORMAT_IEEE_FLOAT) in wave.

                                                                                                                                                                                      * Added Wave_read.getformat(), Wave_write.getformat(), and Wave_write.setformat() for explicit frame format handling.

                                                                                                                                                                                      * Wave_write.setparams() accepts both 7-item tuples including format and 6-item tuples for backwards compatibility (defaulting to WAVE_FORMAT_PCM).

                                                                                                                                                                                      docs.python.org/3.15/whatsnew/

                                                                                                                                                                                        [?]Django on the Med 🏖️ » 🌐
                                                                                                                                                                                        @djangomed@fosstodon.org

                                                                                                                                                                                        A little bit of Django on the Med 2026 from Pescara 🏖️

                                                                                                                                                                                        25 people came from around the world to spend three days working on Django, talking, sharing ideas and enjoying some time together.

                                                                                                                                                                                        In this first video @paulox explain why we brought the event to Pescara, then Simon Charette talks about how useful it is to work together in person.

                                                                                                                                                                                        More people and moments coming soon 😊

                                                                                                                                                                                        Alt...In this first video Paolo Melchiorre explain why we brought the event to Pescara, then Simon Charette talks about how useful it is to work together in person.

                                                                                                                                                                                          AodeRelay boosted

                                                                                                                                                                                          [?]Chaotica » 🌐
                                                                                                                                                                                          @Chaotica@nrw.social

                                                                                                                                                                                          Hach, wie schön. Langsam zahlt sich die ganze Vorarbeit aus und ich kann jetzt vergleichsweise schnell (für mich), neue Funktionalität in mein Dashboard einhängen.

                                                                                                                                                                                          Jetzt kann ich Mastodon-Posts planen und mir auch anzeigen lassen, wann welcher Post geplant ist.

                                                                                                                                                                                          Wie bei den großen.

                                                                                                                                                                                          Nur in gut. :D

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

                                                                                                                                                                                            Why Innsbruck? 🏔️
                                                                                                                                                                                            Because a DjangoCon should come with a pretty great backdrop.

                                                                                                                                                                                            ✨ A beautiful historic city
                                                                                                                                                                                            🏔️ The Alps right outside your door
                                                                                                                                                                                            🚋 Easy to get around
                                                                                                                                                                                            ☕ Plenty of places to meet, chat and recharge
                                                                                                                                                                                            💻 And, of course, a whole community of Django people coming together

                                                                                                                                                                                            Ready to discover Innsbruck with us?

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

                                                                                                                                                                                              Python Tip #270 (of 365):

                                                                                                                                                                                              Move and copy files with pathlib.

                                                                                                                                                                                              In Python 3.14, Path objects gained move and copy methods, and copy works on whole directories:

                                                                                                                                                                                              >>> from pathlib import Path
                                                                                                                                                                                              >>> taxes = Path("taxes")
                                                                                                                                                                                              >>> taxes.copy("taxes-backup")
                                                                                                                                                                                              PosixPath('taxes-backup')

                                                                                                                                                                                              🧵 (1/3)

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

                                                                                                                                                                                                “The reproducibility of pseudorandom numbers is useful for automated tests and for debugging.”

                                                                                                                                                                                                Read more 👉 pym.dev/random-numbers/

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

                                                                                                                                                                                                  Make sure to compile your wheel dependencies with -O2 to get 2-3x speedup for free! 🚀

                                                                                                                                                                                                  multibuild's defaults now also include -O2, so if you use that, update.

                                                                                                                                                                                                  github.com/python-pillow/Pillo

                                                                                                                                                                                                  JPEG2000 lossy save      main  2189.4 ms   pr   981.3 ms   2.23x
JPEG2000 lossy load      main   267.5 ms   pr    83.1 ms   3.22x
JPEG2000 lossless save   main  2168.4 ms   pr   970.6 ms   2.23x
JPEG2000 lossless load   main  2280.2 ms   pr   879.9 ms   2.59x
PNG save                 main   140.2 ms   pr   140.5 ms   1.00x
PNG load                 main    34.6 ms   pr    34.9 ms   0.99x
JPEG save                main    10.5 ms   pr    10.2 ms   1.03x
JPEG load                main    16.7 ms   pr    16.6 ms   1.01x
TIFF deflate save        main    93.7 ms   pr    95.0 ms   0.99x
TIFF deflate load        main    26.0 ms   pr    26.0 ms   1.00x
TIFF lzw save            main   104.3 ms   pr    49.1 ms   2.12x
TIFF lzw load            main    30.8 ms   pr    13.3 ms   2.32x
WebP save                main   318.5 ms   pr   323.7 ms   0.98x
WebP load                main    77.9 ms   pr    78.0 ms   1.00x
AVIF save                main   317.4 ms   pr   293.1 ms   1.08x
AVIF load                main    14.4 ms   pr    13.8 ms   1.04x
FreeType text            main   216.6 ms   pr    64.6 ms   3.35x
LittleCMS transform      main   148.0 ms   pr    47.2 ms   3.14x

                                                                                                                                                                                                  Alt...JPEG2000 lossy save main 2189.4 ms pr 981.3 ms 2.23x JPEG2000 lossy load main 267.5 ms pr 83.1 ms 3.22x JPEG2000 lossless save main 2168.4 ms pr 970.6 ms 2.23x JPEG2000 lossless load main 2280.2 ms pr 879.9 ms 2.59x PNG save main 140.2 ms pr 140.5 ms 1.00x PNG load main 34.6 ms pr 34.9 ms 0.99x JPEG save main 10.5 ms pr 10.2 ms 1.03x JPEG load main 16.7 ms pr 16.6 ms 1.01x TIFF deflate save main 93.7 ms pr 95.0 ms 0.99x TIFF deflate load main 26.0 ms pr 26.0 ms 1.00x TIFF lzw save main 104.3 ms pr 49.1 ms 2.12x TIFF lzw load main 30.8 ms pr 13.3 ms 2.32x WebP save main 318.5 ms pr 323.7 ms 0.98x WebP load main 77.9 ms pr 78.0 ms 1.00x AVIF save main 317.4 ms pr 293.1 ms 1.08x AVIF load main 14.4 ms pr 13.8 ms 1.04x FreeType text main 216.6 ms pr 64.6 ms 3.35x LittleCMS transform main 148.0 ms pr 47.2 ms 3.14x

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

                                                                                                                                                                                                    @carlton @djangomed @judy2k I’m glad a) there are still people caring about new packages and b) see the to-me obvious value in this. Lots of empty stares. 😅

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

                                                                                                                                                                                                      What's New in Python 3.15:

                                                                                                                                                                                                      unicodedata

                                                                                                                                                                                                      * Unicode database updated to v17

                                                                                                                                                                                                      * New iter_graphemes() iterates over grapheme clusters (UAX #29); grapheme_cluster_break(), indic_conjunct_break() & extended_pictographic() give character properties

                                                                                                                                                                                                      * New isxidstart()/isxidcontinue() check UAX #31 identifier characters

                                                                                                                                                                                                      * New block() returns a character's Unicode block

                                                                                                                                                                                                      (Contributed by @stanfromireland, Serhiy Storchaka & Guillaume Sanchez)

                                                                                                                                                                                                      docs.python.org/3.15/whatsnew/

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

                                                                                                                                                                                                        Python Tip #269 (of 365):

                                                                                                                                                                                                        Walk directory trees with Path.walk.

                                                                                                                                                                                                        The walk method (Python 3.12+) is the pathlib version of os.walk:

                                                                                                                                                                                                        >>> taxes = Path("taxes")
                                                                                                                                                                                                        >>> for directory, sub_directories, files in taxes.walk():
                                                                                                                                                                                                        ... print(directory, sub_directories, files)
                                                                                                                                                                                                        ...
                                                                                                                                                                                                        taxes ['archived', '2026'] []
                                                                                                                                                                                                        taxes/archived ['2017'] []
                                                                                                                                                                                                        taxes/archived/2017 ['invoices'] []
                                                                                                                                                                                                        taxes/archived/2017/invoices [] ['soylent.pdf']
                                                                                                                                                                                                        taxes/2026 [] ['expenses.csv', 'dividends.csv']

                                                                                                                                                                                                        🧵 (1/3)

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

                                                                                                                                                                                                          What's New in Python 3.15:

                                                                                                                                                                                                          collections

                                                                                                                                                                                                          * Added collections.Counter.__xor__() and collections.Counter.__ixor__() to compute the symmetric difference between Counter objects. (Contributed by Raymond Hettinger.)

                                                                                                                                                                                                          docs.python.org/3.15/whatsnew/

                                                                                                                                                                                                          mastodon.social/tags/WhatsNew

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

                                                                                                                                                                                                            “When exactly parentheses improve readability is a bit fuzzy and it's definitely subjective.”

                                                                                                                                                                                                            Read more 👉 pym.dev/unnecessary-parenthese

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

                                                                                                                                                                                                              Python Tip #268 (of 365):

                                                                                                                                                                                                              Show relative paths with relative_to.

                                                                                                                                                                                                              Absolute paths are noisy:

                                                                                                                                                                                                              >>> print(path)
                                                                                                                                                                                                              /home/trey/taxes/archived/2017/invoices
                                                                                                                                                                                                              >>> taxes
                                                                                                                                                                                                              PosixPath('/home/trey/taxes')
                                                                                                                                                                                                              >>> print(path.relative_to(taxes))
                                                                                                                                                                                                              archived/2017/invoices

                                                                                                                                                                                                              🧵 (1/3)

                                                                                                                                                                                                                [?]Django News » 🤖 🌐
                                                                                                                                                                                                                @djangonews@mastodon.social

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

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

                                                                                                                                                                                                                “A queue is often called a FIFO data structure: first in, first out.”

                                                                                                                                                                                                                Read more 👉 pym.dev/stacks-and-queues/

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

                                                                                                                                                                                                                  New post: A master class in decorators, patching and tracing.

                                                                                                                                                                                                                  Seventy free, hands-on workshops. Start with decorators using only the Python standard library, move on to decorators, monkey patching and object proxies with wrapt, then finish with patching, testing and tracing using wrapture.

                                                                                                                                                                                                                  Run them on Binder, in Codespaces, or in your browser. Nothing to install.

                                                                                                                                                                                                                  grahamdumpleton.me/posts/2026/

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

                                                                                                                                                                                                                    “If an object quacks like a duck, it may be used as if it's a duck.”

                                                                                                                                                                                                                    Read more 👉 pym.dev/all-iteration-is-the-s

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

                                                                                                                                                                                                                      Python Tip #267 (of 365):

                                                                                                                                                                                                                      Change file extensions with with_suffix.

                                                                                                                                                                                                                      A ".rst" file path that needs to turn into a ".md" file path:

                                                                                                                                                                                                                      >>> from pathlib import Path
                                                                                                                                                                                                                      >>> old_path = Path("/home/trey/projects/uvrs/readme.rst")
                                                                                                                                                                                                                      >>> old_path.with_suffix(".md")
                                                                                                                                                                                                                      PosixPath('/home/trey/projects/uvrs/readme.md')

                                                                                                                                                                                                                      🧵 (1/4)

                                                                                                                                                                                                                        Mas Tigre boosted

                                                                                                                                                                                                                        [?]Mark Dominus » 🌐
                                                                                                                                                                                                                        @mjd@mathstodon.xyz

                                                                                                                                                                                                                        I'm looking for work, please boost!

                                                                                                                                                                                                                        I'm a software engineer with 35 years of experience. I've worked across an unusually wide range of domains: mobile game backends, privacy-preserving data platforms, high-throughput COVID testing infrastructure, email and account systems, e-payment processing, job marketplace systems, and bioinformatics. I pick up new domains quickly and have a history of doing it repeatedly. I understand how to turn business needs into engineering requirements.

                                                                                                                                                                                                                        I prefer to work remotely but I am open to an in-office job in the Philadelphia area or especially in Philadelphia itself. I've often worked remotely since the 1990s and can operate with minimal supervision. Several of my favorite projects were self-directed: I identified the need, built the thing, and shipped it. My preferred time zone is America/New_York, but I'm flexible.

                                                                                                                                                                                                                        Some of the many, many technologies I've used are: Python, Perl, TypeScript/JavaScript, Haskell, Go, C, Java. Postgres, MySQL, SQLite. Flask, SQLAlchemy. AWS (Lambda, S3, RDS, SQS, EC2). Docker, Git. Github and Gitlab.

                                                                                                                                                                                                                        I've also repeatedly picked up new languages and stacks as needed: Haskell for differential privacy research, TypeScript for a 24/7 AWS Lambda system, Flask for my most recent employer. I've become productive with new systems over and over, and I can do it quickly.

                                                                                                                                                                                                                        I'm a published author (Higher-Order Perl, Morgan Kaufmann), longtime blogger, and conference speaker with a reputation for making complex ideas clear.

                                                                                                                                                                                                                        I am a U.S. citizen.

                                                                                                                                                                                                                        My résumé is at https://
                                                                                                                                                                                                                        plover.com/~mjd/cv/Mark%20Jason%20Dominus.pdf

                                                                                                                                                                                                                        mjd@pobox.com

                                                                                                                                                                                                                        Thanks!



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

                                                                                                                                                                                                                          Thanks to all the busy bees at DEP0021 is coming to secure your Django supply chain: github.com/codingjoe/deps/blob

                                                                                                                                                                                                                          Special thanks to @mdn for working providing excellent community documentation on SRI.

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

                                                                                                                                                                                                                            What's New in Python 3.15:

                                                                                                                                                                                                                            unittest

                                                                                                                                                                                                                            * unittest.TestCase.assertLogs() will now accept a formatter to control how messages are formatted. (Contributed by Garry Cairns.)

                                                                                                                                                                                                                            * unittest.TestCase.assertWarns() and unittest.TestCase.assertWarnsRegex() no longer swallow warnings that do not match the specified category or regex. Nested context managers are now supported. (Contributed by Serhiy Storchaka.)

                                                                                                                                                                                                                            docs.python.org/3.15/whatsnew/

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

                                                                                                                                                                                                                              Keep in mind that because the loops in a comprehension must be in the same order as equivalent for loops, it does read a little funny.

                                                                                                                                                                                                                              Read more 👉 trey.io/aeo9fg

                                                                                                                                                                                                                                Bite Code! boosted

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

                                                                                                                                                                                                                                Python Tip #266 (of 365):

                                                                                                                                                                                                                                Reread a file with seek(0).

                                                                                                                                                                                                                                Try to .read() a file twice, and you'll get nothing the second time:

                                                                                                                                                                                                                                >>> f = open("my_file.txt")
                                                                                                                                                                                                                                >>> f‍.read()
                                                                                                                                                                                                                                'This is my file 👋\nThis is line 2\n'
                                                                                                                                                                                                                                >>> f‍.read()
                                                                                                                                                                                                                                ''

                                                                                                                                                                                                                                Python keeps track of your position within a file as you read.

                                                                                                                                                                                                                                When you're at the end, another read returns an empty string.

                                                                                                                                                                                                                                The seek method changes that position.

                                                                                                                                                                                                                                🧵 (1/2)

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

                                                                                                                                                                                                                                  What's New in Python 3.15:

                                                                                                                                                                                                                                  pdb

                                                                                                                                                                                                                                  * Use the new interactive shell as the default input shell for pdb. (Contributed by Tian Gao.)

                                                                                                                                                                                                                                  docs.python.org/3.15/whatsnew/

                                                                                                                                                                                                                                    Wolf boosted

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

                                                                                                                                                                                                                                    @dolanor No, it's still pip if you want to use pip. Or conda if you want to use conda. But there are other options for people who have a reason to use them or just prefer something different.

                                                                                                                                                                                                                                    If anyone is telling you that you shouldn't be using pip (or, I imagine, conda) anymore, that it's deprecated or disfavored or obsolete or "on its way out" or anything of that nature, they don't know what they're talking about and you shouldn't listen.

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

                                                                                                                                                                                                                                      “For true randomness, you can use the secrets module, which generates cryptographically secure random numbers.”

                                                                                                                                                                                                                                      Read more 👉 pym.dev/random-numbers/

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

                                                                                                                                                                                                                                        Tonight we had dinner together with members of @pescara and @djangomed participants who just arrived in Pescara 🍕

                                                                                                                                                                                                                                        A nice way to meet up over dinner by the beach, catching up with old friends and meeting new ones. 🍻

                                                                                                                                                                                                                                        And now we’re ready: Django on the Med 2026 starts tomorrow morning! 🏖️

                                                                                                                                                                                                                                        People having dinner

                                                                                                                                                                                                                                        Alt...People having dinner

                                                                                                                                                                                                                                        People having a drink

                                                                                                                                                                                                                                        Alt...People having a drink

                                                                                                                                                                                                                                          [?]Django » 🌐
                                                                                                                                                                                                                                          @django@fosstodon.org

                                                                                                                                                                                                                                          📅 Applications close at the end of Tuesday (**today**), September 22, 2026, anywhere on Earth (AoE).

                                                                                                                                                                                                                                          Want to be our first Django Software Foundation Executive Director and lead our foundation? It's your last call to apply!

                                                                                                                                                                                                                                          djangoproject.com/weblog/2026/

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

                                                                                                                                                                                                                                            One week until Python 3.15.0 final!!
                                                                                                                                                                                                                                            hugovk.dev/next-release/

                                                                                                                                                                                                                                            What are you most looking forward to?
                                                                                                                                                                                                                                            docs.python.org/3.15/whatsnew/

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

                                                                                                                                                                                                                                              Python Tip #265 (of 365):

                                                                                                                                                                                                                                              Use next() to get the first line in a file.

                                                                                                                                                                                                                                              Reading a CSV file and need to skip the first row of headers?

                                                                                                                                                                                                                                              Pass your file object (or csv.reader object) to the built-in next function:

                                                                                                                                                                                                                                              headers = next(reader)

                                                                                                                                                                                                                                              File objects keep track of your position within an open file, so the next time you read (or loop) you'll start up where you left off.

                                                                                                                                                                                                                                              🧵 (1/3)

                                                                                                                                                                                                                                                [?]SeaGL 2026: Oct 23rd and 24th » 🌐
                                                                                                                                                                                                                                                @SeaGL@mastodon.social

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

                                                                                                                                                                                                                                                PSF Diversity & Inclusion Workgroup के Monthly Office Hours अगले हफ्ते PSF Discord पर! September 29th 1PM UTC को -diversity में जुड़ें। बातचीत करें, सवाल पूछें और Python में अपने projects, open source contributions या learning journey शेयर करें! 🐍🌍
                                                                                                                                                                                                                                                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 September 29th 1PM UTC in -diversity to chat, ask questions, and share what you're working on 🐍🗺️
                                                                                                                                                                                                                                                  pyfound.blogspot.com/2026/07/t

                                                                                                                                                                                                                                                    [?]FoxMaSk 🌵 » 🌐
                                                                                                                                                                                                                                                    @foxmask@framapiaf.org

                                                                                                                                                                                                                                                    Who tested that ?
                                                                                                                                                                                                                                                    To code web app w/o html CSS...

                                                                                                                                                                                                                                                    nicegui.io/documentation/html

                                                                                                                                                                                                                                                    Someone around me migrated an app made with PyQt with that....

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

                                                                                                                                                                                                                                                      And @akx has updated the Babel project's security policy in a similar way:

                                                                                                                                                                                                                                                      github.com/python-babel/babel/

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

                                                                                                                                                                                                                                                        I had my little agent friend whip up a trust-me-bro for Django task frameworks.

                                                                                                                                                                                                                                                        Happy to see my human coding skills are still worth something.

                                                                                                                                                                                                                                                        github.com/codingjoe/threadmill

                                                                                                                                                                                                                                                        Tasks per second with one worker: threadmill 4,989, celery 2,363, django-tasks-db 2,179, django-tasks-redis 1,712.

                                                                                                                                                                                                                                                        Alt...Tasks per second with one worker: threadmill 4,989, celery 2,363, django-tasks-db 2,179, django-tasks-redis 1,712.

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

                                                                                                                                                                                                                                                          “To navigate block-by-block, you can use Ctrl+P to go to the previous block and Ctrl+N to go to the next block.”

                                                                                                                                                                                                                                                          Read more 👉 pym.dev/repl-features/

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

                                                                                                                                                                                                                                                            The last mile of a long road: faster NumPy in the browser lobste.rs/s/zakub6
                                                                                                                                                                                                                                                            notebook.link/blog/the-last-mi

                                                                                                                                                                                                                                                              [?]Python Lyon » 🌐
                                                                                                                                                                                                                                                              @python_lyon@piaille.fr

                                                                                                                                                                                                                                                              Prochain meetup à  : mercredi 30 septembre à 19h, dans les locaux de Genymobile 🐍

                                                                                                                                                                                                                                                              Vous avez envie de vous lancer dans l’auto-hébergement, mais vous ne savez pas par où commencer ? Cette présentation de @matthieusb est faite pour vous !

                                                                                                                                                                                                                                                              ➡️ meetup.com/fr-fr/python-afpy-l

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

                                                                                                                                                                                                                                                                Python Tip #264 (of 365):

                                                                                                                                                                                                                                                                Don't use the file readlines method.

                                                                                                                                                                                                                                                                Do this:
                                                                                                                                                                                                                                                                lines = list(file)

                                                                                                                                                                                                                                                                Not this:
                                                                                                                                                                                                                                                                lines = file.readlines()

                                                                                                                                                                                                                                                                Both give the same list of lines. So why prefer list?

                                                                                                                                                                                                                                                                Files are iterables of lines, and list(...) is THE way to say "loop over this iterable and store the results in a new list".

                                                                                                                                                                                                                                                                With file.readlines(), it's not as obvious that we're making a list.

                                                                                                                                                                                                                                                                🧵 (1/2)

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

                                                                                                                                                                                                                                                                  RE: fosstodon.org/@mattip/11730281

                                                                                                                                                                                                                                                                  Oh, welcome back PyPy 👋

                                                                                                                                                                                                                                                                  PyPy 8.0.0 is out with Python 3.12 support, so it looks like Django can finally start testing against PyPy again.

                                                                                                                                                                                                                                                                  code.djangoproject.com/ticket/

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

                                                                                                                                                                                                                                                                    Python Tip #260 (of 365):

                                                                                                                                                                                                                                                                    Bookmark a date format cheat sheet.

                                                                                                                                                                                                                                                                    Is "%M" month or minute? Is "%H" 12 or 24 hour time? Which one shows a long month name? And a short one?

                                                                                                                                                                                                                                                                    You COULD memorize all of Python's many date/time format codes, but is that worth it?

                                                                                                                                                                                                                                                                    It might be worth memorizing the formats you use all the time ("%Y-%m-%d" and "%H:%M:%S" maybe).

                                                                                                                                                                                                                                                                    But for MOST formats, you can look them up when you need them.

                                                                                                                                                                                                                                                                    🧵 (1/3)

                                                                                                                                                                                                                                                                      🗳

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

                                                                                                                                                                                                                                                                      What do you call __these__ in ?

                                                                                                                                                                                                                                                                      magic methods:6
                                                                                                                                                                                                                                                                      special methods:0
                                                                                                                                                                                                                                                                      dunder methods:61
                                                                                                                                                                                                                                                                      show results:1

                                                                                                                                                                                                                                                                      Closed

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

                                                                                                                                                                                                                                                                        Python Tip #263 (of 365):

                                                                                                                                                                                                                                                                        Parse messy dates with the third-party dateutil library.

                                                                                                                                                                                                                                                                        Its parse function guesses the format from the string itself:

                                                                                                                                                                                                                                                                        >>> from dateutil.parser import parse
                                                                                                                                                                                                                                                                        >>> parse("September 20, 2026")
                                                                                                                                                                                                                                                                        datetime.datetime(2026, 9, 20, 0, 0)
                                                                                                                                                                                                                                                                        >>> parse("20 Sep 2026 14:30")
                                                                                                                                                                                                                                                                        datetime.datetime(2026, 9, 20, 14, 30)
                                                                                                                                                                                                                                                                        >>> parse("9/20/26")
                                                                                                                                                                                                                                                                        datetime.datetime(2026, 9, 20, 0, 0)

                                                                                                                                                                                                                                                                        dateutil.readthedocs.io

                                                                                                                                                                                                                                                                        🧵 (1/4)

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

                                                                                                                                                                                                                                                                          I woke up to find my PR merged and deployed, giving python.org/blogs/ a fresh take and fixing the "Latest News" section on the homepage.

                                                                                                                                                                                                                                                                          It was confusingly linking to Python Insider's homepage, even though it was only one of several data sources.

                                                                                                                                                                                                                                                                          We were also only showing the latest five posts. Six if we include the top header, and I'd like to fix the spacing.

                                                                                                                                                                                                                                                                          github.com/python/pythondotorg

                                                                                                                                                                                                                                                                          Thank you to everyone involved.

                                                                                                                                                                                                                                                                            [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                                            @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                                            🔧 I’m excited to host this optimization workshop in Lisbon next month.

                                                                                                                                                                                                                                                                            Come join me to learn about profiling and optimizing Python code, and maybe even contribute to Django itself.

                                                                                                                                                                                                                                                                            adamj.eu/tech/2026/09/19/pytho

                                                                                                                                                                                                                                                                              Django boosted

                                                                                                                                                                                                                                                                              [?]Valentino Gagliardi » 🌐
                                                                                                                                                                                                                                                                              @gagliardi_vale@fosstodon.org

                                                                                                                                                                                                                                                                              Who's going to be in Pescara next week for Django on the Med?

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

                                                                                                                                                                                                                                                                                “Pretty much every time I make a temporary file, I need to close the file without actually deleting it so that I can then pass the filename off to other code that actually uses the file.”

                                                                                                                                                                                                                                                                                Read more 👉 pym.dev/temporary-files/

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

                                                                                                                                                                                                                                                                                  Python Tip #262 (of 365):

                                                                                                                                                                                                                                                                                  Parse dates with date.strptime.

                                                                                                                                                                                                                                                                                  In Python 3.14+, the date class got its own strptime class method:

                                                                                                                                                                                                                                                                                  >>> import datetime as dt
                                                                                                                                                                                                                                                                                  >>> dt.date.strptime("2026-08-19", "%Y-%m-%d")
                                                                                                                                                                                                                                                                                  datetime‍.date(2026, 8, 19)

                                                                                                                                                                                                                                                                                  🧵 (1/2)

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

                                                                                                                                                                                                                                                                                    @mdk Looks like 3.8 is also around 2%.

                                                                                                                                                                                                                                                                                    And with 3.10's EOL next month, 3.11+ is around 75%.

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

                                                                                                                                                                                                                                                                                      Wow Python 3.7 qui tombe sous les 2 % d’utilisateurs :

                                                                                                                                                                                                                                                                                      git.afpy.org/mdk/python-versio

                                                                                                                                                                                                                                                                                      Oui oui c’est pas une faute de frappe, je parle bien de 3.7, pas 2.7.

                                                                                                                                                                                                                                                                                      (3.12 a ~34% des utilisateurs)

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

                                                                                                                                                                                                                                                                                        “Of course, at some point in your Python coding journey, you will probably find some opportunities to make classes.”

                                                                                                                                                                                                                                                                                        Read more 👉 pym.dev/friendly-classes/

                                                                                                                                                                                                                                                                                          Lily boosted

                                                                                                                                                                                                                                                                                          [?]Django News » 🤖 🌐
                                                                                                                                                                                                                                                                                          @djangonews@mastodon.social

                                                                                                                                                                                                                                                                                          📰 Issue 355: DjangoCon Europe 2027 in Innsbruck and Django Probe

                                                                                                                                                                                                                                                                                          django-news.com/archive/issue-

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

                                                                                                                                                                                                                                                                                            Python Tip #261 (of 365):

                                                                                                                                                                                                                                                                                            Use Python's zoneinfo module when working with time zones.

                                                                                                                                                                                                                                                                                            >>> from zoneinfo import ZoneInfo
                                                                                                                                                                                                                                                                                            >>> pacific = ZoneInfo("America/Los_Angeles")
                                                                                                                                                                                                                                                                                            >>> meeting = datetime(2027, 3, 13, 9, 0, tzinfo=pacific)
                                                                                                                                                                                                                                                                                            >>> print(meeting)
                                                                                                                                                                                                                                                                                            2027-03-13 09:00:00-08:00

                                                                                                                                                                                                                                                                                            🧵 (1/5)

                                                                                                                                                                                                                                                                                              Dr. Sobek boosted

                                                                                                                                                                                                                                                                                              [?]David Lord :python: » 🌐
                                                                                                                                                                                                                                                                                              @davidism@mas.to

                                                                                                                                                                                                                                                                                              I've turned off pull requests from non-members for Flask, Werkzeug, Jinja, and Click this week, and have enjoyed not waking up to a fresh wave of AI junk every morning. I think I'm going to update our contributing guide to say "introduce yourself and how you use the library in chat first if you want to contribute pull requests". Sad that we had to go here, but aside from conference sprints we weren't really getting outside contribution anyway (which is also sad, but that's been the case a lot longer than AI has been around).

                                                                                                                                                                                                                                                                                                Joachim boosted

                                                                                                                                                                                                                                                                                                [?]Bruno Bord [he/him] » 🌐
                                                                                                                                                                                                                                                                                                @brunobord@dice.camp

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

                                                                                                                                                                                                                                                                                                We've updated our security policy on how to report vulnerabilities:

                                                                                                                                                                                                                                                                                                github.com/python-pillow/Pillo

                                                                                                                                                                                                                                                                                                Much of this based on the good stuff in the CPython security policy:

                                                                                                                                                                                                                                                                                                devguide.python.org/security/p

                                                                                                                                                                                                                                                                                                Yesterday's 82 reports totalled 226,620 words (144,437 without code), an average of 2,764 each (1,761 without code).

                                                                                                                                                                                                                                                                                                Moby Dick is 212,796 words (A Tale of Two Cities is 135,886 words).

                                                                                                                                                                                                                                                                                                I've asked the reporter to re-run their tools and update/close as necessary.

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

                                                                                                                                                                                                                                                                                                  What's New in Python 3.15:

                                                                                                                                                                                                                                                                                                  os

                                                                                                                                                                                                                                                                                                  * Add os.statx() on Linux kernel versions 4.11 and later with glibc versions 2.28 and later. (Contributed by Jeffrey Bosboom and @vstinner)

                                                                                                                                                                                                                                                                                                  * os.makedirs() function now has a parent_mode parameter that allows specifying the mode for intermediate directories. This can be used to match the behavior from Python 3.6 and earlier by passing parent_mode=mode. (Contributed by Zackery Spytz and @gpshead)

                                                                                                                                                                                                                                                                                                  docs.python.org/3.15/whatsnew/

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

                                                                                                                                                                                                                                                                                                    New post: Writing a workshop for JupyterLab.

                                                                                                                                                                                                                                                                                                    The second post on jupyterlab-workshop builds a small pytest workshop from nothing, covering the manifest, pages, actions that run commands and write files for the learner, checks that gate progress until the work is done, giving the workshop a Python environment of its own, and the lint and self-test that catch problems before a learner does.

                                                                                                                                                                                                                                                                                                    grahamdumpleton.me/posts/2026/

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

                                                                                                                                                                                                                                                                                                      “Note that the utilities in Python's random module generate pseudorandom numbers, not true random numbers.”

                                                                                                                                                                                                                                                                                                      Read more 👉 pym.dev/random-numbers/

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

                                                                                                                                                                                                                                                                                                        @webology @JessicaTegner when I read grok I think about this old but active Python project I heard about for the first time long time ago from @faassen 🧌
                                                                                                                                                                                                                                                                                                        pypi.org/project/grok/

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

                                                                                                                                                                                                                                                                                                          ✨ I plan to do a proper write-up, but @django new sponsor pages are up and highlight plans in a much easier-to-grok format. djangoproject.com/sponsor/

                                                                                                                                                                                                                                                                                                          Shout-out to @ericholscher for driving this and pulling it all together.

                                                                                                                                                                                                                                                                                                          @nessita for helping to prioritize it and the last mile.

                                                                                                                                                                                                                                                                                                          Also, to our Fundraising WG (present and past) members for working on the prospectus for over a year to give us data and features to work with.

                                                                                                                                                                                                                                                                                                          cc @priyapahwa @afimaame @ryanhiebert

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

                                                                                                                                                                                                                                                                                                            Two weeks until Python 3.15.0 final!
                                                                                                                                                                                                                                                                                                            hugovk.dev/next-release/

                                                                                                                                                                                                                                                                                                              [?]Seth Larson » 🌐
                                                                                                                                                                                                                                                                                                              @sethmlarson@mastodon.social

                                                                                                                                                                                                                                                                                                              RE: social.rust-lang.org/@rust/117

                                                                                                                                                                                                                                                                                                              The lovely folks from @rust gave me a shoulder-tap in one of our mutual security discussion channels about these ongoing attacks:

                                                                                                                                                                                                                                                                                                              blog.rust-lang.org/2026/09/17/

                                                                                                                                                                                                                                                                                                              There's no particular reason the attackers wouldn't do the same to maintainers of Python projects. Please remain vigilant and send anything strange to security@python.org so we can alert others if needed.

                                                                                                                                                                                                                                                                                                              [?]Rust Language » 🌐
                                                                                                                                                                                                                                                                                                              @rust@social.rust-lang.org

                                                                                                                                                                                                                                                                                                              ⚠️ We believe that there is an ongoing campaign targeting owners of popular crates and rust-lang team members that is attempting to compromise devices and accounts in order to use them to publish malware.

                                                                                                                                                                                                                                                                                                              See our blog post for details: blog.rust-lang.org/2026/09/17/

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

                                                                                                                                                                                                                                                                                                                Want to test your knowledge of datetime formatting, parsing, and arithmetic in ?

                                                                                                                                                                                                                                                                                                                I just made a 17-question quiz for you: pym.dev/quiz/datetime

                                                                                                                                                                                                                                                                                                                A warning: it's a bit tricky, even for an experienced Python developer... partly because it DOES test your knowledge of various format codes that I wouldn't usually memorize.

                                                                                                                                                                                                                                                                                                                If you want to get practice with the questions you get wrong afterward, you can find 3 free datetime Daily Recall packs linked at the end of the quiz.

                                                                                                                                                                                                                                                                                                                🧵 (3/3)

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

                                                                                                                                                                                                                                                                                                                  Python Tip #260 (of 365):

                                                                                                                                                                                                                                                                                                                  Bookmark a date format cheat sheet.

                                                                                                                                                                                                                                                                                                                  Is "%M" month or minute? Is "%H" 12 or 24 hour time? Which one shows a long month name? And a short one?

                                                                                                                                                                                                                                                                                                                  You COULD memorize all of Python's many date/time format codes, but is that worth it?

                                                                                                                                                                                                                                                                                                                  It might be worth memorizing the formats you use all the time ("%Y-%m-%d" and "%H:%M:%S" maybe).

                                                                                                                                                                                                                                                                                                                  But for MOST formats, you can look them up when you need them.

                                                                                                                                                                                                                                                                                                                  🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                    @treyhunner What do you think of this idea from @bswck?

                                                                                                                                                                                                                                                                                                                    When you paste code into the REPL, it'll strip any `>>>` / `...`/ output you'd inadvertently copied.

                                                                                                                                                                                                                                                                                                                    Could be useful for learners?

                                                                                                                                                                                                                                                                                                                    github.com/python/cpython/issu

                                                                                                                                                                                                                                                                                                                      [?]pvergain (framapiaf) » 🌐
                                                                                                                                                                                                                                                                                                                      @pvergain@framapiaf.org

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

                                                                                                                                                                                                                                                                                                                      The PSF is excited to announce the results of the 2026 election for the PSF Board! Sending a big thank you to the candidates, our outgoing Board members, and our community for participating this year- we are so grateful to be in community with all of you 💙💛
                                                                                                                                                                                                                                                                                                                      pyfound.blogspot.com/2026/09/a

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

                                                                                                                                                                                                                                                                                                                        The PSF is pleased to announce the results of the inaugural election for the Python Packaging Council! Sending a big thank you to the candidates and our community for participating in this long awaited election. We're excited to see the council start its work!
                                                                                                                                                                                                                                                                                                                        pyfound.blogspot.com/2026/09/a

                                                                                                                                                                                                                                                                                                                          David Gerard boosted

                                                                                                                                                                                                                                                                                                                          [?]@pndc » 🌐
                                                                                                                                                                                                                                                                                                                          @pndc@social.treehouse.systems

                                                                                                                                                                                                                                                                                                                          I'm a software developer and sysadmin who could really use being .

                                                                                                                                                                                                                                                                                                                          What I'd really like to do is Rust, but once you ignore the dubious scammy stuff, there seems to be nothing out there. Prove me wrong with a counterexample!

                                                                                                                                                                                                                                                                                                                          I've spent decades fixing Enterprise mudballs mostly written in . If you've got a crufty legacy system that everybody else is too scared to touch, I'm your man. I love fixing stuff like that.

                                                                                                                                                                                                                                                                                                                          I've also done commercial , , /#C++, and although I don't usually admit it on my CV but these are now Trying Times when everything is on the table, even (the longest six months of my life).

                                                                                                                                                                                                                                                                                                                          Perl naturally leads into Unix system administration and infrastructure. I've built and maintained mail clusters, VoIP systems, network monitoring, DNS management platforms, that sort of thing. If it's non-sexy but something which needs to be done, I'm there.

                                                                                                                                                                                                                                                                                                                          Available immediately, for contract or permie, onsite in Amsterdam/Randstad or remote to anywhere.

                                                                                                                                                                                                                                                                                                                          Drop me a private mention or mail peter@mooli.net if you have or know of something.

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

                                                                                                                                                                                                                                                                                                                            Python Tip #259 (of 365):

                                                                                                                                                                                                                                                                                                                            Use datetime arithmetic and comparisons to check whether a date is within a range.

                                                                                                                                                                                                                                                                                                                            Sputnik launched before the moon landing:

                                                                                                                                                                                                                                                                                                                            >>> sputnik_launch = datetime(1957, 10, 4)
                                                                                                                                                                                                                                                                                                                            >>> moon_landing = datetime(1969, 7, 20)
                                                                                                                                                                                                                                                                                                                            >>> sputnik_launch < moon_landing
                                                                                                                                                                                                                                                                                                                            True

                                                                                                                                                                                                                                                                                                                            One datetime is "less than" another when it represents an earlier moment in time.

                                                                                                                                                                                                                                                                                                                            🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                              New blog post introducing jupyterlab-workshop, a JupyterLab extension I wrote for guided interactive workshops.

                                                                                                                                                                                                                                                                                                                              Instructions sit in a side panel. Each step is a clickable action that does something real in the JupyterLab session beside it, and the workshop checks what you did before you move on. A workshop is a directory of Markdown files and runs wherever JupyterLab does: mybinder, Codespaces, and even JupyterLite in the browser.

                                                                                                                                                                                                                                                                                                                              grahamdumpleton.me/posts/2026/

                                                                                                                                                                                                                                                                                                                                [?]Python Rennes » 🌐
                                                                                                                                                                                                                                                                                                                                @pythonrennes@social.breizhcamp.org

                                                                                                                                                                                                                                                                                                                                Vous loggez énormément dans vos applications, à un point que cela devient un goulet d'étranglement ?

                                                                                                                                                                                                                                                                                                                                Alors jetez un œil sur fastlogging-rs, qui promet des gains de performance conséquents.

                                                                                                                                                                                                                                                                                                                                brmmm3.github.io/posts/2026/09

                                                                                                                                                                                                                                                                                                                                [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                                                                                                🧪 I just released unittest-parametrize 1.9.0.

                                                                                                                                                                                                                                                                                                                                This package helps you make parametrized tests that work with the grain of unittest, but can still be run with pytest.

                                                                                                                                                                                                                                                                                                                                This release adds new skip/expected_failure features, fixes a bug when using Coverage.py's dynamic contexts, and tidies up error messages and usage docs.

                                                                                                                                                                                                                                                                                                                                github.com/adamchainz/unittest

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

                                                                                                                                                                                                                                                                                                                                  “The syntax for adding a new key-value pair to a dictionary is actually the same as the syntax for updating the value for an existing key.”

                                                                                                                                                                                                                                                                                                                                  Read more 👉 pym.dev/using-dictionaries-in-

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

                                                                                                                                                                                                                                                                                                                                    “The last plate that's added to the top of the stack will be the first plate removed from the top of the stack.”

                                                                                                                                                                                                                                                                                                                                    Read more 👉 pym.dev/stacks-and-queues/

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

                                                                                                                                                                                                                                                                                                                                      Python Tip #258 (of 365):

                                                                                                                                                                                                                                                                                                                                      Format dates with f-strings.

                                                                                                                                                                                                                                                                                                                                      datetime objects support the same format codes in f-string format specifiers that the strftime method uses:

                                                                                                                                                                                                                                                                                                                                      >>> deadline = datetime(2046, 10, 31, 15, 46)
                                                                                                                                                                                                                                                                                                                                      >>> f"{deadline:%m/%d/%Y %I:%M %p}"
                                                                                                                                                                                                                                                                                                                                      '10/31/2046 03:46 PM'

                                                                                                                                                                                                                                                                                                                                      🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                        [?]PsychoticSheep » 🌐
                                                                                                                                                                                                                                                                                                                                        @sheepfreak@pixelfed.social

                                                                                                                                                                                                                                                                                                                                        Another Qwen3.8 test! xD

                                                                                                                                                                                                                                                                                                                                        This time I increased the context window to 32K and integrated Qwen3.8 into OpenCode.

                                                                                                                                                                                                                                                                                                                                        All my instructions were in German this time.

                                                                                                                                                                                                                                                                                                                                        I asked it to write a Python script to plot the sombrero function and save the result as a PNG.

                                                                                                                                                                                                                                                                                                                                        It first produced a 2D plot. I then told it that I wanted a 3D plot instead and Qwen adapted the Python code and generated the 3D plot successfully.

                                                                                                                                                                                                                                                                                                                                        I then asked it to check the code for numerical issues. It spotted the division by zero at R = 0 and fixed it using the correct limit sin(r) / r → 1.

                                                                                                                                                                                                                                                                                                                                        So yes, Qwen3.8 can actually do useful coding locally!

                                                                                                                                                                                                                                                                                                                                        The downside? Only 35 of 66 layers fit on the GPU, with about 8.5 GB of the model on the RX 6700 XT and another 7.5 GB mapped in system RAM.

                                                                                                                                                                                                                                                                                                                                        Watching it generate the code is... not exactly exciting xD It's much more bearable when you have a YouTube video running alongside it...

                                                                                                                                                                                                                                                                                                                                        RX 6700 XT, 12 GB VRAM, 16 GB RAM, 32 GB swap.

                                                                                                                                                                                                                                                                                                                                        #LocalAI #Qwen #Qwen38 #QwenAI #OpenCode #LocalLLM #LLM #AI #Coding #Python #AIcoding #CodingAgent #OpenSourceAI #OpenSource #FOSS #AMD #AMDGPU #Radeon #RX6700XT #RDNA2 #ROCm #Linux #LinuxDesktop #NoCloud #LocalInference #Tech #Mathematics #Math #DataVisualization #3DPlot

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

                                                                                                                                                                                                                                                                                                                                          Strings in Python have a startswith method that will check whether a given string is a prefix of our string

                                                                                                                                                                                                                                                                                                                                          Read more 👉 trey.io/dley4p

                                                                                                                                                                                                                                                                                                                                            [?]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)

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

                                                                                                                                                                                                                                                                                                                                              Hey devs,

                                                                                                                                                                                                                                                                                                                                              Remember when Pillow took over PIL's space?

                                                                                                                                                                                                                                                                                                                                              Do we have that for the requests + httpx + httpx2 space yet?

                                                                                                                                                                                                                                                                                                                                              I have hit my point where having all three installed spark no joy for me.

                                                                                                                                                                                                                                                                                                                                              I don't even care who wins or loses this package off, but I do not need all three installed, and I'll keep my personal preference to myself.

                                                                                                                                                                                                                                                                                                                                              Thid party packages are very opinioned which is why I have all three. I do not want or need all three.

                                                                                                                                                                                                                                                                                                                                              What's the solution?

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

                                                                                                                                                                                                                                                                                                                                                [?]Anna Liberty [she/her] » 🌐
                                                                                                                                                                                                                                                                                                                                                @liberty@mathstodon.xyz

                                                                                                                                                                                                                                                                                                                                                I switched from Python to Guile as my go-to scripting language a few months ago and I've been enjoying it.

                                                                                                                                                                                                                                                                                                                                                Pros:
                                                                                                                                                                                                                                                                                                                                                - Guile is a Scheme
                                                                                                                                                                                                                                                                                                                                                - Guile is slop-free
                                                                                                                                                                                                                                                                                                                                                - Guile is faster than Python
                                                                                                                                                                                                                                                                                                                                                - Guile can easily be embedded in other programs
                                                                                                                                                                                                                                                                                                                                                - Guile easily compiles to WASM with Hoot

                                                                                                                                                                                                                                                                                                                                                Cons:
                                                                                                                                                                                                                                                                                                                                                - Guile's syntax can be less readable
                                                                                                                                                                                                                                                                                                                                                - Guile's ecosystem is smaller
                                                                                                                                                                                                                                                                                                                                                - Guile is less documented

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

                                                                                                                                                                                                                                                                                                                                                  📣📣 ATTN PSF Voting Members: The 2026 PSF Board election vote closes tomorrow, September 15th- but don't wait, go vote today! If you affirmed your intention to vote in this year's election or voted last year, check your email for voting instructions 🗳️ pyfound.blogspot.com/2026/09/t

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

                                                                                                                                                                                                                                                                                                                                                    We're deprecating and removing the IM ("IFUNC Image Memory") image format from @pillow. We're doing this with a two-year deprecation rather than the usual one-year.

                                                                                                                                                                                                                                                                                                                                                    pillow.readthedocs.io/en/lates

                                                                                                                                                                                                                                                                                                                                                    If you need it, please let us know! But unless you're calculating molecular sizes of DNA restriction fragments in Linköping, Sweden in the 1990s, probably not. 🐍🧬

                                                                                                                                                                                                                                                                                                                                                    github.com/python-pillow/Pillo

                                                                                                                                                                                                                                                                                                                                                    We may deprecate some of the other obscure plugins.

                                                                                                                                                                                                                                                                                                                                                    github.com/python-pillow/Pillo

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

                                                                                                                                                                                                                                                                                                                                                      Python Tip #256 (of 365):

                                                                                                                                                                                                                                                                                                                                                      Avoid circular imports by decoupling your modules.

                                                                                                                                                                                                                                                                                                                                                      Two modules that import each other will break.

                                                                                                                                                                                                                                                                                                                                                      In users.models:
                                                                                                                                                                                                                                                                                                                                                      from .tasks import send_welcome_email

                                                                                                                                                                                                                                                                                                                                                      And in users.tasks:
                                                                                                                                                                                                                                                                                                                                                      from .models import User

                                                                                                                                                                                                                                                                                                                                                      ImportError: cannot import name 'User' from partially initialized module 'users.models' (most likely due to a circular import)

                                                                                                                                                                                                                                                                                                                                                      🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                                                        Are developer workshops still relevant when anyone can ask an AI? A write-up of my PyCon AU 2026 talk.

                                                                                                                                                                                                                                                                                                                                                        Reading and doing are different things, and AI hasn't touched the doing. AI makes workshop content correct, but not teachable. And the self-serve end is the part under pressure, which raises the question of why I released 24 free wrapture workshops anyway.

                                                                                                                                                                                                                                                                                                                                                        grahamdumpleton.me/posts/2026/

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

                                                                                                                                                                                                                                                                                                                                                          “That allows for the practice of goose typing, meaning practicing duck typing with the built-in isinstance function.”

                                                                                                                                                                                                                                                                                                                                                          Read more 👉 pym.dev/goose-typing/

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

                                                                                                                                                                                                                                                                                                                                                            What's New in Python 3.15:

                                                                                                                                                                                                                                                                                                                                                            shelve

                                                                                                                                                                                                                                                                                                                                                            * Added new reorganize() method to shelve used to recover unused free space previously occupied by deleted entries. (Contributed by Andrea Oliveri.)

                                                                                                                                                                                                                                                                                                                                                            * Add support for custom serialization and deserialization functions in the shelve module. (Contributed by @furkanonder.bsky.social.)

                                                                                                                                                                                                                                                                                                                                                            docs.python.org/3.15/whatsnew/

                                                                                                                                                                                                                                                                                                                                                              AodeRelay boosted

                                                                                                                                                                                                                                                                                                                                                              [?]Oliver Zehentleitner » 🌐
                                                                                                                                                                                                                                                                                                                                                              @oliverzehentleitner@burningboard.net

                                                                                                                                                                                                                                                                                                                                                              I added `picows` support to the UNICORN Binance WebSocket API.

                                                                                                                                                                                                                                                                                                                                                              The benchmark started as a simple library comparison and ended up improving UBWA itself too.

                                                                                                                                                                                                                                                                                                                                                              Results:

                                                                                                                                                                                                                                                                                                                                                              ⚡ up to **2× throughput** on small Binance messages
                                                                                                                                                                                                                                                                                                                                                              🧠 about **26% lower average CPU usage**
                                                                                                                                                                                                                                                                                                                                                              📨 **138M+ live messages** per implementation
                                                                                                                                                                                                                                                                                                                                                              ✅ no picows-specific stalls or unrecoverable streams in the 24h soak

                                                                                                                                                                                                                                                                                                                                                              `websockets` still remains the default for now.

                                                                                                                                                                                                                                                                                                                                                              Why?

                                                                                                                                                                                                                                                                                                                                                              Because 24 hours and 138 million messages are strong evidence, but they are not the same as months of production use across many different systems.

                                                                                                                                                                                                                                                                                                                                                              So picows is opt-in until broader real-world usage proves it further.

                                                                                                                                                                                                                                                                                                                                                              Full benchmark, bugs found, proxy changes and reasoning:

                                                                                                                                                                                                                                                                                                                                                              blog.technopathy.club/picows-i

                                                                                                                                                                                                                                                                                                                                                              picows in UBWA

                                                                                                                                                                                                                                                                                                                                                              Alt...picows in UBWA

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

                                                                                                                                                                                                                                                                                                                                                                Python Tip #255 (of 365):

                                                                                                                                                                                                                                                                                                                                                                Declare your public API with __all__.

                                                                                                                                                                                                                                                                                                                                                                from math import sqrt

                                                                                                                                                                                                                                                                                                                                                                __all__ = ["nth_lucas", "sum_of_squares"]

                                                                                                                                                                                                                                                                                                                                                                phi = (1+sqrt(5))/2

                                                                                                                                                                                                                                                                                                                                                                def nth_lucas(n):
                                                                                                                                                                                                                                                                                                                                                                return round(phi**n + (-1/phi)**n)

                                                                                                                                                                                                                                                                                                                                                                def sum_of_squares(*nums):
                                                                                                                                                                                                                                                                                                                                                                return sum(n**2 for n in nums)

                                                                                                                                                                                                                                                                                                                                                                🧵 (1/6)

                                                                                                                                                                                                                                                                                                                                                                  Pep boosted

                                                                                                                                                                                                                                                                                                                                                                  [?]Claire Boilley » 🌐
                                                                                                                                                                                                                                                                                                                                                                  @ClaireBoilley@social.sciences.re

                                                                                                                                                                                                                                                                                                                                                                  Research engineer position in opening at Université Alpes in France!

                                                                                                                                                                                                                                                                                                                                                                  PhD not necessary, but good skills in needed.

                                                                                                                                                                                                                                                                                                                                                                  More info
                                                                                                                                                                                                                                                                                                                                                                  ⬇️

                                                                                                                                                                                                                                                                                                                                                                  "We are recruiting a Research Engineer in Cognitive Neuroscience and Human Neurophysiology to join our team at the Grenoble Institute of Neurosciences. Our , Behavior and Neuromodulation team investigates the neural mechanisms of decision-making and motivation using human intracranial electrophysiology, brain stimulation and computational approaches.

                                                                                                                                                                                                                                                                                                                                                                  The position is strongly focused on Python scientific software development, signal processing and reproducible analysis pipelines for human intracranial electrophysiology, including intracranial EEG, basal-ganglia LFP and single-unit recordings.

                                                                                                                                                                                                                                                                                                                                                                  We are looking primarily for a strong programmer, not necessarily a PhD holder. Experience with electrophysiology, signal processing or neuroscience data analysis would be highly appreciated.

                                                                                                                                                                                                                                                                                                                                                                  Main activities will include:

                                                                                                                                                                                                                                                                                                                                                                  - development and maintenance of iEEG analysis pipelines

                                                                                                                                                                                                                                                                                                                                                                  - BIDS standardisation and data harmonisation

                                                                                                                                                                                                                                                                                                                                                                  - development of tools linking macro- and micro-electrophysiology

                                                                                                                                                                                                                                                                                                                                                                  - integration with open-source neuroscience software

                                                                                                                                                                                                                                                                                                                                                                  - close interaction with a dynamic team of PhD students, postdoctoral researchers, engineers and clinicians working on human intracranial electrophysiology, decision-making and neuromodulation

                                                                                                                                                                                                                                                                                                                                                                  - supporting ongoing scientific projects by translating experimental and analytical needs into robust, reusable software solutions.

                                                                                                                                                                                                                                                                                                                                                                  Preferred starting date: November 2026.

                                                                                                                                                                                                                                                                                                                                                                  Initial contract: 1 year, renewable up to 3 years.

                                                                                                                                                                                                                                                                                                                                                                  More information and the full job description are available here:

                                                                                                                                                                                                                                                                                                                                                                  euraxess.ec.europa.eu/jobs/464

                                                                                                                                                                                                                                                                                                                                                                  Candidates can contact me directly for more information and should send a CV and motivation letter to:

                                                                                                                                                                                                                                                                                                                                                                  julien.bastin @ univ-grenoble-alpes.fr

                                                                                                                                                                                                                                                                                                                                                                  To get a sense of the type of human intracranial research the engineer will contribute to, recent work from the team includes iEEG studies of value-based decision-making (Baratin et al., 2026), closed-loop intracranial BCI (Baratin et al., 2026), and direct electrical stimulation during decision-making (Cecchi et al., 2024).

                                                                                                                                                                                                                                                                                                                                                                  Baratin et al., Complementary and opponent value signals in the human brain support choosing the best and avoiding the worst, Nature Communications 2026a.
                                                                                                                                                                                                                                                                                                                                                                  Baratin et al., Closed-loop readout of anterior insula high-gamma activity steers value-based decisions, Nature Communications 2026b.
                                                                                                                                                                                                                                                                                                                                                                  Cecchi et al., Direct stimulation of anterior insula and ventromedial prefrontal cortex disrupts economic choices, Nature Communications 2024"

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

                                                                                                                                                                                                                                                                                                                                                                    “If you find subprocess.run to be a little too verbose, you might consider writing a custom wrapper function or two for your own use cases.”

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

                                                                                                                                                                                                                                                                                                                                                                      [?]Juhis » 🌐
                                                                                                                                                                                                                                                                                                                                                                      @hamatti@mastodon.world

                                                                                                                                                                                                                                                                                                                                                                      I really enjoyed this talk by Arshia Sharma at @pyconau on dictionaries and data validation/parsing.

                                                                                                                                                                                                                                                                                                                                                                      youtube.com/watch?v=syof1ZRT92M

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

                                                                                                                                                                                                                                                                                                                                                                        I'm seeing more and more Oepn Source project migrating to Codeberg.

                                                                                                                                                                                                                                                                                                                                                                        I missed the Python library gallery-dl migrated a few months ago github.com/mikf/gallery-dl/iss

                                                                                                                                                                                                                                                                                                                                                                        I used it to download my pictures from conference repository (e.g. flickr) and it worked very well.

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

                                                                                                                                                                                                                                                                                                                                                                          wrapture is now at 1.0.0b1, along with the wrapture-instrumentation, aws, postgresql and mysql packages. I am happy with the APIs, so what it needs now is people trying it on real code and reporting what works and what doesn't.

                                                                                                                                                                                                                                                                                                                                                                          New post rounds up the ten blog posts so far, the packages and docs, plus 24 hands-on workshops you can run in your browser on mybinder with nothing to install.

                                                                                                                                                                                                                                                                                                                                                                          grahamdumpleton.me/posts/2026/

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

                                                                                                                                                                                                                                                                                                                                                                            Python Tip #254 (of 365):

                                                                                                                                                                                                                                                                                                                                                                            Use a module instead of a singleton class.

                                                                                                                                                                                                                                                                                                                                                                            When you import a module, Python creates a module object. Import it again (even under a different name) and you get THE EXACT SAME OBJECT:

                                                                                                                                                                                                                                                                                                                                                                            >>> import events
                                                                                                                                                                                                                                                                                                                                                                            >>> import events as again
                                                                                                                                                                                                                                                                                                                                                                            >>> again is events
                                                                                                                                                                                                                                                                                                                                                                            True

                                                                                                                                                                                                                                                                                                                                                                            So instead of a class that's only ever meant to have one instance:

                                                                                                                                                                                                                                                                                                                                                                            class EventTracker:
                                                                                                                                                                                                                                                                                                                                                                            ...

                                                                                                                                                                                                                                                                                                                                                                            tracker = EventTracker()

                                                                                                                                                                                                                                                                                                                                                                            More: pym.dev/making-singletons/

                                                                                                                                                                                                                                                                                                                                                                            🧵 (1/2)

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

                                                                                                                                                                                                                                                                                                                                                                              You mostly don't need to think about a function's enclosing scope or the think about the closure that it makes.

                                                                                                                                                                                                                                                                                                                                                                              Read more 👉 trey.io/4u4pj0

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

                                                                                                                                                                                                                                                                                                                                                                                The Python Steering Council election is on!

                                                                                                                                                                                                                                                                                                                                                                                hugovk.dev/blog/2025/steering-

                                                                                                                                                                                                                                                                                                                                                                                This year we have six candidates for five seats.

                                                                                                                                                                                                                                                                                                                                                                                This chart shows when the nominations arrived: six is fewer than previous years but they didn't all wait until the last three days.

                                                                                                                                                                                                                                                                                                                                                                                This year we're also using a new "Multi-winner Bloc STAR" voting system: you give between 0-5 stars per candidate.

                                                                                                                                                                                                                                                                                                                                                                                If you're in the core team, remember to vote by Friday!

                                                                                                                                                                                                                                                                                                                                                                                9 nominations in 2019, 4 with in 8-15 days, rest within 2 days.
2020: 10 nominations, fairly well spread out over the two weeks.
2021: 10 nominations, all within 7 days, 6 within last day.
2022: 8 nominations, fairly well spread out.
2023 and 2024: 8 nominations, all within 3 days.
2025: 6 nominations, spread out within 10 days.

                                                                                                                                                                                                                                                                                                                                                                                Alt...9 nominations in 2019, 4 with in 8-15 days, rest within 2 days. 2020: 10 nominations, fairly well spread out over the two weeks. 2021: 10 nominations, all within 7 days, 6 within last day. 2022: 8 nominations, fairly well spread out. 2023 and 2024: 8 nominations, all within 3 days. 2025: 6 nominations, spread out within 10 days.

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

                                                                                                                                                                                                                                                                                                                                                                                  🗳️ I've voted in @ThePSF board election!
                                                                                                                                                                                                                                                                                                                                                                                  🗳️ And in the inaugural Packaging Council election!
                                                                                                                                                                                                                                                                                                                                                                                  🗳️ Remember to vote!

                                                                                                                                                                                                                                                                                                                                                                                  Python Software Foundation Board of Directors Election 2026
Your vote has been received.


Thank you for voting!

                                                                                                                                                                                                                                                                                                                                                                                  Alt...Python Software Foundation Board of Directors Election 2026 Your vote has been received. Thank you for voting!

                                                                                                                                                                                                                                                                                                                                                                                  2026 Python Packaging Council Election
Your vote has been received.

Thank you for voting!

                                                                                                                                                                                                                                                                                                                                                                                  Alt...2026 Python Packaging Council Election Your vote has been received. Thank you for voting!

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

                                                                                                                                                                                                                                                                                                                                                                                    🗳️ I've voted!

                                                                                                                                                                                                                                                                                                                                                                                    The Python Steering Council elections are underway, and there are eight excellent candidates. We'll be in safe hands whichever five are elected.

                                                                                                                                                                                                                                                                                                                                                                                    This year we have 87 eligible core dev voters, compared to 85 last year.

                                                                                                                                                                                                                                                                                                                                                                                    peps.python.org/pep-8105/#cand

                                                                                                                                                                                                                                                                                                                                                                                    hugovk.github.io/python-steeri

                                                                                                                                                                                                                                                                                                                                                                                    Edit: 🧵 Thread continued from: mastodon.social/@hugovk/111415

                                                                                                                                                                                                                                                                                                                                                                                    2024 Python Steering Council Election - vote cast

Helios Voting Bot <no-reply@mail.heliosvoting.org>
to me

Dear Hugo van Kemenade,

You have successfully cast a vote in 2024 Python Steering Council Election.

                                                                                                                                                                                                                                                                                                                                                                                    Alt...2024 Python Steering Council Election - vote cast Helios Voting Bot <no-reply@mail.heliosvoting.org> to me Dear Hugo van Kemenade, You have successfully cast a vote in 2024 Python Steering Council Election.

                                                                                                                                                                                                                                                                                                                                                                                    Chart showing the terms of the 11 people who have served across the past five councils.

                                                                                                                                                                                                                                                                                                                                                                                    Alt...Chart showing the terms of the 11 people who have served across the past five councils.

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

                                                                                                                                                                                                                                                                                                                                                                                      🗳️🗳 I've voted in two elections today!

                                                                                                                                                                                                                                                                                                                                                                                      1. Proxy voted in the UK general election.

                                                                                                                                                                                                                                                                                                                                                                                      2. Online voted in @Thepsf board elections, and yes for the three bylaw changes.

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

                                                                                                                                                                                                                                                                                                                                                                                        🗳️ I've voted in @thepsf.bsky.social board elections!
                                                                                                                                                                                                                                                                                                                                                                                        🗳️ Remember to vote!
                                                                                                                                                                                                                                                                                                                                                                                        🗳️ Remember not to vote for FK!

                                                                                                                                                                                                                                                                                                                                                                                        OpaVote.

Python Software Foundation Board of Directors Election 2025.
Your vote has been received.

Thank you for voting!

                                                                                                                                                                                                                                                                                                                                                                                        Alt...OpaVote. Python Software Foundation Board of Directors Election 2025. Your vote has been received. Thank you for voting!

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

                                                                                                                                                                                                                                                                                                                                                                                          Voted in the Python Steering Council election! 🐍🗳✅

                                                                                                                                                                                                                                                                                                                                                                                          mastodon.social/@hugovk/115688

                                                                                                                                                                                                                                                                                                                                                                                          Ballot Submitted
Thank you for voting!
Election ends 13/12/2025 at 14:00:00

                                                                                                                                                                                                                                                                                                                                                                                          Alt...Ballot Submitted Thank you for voting! Election ends 13/12/2025 at 14:00:00

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

                                                                                                                                                                                                                                                                                                                                                                                            📣📣 ATTN PSF Voting Members: The inaugural Python Packaging Council election vote closes next Tuesday, September 15th- but don't wait, go vote today! If you affirmed your intention to vote, check your email for voting instructions 🗳️
                                                                                                                                                                                                                                                                                                                                                                                            pyfound.blogspot.com/2026/09/i

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

                                                                                                                                                                                                                                                                                                                                                                                              Voting is open for the PSF Board of Directors Election until Tuesday, September 15th, 2:00PM UTC! To all our affirmed and pre-affirmed voters, make sure you check out the candidates and make some time to vote before then 🗳️ pyfound.blogspot.com/2026/09/t

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

                                                                                                                                                                                                                                                                                                                                                                                                Last post in the wrapture tracing series: OpenTelemetry export.

                                                                                                                                                                                                                                                                                                                                                                                                One table in the config and the same events that printed a tree feed a backend while the application runs. Requests become SERVER spans named by route, a failing request carries the 500 and the exception the framework swallowed, and one trace id is shared by the files, the outbound headers and the exported spans, so two services join as one trace.

                                                                                                                                                                                                                                                                                                                                                                                                grahamdumpleton.me/posts/2026/

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

                                                                                                                                                                                                                                                                                                                                                                                                  “You can store the data as attributes on each instance of your class, and you can store the functionality as methods on the class itself.”

                                                                                                                                                                                                                                                                                                                                                                                                  Read more 👉 pym.dev/when-are-classes-used/

                                                                                                                                                                                                                                                                                                                                                                                                    Taggart :ifin: boosted

                                                                                                                                                                                                                                                                                                                                                                                                    [?]phildini [He/Him] » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                    @phildini@wandering.shop

                                                                                                                                                                                                                                                                                                                                                                                                    After a whirlwind tour of what is doing in health tech, I’m looking for my next role.

                                                                                                                                                                                                                                                                                                                                                                                                    If you need an empathetic engineering leader with deep experience in and broad experience in surprising disciplines, reach out!

                                                                                                                                                                                                                                                                                                                                                                                                      [?]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)

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

                                                                                                                                                                                                                                                                                                                                                                                                        Do you know your regular expressions in Python? Do you know the unusual thing re.match() does? Or what soft deprecation is? I've written about the changes coming up in Python 3.15 to help clear things up a bit.

                                                                                                                                                                                                                                                                                                                                                                                                        hugovk.dev/blog/2026/soft-depr

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

                                                                                                                                                                                                                                                                                                                                                                                                          🐍 Check out @sethmlarson's talk at @europython 2026: "Learning from the not-so-secret Python security 'cabal'". This talk is a deep dive into how CPython handles coordinated vulnerability disclosure, how the security team is organized, and what it takes to run a sustainable disclosure program. youtube.com/watch?v=Xmr89QEr720

                                                                                                                                                                                                                                                                                                                                                                                                            [?]Python Rennes » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                            @pythonrennes@social.breizhcamp.org

                                                                                                                                                                                                                                                                                                                                                                                                            📣🐍 prochain le lundi 21 septembre à 18h45 chez (🙏 pour l'accueil). Sergiu Mocanu interviendra sur 2 sujets :
                                                                                                                                                                                                                                                                                                                                                                                                            - l'évaluation de code généré (par des LLM)
                                                                                                                                                                                                                                                                                                                                                                                                            - la valorisation de l'énorme patrimoine logiciel

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

                                                                                                                                                                                                                                                                                                                                                                                                            Python Tip #252 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                            Use ALL_CAPS names for module-level constants.

                                                                                                                                                                                                                                                                                                                                                                                                            MAX_RETRIES = 5
                                                                                                                                                                                                                                                                                                                                                                                                            DEFAULT_TIMEOUT = 30

                                                                                                                                                                                                                                                                                                                                                                                                            pym.dev/python-doesnt-have-con

                                                                                                                                                                                                                                                                                                                                                                                                            Python doesn't have constants. There's no keyword that stops a variable from being reassigned:

                                                                                                                                                                                                                                                                                                                                                                                                            >>> MAX_RETRIES = 5
                                                                                                                                                                                                                                                                                                                                                                                                            >>> MAX_RETRIES = 10

                                                                                                                                                                                                                                                                                                                                                                                                            The all-caps name is purely a convention. It's a signal to readers of our code meaning "this value isn't meant to change".

                                                                                                                                                                                                                                                                                                                                                                                                            🧵 (1/2)

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

                                                                                                                                                                                                                                                                                                                                                                                                              Fourth post in the wrapture tracing series: finding slow code.

                                                                                                                                                                                                                                                                                                                                                                                                              One endpoint is slow and there are three layers it could be. A stopwatch in each is a code change in a layer that should not know it is being measured; a profiler sees every frame and cannot tell one request from the next. Self time for the handful of methods you chose says which one is slow in its own right, rather than slow because of what it calls.

                                                                                                                                                                                                                                                                                                                                                                                                              grahamdumpleton.me/posts/2026/

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

                                                                                                                                                                                                                                                                                                                                                                                                                “The continue statement doesn't break out of its loop; it just skips to the next iteration of the loop.”

                                                                                                                                                                                                                                                                                                                                                                                                                Read more 👉 pym.dev/breaking-out-of-a-loop/

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

                                                                                                                                                                                                                                                                                                                                                                                                                  Voting is open for the PSF Board of Directors Election until Tuesday, September 15th, 2:00PM UTC! To all our affirmed and pre-affirmed voters, make sure you check out the candidates and make some time to vote before then 🗳️ pyfound.blogspot.com/2026/09/t

                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Python Rennes » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                    @pythonrennes@social.breizhcamp.org

                                                                                                                                                                                                                                                                                                                                                                                                                    RE: social.breizhcamp.org/@breizhc

                                                                                                                                                                                                                                                                                                                                                                                                                    Python Rennes existe grâce au soutien de l'association du @breizhcamp 🙏

                                                                                                                                                                                                                                                                                                                                                                                                                    Nous relayons donc cette lettre ouverte qui alerte les entreprises de la tech sur la baisse généralisée de leur sponsoring des évènements techniques (au sens large, l'agilité est aussi concernée), dont beaucoup sont sur le point de disparaître.

                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                    @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                    ⏳ I just released time-machine 3.5.1 with 13 bug fixes.

                                                                                                                                                                                                                                                                                                                                                                                                                    Two were reported by humans. The rest came from prompting Claude Fable with just "Find and fix bugs".

                                                                                                                                                                                                                                                                                                                                                                                                                    None of them had a huge impact (this is a test library, after all), but they were all mistakes. The worst would leave time mocked after a test tearDownClass() failure, which would be pretty hard to debug.

                                                                                                                                                                                                                                                                                                                                                                                                                    Crazy times. These machines can help us build the highest-quality software, if we want.

                                                                                                                                                                                                                                                                                                                                                                                                                    time-machine.readthedocs.io/en

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

                                                                                                                                                                                                                                                                                                                                                                                                                      “Let's say we have some text that was retrieved from a database, and the original text came from a form submission in a web browser. Web browsers often represent line breaks as a carriage return character, followed by a line feed character.”

                                                                                                                                                                                                                                                                                                                                                                                                                      Read more 👉 pym.dev/splitlines/

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

                                                                                                                                                                                                                                                                                                                                                                                                                        Third post in the wrapture tracing series: tracing Flask.

                                                                                                                                                                                                                                                                                                                                                                                                                        A WSGI app routes the interesting facts around the return value, so a plain wrapper on it records nothing useful. One config entry naming the Flask instrumentation gives one tree per HTTP request instead, with the view, the template render and the shop's own calls beneath it, and the failing request saying both that it answered 500 and that a KeyError was why.

                                                                                                                                                                                                                                                                                                                                                                                                                        grahamdumpleton.me/posts/2026/

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

                                                                                                                                                                                                                                                                                                                                                                                                                          The next @pillow release will use lazy imports on Python 3.15, meaning `from PIL import Image` with no further use takes only 10 ms instead of 25 ms! ⚡️🦥⚡️

                                                                                                                                                                                                                                                                                                                                                                                                                          github.com/python-pillow/Pillo

                                                                                                                                                                                                                                                                                                                                                                                                                          import times with Python 3.15 for PIL.Image visualised using a tool called Tuna, from before the change. PIL.Image takes 25 ms, it shows around 16 further modules it imports and how long they take. The biggest are logging at 9 ms and tempfile at 4 ms.

                                                                                                                                                                                                                                                                                                                                                                                                                          Alt...import times with Python 3.15 for PIL.Image visualised using a tool called Tuna, from before the change. PIL.Image takes 25 ms, it shows around 16 further modules it imports and how long they take. The biggest are logging at 9 ms and tempfile at 4 ms.

                                                                                                                                                                                                                                                                                                                                                                                                                          After the change, PIL.Image takes 10 ms, and the two biggest sub-imports are PIL._imaging at 2 ms and typing at 2 ms.

                                                                                                                                                                                                                                                                                                                                                                                                                          Alt...After the change, PIL.Image takes 10 ms, and the two biggest sub-imports are PIL._imaging at 2 ms and typing at 2 ms.

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

                                                                                                                                                                                                                                                                                                                                                                                                                            Python Tip #251 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                            Avoid wildcard imports.

                                                                                                                                                                                                                                                                                                                                                                                                                            Using star imports, like "from something import *", makes for fragile code.

                                                                                                                                                                                                                                                                                                                                                                                                                            The Zen of Python ends with "Namespaces are one honking great idea -- let's do more of those!"

                                                                                                                                                                                                                                                                                                                                                                                                                            Each module automatically makes a namespace, which is great: same-named variables in different modules never accidentally collide.

                                                                                                                                                                                                                                                                                                                                                                                                                            A wildcard import BREAKS that namespacing: "import *" dumps every name from one module into another.

                                                                                                                                                                                                                                                                                                                                                                                                                            🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                                                                                                                              🎙️ Check out the "Security and Ethics in the Age of Generative AI" panel from @europython 2026! The PSF's @miketheman and @sethmlarson join other awesome folks from the community to dig into how generative AI is reshaping cybersecurity, from ecosystem-level risks to practical lessons to the ethics of AI. youtube.com/watch?v=4cfgbo912rg

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

                                                                                                                                                                                                                                                                                                                                                                                                                                Python Tip #250 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                Sort your import statements in a meaningful way.

                                                                                                                                                                                                                                                                                                                                                                                                                                The usual convention (from PEP 8): standard library first, then third-party packages, then your own code, with a blank line between each group.

                                                                                                                                                                                                                                                                                                                                                                                                                                import json
                                                                                                                                                                                                                                                                                                                                                                                                                                import secrets

                                                                                                                                                                                                                                                                                                                                                                                                                                from django.http import Http404, HttpResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                from django.shortcuts import redirect

                                                                                                                                                                                                                                                                                                                                                                                                                                from exercises.models import Exercise

                                                                                                                                                                                                                                                                                                                                                                                                                                🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                  Second post in the wrapture tracing series: zero-code tracing.

                                                                                                                                                                                                                                                                                                                                                                                                                                  The application you need to see inside is often one you cannot, or should not, edit. The bindings and sink move into a wrapture.toml next to the project, and the program runs untouched under python -m wrapture, or with no launcher at all through autowrapt. Also: streaming the trace to JSON Lines and asking it questions with jq.

                                                                                                                                                                                                                                                                                                                                                                                                                                  grahamdumpleton.me/posts/2026/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                    “Note that passing generator expressions into iterable-accepting functions and classes makes something that looks a bit like a custom comprehension.”

                                                                                                                                                                                                                                                                                                                                                                                                                                    Read more 👉 pym.dev/custom-comprehensions/

                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Nic ⏚ » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                      @Nic@tooter.social

                                                                                                                                                                                                                                                                                                                                                                                                                                      Ah une bonne nouvelle sur le front de l'anti-slop: , mon framework préféré en rejette toute IA (palletsprojects.com/contributi) non seulement pour des soumissions de code, mais pour toute interaction !

                                                                                                                                                                                                                                                                                                                                                                                                                                      palletsprojects.com/contributi

                                                                                                                                                                                                                                                                                                                                                                                                                                        Debacle boosted

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

                                                                                                                                                                                                                                                                                                                                                                                                                                        [$] CERN's migration path from CentOS Linux to Debian

                                                                                                                                                                                                                                                                                                                                                                                                                                        The European Laboratory for Particle Physics, usually just called CERN, is not only the birthplace of the World Wide Web, it is home to the Large Hadron Collider (LHC), the world's [...]

                                                                                                                                                                                                                                                                                                                                                                                                                                        lwn.net/Articles/1092512/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                          Voting is open for the Python Packaging Council until Tuesday, September 15th, 2:00PM UTC! To all affirmed voters, make sure you check out the candidates and make some time to vote before then 🗳️ python.org/nominations/electio

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

                                                                                                                                                                                                                                                                                                                                                                                                                                            Python Tip #249 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                            Monkey patch cautiously... and only in your automated tests.

                                                                                                                                                                                                                                                                                                                                                                                                                                            Monkey patching means fundamentally changing how a module or class works WITHOUT editing its code, by reassigning one of its attributes at runtime.

                                                                                                                                                                                                                                                                                                                                                                                                                                            In automated tests, monkey patching can simplify things.

                                                                                                                                                                                                                                                                                                                                                                                                                                            🧵 (1/4)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                              New series on the tracing side of wrapture, starting with live tracing.

                                                                                                                                                                                                                                                                                                                                                                                                                                              Nothing about a binding is specific to testing: it observes a call site and emits events, and what happens to them is decided by whoever is listening. Take away the timeline, register a sink, and the same three bindings from the testing series narrate the shop as it runs, declined card and all.

                                                                                                                                                                                                                                                                                                                                                                                                                                              grahamdumpleton.me/posts/2026/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                “When looking for an element within a sorted list, binary search can be much faster than regular iteration.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                Read more 👉 pym.dev/binary-search/

                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Julien Riou » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                  @jriou@hachyderm.io

                                                                                                                                                                                                                                                                                                                                                                                                                                                  AI [SENSITIVE CONTENT]

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Out of curiosity, I have asked Claude to rewrite a tiny little SSH wrapper from Python to Go and Rust to check performance.

                                                                                                                                                                                                                                                                                                                                                                                                                                                  Results:
                                                                                                                                                                                                                                                                                                                                                                                                                                                  * Python = 20ms
                                                                                                                                                                                                                                                                                                                                                                                                                                                  * Go = 3ms
                                                                                                                                                                                                                                                                                                                                                                                                                                                  * Rust = 1.5ms

                                                                                                                                                                                                                                                                                                                                                                                                                                                  It's totally useless if you have Mitogen because it opens the SSH connection once but if you don't, every single ms counts.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Jobs for Developers » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                    @jobsfordevelopers@mastodon.world

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Python Tip #248 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                    Run "pytest --pdb" to drop into PDB when a test fails.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    With "--pdb", pytest starts PDB in post-mortem mode (see tip #169) as soon as a test fails or raises an exception.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    I find this much nicer than sprinkling print calls through a test and re-running it.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    You can inspect objects, call functions, walk up the stack, and poke at things in real time instead of re-running repeatedly.

                                                                                                                                                                                                                                                                                                                                                                                                                                                    mastodon.social/@treyhunner/11

                                                                                                                                                                                                                                                                                                                                                                                                                                                    🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                      “The print function will automatically convert whatever object you give it to a string because it needs to be a string in order to be printed.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                      Read more 👉 pym.dev/print-features/

                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Jeff Fortin T. (風の庭園のNekohayo) » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                        @nekohayo@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                        I've been looking for a networks channels analyzer app for the desktop, like those found on F-Droid (such as WiFiAnalyzer), and couldn't find one on Flathub.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Then, searching more broadly, I discovered that Daniel Nylander, oldtime Swedish translator in , has built exactly such an app in recent months, in + GTK4 + libadwaita!
                                                                                                                                                                                                                                                                                                                                                                                                                                                        I tried it out (just do "cd src/ && python app.py"), it works well.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Flatpak enthusiasts, see github.com/yeager/wifi-analyze

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Screenshot of the WiFi Analyzer desktop application, showing a graph of 5 gigahertz WiFi networks shown as curves spread across a spectrum of channels. A detailed list of those networks is also shown below the graph, providing easily readable names, channel numbers, signal strength, encryption type, etc.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Alt...Screenshot of the WiFi Analyzer desktop application, showing a graph of 5 gigahertz WiFi networks shown as curves spread across a spectrum of channels. A detailed list of those networks is also shown below the graph, providing easily readable names, channel numbers, signal strength, encryption type, etc.

                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Radio CauseCommune » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                          @CauseCommune@framapiaf.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Peut-on utiliser l'intelligence artificielle sans vendre son âme aux GAFAM et sans livrer les données de ses auditeurs à la Silicon Valley ?

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Dans son rapport d'activité 2025-2026, Radio Cause Commune détaille sa stack technique 100% libre et auto-hébergée dans le 18ᵉ arrondissement de Paris. 1/x

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                          I like what Astral is doing from a tech perspective, but I'm not sure this sits right with me.

                                                                                                                                                                                                                                                                                                                                                                                                                                                          When Astral was a small company, it was one thing, but now that Astral is OpenAI, it kind of rubs me the wrong way.

                                                                                                                                                                                                                                                                                                                                                                                                                                                          Is this just me?

                                                                                                                                                                                                                                                                                                                                                                                                                                                          astral.sh/blog/python-packagin

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                            I'm glad they endorsed their own employee, though.

                                                                                                                                                                                                                                                                                                                                                                                                                                                            That would have been awkward AF if they didn't. 🍿

                                                                                                                                                                                                                                                                                                                                                                                                                                                            (Btw, I throw no shade on anyone from the list or who is running. I just find this to be incredibly cringe to do without reading the room.)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Python Tip #247 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Test file processing code with tempfile.

                                                                                                                                                                                                                                                                                                                                                                                                                                                              from pathlib import Path
                                                                                                                                                                                                                                                                                                                                                                                                                                                              from tempfile import TemporaryDirectory

                                                                                                                                                                                                                                                                                                                                                                                                                                                              def test_make_rst_from_md_file():
                                                                                                                                                                                                                                                                                                                                                                                                                                                              with TemporaryDirectory() as directory:
                                                                                                                                                                                                                                                                                                                                                                                                                                                              md_path = Path(directory, "example‍.md")
                                                                                                                                                                                                                                                                                                                                                                                                                                                              md_path.write_text("# Example markdown file")
                                                                                                                                                                                                                                                                                                                                                                                                                                                              make_rst_from_md_file(md_path)
                                                                                                                                                                                                                                                                                                                                                                                                                                                              assert md_path.with_suffix(".rst").is_file()

                                                                                                                                                                                                                                                                                                                                                                                                                                                              🧵 (1/4)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                “If you need to distinguish between Linux and Mac, you need either the sys.platform string or the platform.system() function.”

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Lily boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Juhis » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @hamatti@mastodon.world

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Great article by @ehmatthes !

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  I like temporary variables too. I share the reasons he does but I'd also like to add that they add documentation for what that data means in the context, making the code easier to read and understand.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  mostlypython.com/in-defense-of

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    New screencast on creating temporary files & directories in Python:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    youtu.be/dVGNVcy5NqY

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    If you'd rather read than watch, there's also an article version:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    pym.dev/temporary-files

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      It can be time to update the "Python wrapper around the libmemcached interface" in Django
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      pypi.org/project/pylibmc2/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The weekend is great time to get to know the candidates who are running for the PSF Board of Directors this year! Find their statements on the 2026 nominees page 🤩 If you affirmed your intention to vote in this year's election or voted last year, make sure to check your email 📩
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        python.org/nominations/electio

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Ronny Vedrilla » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @GitRon@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Most projects have too many apps.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          An app is not a unit of code organisation – it's a namespace in your database. Every label lands in migrations, content types, FK strings. Expensive to move. Python packages are free.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          So: start with one app. Split by domain, never per model. A few satellites that never import a domain (import-linter in CI). One `common`, not `common` and `utils`.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Wrote up what we've learned, counterexamples welcome:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          medium.com/ambient-innovation/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Python Tip #246 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Measure your test coverage, including BRANCH coverage.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            $ coverage run --branch -m pytest
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            $ coverage report

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Or with the pytest-cov plugin:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            $ pytest --cov --cov-branch

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Code coverage lets you know WHICH lines of code were run by your automated tests.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            For Python, coverage‍.py is great for measuring this.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Lines that are missing coverage are NEVER EVEN RUN by your tests. Code that isn't run is code that isn't tested.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            🧵 (1/4)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Python Morsels now includes Daily Recall: a spaced repetition system for Python & Python-adjacent learning.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              It's basically Whereabouts.Earth but for Python.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              I've been talking about this idea for YEARS, dogfooding it for months, and now it's finally live.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              If you'd like to improve your uv, pytest, Python, etc. skills, I'd love you to try it & leave feedback!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              treyhunner.com/2026/09/python-

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                “Note that while auto-formatters will affect blank lines between classes and functions, most blank lines are under your control.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Read more 👉 pym.dev/embrace-whitespace/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Fourth post in the wrapture unit testing series: beyond callables.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Not everything a test controls is a call: attributes, environment variables, settings dicts imported by reference, registry entries, generators. wrapture spells each as a binding with one lifecycle, and a binding can observe as well as hold: it can even tell you a loop stopped early and left its generator half-consumed.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  grahamdumpleton.me/posts/2026/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Default values are great, but they have one gotcha that Python developers sometimes overlook.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Read more 👉 trey.io/rbi1o4

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python Tip #245 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Use approximate comparisons for floating point numbers in your tests.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      As noted back in tip #203, floating point numbers have precision gotchas:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >>> one_two = 0.1 + 0.02
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >>> one_two == 0.12
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      False
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >>> one_two
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      0.12000000000000001

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Third post in the wrapture unit testing series: phased behaviour.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Testing retry logic, circuit breakers and polling loops means a collaborator that behaves differently as the test progresses: fail twice then succeed, open after the third error, report pending until told otherwise. wrapture spells that as phases on a binding, changing on a count, a condition, an exhausted sequence, or a signal from elsewhere in the test.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        grahamdumpleton.me/posts/2026/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          🎲 Just released pytest-randomly 5.0.0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The headline breaking change fixes combination with other test reordering plugins, including pytest-django. Previously, the same seed could produce different test orders between nearly-identical environments. Oops!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Software is never finished: even this 11 year old well-scoped plugin needs the occasional big fix!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          pypi.org/project/pytest-random

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            “It's often more readable to give a name to an object instead of just a number.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Read more 👉 pym.dev/avoid-indexes-in-pytho

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Second post in the wrapture unit testing series: recording calls.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              What wrapture's timeline and tape actually record, what one event holds, and the whole-tape views that answer questions about the flow between calls rather than any one of them. Worked through on a resource leak, the kind of bug where the failure is an absence and asserting on an absence needs a record of what really happened.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              grahamdumpleton.me/posts/2026/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                RE: mastodon.social/@hugovk/117196

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Here's how to join the cool testers' club! 😎

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                hugovk.dev/blog/2026/help-test

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🐍🚀 Out now: final Python 3.15 release candidate!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                It's your last chance to say that YOU helped test 3.15 before the big day on 1st October!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                How?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                💡 Try out the new features
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                💡 Try your project with it
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                💡 Add 3.15 to your CI
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                💡 Library maintainer? An extra task for you: upload wheels to PyPI, especially binary wheels
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🐞 Report bugs!

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                In return?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                😎 Join the cool testers' club!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🦥 Lazy imports
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🧊 frozendict
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                💂 sentinel
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🏎️ Tachyon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🫶 and much, much more!

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Four years ago I published a post on how to manage dependencies in as “boring” a manner as I could manage.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Today I’ve published a revised version catching up on developments in the ecosystem since then:

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python Tip #151 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      For truly unpredictable randomness, use the secrets module

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python's random module relies on pseudo-randomness, meaning it generates numbers in a predictable order. If someone can guess the random "seed" (it's based on the current time) they can predict the numbers produced.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      For true randomness, use Python's secrets module instead.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Python Tip #244 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Use a seed to test code that relies on randomness.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        import random

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        def generate_code():
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        characters = "ABCDEFGHJKLPQRTUVWXY234679"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        return "".join([random.choice(characters) for _ in range(16)])

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        def test_generate_code():
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        random.seed(5)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        assert generate_code() == "YJ6P9462VAT7H2BF"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The utilities in Python's random module generate PSEUDORANDOM numbers using a deterministic algorithm.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]rixx » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @rixx@chaos.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          I was trying to explain why I don't really use Python's match statements much and by explaining my take on them came around from a very mild dislike to an equally mild like

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          very mildly confusing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (this was after running github.com/15r10nk/matchify on my main code base to see what strong use of match statements looks like – obviously not all of the changed statements were good or sensible, but I'm coming around to liking some of them)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ATTN PSF Voting Members: The inaugural Python Packaging Council election vote is open now until September 15th! If you affirmed your intention to vote in the election, you should have an email with voting instructions 🗳️ Learn more on the PSF blog. pyfound.blogspot.com/2026/09/i

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ATTN PSF Voting Members: The 2026 PSF Board election vote is open now until September 15th! If you affirmed your intention to vote in this year's election, or voted last year, you should have an email with voting instructions 🗳️ Learn more on the PSF blog.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              pyfound.blogspot.com/2026/09/t

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🐍🚀 Out now: final Python 3.15 release candidate!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                It's your last chance to say that YOU helped test 3.15 before the big day on 1st October!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                How?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                💡 Try out the new features
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                💡 Try your project with it
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                💡 Add 3.15 to your CI
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                💡 Library maintainer? An extra task for you: upload wheels to PyPI, especially binary wheels
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🐞 Report bugs!

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                In return?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                😎 Join the cool testers' club!
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🦥 Lazy imports
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🧊 frozendict
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                💂 sentinel
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🏎️ Tachyon
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🫶 and much, much more!

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Python Tip #243 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Write automated tests.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  You can test manually (run your code to make sure it works), or write automated tests: code that tests your code, like this:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  def test_no_tax():
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  assert calculate_total([3.50, 13.75], apply_tax=False) == 17.25

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Every time you change your code, your automated tests can tell you whether you broke something... without you needing to manually check every possible scenario.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    First follow-up to the wrapture announcement: unit testing with wrapture.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    I take one small piece of code and write its tests twice, once with unittest.mock and once with wrapture, focusing on the cases where the difference is structural: where wrapping the real code rather than replacing it lets a test say something substitution cannot.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    More posts on the testing side coming over the next few days.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    grahamdumpleton.me/posts/2026/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      “The sorted function accepts an optional reverse argument.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Read more 👉 pym.dev/sorting-in-python/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Pete Prodoehl 🍕 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @rasterweb@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        I finally got around to working on my bike mapping project enough to publish the results...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        rasterweb.net/bike/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        I take the GPX files from my bike rides, run some Python scripts, and get these maps.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        It's still not done, but I've procrastinated enough and wanted to get something out there since I've been working on it since last fall.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Fabio Manganiello » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @fabio@manganiello.eu

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          It’s 2026, and there are still projects out there running on #Python 2.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          https://www.eveonline.com/news/view/the-move-to-python-3-begins

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            “The name deque stands for "double-ended queue", meaning deque objects are actually a sort of hybrid structure: they can be used as a stack, used as a queue, or used as both:”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Read more 👉 pym.dev/stacks-and-queues/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Python Tip #242 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Prefer isinstance over type for type checking.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Do this:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              isinstance(value, int)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Not this:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              type(value) == int

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Unlike comparing with type(...), using isinstance respects inheritance.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              A "type(...) == ..." check fails for subclasses:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> counts = Counter("hello")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> isinstance(counts, dict)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              True
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              >>> type(counts) == dict
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              False

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Checking with type means nobody can inherit from your class without breaking your type check.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              🧵 (1/2)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                What's New in Python 3.15:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                locale

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * setlocale() now supports language codes with @-modifiers. @-modifiers are no longer silently removed in getlocale(), but included in the language code. (Contributed by Serhiy Storchaka.)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * Undeprecate the locale.getdefaultlocale() function. (Contributed by @vstinner.)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                docs.python.org/3.15/whatsnew/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Python Rennes » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @pythonrennes@social.breizhcamp.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RE: fosstodon.org/@europython/1171

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  les rediffusions des conférences de @europython 2026 sont en ligne : youtube.com/playlist?list=PLd3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Une belle diversité de sujets avec 117 vidéos embrassant une multitude de thèmes : JIT, free-threading, async, MicroPython, le craft et l'architecture, les tests, la manipulation de données et la dataviz, rust, Django, l'observabilité, l'opensource, l'utilisation du GPU, l'IAg, le vibecoding, les keynotes et les présentations éclair, etc.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  “When you need to look up one value based on another in Python, you can use a dictionary as a mapping of key-value pairs.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Read more 👉 pym.dev/using-dictionaries-in-

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Python Tip #241 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Let dataclasses write your dunder methods.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The dataclass decorator writes __init__, __repr__, and __eq__ for you:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    from dataclasses import dataclass

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @dataclass
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    class Comment:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    text: str
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    line: int

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Back in tips 63, 64, and 66 I recommended giving every class an initializer, a friendly string representation, and (sometimes) a custom sense of equality.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    That's three methods of boilerplate for even a simple class:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python Tip #240 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Dunder methods are meant to be defined, but not called.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Do this:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      str(today)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Not this:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      today.__str__()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Why avoid calling dunder methods?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Mostly because you're not supposed to.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Dunder methods are a contract between Python and whoever wrote the class: Python calls them, we use the operations they power.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        “So if you need a stack-like structure in Python, use a list.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Read more 👉 pym.dev/stacks-and-queues/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          HTTPX2 – A next-generation HTTP client for Python

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          github.com/pydantic/httpx2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Lien Rag » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @lienrag@mastodon.tedomum.net

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Dires les pythoneux, y'a un moyen de savoir de quel fichier (d'un répertoire donné) on doit importer les modules qu'on veut utiliser ?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            J'avais du code qui fonctionnait avec une version précédente de FreeOrion mais depuis ils ont complètement réorganisé les modules donc y'a plus rien qui marche...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Ronny Vedrilla » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @GitRon@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2027 is coming to Innsbruck – my birthplace! ❤️

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Really looking forward to it, and I'm sure a bunch of our Beyonder devs will join me from February 17–21, 2027.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Finally, the DjangoCon map covers Austria, too 🎉

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2027.djangocon.eu/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @djangoconeurope

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Python Tip #239 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                When implementing __eq__, return NotImplemented for objects you don't know how to work with.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Filling in __eq__ on yesterday's Version class (__lt__ would need the same check):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                class Version:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ... # self.‍parts is (major, minor, patch)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                def __eq__(self, other):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if not isinstance(other, Version):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                return NotImplemented
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                return self.‍parts == other.‍parts

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  “But duck typing and the isinstance function are not mutually exclusive.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Read more 👉 pym.dev/goose-typing/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    My screencast on Python's special NotImplemented value is now public.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Screencast: youtu.be/wI4K7faxZ_Q

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Article: pym.dev/when-to-use-notimpleme

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NotImplemented is something you'll want to know if you ever implement __eq__ or various other "operate on another object"-style dunder methods.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    >>> 2 == 2.0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    True

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Isn't the same as:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    >>> (2).__eq__(2.0)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    NotImplemented

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Q: What does a company need to become an open source champion? I want to launch another one (soon). And I want to really weave it into its DNA. Thoughts?

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🔤🦥 isort 9.0 0 now supports Python 3.15 and sorting lazy imports 🎉
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        github.com/PyCQA/isort/release

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          🇪🇺🐍📽️ The EuroPython videos are all out!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          youtube.com/playlist?list=PLd3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Reply with your picks and let's build a thread of recommendations!

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Python Tip #238 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Don't write ordering methods by hand.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Want your objects to support <, >, <=, and >=?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            You don't need to write them all!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Implement __eq__ and ONE ordering method (like __lt__), then decorate with functools.total_ordering:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @total_ordering
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            class Version:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            def __eq__(self, other): ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            def __lt__(self, other): ...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Julien Riou » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @jriou@hachyderm.io

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Hit by the Patroni HTTP API stuck issue, again.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              I have upgraded dozens of servers from Patroni 4.1.0 to 4.1.5 without issue last week. This morning, I continued to upgrade a couple more clusters. Today, we had two different freshly upgraded clusters down because the Patroni HTTP API is unresponsive. HAproxy stopped to send traffic because it thinks nodes are down, but Patroni and PostgreSQL looks healthy.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              This issue has been on and off for the last 10 years I've been using Patroni. Apparently, it's caused by a recent change in Python that brings back the issue.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              github.com/python/cpython/issu
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              patroni.readthedocs.io/en/late

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              I'm on call tonight. I've been paged twice already. I have set up the MALLOC_ARENA_MAX=1 and PG_MALLOC_ARENA_MAX environment variables on the last failing cluster and hope I'll have a good night sleep before pushing them everywhere tomorrow 🤞🏻

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                “What if we only want to continue onward if the subprocess exited successfully?”

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @0xabad1dea TBF, 2) could also apply to at least , if not other languages.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Nsukami _ | 巣神 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @lemeteore@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    discovering (coming from feels like meeting with a new type of on

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      WhilelM boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]anarcat » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @Anarcat@kolektiva.social

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python Tip #237 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Need a read-only attribute? Use a property.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Properties are read-only by default:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >>> s = Square(4)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >>> s.length
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      4
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      >>> s.length = 10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Traceback (most recent call last):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      AttributeError: property 'length' of 'Square' object has no setter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Any users also using the bindings for ? If you didn't know, `python3-mapnik` has been removed from the unstable and testing releases; it still works in stable.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        I have spent a few days building new packages based on the 4.3.0 release. I'm looking for potential testers; it WorksForMe™, but I want to make sure it doesn't break other setups. Have in account that this release has made some changes to the bindings, so your code might not work as is (mine didn't).

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The PSF Board election vote kicks off in a week 🗳️🐍 In an effort to promote informed voting, the PSF Board Election Team has invited this year’s candidates to participate in a written interview. Check out the interviews on the PSF blog ⬇️

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          pyfound.blogspot.com/search/la

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Mike Fiedler, Code Gardener » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @miketheman@hachyderm.io

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Wednesday night I'll be speaking at the NYC Open Source Security User Group meetup.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            If your release pipeline still has stored API tokens in it, come find out how to delete them for good.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Wed Aug 26, 6-8 PM, pizza at 6, talk at 6:30
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Amazon office, 12 W 39th St, NYC

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Free, but you must register for building access - last chance: luma.com/5mwalp6p?tk=JivtHQ

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Already registered? See you soon! Bring a colleague, have them sign up first - building access requires photo ID.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              “In Computer Science, stacks and queues are data structures that are optimized to make it inexpensive to remove either the most recently added item or the least recently added item.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Read more 👉 pym.dev/stacks-and-queues/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Python Tip #236 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Don't write getter and setter methods in Python.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                If you need to customize what happens when an attribute is accessed or assigned, use a property.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                In Java, it's best practice to use getters and setters instead of direct attribute access, in case you ever need to customize them.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                In Python, we just use attributes.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                When we DO need to customize attribute access, we make a property. Here's one that rejects negative stock values:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🧵 (1/4)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]marcink » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @marcink@stolat.town

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Three days left until the first no-gen-AI meetup in ! We meet in Le Taille Crayon on Monday at 19:00.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  We will have a third presentation: using to write macros for . That is in addition to the previous two: a comparison of and , and building a community around the open source app.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  If you are interested: please register, see stolat.town/@marcink/117079431
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  If you know someone who might be: please help us by boosting or forwarding the link!

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    In the Discord, someone was trying to understand how Python code is executed without ever being turned into native CPU instructions. So I wrote a tiny programming language compiling to bytecodes. 300 lines of Python.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    nedbatchelder.com/blog/202608/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      “Even if our code was inside a function, it is sometimes useful to break out of a loop without also returning from our function.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Read more 👉 pym.dev/breaking-out-of-a-loop/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Python Tip #235 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Don't use super() when "self" would work instead

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        super() has one primary job: calling the parent class's version of a method you're overriding.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        A super() call that isn't doing that job probably shouldn't be there.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Here's a subclass of a tree-like Node class:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        class DoublyLinkedNode(Node):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        def parents(self):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        return super().parents()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        That parents method shouldn't exist. Each parent method is inherited by default.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Thinking in Python by Bruce Eckel

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          thinkinginpython.com/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Python Tip #234 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Don't inherit from list or dict. You could end up with some weird bugs.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Say we make a bi-directional dictionary by customizing __setitem__:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            class TwoWayDict(dict):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            def __setitem__(self, key, value):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            super().__setitem__(key, value)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            super().__setitem__(value, key)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >>> d = TwoWayDict()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >>> d[3] = 8
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >>> d
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            {3: 8, 8: 3}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            And it seems to work... except when it doesn't:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >>> d.update({9: 7})
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >>> d
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            {3: 8, 8: 3, 9: 7}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              “And if you find yourself wanting to ask about the common or unique values between two collections, you can use set arithmetic.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Read more 👉 pym.dev/practical-uses-of-sets/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Django 6.1 was released this month 🎉 with exciting features such as database-level delete options, fetch modes, or UUID7() database function 🤩 Big thanks to all 210 contributors who pushed 907 commits and to the other anonymous heroes who made it possible 👏 👏 💚

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                gist.github.com/felixxm/8f6689

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Juhis » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @hamatti@mastodon.world

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  t is for time-machine

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  A lot of our software deals with the current time which means that to write good tests for it, we need a mechanism to control the time.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  time-machine is a great library for that in Python.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  hamatti.org/posts/t-is-for-tim

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Hey @freakboy3742 it can be interesting collecting all mobile apps written in Python like this attempt done for gtk4 based android application
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    gtk4android.geopjr.dev/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python Tip #233 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Don't return self from a method just to allow method chaining.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      In Python, methods that mutate an object usually return None.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Functions and methods either RETURN a thing or DO a thing, but usually not both.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      You may be tempted to make a mutating method return self so that calls can be chained:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      tasks = (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      TodoList()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      .add_task("Publish weekly email")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      .add_task("Record screencast")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      )

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This works, but it's VERY unconvntional!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🧵 (1/4)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]David Lord :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @davidism@mas.to

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Added docs/comments near places that are magnets for invalid (AI generated) security reports in Werkzeug. Maybe those tools will read these docs when scanning the code and will produce output that says it's not a security issue? Maybe? At least we can point to it next time if not.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        github.com/pallets/werkzeug/pu

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Pffff... » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @1HommeAzerty@mamot.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Je vous raconte, c'est tordu.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          J'exécute subprocess.Popen(["ipython", "kernel", f"-f={cfg}"]) pour lancer un kernel et m'y connecter plus tard.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Si cfg est un chemin relatif (genre "./toto"), rien à signaler. Mais si cfg est un chemin absolu (genre "/home/azerty/foo/toto"), alors mon son parent ("foo") reçoit le bit t. C'est n'importe quoi...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Pour arranger les choses, les dev de ont limité la soumission de bugs aux devs du projet. Bah on va vivre avec ça du coup...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            AodeRelay boosted

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            LWN covered my talk on pathlib from !

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            If you're using and not using the pathlib module, check it out. I think that it's one of the most underused modules in the Python standard library.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            lwn.net/SubscriberLink/1088781

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ¡Para la próxima semana el grupo de trabajo de Diversidad e Inclusión de PSF tendrá un espacio en el Discord de la PSF!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Únete el August 25 9 PM UTC en el canal -diversity para charlar, hacer preguntas y compartir en qué estás trabajando 🐍🗺️

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              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 August 25 9 PM UTC in -diversity to chat, ask questions, and share what you're working on 🐍🗺️


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                pyfound.blogspot.com/2026/07/t

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Lily boosted

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  UK based only - Senior Developer for The Electoral Commission // £70,000 // fully remote possible, hybrid at UK hubs also fine if your preference.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Fancy working with interesting data problems, and services that need to scale to millions of voters? You'll help bring a major voter-information service in-house and shape what comes next.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  YOUR COUNTRY NEEDS YOU! We all need you. Plz.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Interested? I'm sole recruiter for this > thayer@team-prime.com CVs pls!

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    I built a new thing, an idea I have wanted to try for a long time.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Since writing wrapt, the idea was to build on it for two jobs I saw as one: unit testing in the spirit of mock, and tracing execution across real code. Same bindings for both, no changes to the code being observed. wrapture is the answer I ended up with.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    First alpha on PyPI. Curious what people make of it.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    github.com/GrahamDumpleton/wra

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [$] Representing Python paths using pathlib

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      At the outset of his PyCon US 2026 talk, Trey Hunner said that his goal was for attendees to stop representing filesystem paths as strings and to use pathlib instead. That's kind [...]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      lwn.net/Articles/1088781/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Python Tip #232 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Try to avoid static methods in Python.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        A static method is a function that HAPPENS to live on a class. It doesn't know the instance (or class) it's called on.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        They're usually helper functions that live on a class for organizational reasons:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        class Hasher:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @staticmethod
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        def _checksum_matches(hash_object, checksum):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        checksum_bytes = bytes.fromhex(checksum)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        return checksum_bytes == hash_object.digest()

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Pffff... boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]David Lord :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @davidism@mas.to

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Should we remove Flask's interactive debugger? (Being able to execute code at any frame in a traceback.) It's a huge amount of complexity and source of constant invalid security reports. I'm not sure it's been needed for a long time. github.com/pallets/werkzeug/is

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Hachiko boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Milka64 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @milka64@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Nouvelle instance (comment ça 10 jours ?), nouvelle intro !
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Admin sys Linux/BSD et adepte du logiciel libre.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Je bricole et, code en Python
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            je parle parfois de science.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Je préfère l’intelligence artisanale à l’intelligence artificielle.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Héberger ses données plutôt que de les offrir aux GAFAM.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Team et je m'interresse aux

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Juhis » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @hamatti@mastodon.world

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              r is for REPL

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Python's REPL (read-eval-print loop) is an interactive playground for writing and executing Python code and one of the big reasons why I likely ended up enjoying Python more than other languages when I was learning programming.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              It has so many uses: buidling your code step by step, running interactive shell script style operations, exploring Django's models and debugging.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              hamatti.org/posts/r-is-for-rep

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                RE: mastodon.world/@hamatti/117127

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Some neat startup script tips in here, and for Python 3.15 you could do this for nicer pprint output:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                pp = Printer(expand=True, indent=4)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Python Tip #231 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Use class methods as alternate constructors.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >>> s = Square.from_area(100)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >>> s.length
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  10.0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The classmethod decorator makes a method that's meant to be called on the class itself (not on an instance):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  import math

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  class Square:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  def __init__(self, length, color=None):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  self.length = length
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  self.color = color
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @classmethod
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  def from_area(cls, area, color=None):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  return cls(math.sqrt(area), color)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  🧵 (1/4)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Marcos Dione boosted

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    We could really use some help with Twisted's and implementation. Could you DM if these terms of are of interest to you and if you have any spare capacity to review a little bit of code? It would be much appreciated.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      “You can think of abstract base classes that rely on registering as similar to an opt-in duck.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Read more 👉 pym.dev/goose-typing/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        James C boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Yann Büchau :nixos: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @nobodyinperson@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Holy cow, remember to clean your cache from time to time, folks 😅

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        UPDATE: Seems to contain some links, deleting the cache only freed like 9GiB, but still...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        /home/yann/.cache/uv/
27,6 GiB
505.110 Dateien (15 %)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Alt.../home/yann/.cache/uv/ 27,6 GiB 505.110 Dateien (15 %)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]anarcat » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @Anarcat@kolektiva.social

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          The Python Morsels REPL now runs on the new pyrepl! In browsers that don't support JSPI.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          pym.dev/repl

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          As of very recently, both Chrome and Firefox support the JavaScript Promise Interface, which is what's needed to get pyrepl (the new REPL in Python 3.13+) to work in WebAssembly.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          it falls back to the old REPL.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Thanks to @ambv & whoever else helped (can't seem to find the PR) with getting pyrepl working in the browser!

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Fitheach » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @fitheach@mstdn.io

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            In general, I prefer reStructuredText to other markups, because I find it more capable, for my needs.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The one exception to this is Tables. Whoever designed the rst syntax for tables should be taken around the back of the building, and shot.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            I've just spent over an hour fiddling with -, =, and + to get my tables to work in 3 documents.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              runs on ~zero AWS cost thanks to @fastlydevs caching 99% of traffic + AWS credits covering the rest. Huge thanks to both! But 2026 broke an 8-year streak: AWS spend is up 69% YoY as agents & CI runs surge.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @Monorepo, PSF Director of Engineering, on what's changing: pyfound.blogspot.com/2026/08/h

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Lily boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]rixx » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @rixx@chaos.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Gunicorn now categorises "Framework returns content on HEAD requests" as a bug, and warns about it for every request.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Django's position is "Web servers should automatically strip the content of responses to HEAD requests while leaving the headers unchanged".

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                So, that's fun! 🫠
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                (Screenshot shows ASGI commit, but it was added to WSGI too.)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Django docs screenshot, highlight reads "Web servers should automatically strip the content of responses to HEAD requests while leaving the headers unchanged"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Alt...Django docs screenshot, highlight reads "Web servers should automatically strip the content of responses to HEAD requests while leaving the headers unchanged"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                gunicorn commit, message: fix: warn once when ASGI app emits a body for a no-body response
A framework bug — say, returning bytes from a HEAD or 204 handler — is
now logged at WARNING level the first time it happens for a request
so the misbehavior is visible without spamming on multi-chunk streams.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Alt...gunicorn commit, message: fix: warn once when ASGI app emits a body for a no-body response A framework bug — say, returning bytes from a HEAD or 204 handler — is now logged at WARNING level the first time it happens for a request so the misbehavior is visible without spamming on multi-chunk streams.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Juhis » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @hamatti@mastodon.world

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  q is for Q

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Django's Q objects make more complex queries easier to read and they can improve reusability and documentation of your code by giving individual queries and query parts names.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  hamatti.org/posts/q-is-for-q-p

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Python Tip #230 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Use a single underscore prefix for internal attributes.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This _digits attribute is private... but only by convention:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    import re

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    class PhoneNumber:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    def __init__(self, number):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    self._digits = re.sub(r"\D", "", number)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    This (not fully implemented) class includes str() and an area_code attribute as its public interface:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    >>> wh = PhoneNumber("(202) 456-1414")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    >>> print(wh)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    202-456-1414
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    >>> wh.area_code
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    '202'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    🧵 (1/3)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Seth Larson » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @sethmlarson@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      A neat security vulnerability in Python caused by str.lower(). Also includes lots of RFCs so I’m having a good time :)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      sethmlarson.dev/when-str-lower

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ✍️ I used my leet prompt engineering skillz to fix a bunch of bugs in django-upgrade

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        adamj.eu/tech/2026/08/18/djang

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Alright Fedi, I'm looking for a job out of AI hell. I know chances aren't great for anyone right now, but I'm taking mine anyway.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          I'm a (senior?) developer with 10 years of experience in both and (with a preference for the latter). I can find my way around and don't shy away from . I've done a bit of lately and haven't found it terrible.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          I thrive in team environments where I have time both to work on my own and in pairs or mobs ( mob.sh is a great tool I'd use again, but IntelliJ's Code With Me works too).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          My greatest passion is automating the tasks around coding away - testing, building, deploying code with either the shortest set of commands or just fully automated from a pipeline on pull/merge requests.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          I won't say no to places that require me to use AI, but I have a strong preference to be able to write my code myself.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Would love boosts for reach! Also thanks for reading 💖

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            “We can automatically decode the output of this process using the default character encoding, by specifying text=True when we call subprocess.run:”

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Debacle boosted

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [$] Bootstrappable builds: how and why

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              This year's edition of the Free and Open Source Software Yearly conference, better known as "FOSSY", moved north to the beautiful (and enormous) campus of the University of British [...]

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              lwn.net/Articles/1088279/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Python Tip #229 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Don't overuse classes.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Writing Python code does NOT require writing classes.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Unlike many programming languages, you can accomplish quite a bit in Python without ever making a class.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The most common reason to write a class is that a framework REQUIRES one (like Django's Model classes).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                The best reason to write your OWN class: you have data and functionality that clearly belong together.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  RE: fosstodon.org/@dongheena/11711

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  🐍🇰🇷🏃‍♂️ Thanks to all the sprinters for contributing to , and to @dongheena for running this with me!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]Juhis » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @hamatti@mastodon.world

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    o is for orm

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    What a way to start a new week: talking about Django's ORM. Whether to like ORMs or not seems to be a divisive topic among developer. I love them and Django's one is my favourite flavour.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    hamatti.org/posts/o-is-for-orm

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Deuchnord » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @deuchnord@social.deuchnord.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Maintenant que les démarches administratives sont faites, je peux enfin l'annoncer : je suis maintenant en freelance !
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Développeur spécialisé dans le Web avec PHP (vanilla & Symfony) et Python (surtout avec Flask), avec de solides connaissances en JS (vanilla & Vue.js), je réalise tous les développements en tenant compte des besoins en accessibilité, en écoconception et du RGPD dès la conception.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Réalisations entièrement faites par un cerveau biologique.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        controlc boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Jobs for Developers » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @jobsfordevelopers@mastodon.world

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        “You don't need to implement binary search yourself.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Read more 👉 pym.dev/binary-search/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Frank Wiles » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @frank@frankwiles.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Not going to make it to Chicago for DjangoCon US 2026? That's ok, I mean I'll miss you, but did you know you can watch all of the talk lives for cheap? Grab a ticket and help support the conference and community! ti.to/defna/djangocon-us-2026

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Python Tip #228 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Don't catch NameError exceptions. 🧵

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This is an issue:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            try:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            start, end = parse_date(row["start"]), parse_date(row["end"])
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            except (ValueError, TypeError, KeyError, NameError):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            print(f"Invalid date on line {n}", file=sys.stderr)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            continue

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            A NameError is raised when a variable isn't defined... which usually means a variable name was MISSPELLED.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              You've all started testing the 3.15 release candidate, right?
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Oh, you can't because it's not on AWS Lambda? Good news, it's now available along with Node.js 26 as a preview:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              aws-news.com/article/2026-08-1

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Python Tip #227 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Don't rely on clever implementation details. 🧵

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                In CPython, two 3's are identical:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> x = 3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> y = 3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> x is y
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                True

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                But two 300's are not always identical:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> x = 300
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> y = 300
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> x is y
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                False

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Don't rely on this. Compare numbers with ==.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                In CPython, integers from -5 to 256 are created on launch, so every 200 is identical to every other 200.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Bigger numbers are only identical sometimes:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> x, y = 300, 300
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                >>> x is y
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                True

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                🧵 (1/2)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Alex Martelli coined the term "goose typing" to describe this ability in Python to practice duck typing while also using isinstance and issubclass.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Read more 👉 pym.dev/goose-typing/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Fun first day at , meeting the local community and especially hearing how they're not only building but sustaining communities:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    🐍 @dongheena building a language support team, starting informally to encourage participation

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    🐍Luna building PyLadies Seoul through asking for help and learning to teach

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    🐍 Jiwoo Oh, Jiyoung Hwang & Juyeong Lee jumped right into a big open-source project and learned early the importance of collaboration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    the words "PyCon Korea" on a wall, composed from the names of attendees.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Alt...the words "PyCon Korea" on a wall, composed from the names of attendees.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Let’s Build a Python Language Support Team
- Donghee Na

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Alt...Let’s Build a Python Language Support Team - Donghee Na

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Growth together with PyLadies Seoul
- Luna

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Alt...Growth together with PyLadies Seoul - Luna

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    "Is it really okay to change it like this...?" An Undergrad's Journey of Contributing to OpenStack (feat. Surviving the Python Ecosystem)
-
Jiwoo Oh, Jiyoung Hwang
, Juyeong Lee

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Alt..."Is it really okay to change it like this...?" An Undergrad's Journey of Contributing to OpenStack (feat. Surviving the Python Ecosystem) - Jiwoo Oh, Jiyoung Hwang , Juyeong Lee

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python Tip #226 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Don't assign to global variables from within a function.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      You CAN do this in Python. But you really shouldn't.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Yesterday's tip noted that assignments within a function NORMALLY make local variables.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      But they don't always...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python's "global" statement is the exception:

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🧵 (1/2)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Django News » 🤖 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @djangonews@mastodon.social

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        “When I need to run multiple subprocesses within the same Python script, I often find myself passing the same keyword arguments over and over to the run function.”

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Pete Prodoehl 🍕 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @rasterweb@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          And here are my bike riding numbers from 2025. I started having back/leg/nerve pain at the end of November. It will always bother me that I didn't get 2,000 miles in 2025.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          (August is when I started riding an ebike and commuting to work and riding a lot, lot, lot more!)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Graph with bike ride stats from 2025.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Alt...Graph with bike ride stats from 2025.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Graph with bike ride stats from 2025.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Alt...Graph with bike ride stats from 2025.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Graph with bike ride stats from 2025.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Alt...Graph with bike ride stats from 2025.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Graph with bike ride stats from 2025.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Alt...Graph with bike ride stats from 2025.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [?]Pete Prodoehl 🍕 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            @rasterweb@mastodon.social

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            My bike riding has been poor this year, due to spinal stenosis and then spinal surgery in June... but hopefully the numbers will go up for the rest of the year.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            (And who knows? Maybe I'll update some of the Python code that generates these.)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Graph with bike riding data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Alt...Graph with bike riding data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Graph with bike riding data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Alt...Graph with bike riding data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Graph with bike riding data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Alt...Graph with bike riding data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Graph with bike riding data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Alt...Graph with bike riding data.

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              sincewhen now includes features that are removed from Python and their removal version.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              pym.dev/since or "uvx sincewhen"

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              If you catch features it doesn't handle that you think it should, let me know.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Python Rennes » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @pythonrennes@social.breizhcamp.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ⚠️ si vous utilisez une str et que vous migrez de 3.10 à 3.11+ attention à ce changement de comportement :

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                from enum import Enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                class Meetup(str, Enum):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                PYTHON = 'python'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                JS = 'js'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                print(f'{Meetup.PYTHON}')
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                # 'python' pour 3.10
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                # 'Meetup.PYTHON' pour 3.11+

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Une conséquence de peps.python.org/pep-0663/.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Pour revenir au comportement d'avant :

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                - utiliser Meetup.PYTHON.value
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                - implémenter la méthode __str__ :

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                class Meetup(str, Enum):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                def __str__(self):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                return self.value

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Kushal Das :python: :tor: 🇸🇪 » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @kushal@toots.dgplug.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Released a new version of my library for @signalapp pypi.org/project/replyfast/

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ⬆️ I updated django-cli-no-admin last night to support Django 6.1, Python 3.15, and Python's free-threaded versions.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Given the nature of the project, that means pyproject.toml updates 😬

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    I also tried out the trusting publisher thing, and it worked too. 🎉

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    github.com/jefftriplett/django

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]max. » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @makszilla@piaille.fr

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]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)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Juhis » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @hamatti@mastodon.world

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        l is for learning.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Life of a software developer is one of continuous learning. There's always something new to learn and so many resources to learn from.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Today I shared a couple of book and podcasts recommendations and a long list of amazing people who write about Python on their websites.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        hamatti.org/posts/l-is-for-lea

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]David Lord :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @davidism@mas.to

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          I need to think about how I'm voting the Packaging Council election. So many great nominees, but a lot that I don't recognize because they're dealing with a different part of the ecosystem and not the core where I know the most people. I feel like I want the inaugural council to be core people who were already setting a good direction, but "who I know" also feels like the wrong way to vote. And there's still too many people who I know! 😅 python.org/nominations/electio

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            We're also excited to announce the nominees for the inaugural Python Packaging Council 🤩 make sure to check out everyone's nomination statements to learn more about this years candidates! (And make sure to affirm your intention to vote by August 25th, 2 PM UTC!) pyfound.blogspot.com/2026/08/a

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              “It's actually possible to use isinstance and practice duck typing at the same time!”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Read more 👉 pym.dev/goose-typing/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [?]Mike Fiedler, Code Gardener » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                @miketheman@hachyderm.io

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Wow, @pypi crossed 2 EXABYTES bandwidth served in 2026.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                For comparison, **all traffic** served in 2025 was only 1.95 Exabytes.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Thanks to @fastlydevs over 99.999% of that is absorbed by their powerful global caching layer, chugging along to serve users worldwide

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Chart with blue line increasing gradually up and to the right, displaying total bandwidth served this year since January 1st

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Alt...Chart with blue line increasing gradually up and to the right, displaying total bandwidth served this year since January 1st

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  We're also excited to announce the nominees for the inaugural Python Packaging Council 🤩 make sure to check out everyone's nomination statements to learn more about this years candidates! (And make sure to affirm your intention to vote by August 25th, 2 PM UTC!) pyfound.blogspot.com/2026/08/a

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    We're excited to announce the nominees for the 2026 PSF Board Election 🤩 make sure to check out everyone's nomination statements to learn more about this years candidates! (And make sure to affirm your intention to vote by August 25th, 2 PM UTC!)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    pyfound.blogspot.com/2026/08/a

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Python Tip #224 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Constants that are specific to a class often belong ON that class.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      class Circle:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      max_radius = 100
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      def __init__(self, radius):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      if radius > self.max_radius:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      raise ValueError(f"Radius can't exceed {self.max_radius}")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      self.radius = radius

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      But, why make max_radius a class attribute instead of a module-level MAX_RADIUS constant...?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        I decided to play with a silly idea: reorganizing 's junk drawer module (I say "junk drawer" affectionately here).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        treyhunner.com/2026/08/reorgan

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [?]Adam Johnson :django: :python: » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          @adamchainz@fosstodon.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          📦 New package day! This time a Rusty rewrite of the emoji package: 3.5x faster for conversion, 70 times faster for deconversion, and using about 40% less memory.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          adamj.eu/tech/2026/08/12/pytho

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            it's that time again! upgrade your on macOS with `mopup`:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            a terminal running `pipx run --python python3.14 mopup` and upgrading from 3.14.6 to 3.14.7

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Alt...a terminal running `pipx run --python python3.14 mopup` and upgrading from 3.14.6 to 3.14.7

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [?]Stylus [He/Him/They/Them] » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              @stylus@social.afront.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              does look different today?

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                “But self-concatenation doesn't copy anything, so don't try to use it to make lists of mutable values like lists-of-lists.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Read more 👉 pym.dev/self-concatenation/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [?]Mike Fiedler, Code Gardener » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  @miketheman@hachyderm.io

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Wow, @pypi crossed 2 EXABYTES bandwidth served in 2026.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  For comparison, **all traffic** served in 2025 was only 1.95 Exabytes.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Thanks to @fastlydevs over 99.999% of that is absorbed by their powerful global caching layer, chugging along to serve users worldwide

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Chart with blue line increasing gradually up and to the right, displaying total bandwidth served this year since January 1st

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Alt...Chart with blue line increasing gradually up and to the right, displaying total bandwidth served this year since January 1st

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Fred de CLX boosted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [?]marcink » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    @marcink@stolat.town

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    no-gen-AI meetups: it is now possible to sign up for the first event!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    On keskonfai: keskonfai.fr/events/6e9b14ad-9

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    On meetup.com: meetup.com/code-is-art/events/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Use either to sign up (preferably in advance so that we know how many people to expect), boost if you know anyone who might also be interested, maybe suggest a talk if you would like to share something interesting? And show up at Taille Crayon on the 24th, 19:00, see you there!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    (and and for the first talk on the list)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Picture of Le Taille Crayon (from their web page): people sitting at tables in a nice courtyard with trees around and lights above.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Alt...Picture of Le Taille Crayon (from their web page): people sitting at tables in a nice courtyard with trees around and lights above.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [?]Python Rennes » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      @pythonrennes@social.breizhcamp.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      RE: fosstodon.org/@ThePSF/11704441

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      la communauté Python lance un sondage sur les pratiques d'utilisation et l'outillage autour du typage des valeurs : surveymonkey.com/r/python_typi

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The 2026 Python Type System & Tooling Survey is live 🐍📝❓ No typing experience needed—your perspective as a dev matters most. Take a couple minutes to help improve Python typing for all!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      surveymonkey.com/r/python_typi

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      This survey was developed with support from the Pyrefly team at Meta, the PyCharm team at JetBrains, the Python team at Microsoft, and the typing community on discourse.python.org.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        [?]Python Rennes » 🌐
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        @pythonrennes@social.breizhcamp.org

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        xy est une bibliothèque permettant de simplement réaliser des graphiques interactifs 2D pour le web ou les notebooks. Elles supporte l'affichage de nombreux points grace à son cœur écrit en rust qui détermine ce qui a besoin d'etre affiché : github.com/reflex-dev/xy

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          🟣 Nouveau journal de bord sur le blog !

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ➡️ blog.flozz.fr/2026/08/12/journ

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Aujourd'hui je vais vous parler un peu d'une amélioration que j'ai développé pour ma lib rst2gemtext suite à un besoin de @Dryusdan, d'un petit changement que j'ai apporté au blog, et d'une réflexion que j'ai eu sur la langue dans laquelle je publie suite à la lecture d'un article de @Edent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Bonne lecture ! 😁

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Python Tip #223 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Consider copying mutable arguments in your class initializers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            What happens if two objects are given the SAME list?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >>> initial_tasks = ['Watch screencast', 'Brush teeth']
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >>> mon = TodoList(initial_tasks)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            >>> tue = TodoList(initial_tasks)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            It depends...

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            🧵 (1/4)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              “When you need to launch a subprocess from within Python, I recommend using the run function from Python's subprocess module.”

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

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Want to know how many cores on your CPU with ? You can use the multiprocessing module for that 🐍🔥

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Python Tip #222 (of 365):

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Be careful with mutable default values in function definitions.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  This class has a bug:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  class TodoList:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  def __init__(self, tasks=[]):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  self.tasks = tasks

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  def add_task(self, task):
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  self.tasks.append(task)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Every TodoList object made without arguments shares the SAME list:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >>> mon = TodoList()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >>> tue = TodoList()
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >>> mon.add_task("Work on Python exercise")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  >>> tue.tasks
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ['Work on Python exercise']

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  🧵 (1/3)

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

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    “Python's f-strings are great, but if you just need to smoosh a few values together with spaces between them, consider passing separate arguments to print.”

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Read more 👉 pym.dev/print-features/

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Back to top - More...