Skip to content
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

Fix pyodbc cursor error in SQLA instrumentation #469

Merged
merged 9 commits into from
Jun 7, 2021
Merged

Fix pyodbc cursor error in SQLA instrumentation #469

merged 9 commits into from
Jun 7, 2021

Conversation

jomasti
Copy link
Contributor

@jomasti jomasti commented Apr 26, 2021

Description

Deleting the cursor reference after execution and in the error handler
instead of keeping a weak reference.

Fixes #460

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Added Docker tests for MSSQL and pyodbc to verify the instrumentation as
    working

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@jomasti jomasti marked this pull request as ready for review April 26, 2021 04:02
@jomasti jomasti requested a review from a team as a code owner April 26, 2021 04:02
@jomasti jomasti requested review from aabmass and hectorhdzg and removed request for a team April 26, 2021 04:02
@ocelotl ocelotl self-requested a review May 27, 2021 23:11
@ocelotl ocelotl dismissed their stale review May 27, 2021 23:12

Approved by mistake

@ocelotl
Copy link
Contributor

ocelotl commented May 27, 2021

Please take a look at the failing test case, @jomasti

jomasti and others added 5 commits June 1, 2021 15:06
Deleting the cursor reference after execution and in the error handler
instead of keeping a weak reference.

Added Docker tests for MSSQL and pyodbc to verify the instrumentation as
working
@jomasti jomasti changed the title Fix pyodbc cursor error in SQLA instumentation Fix pyodbc cursor error in SQLA instrumentation Jun 2, 2021
@codeboten codeboten merged commit b2dd4b8 into open-telemetry:main Jun 7, 2021
@jomasti jomasti deleted the sqlalchemy-pyodbc-cursor-error branch June 8, 2021 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sqlalchemy: TypeError: cannot create weak reference to 'pyodbc.Cursor' object
4 participants