Skip to content

Commit e219f61

Browse files
authored
Merge branch 'main' into bewithgaurav/publish_symbols
2 parents c6372d1 + ef70493 commit e219f61

82 files changed

Lines changed: 3745 additions & 4552 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/PULL_REQUEST_TEMPLATE.MD

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,32 @@
1-
### PR Title
1+
### ADO Work Item Reference
2+
<!-- Insert your ADO Work Item ID below (e.g. AB#37452) -->
3+
> AB#<WORK_ITEM_ID>
4+
-------------------------------------------------------------------
5+
### Summary
6+
<!-- Insert your Copilot Generated Summary below -->
7+
8+
9+
<!--
10+
### PR Title Guide
211
3-
#### For feature requests
12+
> For feature requests
413
FEAT: (short-description)
514
6-
#### For non-feature requests like test case updates, config updates , dependency updates etc
15+
> For non-feature requests like test case updates, config updates , dependency updates etc
716
CHORE: (short-description)
817
9-
### For Fix requests
18+
> For Fix requests
1019
FIX: (short-description)
1120
12-
### For doc update requests
21+
> For doc update requests
1322
DOC: (short-description)
1423
15-
### For Formatting, indentation, or styling update
24+
> For Formatting, indentation, or styling update
1625
STYLE: (short-description)
1726
18-
### For Refactor, without any feature changes
27+
> For Refactor, without any feature changes
1928
REFACTOR: (short-description)
2029
21-
### For release related changes, without any feature changes
22-
RELEASE: #<RELEASE_VERSION> (short-description)
23-
24-
-------------------------------------------------------------------
25-
### Summary
26-
<!-- Briefly describe the new feature -->
27-
28-
### Issue Reference
29-
Fixes #<ISSUE_NUMBER> (if applicable)
30-
31-
### Solution Implemented
32-
<!-- Explain the fix implemented -->
33-
- [ ] Fixed `<describe what was fixed>`
34-
- [ ] Updated `<mention any changed functions/files>`
35-
36-
### Checklist
37-
- [ ] **Tests Passed** (if applicable)
38-
- [ ] **Code is formatted**
39-
- [ ] **Docs Updated** (if necessary)
40-
41-
### Testing Performed
42-
<!-- How was this fix tested? -->
43-
- [ ] Unit Tests
44-
- [ ] Manual Testing
45-
- [ ] Python Version: `<mention Python version>`
46-
- [ ] OS: `<mention OS>`
47-
48-
### Additional Notes
49-
<!-- Any extra details or related links -->
30+
> For release related changes, without any feature changes
31+
RELEASE: #<RELEASE_VERSION> (short-description)
32+
-->
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: PR Formatting Check
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, reopened, synchronize]
6+
7+
permissions:
8+
pull-requests: write
9+
10+
jobs:
11+
check:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Validate PR title and description content
15+
uses: actions/github-script@v7
16+
with:
17+
script: |
18+
const title = context.payload.pull_request.title;
19+
const body = context.payload.pull_request.body;
20+
21+
const validTitlePrefixes = [
22+
'FEAT:', 'CHORE:', 'FIX:', 'DOC:', 'STYLE:', 'REFACTOR:', 'RELEASE:'
23+
];
24+
25+
const hasValidPrefix = validTitlePrefixes.some(prefix => title.startsWith(prefix));
26+
27+
if (!hasValidPrefix) {
28+
core.setFailed(`❌ PR title must start with one of the allowed prefixes:\n${validTitlePrefixes.join(', ')}`);
29+
}
30+
31+
const azureWorkItemLinkPattern = /https:\/\/sqlclientdrivers\.visualstudio\.com\/[^\/]+\/_workitems\/edit\/\d+/i;
32+
const hasWorkItemLink = azureWorkItemLinkPattern.test(body);
33+
34+
if (!hasWorkItemLink) {
35+
core.setFailed(`❌ PR should contain a valid ADO Work Item ID.\nExpected a hyperlink in the format: https://sqlclientdrivers.visualstudio.com/.../_workitems/edit/<ID>\nPlease ensure the ADO task hyperlink is present in the PR description.`);
36+
}
37+
38+
// Check if PR description contains a meaningful summary section with actual content
39+
const summaryPattern = /###\s*Summary\s*\r?\n([\s\S]*?)(\r?\n###|$)/;
40+
const summaryMatch = body.match(summaryPattern);
41+
42+
let hasValidSummary = false;
43+
44+
if (summaryMatch && summaryMatch[1]) {
45+
// Extract the summary content
46+
const summaryContent = summaryMatch[1];
47+
48+
// Remove all HTML comments including the template placeholder
49+
const contentWithoutComments = summaryContent.replace(/<!--[\s\S]*?-->/g, '');
50+
51+
// Remove whitespace and check if there's actual text content
52+
const trimmedContent = contentWithoutComments.trim();
53+
54+
// Check if there's at least 10 characters of meaningful content
55+
hasValidSummary = trimmedContent.length >= 10;
56+
}
57+
58+
if (!hasValidSummary) {
59+
core.setFailed(`❌ PR must contain a meaningful summary section with actual text content (minimum 10 characters).
60+
Please add a clear description under the '### Summary' heading in your PR description.`);
61+
}
62+
- name: Add size label based on PR diff
63+
uses: actions/github-script@v7
64+
with:
65+
script: |
66+
const pr = context.payload.pull_request;
67+
const additions = pr.additions;
68+
const deletions = pr.deletions;
69+
const totalChanges = additions + deletions;
70+
71+
// Threshold constants
72+
const SMALL_PR_THRESHOLD = 100;
73+
const MEDIUM_PR_THRESHOLD = 500;
74+
75+
let labelToAdd = '';
76+
if (totalChanges < SMALL_PR_THRESHOLD) {
77+
labelToAdd = 'pr-size: small';
78+
} else if (totalChanges < MEDIUM_PR_THRESHOLD) {
79+
labelToAdd = 'pr-size: medium';
80+
} else {
81+
labelToAdd = 'pr-size: large';
82+
}
83+
84+
// Remove existing size labels if any
85+
const existingLabels = pr.labels.map(l => l.name);
86+
const sizeLabels = ['pr-size: small', 'pr-size: medium', 'pr-size: large'];
87+
for (const label of existingLabels) {
88+
if (sizeLabels.includes(label)) {
89+
await github.rest.issues.removeLabel({
90+
...context.repo,
91+
issue_number: pr.number,
92+
name: label,
93+
});
94+
}
95+
}
96+
97+
// Add new size label
98+
await github.rest.issues.addLabels({
99+
...context.repo,
100+
issue_number: pr.number,
101+
labels: [labelToAdd],
102+
});
103+
104+
console.log(`Added label: ${labelToAdd} (Total changes: ${totalChanges})`);

