Skip to content
Discussion options

You must be logged in to vote

The reason it got dropped as "unused" is that it genuinely was. In 0.0.38 and earlier, sqlmodel.main.class_registry was just this, sitting at module scope:

class_registry = weakref.WeakValueDictionary()  # type: ignore

Nothing else in SQLModel ever wrote to it or read from it (grep the old main.py, it appears exactly once), and it was never exported from sqlmodel/__init__.py. So it was always an empty dict that no SQLModel code touched. If your BigQuery compat code was reading _sm.class_registry expecting to find your mapped classes in there, it was getting an empty mapping the whole time.

The registry that actually holds your mapped classes by name (the one SQLAlchemy uses to resolve str…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@12rambau
Comment options

Answer selected by YuriiMotov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
3 participants