Python Bytes is a weekly podcast hosted by Michael Kennedy and Brian Okken. The show is a short discussion on the headlines and noteworthy news in the Python, developer, and data science space.
#330 Your data, validated 5x-50x faster, coming soon
April 06, 2023
00:34:25
33.53 MB
Downloads: 0
Watch on YouTube
About the show
Sponsored by Influxdb
Connect with the hosts
- Michael: @mkennedy@fosstodon.org
- Brian: @brianokken@fosstodon.org
- Show: @pythonbytes@fosstodon.org
Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too.
Brian #1: Pydantic V2 Pre Release
- Terrence Dorsey & Samuel Colvin
- Alpha release available to everyone:
pip install --pre -U "pydantic>=2.0a1"
- Headlines:
- pydantic-core - all validation logic rewritten in Rust and moved to separate package,
pytest-core
- 5-50x faster
- separation will aid safety and maintainability
- pydantic-core - all validation logic rewritten in Rust and moved to separate package,
- Lots ready for experimentation
- BaseModel, Dataclasses, Serialization, …
- Much still under construction
- Docs, BaseSettings→ pydantic-settings, …
Michael #2: microdot The impossibly small web framework for Python and MicroPython
- Microdot is a minimalistic Python web framework inspired by Flask, and designed to run on systems with limited resources such as microcontrollers.
- It runs on standard Python and on MicroPython.
- Support for async, websockets, tls, even ASGI servers.
- Less mem usage by a big margin.
Brian #3: GitHub Actions Tools: watchgha, build and inspect, and pytest annotate failures
- watchgha
- Ned Batchelder
- Watch GH Actions progress on the command line
- build-and-inspect-python-package
- Hynek
- Test the build of wheels, check contents, lint README
- print sdist contents, wheel contents, and metadata
- pytest-github-actions-annotate-failures
- utgwkk
- Nice traceback annotations for pytest
Michael #4: PEP 709 – Inlined comprehensions
- by Carl Meyer
- Comprehensions are currently compiled as nested functions, which provides isolation of the comprehension’s iteration variable, but is inefficient at runtime.
- This PEP proposes to inline list, dictionary, and set comprehensions into the code where they are defined, and provide the expected isolation by pushing/popping clashing locals on the stack.
- This change makes comprehensions much faster: up to 2x faster for a microbenchmark of a comprehension alone.
Extras
Michael:
Joke: Can’t watch movies