Topics covered in this episode: * pypistats.org was down, is now back, and there’s a CLI** State of Python 2025** wrapt: A Python module for decorators, wrappers and monkey patching.*pysentryExtrasJokeWatch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python TrainingThe Complete pytest CoursePatreon Supporters Connect with the hosts Michael: @mkennedy@fosstodon.org / @mkennedy.codes (bsky)Brian: @brianokken@fosstodon.org / @brianokken.bsky.socialShow: @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. Brian #1: pypistats.org was down, is now back, and there’s a CLI pypistats.org is a cool site to check the download stats for Python packages.It was down for a while, like 3 weeks?A couple days ago, Hugo van Kemenade announced that it was back up.With some changes in stewardship “pypistats.org is back online! 🚀📈 Thanks to @jezdez for suggesting the @ThePSF takes stewardship and connecting the right people, to @EWDurbin for migrating, and of course to Christopher Flynn for creating and running it for all these years!”Hugo has a CLI version, pypistats You can give it a command for what you want to search for recent,overall, python_major, python_minor, systemThen either a package name, a directory path, or if nothing, it will grab the current directory package via pyproject.toml or setup.cfgvery cool Michael #2: State of Python 2025 Michael’s Themes Python people use Python: 86% of respondents use Python as their main languageWe are mostly brand-new programmers: Exactly 50% of respondents have less than two years of professional coding experienceData science is now over half of all PythonMost still use older Python versions despite benefits of newer releases: Compelling math to make the change.Python web devs resurgenceForward-looking trends Agentic AI will be wildAsync, await, and threading are becoming core to PythonPython GUIs and mobile are risingActionable ideas Action 1: Learn uvAction 2: Use the latest PythonAction 3: Learn agentic AIAction 4: Learn to read basic RustAction 5: Invest in understanding threadingAction 6: Remember the newbies Brian #3: wrapt: A Python module for decorators, wrappers and monkey patching. “The aim of the wrapt module is to provide a transparent object proxy for Python, which can be used as the basis for the construction of function wrappers and decorator functions. An easy to use decorator factory is provided to make it simple to create your own decorators that will behave correctly in any situation they may be used.”Why not just use functools.wraps()? “The wrapt module focuses very much on correctness. It therefore goes way beyond existing mechanisms such as functools.wraps() to ensure that decorators preserve introspectability, signatures, type checking abilities etc. The decorators that can be constructed using this module will work in far more scenarios than typical decorators and provide more predictable and consistent behaviour.”There’s a bunch of blog posts from 2014 / 2015 (and kept updated) that talk about how wrapt solves many issues with traditional ways to decorate and patch things in Python, including “How you implemented your Python decorator is wrong”.Docs are pretty good, with everything from simple wrappers to an example of building a wrapper to handle thread synchronization Michael #4: pysentry via Owen LamontInstall via uv tool install pysentry-rsScan your Python dependencies for known security vulnerabilities with Rust-powered scanner.PySentry audits Python projects for known security vulnerabilities by analyzing dependency files (uv.lock, poetry.lock, Pipfile.lock, pyproject.toml, Pipfile, requirements.txt) and cross-referencing them against multiple vulnerability databases. It provides comprehensive reporting with support for various output formats and filtering options.Key Features: Multiple Project Formats: Supports uv.lock, poetry.lock, Pipfile.lock, pyproject.toml, Pipfile, and requirements.txt filesExternal Resolver Integration: Leverages uv and pip-tools for accurate requirements.txt constraint solvingMultiple Data Sources: PyPA Advisory Database (default)PyPI JSON APIOSV.dev (Open Source Vulnerabilities)Flexible Output for different workflows: Human-readable, JSON, SARIF, and Markdown formatsPerformance Focused: Written in Rust for speedAsync/concurrent processingMulti-tier intelligent caching (vulnerability data + resolved dependencies)Comprehensive Filtering: Severity levels (low, medium, high, critical)Dependency scopes (main only vs all [optional, dev, prod, etc] dependencies)Direct vs. transitive dependenciesEnterprise Ready: SARIF output for IDE/CI ...
Show More
Show Less