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

psycopg2-binary support #1422

Closed

Conversation

kamilkrampa
Copy link

@kamilkrampa kamilkrampa commented Oct 29, 2022

Description

Inspired by this comment. I changed the idea slightly to OR inner tuples, it seemed to be easier to do but let me know what do you think about it.

Fixes #610

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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 unit tests
  • Instrument any app with psycopg2-binary installed

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • 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

@kamilkrampa kamilkrampa requested a review from a team October 29, 2022 18:09
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 29, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Contributor

@Kludex Kludex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A test-requirements.txt file needs to be added to test with only psycopg2-binary, I guess.

@Kludex
Copy link
Contributor

Kludex commented Dec 31, 2024

Oh, this is 2 years old. 😢

Still valid tho.

@@ -13,4 +13,4 @@
# limitations under the License.


_instruments = ("psycopg2 >= 2.7.3.1",)
_instruments = (("psycopg2 >= 2.7.3.1", "psycopg2-binary >= 2.7.3.1"),)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_instruments = (("psycopg2 >= 2.7.3.1", "psycopg2-binary >= 2.7.3.1"),)
_instruments = ("psycopg2 >= 2.7.3.1", "psycopg2-binary >= 2.7.3.1")

This is what the kafka-python is doing, please take a look at opentelemetry-instrumentation-kafka-python/pyproject.toml, with that updated you should be able to drop the dependencies,py changes.

Copy link
Contributor

@joshowen joshowen Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done the minimal implementation here #3186

@joshowen joshowen mentioned this pull request Jan 14, 2025
11 tasks
@kamilkrampa kamilkrampa deleted the psycopg2-binary-support branch January 27, 2025 12:39
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.

DependencyConflict: requested: "psycopg2 >= 2.7.3.1" but found: "None"
5 participants