Topics covered in this episode:
git-flight-rules * Uravelling t-strings * neohtop * Introducing Pyrefly: A new type checker and IDE experience for Python * Extras * Joke*

Watch on YouTube
About the show

Sponsored by us! Support our work through:

  • Our courses at Talk Python Training
  • The Complete pytest Course
  • Patreon Supporters

Connect with the hosts

  • Michael: @mkennedy@fosstodon.org / @mkennedy.codes (bsky)
  • Brian: @brianokken@fosstodon.org / @brianokken.bsky.social
  • Show: @pythonbytes@fosstodon.org / @pythonbytes.fm (bsky)

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too.

Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.

Michael #1: git-flight-rules

  • What are "flight rules"?
    • A guide for astronauts (now, programmers using Git) about what to do when things go wrong.
    • Flight Rules are the hard-earned body of knowledge recorded in manuals that list, step-by-step, what to do if X occurs, and why. Essentially, they are extremely detailed, scenario-specific standard operating procedures. [...]
    • NASA has been capturing our missteps, disasters and solutions since the early 1960s, when Mercury-era ground teams first started gathering "lessons learned" into a compendium that now lists thousands of problematic situations, from engine failure to busted hatch handles to computer glitches, and their solutions.
  • Steps for common operations and actions
    • I want to start a local repository
    • What did I just commit?
    • I want to discard specific unstaged changes
    • Restore a deleted file

Brian #2: Uravelling t-strings

  • Brett Cannon
  • Article walks through
    • Evaluating the Python expression
    • Applying specified conversions
    • Applying format specs
    • Using an Interpolation class to hold details of replacement fields
    • Using Template class to hold parsed data
  • Plus, you don’t have to have Python 3.14.0b1 to try this out.
  • The end result is very close to an example used in PEP 750, which you do need 3.14.0b1 to try out.
  • See also:
    • I’ve written a pytest version, Unravelling t-strings with pytest, if you want to run all the examples with one file.

Michael #3: neohtop

  • Blazing-fast system monitoring for your desktop
  • Features
    • Real-time process monitoring
    • CPU and Memory usage tracking
    • Beautiful, modern UI with dark/light themes
    • Advanced process search and filtering
    • Pin important processes
    • Process management (kill processes)
    • Sort by any column
    • Auto-refresh system stats

Brian #4: Introducing Pyrefly: A new type checker and IDE experience for Python

  • From Facebook / Meta
  • Another Python type checker written in Rust
  • Built with IDE integration in mind from the beginning
  • Principles
    • Performance
    • IDE first
    • Inference (inferring types in untyped code)
    • Open source
  • I mistakenly tried this on the project I support with the most horrible abuses of the dynamic nature of Python, pytest-check. It didn’t go well. But perhaps the project is ready for some refactoring. I’d like to try it soon on a more well behaved project.

Extras

Brian:

  • Python: The Documentary Official Trailer
  • Tim Hopper added Setting up testing with ptyest and uv to his “Python Developer Tooling Handbook”
  • For a more thorough intro on pytest, check out courses.pythontest.com
  • pocket is closing, I’m switching to Raindrop
    • I got one question about code formatting. It’s not highlighted, but otherwise not bad.

Michael:

  • New course! Polars for Power Users: Transform Your Data Analysis Game
  • Apache Airflow 3.0 Released
  • Paste 5

Joke: Theodore Roosevelt’s Man in the Arena, but for programming