Skip to content

Don't register tables in metadata if autoloading fails #2988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sqlalchemy-bot opened this issue Mar 11, 2014 · 6 comments
Closed

Don't register tables in metadata if autoloading fails #2988

sqlalchemy-bot opened this issue Mar 11, 2014 · 6 comments
Labels
bug Something isn't working engine engines, connections, transactions, isolation levels, execution options low priority
Milestone

Comments

@sqlalchemy-bot
Copy link
Collaborator

Migrated issue, originally created by Roman Podoliaka (@malor)

When autoloading of a table fails, it nevertheless gets added to the metadata registry. This behaviour seems to be accidentally introduced in f6198d9.

Snippet to reproduce is attached. Fix is coming soon.


Attachments: test_issue.py

@sqlalchemy-bot
Copy link
Collaborator Author

Michael Bayer (@zzzeek) wrote:

weird, that would be a regression. funny there's no test for that, need to put a test in test/engine/test_reflection. the code tries pretty hard to make sure this doesn't happen.

(looks)

oh geez I just commented out the line....need a test!

@sqlalchemy-bot
Copy link
Collaborator Author

Roman Podoliaka (@malor) wrote:

Sent a pull request via github, and the latter seems to be down now :)

@sqlalchemy-bot
Copy link
Collaborator Author

Roman Podoliaka (@malor) wrote:

Updated the pull request on github (zzzeek/sqlalchemy#78). Let me know, if you think that the test is not sufficient.

@sqlalchemy-bot
Copy link
Collaborator Author

Michael Bayer (@zzzeek) wrote:

Remove tables from metadata when autoload fails

If autoloading of a table fails, don't register it in a metadata
instance. It seems that the original behaviour was accidentally
changed in f6198d9, restore it.

Closes issue #2988

0bb00db

@sqlalchemy-bot
Copy link
Collaborator Author

Michael Bayer (@zzzeek) wrote:

changelog to fix #2988

c464960

@sqlalchemy-bot
Copy link
Collaborator Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

@sqlalchemy-bot sqlalchemy-bot added bug Something isn't working low priority engine engines, connections, transactions, isolation levels, execution options labels Nov 27, 2018
@sqlalchemy-bot sqlalchemy-bot added this to the 0.9.4 milestone Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working engine engines, connections, transactions, isolation levels, execution options low priority
Projects
None yet
Development

No branches or pull requests

1 participant