PyPI_Description.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ We are making progress - The Public Preview of our driver is now available! This
88

99
### What's Included:
1010

11-
- Everything from alpha
12-
- macOS Support: The mssql-python driver now supports macOS on Intel as well as ARM-based systems, enabling seamless development on Apple Silicon (M-series) devices. This milestone strengthens our cross-platform capabilities—and we’re just getting started. Linux support is on the horizon!
13-
- Connection Pooling: We've introduced a robust and configurable connection pooling system designed to significantly enhance performance and optimize resource utilization. This feature ensures more efficient management of database connections, especially under high-load scenarios. This feature is only available on Windows as of now.
11+
- Everything from previous releases
12+
- **Linux Support**: The mssql-python driver now supports Linux OS (manylinux2014) - Ubuntu, Debian and RHEL, enabling seamless development on Linux based systems. Added Linux driver libraries and related logic for architecture-specific handling and ODBC driver path resolution. Support for other Linux based distros will come in subsequent releases.
13+
- **Connection Pooling Support for MacOS and Linux**: Implemented connection pooling features for MacOS and Linux, including tests and unified code support for pooling across platforms.
14+
Expanded Pipeline/Test Matrix: Added/expanded support for Python versions < 3.13 and enhanced database setup for testing, including LocalDB and Docker-based SQL Server.
1415

1516
For more information, please visit the project link on Github: https://github.com/microsoft/mssql-python
1617

