Hua work common - #109
Merged
Merged
Hua work common#109
Conversation
Imports psycopg2 when available (preserves current default), and falls
back to psycopg (v3) when psycopg2 is missing. Provides thin
executemany-based shims for psycopg2.extras.execute_values and
execute_batch so the existing bulk-insert / bulk-update / bulk-delete
paths work unchanged on either driver.
Adds an optional 'psycopg3' extra in pyproject.toml:
pip install rda_python_common[psycopg3]
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
psycopg (v3) is now the default; psycopg2 remains supported as an opt-in fallback via the `psycopg2` extra. pg_dbi auto-detects which driver is installed and provides execute_values/execute_batch shims on top of psycopg3's executemany(). Bump version to 2.1.13.
Mirror the pg_dbi.py change in the legacy module-style PgDBI.py: prefer psycopg (v3); fall back to psycopg2 when v3 is not installed. Provide execute_values/execute_batch shims on top of psycopg3's executemany() so callers keep working unchanged.
…common into hua-work-common
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Split Environment setup (env creation only) from Installing rda-python-common (install variants) to remove duplicate pip install lines. - Introduce '## Using rda-python-common in another RDA python repo' as the consumption-side section (declare dep / import / verify). - Add bridge sentences between Environment setup, Installing, Modules, and Usage examples; add intro to the per-module bullet list. - Bump conda quickstart to python=3.12.
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.
No description provided.