#460: Overlooked Python Typing
About the show
Sponsored by us! Support our work through:
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.
Brian #1: Advent of Code starts today
- A few changes, like 12 days this year, which honestly, I’m grateful for.
- See also: elf: Advent of Code CLI helper for Python
Michael #2: Django 6 is coming
- Expected December 2025
- Django 6.0 supports Python 3.12, 3.13, and 3.14
- Built-in support for the Content Security Policy (CSP) standard is now available, making it easier to protect web applications against content injection attacks such as cross-site scripting (XSS).
- The Django Template Language now supports template partials, making it easier to encapsulate and reuse small named fragments within a template file.
- Django now includes a built-in Tasks framework for running code outside the HTTP request–response cycle. This enables offloading work, such as sending emails or processing data, to background workers.
- Email handling in Django now uses Python’s modern email API, introduced in Python 3.6. This API, centered around the <code>email.message.EmailMessage</code> class
Brian #3: Advanced, Overlooked Python Typing
- get_args, TypeGuard, TypeIs, and more goodies
Michael #4: codespell
- Learned from this PR for the Talk Python book.
- Fix common misspellings in text files.
- It's designed primarily for checking misspelled words in source code (backslash escapes are skipped), but it can be used with other files as well.
- It does not check for word membership in a complete dictionary, but instead looks for a set of common misspellings. Therefore it should catch errors like "adn", but it will not catch "adnasdfasdf".
- It shouldn't generate false-positives when you use a niche term it doesn't know about.
Extras
Brian:
Michael:
- Follow up on tach from Gerben Dekker:
tachhas been unmaintained for a bit but is not anymore. It was the main product from Gauge which is a Y combinator startup that pivoted to something unrelated and abandonedtach. However, https://github.com/DetachHead forked it but now got access to the main repo and has committed to maintaining it.ruff analyze graphis fully independent oftach- we actually started to look into alternatives fortachwhen it became unmaintained and then foundruff analyze graph.- For our use case, with just a bit of manipulation on top of
ruff analyze graphwe replaced our use ofdeptry(which was slower - and I try to be careful depending on one-man projects).
- A Review of Michael Kennedy’s book, “Talk Python in Production” - Thanks Doug
Joke: NoaaS
Episode Transcript
Collapse transcript
00:00
00:05
00:12
00:13
00:14
00:21
00:23
00:28
00:30
00:31
00:33
00:41
00:44
00:49
00:51
00:53
00:57
01:00
01:04
01:06
01:08
01:10
01:12
01:16
01:17
01:19
01:21
01:24
01:25
01:27
01:32
01:35
01:38
01:42
01:43
01:47
01:52
01:57
01:58
01:59
02:01
02:08
02:09
02:12
02:13
02:14
02:16
02:17
02:17
02:20
02:22
02:24
02:26
02:28
02:34
02:37
02:40
02:42
02:44
02:47
02:52
02:57
02:59
03:00
03:04
03:08
03:12
03:20
03:24
03:30
03:31
03:33
03:34
03:40
03:44
03:49
04:03
04:05
04:08
04:11
04:12
04:17
04:18
04:45
04:46
04:47
04:48
04:50
04:54
04:56
05:02
05:04
05:05
05:08
05:10
05:12
05:13
05:20
05:23
05:28
05:31
05:31
05:36
05:42
05:44
05:46
05:49
05:51
05:53
05:59
06:05
06:06
06:07
06:10
06:11
06:15
06:21
06:25
06:32
06:36
06:40
06:43
06:50
06:53
06:57
07:01
07:04
07:06
07:08
07:11
07:15
07:21
07:23
07:26
07:28
07:34
07:40
07:43
07:44
07:51
07:56
07:59
08:02
08:08
08:14
08:19
08:27
08:30
08:35
08:36
08:38
08:40
08:44
08:48
08:48
08:49
08:52
08:57
09:00
09:04
09:07
09:09
09:16
09:21
09:26
09:30
09:34
09:36
09:40
09:41
09:46
09:48
09:50
09:54
10:00
10:01
10:03
10:05
10:07
10:10
10:12
10:18
10:20
10:21
10:22
10:25
10:30
10:30
10:34
10:41
10:44
10:45
10:50
10:54
10:55
10:57
10:58
10:59
11:00
11:00
11:01
11:02
11:03
11:05
11:09
11:12
11:15
11:15
11:17
11:20
11:24
11:29
11:36
11:42
11:48
11:49
11:54
11:56
12:00
12:02
12:09
12:12
12:16
12:22
12:23
12:25
12:31
12:33
12:36
12:40
12:42
12:44
12:45
12:49
12:51
12:52
12:53
12:55
12:56
13:00
13:04
13:10
13:13
13:22
13:25
13:37
13:40
13:51
13:53
13:55
13:59
14:04
14:09
14:11
14:14
14:22
14:23
14:28
14:30
14:31
14:32
14:37
14:38
14:39
14:43
14:47
14:51
14:54
14:55
15:00
15:01
15:05
15:11
15:14
15:16
15:20
15:22
15:30
15:36
15:40
15:47
15:54
15:59
16:01
16:07
16:08
16:11
16:14
16:15
16:16
16:17
16:21
16:21
16:23
16:25
16:26
16:29
16:34
16:38
16:40
16:41
16:46
16:47
16:49
16:55
17:01
17:07
17:09
17:12
17:17
17:20
17:23
17:29
17:34
17:40
17:45
17:51
17:53
17:56
18:00
18:04
18:05
18:09
18:09
18:13
18:15
18:22
18:23
18:24
18:28
18:29
18:32
18:34
18:36
18:38
18:40
18:40
18:42
18:44
18:45
18:46
18:47
18:47
18:50
18:54
18:59
19:04
19:08
19:14
19:16
19:19
19:22
19:25
19:32
19:32
19:37
19:46
19:49
19:55
19:57
20:02
20:04
20:11
20:15
20:19
20:22
20:24
20:28
20:30
20:32
20:36
20:40
20:43
20:43
20:49
20:52
20:55
20:59
21:03
21:05
21:07
21:07
21:09
21:10
21:10
21:13
21:21
21:25
21:26
21:31
21:37
21:39
21:43
21:49
21:54
21:58
22:04
22:13
22:20
22:29
22:39
22:40
22:46
22:47
22:48
22:53
22:59
23:01
23:02
23:03
23:05
23:08
23:08
23:09
23:16
23:21
23:26
23:31
23:38
23:43
23:44
23:45
23:47
23:48
23:50
23:52
23:55
23:58
24:01
24:07
24:14
24:23



