-
Notifications
You must be signed in to change notification settings - Fork 544
Use cursor.mogrify when available #203
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #203 +/- ##
=========================================
Coverage ? 76.09%
=========================================
Files ? 29
Lines ? 2389
Branches ? 409
=========================================
Hits ? 1818
Misses ? 423
Partials ? 148
Continue to review full report at Codecov.
|
@mlennon-lumere I pushed what I have right now but I probably won't get around to it this week. As stated in the linked issue the problem is that none of this is properly tested. |
I think there could be tests added here. But the reason I'd prefer this approach instead of what's in #202 is that with the approach in #202, you'd have to have a case to handle each and every thing that psycopg2 could throw at you. For example, By standing on their shoulders with |
Yes I closed #202 because I think this is the superior approach. It's still harder to test though. A test like "assert that our integration calls mogrify" without actually having a real psycopg cursor isn't good enough I think, considering all the bugs we have ran into |
Is this still being worked on? Cheers |
Sorry, we've been really busy with non-sdk related stuff recently. I'll try to make some room for this. As far as I remember I was unhappy with the tests. |
We're hoping to get these changes upstream, so we can stop relying on our fork. Do you need something else to get this done, or is simple patience the way to go? Thanks! |
I really want to merge this with decent tests only. Right now we don't have any other customer/user complaining about this so it's kind of low-priority |
7c71749
to
1d380f7
Compare
What sort of unit tests do you believe are missing? I'm hoping to see this get in, our org needs it to be able to keep using sentry. Looking at the tests output is difficult, as many of the test runs on travis failed because of hitting an API rate limit. Can you guide as to what you'd like to see? Thanks |
@mlennon-lumere I merged master into this branch, I hope the errors are now clearer. We recently added a This has been a long time ago, but I believe the issue here was that we configured a sqlite database while testing postgres specific stuff. This has already caused some issues in the past, but so far we've been able to get away with it even though the query crashed halfway through. |
I'm not sure what's going on with the celery tests breaking - thanks for having a look and fixing the bytestring issues, postgres config |
Seems unrelated. Thanks for the PR! |
Thanks for merging - when can we expect a release? Thanks again |
I will make one tomorrow morning, i.e. 10 hours from now.
…On Mon, Mar 25, 2019 at 8:48 PM Michael Lennon ***@***.***> wrote:
Thanks for merging - when can we expect a release?
Thanks again
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#203 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAzHxSPoM3b7j5GFaTB8P_7zg_IjqAdZks5vaSgEgaJpZM4ZQi-0>
.
|
0.7.8 is out! |
Instead of trying to reimplement sql formatting, use cursor.mogrify when it is available. This is implemented by psycopg2 precisely in order to get the SQL as it would be sent to the server via
cursor.execute
http://initd.org/psycopg/docs/cursor.html#cursor.mogrify
Fix for #201