-
-
Notifications
You must be signed in to change notification settings - Fork 108
chore(deps): update dependency npgsql to v10 #4129
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the Npgsql dependency from version 9.0.4 to 10.0.1, representing a major version upgrade that includes significant breaking changes.
Key Changes
- Upgrades Npgsql from 9.0.4 to 10.0.1 (major version bump)
- Breaking changes include new default type mappings for date/time types (now maps to DateOnly/TimeOnly instead of DateTime)
- Removes support for .NET 6.0
- Adds new features including GSSAPI session encryption, SHA3 hash algorithms for SASL authentication, and improved OpenTelemetry support
| <PackageVersion Include="MSTest.TestAdapter" Version="4.0.2" /> | ||
| <PackageVersion Include="MSTest.TestFramework" Version="4.0.2" /> | ||
| <PackageVersion Include="Npgsql" Version="9.0.4" /> | ||
| <PackageVersion Include="Npgsql" Version="10.0.1" /> |
Copilot
AI
Dec 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This major version update from Npgsql 9.0.4 to 10.0.1 includes breaking changes related to date/time type mappings. According to the release notes, version 10 now "Map[s] date/time to DateOnly/TimeOnly by default."
The codebase uses reader.GetDateTime() to read TIMESTAMP columns (e.g., in TodoRepository.cs lines 42, 69, 104, 137 and TodoTestBase.cs). With the new default type mappings in Npgsql 10, TIMESTAMP columns may map to different .NET types, which could cause runtime exceptions or unexpected behavior.
Consider either:
- Testing thoroughly to ensure the TIMESTAMP columns still map correctly to DateTime
- Explicitly configuring the legacy date/time mappings if needed using
NpgsqlConnection.GlobalTypeMapper.UseLegacyTimestampBehavior()if the new behavior causes issues - Verifying that PostgreSQL TIMESTAMP WITH TIME ZONE is being used (which continues to map to DateTime) rather than TIMESTAMP (which now maps to DateOnly/TimeOnly)
| <PackageVersion Include="Npgsql" Version="10.0.1" /> | |
| <PackageVersion Include="Npgsql" Version="9.0.4" /> |
PR Review: Npgsql 9.0.4 to 10.0.1 Major Version UpgradeThis PR upgrades Npgsql from 9.0.4 to 10.0.1, a major version upgrade with breaking changes. Positive Aspects
Breaking Changes in Npgsql 10.0
Code Quality AssessmentThe existing code using Npgsql follows best practices:
Recommendation: LGTM with VerificationThis upgrade appears safe because:
Action Items:
Future Enhancement: Consider NpgsqlDataSource instead of NpgsqlConnection for better pooling (not required for this PR) References: https://www.npgsql.org/doc/release-notes/10.0.html |
d0a3c52 to
4a901c8
Compare
Pull Request ReviewSummaryThis PR upgrades Npgsql from version 9.0.4 to 10.0.1 (major version upgrade). AnalysisUsage in CodebaseNpgsql is used exclusively in example/test code:
Breaking Changes in Npgsql 10.0Based on the release notes, key breaking changes include:
Impact Assessment✅ LOW RISK - The codebase usage is simple and does not rely on:
The existing code at TodoRepository.cs:42-43 and TodoTestBase.cs:79 uses reader.GetDateTime(3) and created_at TIMESTAMP which should continue to work as PostgreSQL TIMESTAMP (without time zone) still maps to DateTime. Recommendations
Code Quality Notes
Pre-Commit Checklist (per CLAUDE.md)
Verdict: ✅ APPROVE pending successful test execution of the example project. |
This PR contains the following updates:
9.0.4→10.0.1Release Notes
npgsql/npgsql (Npgsql)
v10.0.1v9.0.4 contains several minor bug fixes.
Milestone issues
Full Changelog: npgsql/npgsql@v10.0.0...v10.0.1
v10.0.0See the release notes.
The full list of changes is available here.
What's Changed
New Contributors
Full Changelog: npgsql/npgsql@v9.0.0...v10.0.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.