Repository navigation
Commit a8d2523
REFACTOR: Mark preview async entry-point classes as internal (#811)
### Work Item / Issue Reference
<!--
IMPORTANT: Please follow the PR template guidelines below.
For mssql-python maintainers: Insert your ADO Work Item ID below
For external contributors: Insert Github Issue number below
Only one reference is required - either GitHub issue OR ADO Work Item.
-->
<!-- mssql-python maintainers: ADO Work Item -->
>
[AB#48345](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/48345)
<!-- External contributors: GitHub Issue -->
> GitHub Issue: #<ISSUE_NUMBER>
-------------------------------------------------------------------
### Summary
<!-- Insert your summary of changes below. Minimum 10 characters
required. -->
This pull request makes the async query API's entry points explicitly
internal by renaming `AsyncConnection` and `AsyncCursor` to
`_AsyncConnection` and `_AsyncCursor` throughout 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 `AsyncConnection` and `AsyncCursor` to `_AsyncConnection` and
`_AsyncCursor` in all source files, marking them as internal and
updating all references, imports, and type hints to use the new names.
[[1]](diffhunk://#diff-fe2a90159e4d1df90fbffc8307fc75ccae65acaf840f85a536685128aa7c0dd1R3-R14)
[[2]](diffhunk://#diff-3e947aa8fd6b23e5dfffbc6f15d91ee266c227bc3d73c53cfe52cfd22c680f00L14-R14)
[[3]](diffhunk://#diff-3e947aa8fd6b23e5dfffbc6f15d91ee266c227bc3d73c53cfe52cfd22c680f00L30-R30)
[[4]](diffhunk://#diff-3e947aa8fd6b23e5dfffbc6f15d91ee266c227bc3d73c53cfe52cfd22c680f00L59-R59)
[[5]](diffhunk://#diff-3e947aa8fd6b23e5dfffbc6f15d91ee266c227bc3d73c53cfe52cfd22c680f00L84-R89)
[[6]](diffhunk://#diff-3e947aa8fd6b23e5dfffbc6f15d91ee266c227bc3d73c53cfe52cfd22c680f00L112-R112)
[[7]](diffhunk://#diff-3e947aa8fd6b23e5dfffbc6f15d91ee266c227bc3d73c53cfe52cfd22c680f00L160-R160)
[[8]](diffhunk://#diff-3da247a0ee37b66337de6a8f374bd046312459df9ecea67cdf5513c2652f154bL23-R23)
[[9]](diffhunk://#diff-3da247a0ee37b66337de6a8f374bd046312459df9ecea67cdf5513c2652f154bL132-R132)
[[10]](diffhunk://#diff-65ba8aec48707032444564596868fba989dabbd163f9e481e2e43b75db9ebd4eL13-R16)
[[11]](diffhunk://#diff-65ba8aec48707032444564596868fba989dabbd163f9e481e2e43b75db9ebd4eL31-R31)
[[12]](diffhunk://#diff-65ba8aec48707032444564596868fba989dabbd163f9e481e2e43b75db9ebd4eL43-R48)
[[13]](diffhunk://#diff-65ba8aec48707032444564596868fba989dabbd163f9e481e2e43b75db9ebd4eL86-R86)
[[14]](diffhunk://#diff-d0f0da5fd7420e02d6c639f2c589b87b1bc4428cec3b2438d0282a7f330b48f3L13-R13)
[[15]](diffhunk://#diff-d0f0da5fd7420e02d6c639f2c589b87b1bc4428cec3b2438d0282a7f330b48f3L24-R28)
[[16]](diffhunk://#diff-d0f0da5fd7420e02d6c639f2c589b87b1bc4428cec3b2438d0282a7f330b48f3L39-R39)
[[17]](diffhunk://#diff-d0f0da5fd7420e02d6c639f2c589b87b1bc4428cec3b2438d0282a7f330b48f3L63-R63)
[[18]](diffhunk://#diff-d0f0da5fd7420e02d6c639f2c589b87b1bc4428cec3b2438d0282a7f330b48f3L85-R85)
[[19]](diffhunk://#diff-d0f0da5fd7420e02d6c639f2c589b87b1bc4428cec3b2438d0282a7f330b48f3L117-R117)
* Removed `AsyncConnection` and `AsyncCursor` from the `__all__` export
list in `mssql_python.async_query`, ensuring they are not part of the
public API surface.
**Test and Documentation Updates:**
* Updated all tests to use `_AsyncConnection` and `_AsyncCursor`, and
added a test to verify that the public API does not expose the async
entry points.
[[1]](diffhunk://#diff-c213b74299edce8f2d828aef6987d4312cd20bf0f2c14130cb506d8e058b5cdfL4-R4)
[[2]](diffhunk://#diff-c213b74299edce8f2d828aef6987d4312cd20bf0f2c14130cb506d8e058b5cdfL16-R16)
[[3]](diffhunk://#diff-22222c8971b8f6f8d4383e54ef794caf6908f33f9433adf9b17c0365459e1d27R5-R20)
[[4]](diffhunk://#diff-c0fe53c7c74bc7115990cc1c2a8a7890606aeef2571d5edd2e4383f6f23cf593L10-R18)
[[5]](diffhunk://#diff-c0fe53c7c74bc7115990cc1c2a8a7890606aeef2571d5edd2e4383f6f23cf593L27-R35)
[[6]](diffhunk://#diff-c0fe53c7c74bc7115990cc1c2a8a7890606aeef2571d5edd2e4383f6f23cf593L271-R272)
[[7]](diffhunk://#diff-c0fe53c7c74bc7115990cc1c2a8a7890606aeef2571d5edd2e4383f6f23cf593L282-R283)
[[8]](diffhunk://#diff-c0fe53c7c74bc7115990cc1c2a8a7890606aeef2571d5edd2e4383f6f23cf593L293-R294)
[[9]](diffhunk://#diff-c0fe53c7c74bc7115990cc1c2a8a7890606aeef2571d5edd2e4383f6f23cf593L305-R318)
[[10]](diffhunk://#diff-c0fe53c7c74bc7115990cc1c2a8a7890606aeef2571d5edd2e4383f6f23cf593L341-R342)
[[11]](diffhunk://#diff-1d1fc3827b30eda52b3bd7bb2c0eab40b77258a1f1052d5a5db6040251063383L9-R9)
* Updated module docstrings and comments to clarify that
`_AsyncConnection` and `_AsyncCursor` are 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.
<!--
### PR Title Guide
> For feature requests
FEAT: (short-description)
> For non-feature requests like test case updates, config updates ,
dependency updates etc
CHORE: (short-description)
> For Fix requests
FIX: (short-description)
> For doc update requests
DOC: (short-description)
> For Formatting, indentation, or styling update
STYLE: (short-description)
> For Refactor, without any feature changes
REFACTOR: (short-description)
> For performance improvements
PERF: (short-description)
> For release related changes, without any feature changes
RELEASE: #<RELEASE_VERSION> (short-description)
### Contribution Guidelines
External contributors:
- Create a GitHub issue first:
https://github.com/microsoft/mssql-python/issues/new
- Link the GitHub issue in the "GitHub Issue" section above
- Follow the PR title format and provide a meaningful summary
mssql-python maintainers:
- Create an ADO Work Item following internal processes
- Link the ADO Work Item in the "ADO Work Item" section above
- Follow the PR title format and provide a meaningful summary
-->
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>1 parent 111e0cf commit a8d2523
12 files changed
Lines changed: 88 additions & 71 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
10 | | - | |
11 | | - | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
26 | | - | |
27 | | - | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
8 | 21 | | |
9 | 22 | | |
10 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
268 | 269 | | |
269 | 270 | | |
270 | 271 | | |
271 | | - | |
| 272 | + | |
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
| |||
279 | 280 | | |
280 | 281 | | |
281 | 282 | | |
282 | | - | |
| 283 | + | |
283 | 284 | | |
284 | 285 | | |
285 | 286 | | |
| |||
290 | 291 | | |
291 | 292 | | |
292 | 293 | | |
293 | | - | |
| 294 | + | |
294 | 295 | | |
295 | 296 | | |
296 | 297 | | |
| |||
302 | 303 | | |
303 | 304 | | |
304 | 305 | | |
305 | | - | |
| 306 | + | |
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
311 | 312 | | |
312 | | - | |
| 313 | + | |
313 | 314 | | |
314 | 315 | | |
315 | 316 | | |
316 | 317 | | |
317 | | - | |
| 318 | + | |
318 | 319 | | |
319 | 320 | | |
320 | 321 | | |
| |||
338 | 339 | | |
339 | 340 | | |
340 | 341 | | |
341 | | - | |
| 342 | + | |
342 | 343 | | |
343 | 344 | | |
344 | 345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
| 309 | + | |
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
| 343 | + | |
0 commit comments