~/talk

from hat import rabbit: Hacking your way through Python's import machinery for fun and profit

Talkat PyConline AU 2021 · 2021-09-10..09-12· [python]
slides:none on file

Claim: make Django believe SQL-only migrations are real Python migration modules so Django can import and run them without duplicating files. Uses the import machinery: sys.meta_path, custom finder/loader and a sys.path_hooks path-entry hook, plus pkgutil.iter_modules and ModuleSpec mechanics. Builds virtual migration package and per-migration modules on the fly, registers them at runtime, and it works — used to let procrastinate expose PostgreSQL SQL migrations to Django with no disk files written.

AI-written summary · about

  1. 0:00Start
  2. 0:16Joakim Jablon
  3. 3:03What a Sql Migration Is
  4. 6:49Procrastinate Sql Migrations
  5. 7:43Migrations
  6. 8:39Virtual Migration Files
  7. 9:55The Structure of the Import Machinery
  8. 10:30The Import Statement
  9. 15:33Sysdot Metapath
  10. 17:19Path Entries
  11. 25:09Create an Importer
  12. 27:55Item Modules
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.