psycopg2: Patch all imports of register_type#393
Merged
palazzem merged 3 commits intoDataDog:masterfrom Jan 19, 2018
stj:master
Merged
psycopg2: Patch all imports of register_type#393palazzem merged 3 commits intoDataDog:masterfrom stj:master
palazzem merged 3 commits intoDataDog:masterfrom
stj:master
Conversation
added 3 commits
January 11, 2018 09:35
`register_type` was patched in #96, though only in psycopg.extensions. The function is defined in psycopg2._psycopg and imported in psycopg2._json neither of them are patched and if used cause a TypeError.
this function does c-level checks of the type of the argument so it must be a raw psycopg connection passed in. This adds a hook to transparently downgrade.
Versions checked are: - redis - aiohttp - psycopg2 - gevent - requests - sqlalchemy Added new versions when latest is not tested.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
register_typewas patched in #96, though only inpsycopg.extensions.The function is defined in
psycopg2._psycopgand imported inpsycopg2._jsonneither of them are patched and if used cause a
TypeError.