README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,18 @@ pip install mssql-python
2020
brew install openssl
2121
pip install mssql-python
2222
```
23+
**Linux:** mssql-python can be installed with [pip](http://pypi.python.org/pypi/pip)
24+
```bash
25+
pip install mssql-python
26+
```
2327

2428
## Key Features
2529
### Supported Platforms
2630

27-
Windows and MacOS
28-
31+
Windows, MacOS and Linux (manylinux2014 - Debian, Ubuntu & RHEL)
32+
2933
> **Note:**
30-
> Support for Linux is coming soon
34+
> Support for additional Linux OSs (Alpine, SUSE Linux) will come soon
3135
>
3236
3337
### DBAPI v2.0 Compliance
@@ -45,15 +49,24 @@ By adhering to the DB API 2.0 specification, the mssql-python module ensures com
4549
### Support for Microsoft Entra ID Authentication
4650

4751
The Microsoft mssql-python driver enables Python applications to connect to Microsoft SQL Server, Azure SQL Database, or Azure SQL Managed Instance using Microsoft Entra ID identities. It supports various authentication methods, including username and password, Microsoft Entra managed identity, and Integrated Windows Authentication in a federated, domain-joined environment. Additionally, the driver supports Microsoft Entra interactive authentication and Microsoft Entra managed identity authentication for both system-assigned and user-assigned managed identities.
48-
52+
53+
EntraID authentication is now fully supported on MacOS and Linux but with certain limitations as mentioned in the table:
54+
55+
| Authentication Method | Windows Support | macOS/Linux Support | Notes |
56+
|----------------------|----------------|---------------------|-------|
57+
| ActiveDirectoryPassword | ✅ Yes | ✅ Yes | Username/password-based authentication |
58+
| ActiveDirectoryInteractive | ✅ Yes | ❌ No | Only works on Windows |
59+
| ActiveDirectoryMSI (Managed Identity) | ✅ Yes | ✅ Yes | For Azure VMs/containers with managed identity |
60+
| ActiveDirectoryServicePrincipal | ✅ Yes | ✅ Yes | Use client ID and secret or certificate |
61+
| ActiveDirectoryIntegrated | ✅ Yes | ❌ No | Only works on Windows (requires Kerberos/SSPI) |
62+
4963
### Enhanced Pythonic Features
5064

5165
The driver offers a suite of Pythonic enhancements that streamline database interactions, making it easier for developers to execute queries, manage connections, and handle data more efficiently.
5266

5367
### Connection Pooling
5468

55-
The Microsoft mssql_python driver provides built-in support for connection pooling, which helps improve performance and scalability by reusing active database connections instead of creating a new connection for every request.
56-
69+
The Microsoft mssql_python driver provides built-in support for connection pooling, which helps improve performance and scalability by reusing active database connections instead of creating a new connection for every request. This feature is enabled by default. For more information, refer [Connection Pooling Wiki](https://github.com/microsoft/mssql-python/wiki/Connection#connection-pooling).
5770

5871
## Getting Started Examples
5972
Connect to SQL Server and execute a simple query:

ROADMAP.md

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,15 @@ In future releases, we plan to add several DBAPI enhancements, including:
2525
- `Output` and `InputOutput` Parameters: Handling of output and input-output parameters in stored procedures.
2626
- Optional DBAPIs: Additional optional DBAPI features to provide more flexibility and functionality for developers.
2727

28-
**3. Connection Pooling for MacOS and Linux Distributions**
28+
**3. Cross-Platform Support: Additional Linux Distributions**
2929

30-
Connection pooling will be made available soon for MacOS and Linux distributions, allowing for efficient reuse of database connections. The feature is already available for Windows OS. This feature will significantly improve performance by reducing the overhead associated with establishing new connections for each database operation .
31-
- Reduce Connection creation overhead
32-
- Improve scalability via efficient reuse of connections
33-
- Enhance multi-threaded operation performance
30+
We are committed to providing cross-platform support for our Python driver. In the next few weeks, we will release support for additional Linux distributions viz Alpine, SUSE Linux & Oracle Linux.
3431

35-
**4. Cross-Platform Support: Linux Distributions**
36-
37-
We are committed to providing cross-platform support for our Python driver. In the next few weeks, we will release versions compatible with various Linux distributions. This will enable developers to use the driver on their preferred operating systems without any compatibility issues.
38-
Soon, you will be able to:
39-
- Use the driver across multiple environments and OS
40-
- Deploy application on cloud-native platforms
41-
- Avoid compatibility issues with system-dependent code
42-
- Flexibility in choosing development environments
43-
44-
**5. Bulk Copy (BCP)**
32+
**4. Bulk Copy (BCP)**
4533

4634
Bulk Copy API (BCP) support is coming soon to the Python Driver for SQL Server. It enables high-speed data ingestion and offers fine-grained control over batch operations, making it ideal for large-scale ETL workflows.
4735

48-
**6. Asynchronous Query Execution**
36+
**5. Asynchronous Query Execution**
4937

5038
We are also working on adding support for asynchronous query execution. This feature will allow developers to execute queries without blocking the main thread, enabling more responsive and efficient applications. Asynchronous query execution will be particularly beneficial for applications that require high concurrency and low latency.
5139
- No blocking of the main thread

0 commit comments

Comments
 (0)