v0.7.3-v0.7.6 shipped — 4 modern-Python parser fixes, thanks to @jsabater for the first repro #26
FROWNINGdev
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
After @jsabater filed #25 yesterday about typed Django/Ninja fields silently disappearing from the sidebar, I did a targeted fuzz of the class + field regexes for other modern-Python shapes that might silently break. Ended up finding three more.
Fixed
jti: CharField[str] = models.CharField(...). Reported by @jsabater with a beautifully minimal Django Ninja 1.6 repro. Fields silently disappeared from the sidebar, ER diagram, n+1 detector, MCPdescribe_model,find_relations— everything that reads the parsed schema.class Container[T](models.Model):.CLASS_REdidn't allow[T]between the name and(, so entire classes vanished from the walk.modelsmodule (from django.db import models as m→x = m.CharField(...)) and third-party field packages (x = jsonfield.JSONField(...)). Same underlying gap inBARE_FIELD_RE.\s{indent}doesn't count a single\tas 4 chars even though_detect_class_indentdid. Every field silently dropped for editors defaulting to tabs.The pattern
All four bugs are the same shape: user-written code parses fine as Python but silently produces zero fields — no error, no warning, no crash. The reason regex parsers were used in the first place (no runtime dep, fast, safe) is exactly why these bugs are so hard to spot — the tool just returns empty results.
Ended up shipping 19 regression tests across the four fixes (Python 183 total, TS 4 total) that lock the exact shapes down. Any future syntax evolution that regresses these gets caught at CI time.
Try it
Thanks
pip install django-orm-lensfor the second week running (~1.6k/week, we see you)What's next
Focus stays on quality over new features for the next week. The MCP-plus-CLI-plus-extension surface is doing its job (2k+ PyPI installs, 14 stars, 6 external PRs) and we're closing the long tail of edge-case parser bugs. Feature request queue: #3 (ORM query autocomplete) is still the flagship candidate for v0.8 — 2-3 weeks of work.
If you hit a parse gap of your own, please file it like jsabater did — a 3-line repro is all we need to fix it same-day.
All reactions