Episódios
-
Topics covered in this episode:
platformdirspoethepoet - “Poe the Poet is a batteries included task runner that works well with poetry or with uv.”Python Pandas Ditches NumPy for Speedier PyArrowpointblank: Data validation made beautiful and powerfulExtrasJokeWatch on YouTubeAbout the show
Sponsored by us! Support our work through:
Our courses at Talk Python TrainingThe Complete pytest CoursePatreon SupportersConnect with the hosts
Michael: @[email protected] / @mkennedy.codes (bsky)Brian: @[email protected] / @brianokken.bsky.socialShow: @[email protected] / @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: platformdirs
A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir".Why the community moved on from appdirs to platformdirsAt AppDirs:Note: This project has been officially deprecated. You may want to check out pypi.org/project/platformdirs/ which is a more active fork of appdirs. Thanks to everyone who has used appdirs. Shout out to ActiveState for the time they gave their employees to work on this over the years.Better than AppDirs:Works today, works tomorrow – new Python releases sometimes change low-level APIs (win32com, pathlib, Apple sandbox rules). platformdirs tracks those changes so your code keeps running.First-class typing – no more types-appdirs stubs; editors autocomplete paths as Path objects.Richer directory set – if you need a user’s Downloads folder or a per-session runtime dir, there’s a helper for it.Cleaner internals – rewritten to use pathlib, caching, and extensive test coverage; all platforms are exercised in CI.Community stewardship – the project lives in the PyPA orbit and gets security/compatibility patches quickly.Brian #2: poethepoet - “Poe the Poet is a batteries included task runner that works well with poetry or with uv.”
from Bob BelderbosTasks are easy to define and are defined in pyproject.tomlMichael #3: Python Pandas Ditches NumPy for Speedier PyArrow
Pandas 3.0 will significantly boost performance by replacing NumPy with PyArrow as its default engine, enabling faster loading and reading of columnar data.Recently talked with Reuven Lerner about this on Talk Python too.In the next version, v3.0, PyArrow will be a required dependency, with pyarrow.string being the default type inferred for string data.PyArrow is 10 times faster.PyArrow offers columnar storage, which eliminates all that computational back and forth that comes with NumPy. PyArrow paves the way for running Pandas, by default, on Copy on Write mode, which improves memory and performance usage.Brian #4: pointblank: Data validation made beautiful and powerful
“With its … chainable API, you can … validate your data against comprehensive quality checks …”Extras
Brian:
Ruff rulesRuff users, what rules are using and what are you ignoring?Python 3.14.0b2 - did we already cover this?Transferring your Mastodon account to another server, in case anyone was thinking about doing thatI’m trying out Fathom Analytics for privacy friendly analyticsMichael:
Polars for Power Users: Transform Your Data Analysis Game CourseJoke: Does your dog bite?
-
Topics covered in this episode:
Making PyPI’s test suite 81% fasterPeople aren’t talking enough about how most of OpenAI’s tech stack runs on PythonPyCon Talks on YouTubeOptimizing Python Import PerformanceExtrasJokeWatch on YouTubeAbout the show
Sponsored by Digital Ocean: pythonbytes.fm/digitalocean-gen-ai Use code DO4BYTES and get $200 in free credit
Connect with the hosts
Michael: @[email protected] / @mkennedy.codes (bsky)Brian: @[email protected] / @brianokken.bsky.socialShow: @[email protected] / @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.
Brian #1: Making PyPI’s test suite 81% faster
Alexis ChallandeThe PyPI backend is a project called WarehouseIt’s tested with pytest, and it’s a large project, thousands of tests.Steps for speedupParallelizing test execution with pytest-xdist 67% time reduction--numprocesses=auto allows for using all coresDB isolation - cool example of how to config postgress to give each test worker it’s on dbThey used pytest-sugar to help with visualization, as xdist defaults to quite terse outputUse Python 3.12’s sys.monitoring to speed up coverage instrumentation 53% time reductionNice example of using COVERAGE_CORE=sysmonOptimize test discoveryAlways use testpathsSped up collection time. 66% reduction (collection was 10% of time)Not a huge savings, but it’s 1 line of configEliminate unnecessary importsUse python -X importtimeExamine dependencies not used in testing.Their example: ddtraceA tool they use in production, but it also has a couple pytest plugins includedThose plugins caused ddtrace to get imported Using -p:no ddtrace turns off the plugin bitsNotes from Brian:I often get questions about if pytest is useful for large projects.Short answer: Yes!Longer answer: But you’ll probably want to speed it upI need to extend this article with a general purpose “speeding up pytest” post or series. -p:no can also be used to turn off any plugin, even builtin ones.Examples include nice to have developer focused pytest plugins that may not be necessary in CICI reporting plugins that aren’t needed by devs running tests locallyMichael #2: People aren’t talking enough about how most of OpenAI’s tech stack runs on Python
Original article: Building, launching, and scaling ChatGPT ImagesTech stack: The technology choices behind the product are surprisingly simple; dare I say, pragmatic!Python: most of the product’s code is written in this language.FastAPI: the Python framework used for building APIs quickly, using standard Python type hints. As the name suggests, FastAPI’s strength is that it takes less effort to create functional, production-ready APIs to be consumed by other services.C: for parts of the code that need to be highly optimized, the team uses the lower-level C programming languageTemporal: used for asynchronous workflows and operations inside OpenAI. Temporal is a neat workflow solution that makes multi-step workflows reliable even when individual steps crash, without much effort by developers. It’s particularly useful for longer-running workflows like image generation at scaleMichael #3: PyCon Talks on YouTube
Some talks that jumped out to me:Keynote by Cory Doctorow503 days working full-time on FOSS: lessons learnedGoing From Notebooks to Scalable SystemsAnd my Talk Python conversation around it. (edited episode pending)Unlearning SQLThe Most Bizarre Software Bugs in History The PyArrow revolution in PandasAnd my Talk Python episode about it.What they don't tell you about building a JIT compiler for CPythonAnd my Talk Python conversation around it (edited episode pending)Design Pressure: The Invisible Hand That Shapes Your Code Marimo: A Notebook that "Compiles" Python for Reproducibility and ReusabilityAnd my Talk Python episode about it.GPU Programming in Pure Python And my Talk Python conversation around it (edited episode pending)Scaling the Mountain: A Framework for Tackling Large-Scale Tech DebtBrian #4: Optimizing Python Import Performance
Mostly pay attention to #'s 1-3This is related to speeding up a test suite, speeding up necessary imports.Finding what’s slowUse python -X importtime <the reset of the commandEx: python -X importtime ptyestTechniquesLazy imports move slow-to-import imports into functions/methodsAvoiding circular imports hopefully you’re doing that alreadyOptimize __init__.py files Avoid unnecessary imports, heavy computations, complex logicNotes from BrianSome questions remain open for meDoes module aliasing really help much?This applies to testing in a big wayTest collection imports your test suite, so anything imported at the top level of a file gets imported at test collection time, even if you only are running a subset of tests using filtering like -x or -m or other filter methods.Run -X importtime on test collection.Move slow imports into fixtures, so they get imported when needed, but NOT at collection.See also: option -X in the standard docsConsider using import_profileExtras
Brian:
PEPs & Co. PEP is a ‘backronym”, an acronym where the words it stands for are filled in after the acronym is chosen. Barry Warsaw made this one up.There are a lot of “enhancement proposal” and “improvement proposal” acronyms now from other communitiespythontest.com has a new themeMore colorful. Neat search featureNow it’s excruciatingly obvious that I haven’t blogged regularly in a whileI gotta get on thatCode highlighting might need tweaked for dark modeMichael:
git-bugPyrefly follow upJoke: There is hope.
-
Estão a faltar episódios?
-
Topics covered in this episode:
git-flight-rulesUravelling t-stringsneohtopIntroducing Pyrefly: A new type checker and IDE experience for PythonExtrasJokeWatch on YouTubeAbout the show
Sponsored by us! Support our work through:
Our courses at Talk Python TrainingThe Complete pytest CoursePatreon SupportersConnect with the hosts
Michael: @[email protected] / @mkennedy.codes (bsky)Brian: @[email protected] / @brianokken.bsky.socialShow: @[email protected] / @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 actionsI want to start a local repositoryWhat did I just commit?I want to discard specific unstaged changesRestore a deleted fileBrian #2: Uravelling t-strings
Brett CannonArticle walks throughEvaluating the Python expressionApplying specified conversionsApplying format specsUsing an Interpolation class to hold details of replacement fieldsUsing Template class to hold parsed dataPlus, 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 desktopFeaturesReal-time process monitoringCPU and Memory usage trackingBeautiful, modern UI with dark/light themesAdvanced process search and filteringPin important processesProcess management (kill processes)Sort by any columnAuto-refresh system statsBrian #4: Introducing Pyrefly: A new type checker and IDE experience for Python
From Facebook / MetaAnother Python type checker written in RustBuilt with IDE integration in mind from the beginningPrinciplesPerformanceIDE firstInference (inferring types in untyped code)Open sourceI 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 TrailerTim 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.compocket is closing, I’m switching to RaindropI 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 GameApache Airflow 3.0 ReleasedPaste 5Joke: Theodore Roosevelt’s Man in the Arena, but for programming
-
Topics covered in this episode:
pre-commit: install with uvPEP 773: A Python Installation Manager for Windows (Accepted)Changes for TextualThe Best Programmers I KnowExtrasJokeWatch on YouTubeAbout the show
Sponsored by NordLayer: pythonbytes.fm/nordlayer
Connect with the hosts
Michael: @[email protected] / @mkennedy.codes (bsky)Brian: @[email protected] / @brianokken.bsky.socialShow: @[email protected] / @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.
Brian #1: pre-commit: install with uv
Adam Johnsonuv tool works great at keeping tools you use on lots of projects up to date quickly, why not use it for pre-commit.The extension of pre-commit-uv will use uv to create virtual environments and install packages fore pre-commit. This speeds up initial pre-commit cache creation. However, Adam is recommending this flavor of using pre-commit because it’s just plain easier to install pre-commit and dependencies than the official pre-commit install guide.Win-win.Side note: No Adam, I’m not going to pronounce uv “uhv”, I’ll stick with “you vee”, even Astral tells me I’m wrongMichael #2: PEP 773: A Python Installation Manager for Windows (Accepted)
via pycoders newsletterOne manager to rule them all – PyManager.PEP 773 replaces all existing Windows installers (.exe “traditional” bundle, per-version Windows Store apps, and the separate py.exe launcher) with a single MSIX app called Python Install Manager (nick-named PyManager).PyManager should be mainstream by CPython 3.15, and the traditional installer disappears no earlier than 3.16 (≈ mid-2027).Simple, predictable commands.python → launches “the best” runtime already present or auto-installs the latest CPython if none is found.py → same launcher as today plus management sub-commands:py install, py uninstall, py list, py exec, py help.Optional python3 and python3.x aliases can be enabled by adding one extra PATH entry.Michael #3: Changes for Textual
Bittersweet news: the business experiment ends, but the code lives on.Textual began as a hobby project layered on top of Rich, but it has grown into a mature, “makes-the-terminal-do-the-impossible” TUI framework with an active community and standout documentation.Despite Textual’s technical success, the team couldn’t pinpoint a single pain-point big enough to sustain a business model, so the company will wind down in the coming weeks.The projects themselves aren’t going anywhere: they’re stable, battle-tested, and will continue under the stewardship of the original author and the broader community.Brian #4: The Best Programmers I Know
Matthias Endler“I have met a lot of developers in my life. Lately, I asked myself: “What does it take to be one of the best? What do they all have in common?””The listRead the referenceKnow your tools really wellRead the error messageBreak down problemsDon’t be afraid to get your hands dirtyAlways help othersWriteNever stop learningStatus doesn’t matterBuild a reputationHave patienceNever blame the computerDon’t be afraid to say “I don’t know”Don’t guessKeep it simpleEach topic has a short discussion. So don’t just ready the bullet points, check out the article.Extras
Brian:
I had a great time in Munich last week. I a talk at a company event, met with tons of people, and had a great time. The best part was connecting with people from different divisions working on similar problems.I love the idea of internal conferences to get people to self organize by topic and meet people they wouldn’t otherwise, to share ideas.Also got started working on a second book on the plane trip back.Michael:
Talk Python Clips (e.g. mullet)Embrace your cloud firewall (example).Python 3.14.0 beta 1 is hereCongrats to the new PSF Fellows.Cancelled faster CPythonbsky.app/profile/snarky.ca postJoke: How To Fix Your Computer
-
Topics covered in this episode:
pirel: Python release cycle in your terminalFastAPI CloudPython's new t-stringsExtrasJokeWatch on YouTubeAbout the show
Sponsored by NordLayer: pythonbytes.fm/nordlayer
Connect with the hosts
Michael: @[email protected] / @mkennedy.codes (bsky)Brian: @[email protected] / @brianokken.bsky.socialShow: @[email protected] / @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: pirel: Python release cycle in your terminal
pirel check shows release information about your active Python interpreter.If the active version is end-of-life, the program exits with code 1. If no active Python interpreter is found, the program exits with code 2.pirel list lists all Python releases in a table. Your active Python interpreter is highlighted.A picture is worth many wordsBrian #2: FastAPI Cloud
Sebastián Ramírez, creator of FastAPI, announced today the formation of a new Company, FastAPI Cloud.Here’s the announcement blog post: FastAPI Cloud - By The Same Team Behind FastAPIThere’s a wait list to try it out.Promises to turns deployment into fastapi login; fastapi deploySide note: announcement includes quote from Daft Punk: Build Harder, Better, Faster, StrongerI just included this in a talk I’m gave last week (and will again next week), where I modify this to “Build Easier, Better, Faster, Stronger”Sebastian and I are both fans of the rocket emoji.BTW, we first covered FastAPI on episode 123 in 2019Brian #3: Python's new t-strings
Dave Peck, one of the authors of PEP 750, which will go into Python 3.14We covered t-strings in ep 428In articlet-strings security benefits over f-stringsHow to work with t-stringsA Pig Latin exampleAlso, I think I have always done this wrongIs it the first consonant to the end? or the first consonant cluster?So… Brian → Rianbay? or Ianbray?BTW, this is an example of nerdgassingWhat’s next once t-strings ship?On thing that’s next (in Python 3.15, maybe, is using t-strings in shlex and subprocess)PEP 787 – Safer subprocess usage using t-strings deferred to 3.15Michael #4: zev
A simple CLI tool to help you remember terminal commands.Examples:
# Find running processeszev 'show all running python processes'# File operationszev 'find all .py files modified in the last 24 hours'# System informationzev 'show disk usage for current directory'# Network commandszev 'check if google.com is reachable'# Git operationszev 'show uncommitted changes in git'Again, picture worth many words:
Extras
Brian:
Holy Grail turns 50nerdgassingMichael:
Transcripts are a bit better now.Zen is better nowJoke: Can my friend come in?
-
Topics covered in this episode:
pip 25.1 has dependency groups, pylock.toml, plus moreaiohttp goes free threadeduv 0.6.15 supports pylock.tomlWheneverExtrasJokeWatch on YouTubeAbout the show
Sponsored by Porkbun! Use our link pythonbytes.fm/porkbun and get a .app or .dev domain for $5.99 at Porkbun.
Connect with the hosts
Michael: @[email protected] / @mkennedy.codes (bsky)Brian: @[email protected] / @brianokken.bsky.socialShow: @[email protected] / @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.
Brian #1: pip 25.1 has dependency groups, pylock.toml, plus more
post What's new in pip 25.1 - Dependency groups!Richard SiDiscovered this through Hugo van KemenadeDependency groups, PEP 735, supported
# pyproject.toml[dependency-groups]test = ["pytest", "pytest-xdist"]lint = ["mypy", "isort"]# Dependency Groups can include other groups! ✨dev = [ {include-group = "test"}, {include-group = "lint"} ]Package installation progress bar
Resumable downloadsExperimental lockfile generation, PEP 751, with pip lockso coolpip index versions is stable, no longer experimentaluse this to get a list of available versionsex: python3 -m pip index versions pytest-checkcombine with --json to get a nice script readable outputMichael #2: aiohttp goes free threaded
Thanks to months of consistent contributions by Lysandros Nikolaou, all of the mandatory dependencies of #aiohttp now ship free-threaded variants of #wheels!This unlocks the same in aiohttp!Brian #3: uv 0.6.15 supports pylock.toml
Discovered through Brett CannonSo far, these projects support pylock.tomlpippip-auditpdmuvWith uvTo export a uv.lock to the pylock.toml format, run: uv export -o pylock.tomlTo generate a pylock.toml file from a set of requirements, run: uv pip compile -o pylock.toml -r requirements.inTo install from a pylock.toml file, run: uv pip sync pylock.toml or uv pip install -r pylock.tomlMichael #4: Whenever
via Pat DeckerTyped and DST-safe datetimes for Python, available in Rust or pure Python.Whenever helps you write correct and type checked datetime code.It's also way faster than other third-party libraries—and usually the standard library as well.Extras
Brian:
Every UUIDMichael:
New Vulnerability in GitHub Copilot and Cursor: How Hackers Can Weaponize Code Agents via Brian SkinnAnd typosquatting in the AI ageFirefox Send alternativesfile.pizza via @rafaelwo bitwarden sendJoke: Can you Vibe?
Interview with Vibe Coder in 2025Senior Engineer tries Vibe Coding -
Topics covered in this episode:
HulyCVE Foundation formed to take over CVE program from MITREdrawdb14 Advanced Python FeaturesExtrasJokeWatch on YouTubeAbout the show
Sponsored by Posit Workbench: pythonbytes.fm/workbench
Connect with the hosts
Michael: @[email protected] / @mkennedy.codes (bsky)Brian: @[email protected] / @brianokken.bsky.socialShow: @[email protected] / @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: Huly
All-in-One Project Management Platform (alternative to Linear, Jira, Slack, Notion, Motion) If you're primarily interested in self-hosting Huly without the intention to modify or contribute to its development, please use huly-selfhost.Manage your tasks efficiently with Huly's bidirectional GitHub synchronization. Use Huly as an advanced front-end for GitHub Issues and GitHub Projects.Connect every element of your workflow to build a dynamic knowledge base.Everything you need for productive team work: Team Planner • Project Management • Virtual Office • Chat • Documents • InboxSelf hosting as a service: elest.ioBrian #2: CVE Foundation formed to take over CVE program from MITRE
Back story: CVE, global source of cybersecurity info, was hours from being cut by DHSThe 25-year-old CVE program, an essential part of global cybersecurity, is cited in nearly any discussion or response to a computer security issue.CVE was at real risk of closure after its contract was set to expire on April 16.The nonprofit MITRE runs CVE on a contract with the DHS.A letter last Tuesday sent Tuesday by Yosry Barsoum, vice president of MITRE, gave notice of the potential halt to operations.Another possible victim of the current administration.CVE Foundation Launched to Secure the Future of the CVE ProgramCVE Board members have spent the past year developing a strategy to transition CVE to a dedicated, non-profit foundation. The new CVE Foundation will focus solely on continuing the mission of delivering high-quality vulnerability identification and maintaining the integrity and availability of CVE data for defenders worldwide.Over the coming days, the Foundation will release more information about its structure, transition planning, and opportunities for involvement from the broader community.Michael #3: drawdb
Free and open source, simple, and intuitive database design editor, data-modeler, and SQL generator.Great drag-drop relationship managerDefine your DB visually, export as SQL create scriptsOr import existing SQL to kickstart the diagramming.Brian #4: 14 Advanced Python Features
Edward LiPicking some favorites1. Typing Overloads2. Keyword-only and Positional-only Arguments9. Python NitpicksFor-else statementsWalrus operatorShort Circuit EvaluationOperator ChainingExtras
Michael:
Thunderbird send / other firefox things.Joke: Python Tariffs
Thanks wagenraceThanks Campfire Tales -
Topics covered in this episode:
How to Write a Git Commit MessageCaddy Web ServerSome new PEPs approvedjuvExtrasJokeWatch on YouTubeAbout the show
Sponsored by Posit Connect: pythonbytes.fm/connect
Connect with the hosts
Michael: @[email protected] / @mkennedy.codes (bsky)Brian: @[email protected] / @brianokken.bsky.socialShow: @[email protected] / @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.
Brian #1: How to Write a Git Commit Message
Chris Beams7 rules of a great commit messageSeparate subject from body with a blank lineLimit the subject line to 50 charactersCapitalize the subject lineDo not end the subject line with a periodUse the imperative mood in the subject lineWrap the body at 72 charactersUse the body to explain what and why vs. howArticle also includesWhy a good commit message mattersDiscussion about each of the 7 rulesCool hat tips to other articles on the subject“Keep in mind: This has all been said before.”Each word is a different link.Michael #2: Caddy Web Server
via Fredrik MellströmLike a more modern NGINXCaddy automatically obtains and renews TLS certificates for all your sites.Caddy's native configuration is a JSON document.Even localhost and internal IPs are served with TLS using the intermediate of a fully-automated, self-managed CA that is automatically installed into most local trust stores.Configure multiple Caddy instances with the same storage, and they will automatically coordinate certificate management as a fleet.Production-grade static file server.Brian #3: Some new PEPs approved
PEP 770 – Improving measurability of Python packages with Software Bill-of-MaterialsAccepted for packagingAuthor: Seth Larson, Sponsor Brett Cannon“This PEP proposes using SBOM documents included in Python packages as a means to improve automated software measurability for Python packages.”PEP 750 – Template StringsAccepted for Python 3.14Author: Jim Baker, Guido van Rossum, Paul Everitt, Kaudai Aono, Lysandros Nikolaou, Dave Peck“Templates provide developers with access to the string and its interpolated values before they are combined. This brings native flexible string processing to the Python language and enables safety checks, web templating, domain-specific languages, and more.”Michael #4: juv
A toolkit for reproducible Jupyter notebooks, powered by uv. Create, manage, and run Jupyter notebooks with their dependencies Pin dependencies with PEP 723 - inline script metadata Launch ephemeral sessions for multiple front ends (e.g., JupyterLab, Notebook, NbClassic) Powered by uv for fast dependency managementUse uvx to run jupyterlab with ephemeral virtual environments and tracked dependencies.Extras
Brian:
Status of Python versionsnew-ish formatUse this all the time. Can’t remember if we’ve covered the new format yet.See also Python endoflife.dateSame dates, very visible encouragement to move on to Python 3.13 if you haven’t already.Michael:
Python 3.13.3 is out..git-blame-ignore-revs follow upJoke: BGPT (thanks Doug Farrell)
-
Topics covered in this episode:
Git Town solves the problem that using the Git CLI correctlyPEP 751 – A file format to record Python dependencies for installation reproducibility git-who and watchghaShare Python Scripts Like a Pro: uv and PEP 723 for Easy DeploymentExtrasJokeWatch on YouTubeAbout the show
Sponsored by Posit Package Manager: pythonbytes.fm/ppm
Connect with the hosts
Michael: @[email protected] / @mkennedy.codes (bsky)Brian: @[email protected] / @brianokken.bsky.socialShow: @[email protected] / @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 Town solves the problem that using the Git CLI correctly
Git Town is a reusable implementation of Git workflows for common usage scenarios like contributing to a centralized code repository on platforms like GitHub, GitLab, or Gitea. Think of Git Town as your Bash scripts for Git, but fully engineered with rock-solid support for many use cases, edge cases, and error conditions.Keep using Git the way you do now, but with extra commands to create various branch types, keep them in sync, compress, review, and ship them efficiently.Basic workflowCommands to create, work on, and ship features.git town hack - create a new feature branchgit town sync - update the current branch with all ongoing changesgit town switch - switch between branches visuallygit town propose - propose to ship a branchgit town ship - deliver a completed feature branchAdditional workflow commandsCommands to deal with edge cases.git town delete - delete a feature branchgit town rename - rename a branchgit town repo - view the Git repository in the browserBrian #2: PEP 751 – A file format to record Python dependencies for installation reproducibility
AcceptedFrom Brett Cannon“PEP 751 has been accepted! This means Python now has a lock file standard that can act as an export target for tools that can create some sort of lock file. And for some tools the format can act as their primary lock file format as well instead of some proprietary format.”File name: pylock.toml or at least something that starts with pylock and ends with .tomlIt’s exciting to see the start of a standardized lock fileMichael #3: git-who and watchgha
git-who is a command-line tool for answering that eternal question: Who wrote this code?!Unlike git blame, which can tell you who wrote a line of code, git-who tells you the people responsible for entire components or subsystems in a codebase. You can think of git-who sort of like git blame but for file trees rather than individual files.And watchgha - Live display of current GitHub action runs by Ned Batchelder
Brian #4: Share Python Scripts Like a Pro: uv and PEP 723 for Easy Deployment
Dave JohnsonNice full tutorial discussing single file Python scripts using uv with external dependencies Starting with a script with dependencies.Using uv add --script [HTML_REMOVED] [HTML_REMOVED] to add a /// script block to the topUsing uv runAdding #!/usr/bin/env -S uv run --script shebangEven some Windows adviceExtras
Brian:
April 1 pranks done wellBREAKING: Guido van Rossum Returns as Python’s BDFLincludingBrett Cannon noted as “Famous Python Quotationist”Guido taking credit for “I came for the language but I stayed for the community” which was from Brettthen Brett’s title of “Famous Python Quotationist” is crossed out.Barry Warsaw asking Guido about releasing Python 2.8Barry is the FLUFL, “Friendly Language Uncle For Life “Mariatta can’t get Guido to respond in chat until she addresses him as “my lord”.“… becoming one with whitespace.”“Indentation is Enlightenment” Upcoming new keyword: maybeLike “if” but more Pythonicas in Maybe: print("Python The Documentary - Coming This Summer!")I’m really hoping there is a documentaryApril 1 pranks done poorlyNote: pytest-repeat works fine with Python 3.14, and never had any problemsIf you have to explain the joke, maybe it’s not funny.The explanationpi, an irrational number, as in it cannot be expressed by a ratio of two integers, starts with 3.14159 and then keeps going, and never repeats.Python 3.14 is in alpha and people could be testing with it for packagesTest & Code is doing a series on pytest pluginspytest-repeat is a pytest plugin, and it happened to not have any tests for 3.14 yet.Now the “joke”. I pretended that I had tried pytest-repeat with Python 3.14 and it didn’t work.Test & Code: Python 3.14 won't repeat with pytest-repeatThus, Python 3.14 won’t repeat.Also I mentioned that there was no “rational” explanation.And pi is an irrational number.Michael:
pysqlscribe v0.5.0 has the “parse create scripts” feature I suggested!Markdown follow upPrettier to format Markdown via HugoBeen using mdformat on some upcoming projects including the almost done Talk Python in Production book. Command I like is mdformat --number --wrap no ./uv tool install --with is indeed the pipx inject equivalent, but requires multiple --with's:pipx inject mdformat mdformat-gfm mdformat-frontmatter mdformat-footnote mdformat-gfm-alertsuv tool install mdformat --with mdformat-gfm --with mdformat-frontmatter --with mdformat-footnote --with mdformat-gfm-alertsuv follow upFrom James FalconAs a fellow uv enthusiast, I was still holding out for a use case that uv hasn't solved. However, after last week's episode, you guys finally convinced me to switch over fully, so I figured I'd explain the use case and how I'm working around uv's limitations.I maintain a python library supported across multiple python versions and occasionally need to deal with bugs specific to a python version. Because of that, I have multiple virtualenvs for one project. E.g., mylib38 (for python 3.8), mylib313 (for python 3.13), etc. I don't want a bunch of .venv directories littering my project dir.For this, pyenv was fantastic. You could create the venv with pyenv virtualenv 3.13.2 mylib313, then either activate the venv with pyenv activate mylib313 and create a .python-version file containing mylib313 so I never had to manually activate the env I want to use by default on that project.uv doesn't have a great solution for this use case, but I switched to a workflow that works well enough for me:Define my own central location for venvs. For me that's ~/vCreate venvs with something like uv venv --python 3.13 ~/v/mylib313Add a simple function to my bashrc:`workon() { source ~/v/$1/bin/activate } \ so now I can run \workon mylib313orworkon mylib38when I need to work in a specific environment. uv's.python-version` support works much differently than pyenv's, and that lack of support is my biggest frustration with this approach, but I am willing to live without it.Do you Firefox but not Zen? You can now make pure Firefox more like Zen’s / Arc’s layout.Joke: So here it will stay
See the follow up thread too!Also: Guido as Lord Python via Nick Muoh -
Topics covered in this episode:
mdformatpre-commit-uvPEP 758 and 781Serie: rich git commit graph in your terminal, like magic ExtrasJokeWatch on YouTubeAbout the show
Sponsored by Posit Connect Cloud: pythonbytes.fm/connect-cloud
Connect with the hosts
Michael: @[email protected] / @mkennedy.codes (bsky)Brian: @[email protected] / @brianokken.bsky.socialShow: @[email protected] / @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.
Brian #1: mdformat
Suggested by Matthias SchöttleLast episode Michael covered blacken-docs, and I mentioned it’d be nice to have an autoformatter for text markdown.Matthias delivered with suggesting mdformat“Mdformat is an opinionated Markdown formatter that can be used to enforce a consistent style in Markdown files.”A python project that can be run on the command line.Uses a style guide I mostly agree with.I’m not a huge fan of numbered list items all being “1.”, but that can be turned off with --number, so I’m happy.Converts underlined headings to #, ##, etc. headings.Lots of other sane conventions.The numbering thing is also sane, I just think it also makes the raw markdown hard to read.Has a plugin system to format code blocksMichael #2: pre-commit-uv
via Ben FalkUse uv to create virtual environments and install packages for pre-commit.Brian #3: PEP 758 and 781
PEP 758 – Allow except and except* expressions without parenthesesacceptedPEP 781 – Make TYPE_CHECKING a built-in constantdraft statusAlso, PEP Index by Category kinda rocksMichael #4: Serie: rich git commit graph in your terminal, like magic
While some users prefer to use Git via CLI, they often rely on a GUI or feature-rich TUI to view commit logs. Others may find git log --graph sufficient.GoalsProvide a rich git log --graph experience in the terminal.Offer commit graph-centric browsing of Git repositories.Extras
Michael:
Sunsetting Search? (Startpage)Ruff in or out?Joke: Wishing for wishes
-
Topics covered in this episode:
Why aren't you using uv?Python Developer Tooling HandbookCalling all doc writers: blacken-docsReinventing notebooks as reusable Python programsExtrasJokeWatch on YouTubeAbout the show
Brought to you by Posit Connect: pythonbytes.fm/connect.
Connect with the hosts
Michael: @[email protected] / @mkennedy.codes (bsky)Brian: @[email protected] / @brianokken.bsky.socialShow: @[email protected] / @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: Why aren't you using uv?
Fun conversation on X by Armin Ronacher.Interesting quotes from the threadI get it replaces pip/pyenv, but should I also use it instead of the built in 'python -m venv .venv'?But I need python installed to make python programs?Because it places the venv in the project folder and I can't run executables from there due to corporate policy. Many such cases. No idea why astral doesn't address this with more urgency.Sounds like a bad corporate policy :)i’m too lazy to switch from pyenv and piptrust issues, what if they do a bait and switch …Because everyone said that about poetry and I'm not sure I'm really ready to get hurt again.MasochismMany times I tried a lot of similar tools and always come back to pip and pip-tools. Them are just work, why should I spend my time for something "cool" that will bring more problems?I tried this week but I was expecting a "uv install requests" instead of "uv add". Switched back to pipenv.we partially use it. will transition when Dependabot support is available.I’ll leave it with → Jared Scheel: Seeing a whole lotta Stockholm Syndrome in the replies to this question.Brian #2: Python Developer Tooling Handbook
Tim Hopper“This is not a book about programming Python. Instead, the goal of this book is to help you understand the ecosystem of tools used to make Python development easier and more productive”Covers tools related to packaging, linting, formatting, and managing dependencies.Michael #3: Calling all doc writers: blacken-docs
Run black on python code blocks in documentation files You can also install blacken-docs as a pre-commit hook.It supports Markdown, reStructuredText, and LaTex files. Additionally, you can run it on Python files to reformat Markdown and reStructuredText within docstrings.Brian #4: Reinventing notebooks as reusable Python programs
marimo allows you to store notebooks as plaintext Python filespropertiesGit-friendly: small code change => small diffeasy for both humans and computers to readimportable as a Python module, without executing notebook cellsexecutable as a Python scripteditable with a text editorAlso, … testing with pytest“Because marimo notebooks are just Python files, they are interoperable with other tools for Python — including pytest. ““Testing cells. Any cell named as test_* is automatically discoverable and testable by pytest. The same goes for any cell that contains only test_ functions and Test classes.”“Importantly, because cells are wrapped in functions, running pytest test_notebook.py doesn’t execute the entire notebook — just its tests.”Extras
Brian:
PyConUS announces Refund Policy for International AttendeesNew format now live for The Complete pytest Course Bundle and component coursesEach course now available separately alsopytest Primary Power is 13 lessons, 3.9 hoursUsing pytest with Projects, 10 lessons, 3.4 hourspytest Booster Rockets, 6 lessons, 1.3 hours of contentNew format is easier to navigateBetter for people who like different speeds. I’m usually a 1.25x-1.5x speed person.Now also with Congratulations! lessons (with fireworks) and printable certificates.Michael:
PyCon Taiwan is currently calling for proposalsHN trends follow up via ShinjitsuI'm sure some other Hacker News reader has already given you the feedback, but in the unlikely case that they haven't, You read those headlines in this segment exactly wrong.
“Ask HN: Who is hiring?" is a monthly post that asks employers to postabout jobs they have available
“Ask HN: Who wants to be hired?” is a monthly topic where they askpeople who are looking for jobs to post about themselves in the hopethat their skillset it is a good match (and not an LLM generated resume)
So unfortunately your rosy analysis might need a less rosyinterpretation.
Joke:
Top 12 things likely to be overheard if you had a Klingon ProgrammerFrom Holgi on Mastodon -
Topics covered in this episode:
The weird quirk with rounding in PythonPython interpreter adds tail callsRemove punctuation from a string with translate and maketransExtra, extra, extraExtrasJokeSee the full show notes for this episode on the website at pythonbytes.fm/424 -
Topics covered in this episode:
pysqlscribeA map of PythonRust, C++, and Python trends in jobs on Hacker News (February 2025)The features of Python's help() functionExtrasJokeSee the full show notes for this episode on the website at pythonbytes.fm/423 -
Topics covered in this episode:
My 2025 uv-based Python Project Layout for Production AppsaiolimiterA peek into a possible future of Python in the browserReloadiumExtrasJokeSee the full show notes for this episode on the website at pythonbytes.fm/422 -
Topics covered in this episode:
httpdbgPyPI Now Supports iOS and Android Wheels for Mobile Python DevelopmentArcade Game Platform goes 3.0PEP 765 – Disallow return/break/continue that exit a finally blockExtrasJokeSee the full show notes for this episode on the website at pythonbytes.fm/421 -
Topics covered in this episode:
PEP 772 – Packaging governance processOfficial Django MongoDB Backend Now Available in Public PreviewDeveloper PhilosophyPython 3.13.2 releasedExtrasJokeSee the full show notes for this episode on the website at pythonbytes.fm/420 -
Topics covered in this episode:
content-types package for better MIME types/Content-TypeWagtail 6.4Build It YourselfBuild backend popularity over timeExtrasJokeSee the full show notes for this episode on the website at pythonbytes.fm/419 -
Topics covered in this episode:
In memoriam: Michael Foord 1974-2025Valkey (Redis Replacement)30 best practices for software development and testingmimetype.ioExtrasJokeSee the full show notes for this episode on the website at pythonbytes.fm/418 -
Topics covered in this episode:
LLM CatcherOn PyPI Quarantine processRESPXUnpacking kwargs with custom objectsExtrasJokeSee the full show notes for this episode on the website at pythonbytes.fm/417 -
Topics covered in this episode:
Terminals & ShellsWinloop: An Alternative library for uvloop compatibility with windowsRuff & uvuv-secureExtrasJokeSee the full show notes for this episode on the website at pythonbytes.fm/416 - Mostrar mais