Repository navigation
Release v1.0.0.dev14 - #38
Merged
Merged
Conversation
…ct (#37) * feat(dialect): require version adaptation before using Postgres dialect PostgresDialect now defaults to version=None, requiring introspect_and_adapt() or explicit version before version-dependent features can be used. This prevents silent SQL errors from incorrect version assumptions. - Change PostgresDialect.__init__ default version to None - Remove hardcoded (9, 6, 0) from backend dialect construction - Update tests to use explicit version (13, 0, 0) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore: add changelog fragment for PR #37 --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
…graph Rename the CLI subcommand and underlying module from "named-query" to "named-expression" to reflect broader expression evaluation capability beyond just query execution. Add new "named-procedure-graph" subcommand for visualizing procedure relationship graphs. Update named_connection to pass output provider.
…curity tests - Fixed broken indentation: test_drop_statistics_name_quoted was nested inside test_partition_value_integer instead of the class - Added format_identifier naive-vs-proper equivalence tests for safe input - Added format_identifier naive-vs-proper injection immunity tests showing proper escaping prevents breakout that naive quoting allows - Added tests for normal, embedded-quote, injection-payload, and empty cases
…alue injection - Remove _quote_identifier dead code (delegate to format_identifier) - Fix _format_partition_value to escape single quotes in string values, preventing SQL injection via partition value breakout
- Remove _quote_identifier dead code, delegate to format_identifier - Fix format_drop_virtual_table, format_create_trigger_statement - Apply named_expression feature enhancements
Add bridge file importing the new multilingual Unicode, emoji burst, SQL injection payload, and injection immunity tests from testsuite.
PyPI-hosted testsuite dev13 does not include the test_logging_data_summarization module, causing collection errors. Switch to git source at dev14 which has it. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Replace `raise ... from None` with `raise ... from e` in both sync and async backends to preserve the original traceback for debugging - Add password-in-plaintext warning to PostgresConnectionConfig.to_connection_string() Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
psycopg3 automatically deserializes JSONB columns to Python dict/list, but JsonUser's JSON fields are defined as Optional[str] in the testsuite. Without a type adapter, Pydantic validation fails when receiving dict instead of str from the database. Register PostgresJSONBAdapter for all JSON fields in setup_json_user_fixtures and setup_async_json_user_fixtures. The adapter's from_database() method converts dict/list back to JSON string when target_type is str. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… types All Postgres adapters (PostgresJSONBAdapter, PostgresListAdapter, PostgresNetworkAddressAdapter, PostgresEnumAdapter, PostgresHstoreAdapter) previously implemented SQLTypeAdapter Protocol directly and overrode from_database() / to_database() directly, bypassing BaseSQLTypeAdapter's Optional type unwrapping logic. This caused Pydantic ValidationError when psycopg3 auto-deserializes JSONB columns to dict/list, because the adapter received Optional[str] as target_type but checked `target_type is str` which never matched. By inheriting BaseSQLTypeAdapter and implementing _do_from_database() / _do_to_database() instead, Optional unwrapping is handled by the base class before reaching the adapter's type-specific logic. Also removes mock-based tests for ipaddress unavailability, as ipaddress is a standard library module guaranteed to exist in all supported Python versions. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Bridge the shared testsuite Pydantic native validation contract into the PostgreSQL provider, align dev test dependencies, and add a Python 3.14 / PostgreSQL 18 benchmark job for CI parity. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Register benchmark providers so the testsuite benchmark job runs PostgreSQL scenarios instead of skipping, and restore Python 3.8-specific dependency constraints for the CI matrix. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Consolidate PostgreSQL backend benchmark relocation, FastAPI benchmark coverage, benchmark insert id fixes, and the CI testsuite dependency switch to the published PyPI package. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Pin the CI core dependency to the published 1.0.0.dev27 package so workflows no longer depend on the release branch source checkout. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #38 +/- ##
==========================================
+ Coverage 68.72% 69.29% +0.56%
==========================================
Files 230 231 +1
Lines 10054 10088 +34
Branches 1599 1593 -6
==========================================
+ Hits 6910 6990 +80
+ Misses 2621 2569 -52
- Partials 523 529 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add focused tests for PostgreSQL CLI adapter wiring and backend initialization paths to improve release PR coverage without requiring live database connections. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
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.



Summary
Release
v1.0.0.dev14ofrhosocial-activerecord-postgres.This release includes PostgreSQL dialect/version-guard improvements, security hardening for identifier and partition formatting, adapter fixes for optional types, JSONB test adapter registration, CI maintenance, and expanded validation/test coverage.
Included changes
feat(dialect): require version adaptation before using Postgres dialect(feat(dialect): require version adaptation before using Postgres dialect #37)feat: split returning support into DML-specific flags for PostgreSQL dialectfix(postgres): apply security fixes and dialect improvementsfix(postgres): remove dead _quote_identifier, fix _format_partition_value injectionfix(backend): preserve exception chain and add credential warningfix(adapters): inherit BaseSQLTypeAdapter to properly handle Optional typesfix(test): register PostgresJSONBAdapter for JsonUser JSON fieldsrefactor(cli): rename named-query to named-expression, add procedure-graphtest(query): add bridge for unicode/emoji/injection round-trip teststest: add Pydantic native validation coveragetest: update PostgreSQL benchmarks and testsuite dependencyci: upgrade actions/checkout from v4 to v6ci: upgrade testsuite source to git+https at release/v1.0.0.dev14ci: fix PostgreSQL benchmark coverageci: install core package from PyPIchore: add .gitattributes to enforce LF line endingschore: bump version to 1.0.0.dev14Changelog
changelog.d/37.changed.mdreferences merged PR feat(dialect): require version adaptation before using Postgres dialect #37.Validation
pyproject.tomlversion is1.0.0.dev14, matching branchrelease/v1.0.0.dev14.origin/mainhas 0 commits missing from release branch; release branch is 18 commits ahead oforigin/main.Merge instructions
mainvia GitHub web interface after CI passes.main, create/push tag or publish the GitHub release, and decide whether to delete the release branch.