-
Notifications
You must be signed in to change notification settings - Fork 105
Fix sw_psycopg2 register_type() #211
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
This addresses this apache/skywalking#8556 problem, right? Thanks for looking into this. |
Should, yes. |
If you have verified it works for Django version above 3.10 then LGTM. :) |
There is a Django 3.10? I did do a quick test of our fork of this with Django 4.0.5 and it works, waiting on more thorough tests from the test monkeys though. |
LOL I forgot Django is already at 4.x. Btw we should bump up the checked versions in Django plugin supported matrix.
change to something like
BTW, do you think we should remove the support for 3.6? It has been sunsetted since 6 months ago. We will introduce some advanced features requiring 3.7 up, like the automatic post-fork hook. |
That is for a different PR, this one is about psycopg2.
If you are asking my opinion then don't remove support for something until and unless you need to. There's nothing worse than having your project stop working for no good reason other than an arbitrary date. |
Yes, thanks for the explanation. LGTM |
psycopg2._psycopg.register_type()
can be called with a connection or cursor, but since these are wrapped proxy objects when instrumented the binary module_psycopg
does not recognize them causing calls likepsycopg2.extras.register_json()
to fail:The fix is simply to pass unwrapped connection or cursor.