[psycopg2] fix for quote_ident typing bug#477
Merged
Conversation
palazzem
reviewed
Jun 4, 2018
| def test_manual_wrap_extension_quote_ident_standalone(): | ||
| from ddtrace import patch_all | ||
| patch_all() | ||
| from psycopg2.extensions import quote_ident |
There was a problem hiding this comment.
Don't we have the issue if the order is reversed? or it's the other way around?
Member
Author
There was a problem hiding this comment.
reordering seems to not patch quote_ident I'll have to dig into how python treats these object references, I would have assumed that it'd be safe to patch after importing because it's the same reference...
palazzem
approved these changes
Jun 7, 2018
palazzem
left a comment
There was a problem hiding this comment.
Once we've verified that the problem is fixed, you can proceed with the merge. Thank you!
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.
Problem
Closes #474 and closes #383
Related to #96.
Solution
Use the method introduced in #96 to manually patch the
psycopg2.extensions.quote_identmethod if it exists on the version ofpsycopg2used.This PR also introduces a test that replicates the bug.