Handle warnings related to connection reset agent #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt to handle the issues raised in #36.
The upstream reset agent handling logic in
sqlalchemy
appears to have been changing recently and it may be the case that the message appearing from version1.3.17
is harmless. Even so it seemed worth taking a look to see whether there's a way to reduce the warning noise without causing breakage.The changes applied here allow tests to pass without errors or warnings for both
pytest-flask-sqlalchemy
and theflaskdb
issue repro repository when using the currentmaster
branch ofsqlalchemy
.The issue repro repository tests do still report a warning after these changes are applied when using
sqlalchemy
1.3.18
.Major caveat: I'm not fully sure of all the interactions between the various database engine, session, connection and transaction objects taking place across all these libraries; I've addressed the symptoms here but it's possible that this isn't the most correct fix.
Addresses / fixes #36.