Allow inspection registrations from module reloads by w-Jessamine · Pull Request #13402 · sqlalchemy/sqlalchemy · GitHub
Skip to content

Allow inspection registrations from module reloads#13402

Open
w-Jessamine wants to merge 2 commits into
sqlalchemy:mainfrom
w-Jessamine:fix/inspection-reload-registrars
Open

Allow inspection registrations from module reloads#13402
w-Jessamine wants to merge 2 commits into
sqlalchemy:mainfrom
w-Jessamine:fix/inspection-reload-registrars

Conversation

@w-Jessamine

Copy link
Copy Markdown

Summary

  • allow the inspection registry to accept a replacement registrar when it has the same module and name as the existing registration
  • keep the existing duplicate-registration assertion for conflicting registrars
  • add regression coverage for module reload style registration and a changelog entry

Closes #10748.

Validation

  • /tmp/sqlalchemy-pr-venv/bin/python -m pytest test/base/test_inspect.py -q
  • /tmp/sqlalchemy-pr-venv/bin/python -m compileall -q lib/sqlalchemy/inspection.py test/base/test_inspect.py

@w-Jessamine w-Jessamine marked this pull request as ready for review June 28, 2026 21:33

@CaselIT CaselIT left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, just a nitpick comment. otherwise it looks fine

@zzzeek I think 2.1 only for this is fine

Comment thread lib/sqlalchemy/inspection.py
@CaselIT CaselIT requested a review from sqla-tester June 29, 2026 10:30

@sqla-tester sqla-tester left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, this is sqla-tester setting up my work on behalf of CaselIT to try to get revision e54815e of this pull request into gerrit so we can run tests and reviews and stuff

@sqla-tester

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

schemes that attempt to reload modules are blocked by the inspection registry

3 participants