#370: Your Very Own Heroku
Published Tue, Feb 6, 2024,
recorded Tue, Feb 6, 2024
About the show
Sponsored by us! Support our work through:
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.
Michael #1: Dokku
- An open source PAAS alternative to Heroku.
- Dokku helps you build and manage the lifecycle of applications from building to scaling.
- Powered by Docker, you can install Dokku on any hardware.
- Once it's set up on a host, you can push Heroku-compatible applications to it via Git.
- Rich plug in architecture.
Brian #2: Summary of Major Changes Between Python Versions
- Nicholas Hairs
- Changes between versions & Tools & utilities to help with switching
- Hopefully you’re already at least at 3.8, but come on, 3.11 & 3.12 are so fun!
- Useful things
pyupgrade
can automatically upgrade code base- (However, I frequently just upgrade and run tests and let my old code be as-is until it bugs me. - Brian)
black
checkspyproject.toml
requires-python
setting and uses version specific rules.
- Versions (way more highlights listed in the article)
- 3.8
- Assignment expressions
:=
walrus f"{variable=}"
now works
- Assignment expressions
- 3.9
- Typing has built in generics like
dict[]
, so no morefrom typing import Dict
- Dict union operator
- Strings can
removeprefix
andremovesuffix
- Typing has built in generics like
- 3.10
- Structural pattern matching
match/case
- Typing: Union using pipe
|
- Dataclasses support
slots=True
andkw_only=True
- Structural pattern matching
- 3.11
tomllib
included as a standard TOMP parser- Exception groups
- Exception Notes
add_note()
- Typing: A
Self
type - Star unpacking expressions allowed in
for
statements:for x in *a, *b:
- 3.12
- f-strings can re-use quotes
- Typing: better type parameter syntax
- Typing:
@override
decorator ensures a method being overridden by a child class actually exists.
- 3.8
Michael #3: How to check Internet Speed via Terminal? speedtest-cli
- Command line interface for testing internet bandwidth using speedtest.net
- Just
pipx install speedtest-cli
- Has a Python API too
Brian #4: Blogs: We all should blog more
- Jeff Triplett is attempting one post per day in February
- Feb 1: Choosing the Right Python and Django Versions for Your Projects
- Feb 2: My First Mac
- Which also links to a quite interesting Personal: Default Apps 2023
- Feb 3: What’s Your Go-to Comfort Media? [rough cut]
- Feb 4: The Django apps I actually use (rough cut)
- Feb 5: How to test with Django and pytest fixtures
- Need ideas?
- Not using AI? Thanks. We appreciate that.
- Maybe tag it as Not By AI
Extras
Brian:
- If upgrading to pytest 8, be aware that running individual tests with parametrization will result in a reverse order.
- It shouldn’t matter. You shouldn’t be depending on test order.
- But it was surprising to me.
- Issue has been logged
Michael:
- Orbstack follow up
Joke: White Lies