Repository navigation
REFACTOR: Mark preview async entry-point classes as internal - #811
Merged
Merged
Conversation
PR Performance ReportPerformance assessment superseded. The pull request revision changed before publication completed. |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Update connection and cursor documentation that still describes these internal APIs as public.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Refactors preview async connection and cursor entry points into internal APIs.
Changes:
- Renames async wrapper classes with underscore-prefixed names.
- Updates references, fixtures, and async tests.
- Removes public exports and adds export-boundary coverage.
| File | Reviewed change |
|---|---|
tests/AsyncTest/test_007_async_fetch.py |
Updates fetch tests for internal APIs. |
tests/AsyncTest/test_006_async_execute.py |
Updates execution tests. |
tests/AsyncTest/test_004_async_logging.py |
Updates logging tests. |
tests/AsyncTest/test_003_async_exceptions.py |
Updates exception tests. |
tests/AsyncTest/test_002_async_connection.py |
Updates connection tests. |
tests/AsyncTest/test_001_async_query_native.py |
Verifies internal naming and exports. |
tests/AsyncTest/conftest.py |
Updates the async connection fixture. |
mssql_python/async_query/async_fetch.py |
Updates cursor type references. |
mssql_python/async_query/async_execute.py |
Updates cursor type references. |
mssql_python/async_query/async_cursor.py |
Renames the cursor wrapper. |
mssql_python/async_query/async_connection.py |
Renames the connection wrapper. |
mssql_python/async_query/__init__.py |
Updates internal exports. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: subrata-ms <141804867+subrata-ms@users.noreply.github.com>
Subrata (subrata-ms)
marked this pull request as ready for review
September 24, 2026 04:46
📊 Code Coverage Report
Diff CoverageDiff: main...HEAD, staged and unstaged changes
Summary
📋 Files Needing Attention📉 Files with overall lowest coverage (click to expand)mssql_python.pybind.performance_counter.hpp: 0.7%
mssql_python.pybind.logger_bridge.cpp: 57.9%
mssql_python.pybind.ddbc_bindings.h: 64.1%
mssql_python.pybind.logger_bridge.hpp: 70.8%
mssql_python.pybind.ddbc_bindings.cpp: 78.4%
mssql_python.pybind.connection.connection.cpp: 82.5%
mssql_python.pybind.connection.connection_pool.cpp: 82.9%
mssql_python.logging.py: 86.2%
mssql_python.pooling.py: 90.1%
mssql_python.pybind.fetch_temporal.hpp: 92.1%🔗 Quick Links
|
Sumit Sarabhai (sumitmsft)
approved these changes
Sep 24, 2026
Jahnvi Thakkar (jahnvi480)
approved these changes
Sep 24, 2026
Saurabh Singh (saurabh500)
approved these changes
Sep 24, 2026
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.

Work Item / Issue Reference
Summary
This pull request makes the async query API's entry points explicitly internal by renaming
AsyncConnectionandAsyncCursorto_AsyncConnectionand_AsyncCursorthroughout the codebase. These classes are no longer part of the public API, and all references, imports, and type hints have been updated accordingly. The tests and documentation have also been updated to reflect these changes, ensuring that users cannot accidentally rely on unstable async APIs.Async API Internalization:
Renamed
AsyncConnectionandAsyncCursorto_AsyncConnectionand_AsyncCursorin all source files, marking them as internal and updating all references, imports, and type hints to use the new names. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19]Removed
AsyncConnectionandAsyncCursorfrom the__all__export list inmssql_python.async_query, ensuring they are not part of the public API surface.Test and Documentation Updates:
Updated all tests to use
_AsyncConnectionand_AsyncCursor, and added a test to verify that the public API does not expose the async entry points. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Updated module docstrings and comments to clarify that
_AsyncConnectionand_AsyncCursorare internal and not stable public APIs.These changes reinforce that async query support is experimental and not intended for public consumption, preventing accidental usage and clarifying the intended API boundaries.