Files
semantic-kernel/python/pyproject.toml
T
13f812b825 Python: Update pymongo requirement from <4.16,>=4.8.0 to >=4.8.0,<4.17 in /python (#13866)
Updates the requirements on
[pymongo](https://github.com/mongodb/mongo-python-driver) to permit the
latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mongodb/mongo-python-driver/releases">pymongo's
releases</a>.</em></p>
<blockquote>
<h2>PyMongo 4.16.0</h2>
<p>Community notes: <!-- raw HTML omitted --></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mongodb/mongo-python-driver/blob/master/doc/changelog.rst">pymongo's
changelog</a>.</em></p>
<blockquote>
<h2>Changes in Version 4.16.0 (2026/01/07)</h2>
<p>PyMongo 4.16 brings a number of changes including:</p>
<ul>
<li>Removed invalid documents from
:class:<code>bson.errors.InvalidDocument</code> error messages as
doing so may leak sensitive user data.
Instead, invalid documents are stored in
:attr:<code>bson.errors.InvalidDocument.document</code>.</li>
<li>PyMongo now requires <code>dnspython&gt;=2.6.1</code>, since
<code>dnspython</code> 1.0 is no longer maintained.
The minimum version is <code>2.6.1</code> to account for
<code>CVE-2023-29483
&lt;https://www.cve.org/CVERecord?id=CVE-2023-29483&gt;</code>_.</li>
<li>Removed support for Eventlet.
Eventlet is actively being sunset by its maintainers and has
compatibility issues with PyMongo's dnspython dependency.</li>
<li>Use Zstandard support from the standard library for Python 3.14+,
and use <code>backports.zstd</code> for older versions.</li>
<li>Fixed return type annotation for <code>find_one_and_*</code> methods
on :class:<code>~pymongo.asynchronous.collection.AsyncCollection</code>
and :class:<code>~pymongo.synchronous.collection.Collection</code> to
include <code>None</code>.</li>
<li>Added support for NumPy 1D-arrays in
:class:<code>bson.binary.BinaryVector</code>.</li>
<li>Prevented :class:<code>~pymongo.encryption.ClientEncryption</code>
from loading the crypt
shared library to fix &quot;MongoCryptError: An existing crypt_shared
library is
loaded by the application&quot; unless the linked library search path is
set.</li>
</ul>
<h2>Changes in Version 4.15.5 (2025/12/02)</h2>
<p>Version 4.15.5 is a bug fix release.</p>
<ul>
<li>Fixed a bug that could cause <code>AutoReconnect(&quot;connection
pool paused&quot;)</code> errors when cursors fetched more documents
from the database after SDAM heartbeat failures.</li>
</ul>
<h2>Changes in Version 4.15.4 (2025/10/21)</h2>
<p>Version 4.15.4 is a bug fix release.</p>
<ul>
<li>Relaxed the callback type of
:meth:<code>~pymongo.asynchronous.client_session.AsyncClientSession.with_transaction</code>
to allow the broader Awaitable type rather than only Coroutine
objects.</li>
<li>Added the missing Python 3.14 trove classifier to the package
metadata.</li>
</ul>
<p>Issues Resolved
...............</p>
<p>See the <code>PyMongo 4.15.4 release notes in JIRA</code>_ for the
list of resolved issues
in this release.</p>
<p>.. _PyMongo 4.15.4 release notes in JIRA: <a
href="https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&amp;version=47237">https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&amp;version=47237</a></p>
<h2>Changes in Version 4.15.3 (2025/10/07)</h2>
<p>Version 4.15.3 is a bug fix release.</p>
<ul>
<li>Fixed a memory leak when raising
:class:<code>bson.errors.InvalidDocument</code> with C extensions.</li>
<li>Fixed the return type of the
:meth:<code>~pymongo.asynchronous.collection.AsyncCollection.distinct</code>,</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/32901018ca14d9acb05004a88d65b6ab0b29c877"><code>3290101</code></a>
Prepare 4.16.0 release (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2672">#2672</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/1be94d262dd0281b032b6f9e56d381cac3a7a6d9"><code>1be94d2</code></a>
PYTHON-5685 Fix unified spec sync metadata for csot and sessions tests
(<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2669">#2669</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/6585d9cb51d5c9b2d85eec4f49b8196612d9e8ee"><code>6585d9c</code></a>
PYTHON-2442: Refactor: use _asdict() in _options_dict() (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2670">#2670</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/fdb1f7ea4abe128ae4e59e3d063fd95d7daaa964"><code>fdb1f7e</code></a>
PYTHON-5677 Prevent ClientEncryption from loading crypt shared library
(<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2659">#2659</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/0cd9763423b85cd37779ea934bf7b1f8be8bbf8e"><code>0cd9763</code></a>
Bump zizmorcore/zizmor-action from
cb3d8e846e148d1111d90b03375b9c03deceda37 t...</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/2f263d4d3f11eb4a2b32ace467fd2767c371f4d7"><code>2f263d4</code></a>
PYTHON-5680 Fix handling of expectedDocuments in Unified Test Runner (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2665">#2665</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/e9658b2406232b6bd6ac1d961b368142f8819479"><code>e9658b2</code></a>
Add 4.15.5 release date to changelog (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2666">#2666</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/10dd20405ba19c643a1b305ff84f742b19c40daf"><code>10dd204</code></a>
Update coverage[toml] requirement from &lt;=7.10.6,&gt;=5 to
&gt;=5,&lt;=7.10.7 (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2662">#2662</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/130067799cc671d4dcc2f34dafff73c4ef5ddeaf"><code>1300677</code></a>
[Spec Resync] 12-22-2025 (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2663">#2663</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/18c1f142b5b3fd179a677b2736332dc17770b7c2"><code>18c1f14</code></a>
PYTHON-5529 Introduce optin setting to await for MinPoolSize population
(<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2664">#2664</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/mongodb/mongo-python-driver/compare/4.8.0...4.16.0">compare
view</a></li>
</ul>
</details>
<br />


You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

> **Note**
> Automatic rebases have been disabled on this pull request as it has
been open for over 30 days.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: moonbox3 <[email protected]>
2026-06-17 11:20:12 +00:00

258 lines
6.2 KiB
TOML

[project]
name = "semantic-kernel"
description = "Semantic Kernel Python SDK"
authors = [{ name = "Microsoft", email = "[email protected]"}]
readme = "README.md"
# Version read from __version__ field in __init__.py by Flit
dynamic = ["version"]
requires-python = ">=3.10"
license = {file = "LICENSE"}
urls.homepage = "https://learn.microsoft.com/en-us/semantic-kernel/overview/"
urls.source = "https://github.com/microsoft/semantic-kernel/tree/main/python"
urls.release_notes = "https://github.com/microsoft/semantic-kernel/releases?q=tag%3Apython-1&expanded=true"
urls.issues = "https://github.com/microsoft/semantic-kernel/issues"
classifiers = [
"License :: OSI Approved :: MIT License",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Framework :: Pydantic :: 2",
"Typing :: Typed",
]
dependencies = [
# azure agents
"azure-ai-projects ~= 1.0.0b12",
"azure-ai-agents >= 1.2.0b3",
"aiohttp ~= 3.8",
"cloudevents ~=1.0",
"pydantic >=2.0,!=2.10.0,!=2.10.1,!=2.10.2,!=2.10.3,<2.14",
"pydantic-settings ~= 2.0",
"defusedxml ~= 0.7",
# azure identity
"azure-identity >= 1.13",
# embeddings
"numpy >= 1.25.0; python_version < '3.12'",
"numpy >= 1.26.0; python_version >= '3.12'",
# openai connector
"openai >= 2.0.0",
# openapi and swagger
"openapi_core >= 0.18,<0.20",
"websockets >= 13, < 16",
"aiortc>=1.9.0",
# OpenTelemetry
"opentelemetry-api ~= 1.24",
"opentelemetry-sdk ~= 1.24",
"prance >= 23.6.21,< 25.4.9",
# templating
"pybars4 ~= 0.9",
"jinja2 ~= 3.1",
"nest-asyncio ~= 1.6",
"scipy>=1.15.1",
"websockets >= 13, < 16",
"aiortc>=1.9.0",
# Protobuf
# explicit typing extensions
"typing-extensions>=4.13",
"mcp>=1.26.0",
]
### Optional dependencies
[project.optional-dependencies]
anthropic = [
"anthropic ~= 0.32"
]
autogen = [
"autogen-agentchat >= 0.2, <0.4"
]
aws = [
"boto3>=1.36.4,<1.43.0",
]
azure = [
"azure-ai-inference >= 1.0.0b6",
"azure-core-tracing-opentelemetry >= 1.0.0b11",
"azure-search-documents >= 11.6.0b4, < 12.0.0",
"azure-cosmos ~= 4.7"
]
chroma = [
"chromadb >= 0.5,< 1.4"
]
copilotstudio = [
"microsoft-agents-copilotstudio-client >= 0.3.1",
"microsoft-agents-activity >= 0.3.1"
]
faiss = [
"faiss-cpu>=1.10.0"
]
google = [
"google-cloud-aiplatform>=1.114,<1.134",
"google-genai >= 1.51,< 1.75"
]
hugging_face = [
"transformers[torch] ~= 4.28",
"sentence-transformers >= 2.2,< 6.0",
"torch == 2.8.0"
]
mcp = [
"mcp>=1.8",
]
milvus = [
"pymilvus >= 2.3,< 2.7",
"milvus >= 2.3,<2.3.8; platform_system != 'Windows'"
]
mistralai = [
"mistralai >= 1.2,< 2.4.6"
]
mongo = [
"pymongo >= 4.8.0, < 4.17",
"motor >= 3.3.2,< 3.8.0"
]
notebooks = [
"ipykernel >= 6.29,< 8.0"
]
ollama = [
"ollama ~= 0.4"
]
onnx = [
# onnxruntime>=1.24.0 dropped Python 3.10 support; pin to last compatible version for 3.10.
"onnxruntime==1.22.1; python_version == '3.10'",
"onnxruntime>=1.24.3; python_version > '3.10'",
"onnxruntime-genai==0.9.0"
]
oracledb = [
"oracledb >= 3.4.1"
]
pandas = [
"pandas ~= 2.2"
]
pinecone = [
"pinecone[asyncio, grpc] ~= 7.0"
]
postgres = [
"psycopg[binary,pool] ~= 3.2"
]
qdrant = [
"qdrant-client ~= 1.9"
]
redis = [
"redis[hiredis] >= 6,< 8",
"types-redis ~= 4.6.0.20240425",
"redisvl ~= 0.4"
]
realtime = [
"websockets >= 13, < 16",
"aiortc>=1.9.0",
]
sql = [
"pyodbc >= 5.2"
]
usearch = [
"usearch ~= 2.16",
"pyarrow >= 12.0,< 22.0"
]
weaviate = [
"weaviate-client>=4.17.0,<5.0",
]
[dependency-groups]
dev = [
"pre-commit ~= 3.7",
"ipykernel >= 6.29,< 8.0",
"nbconvert ~= 7.16",
"pytest ~= 8.2",
"pytest-xdist[psutil] ~= 3.6",
"pytest-cov >= 5.0",
"pytest-asyncio ~= 1.0",
"pytest-timeout>=2.3.1",
"snoop ~= 0.4",
"mypy >= 1.10",
"types-PyYAML ~= 6.0.12.20240311",
"ruff ~= 0.9"
]
[tool.uv]
prerelease = "if-necessary-or-explicit"
environments = [
"sys_platform == 'darwin'",
"sys_platform == 'linux'",
"sys_platform == 'win32'"
]
[tool.pytest.ini_options]
testpaths = 'tests'
addopts = "-ra -q -r fEX"
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
filterwarnings = [
'ignore:.*FunctionChoiceBehavior.*:DeprecationWarning'
]
timeout = 120
markers = [
"ollama: mark a test as requiring the Ollama service (use \"not ollama\" to skip those tests)",
"onnx: mark a test as requiring the Onnx service (use \"not onnx\" to skip those tests)"
]
[tool.ruff]
line-length = 120
target-version = "py310"
include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
preview = true
[tool.ruff.lint]
fixable = ["ALL"]
unfixable = []
select = [
"D", #pydocstyle checks
"E", #error checks
"F", #pyflakes checks
"I", #isort
"CPY", #copyright
"ISC", #implicit string concat
"INP", #implicit namespace package
"RSE", #raise exception parantheses check
"RET", #flake8-return check
"SIM", #flake8-simplify check
"TD", #todos
"FIX", #fixme checks
"ERA", #remove connected out code
"RUF" #RUF specific rules
]
ignore = [
"D100", #allow missing docstring in public module
"D104", #allow missing docstring in public package
"D418", #allow docstring on overloaded function
"TD003", #allow missing link to todo issue
"FIX002" #allow todo
]
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
# Ignore all directories named `tests` and `samples`.
"tests/**" = ["D", "INP", "TD", "ERA001", "RUF"]
"samples/**" = ["D", "INP", "ERA001", "RUF"]
# Ignore all files that end in `_test.py`.
"*_test.py" = ["D"]
"*.ipynb" = ["CPY", "E501"]
[tool.ruff.lint.flake8-copyright]
notice-rgx = "^# Copyright \\(c\\) Microsoft\\. All rights reserved\\."
min-file-size = 1
[tool.bandit]
targets = ["semantic_kernel"]
exclude_dirs = ["tests", "samples/demos/mcp_with_oauth"]
[tool.flit.module]
name = "semantic_kernel"
[build-system]
requires = ["flit-core >= 3.9,<4.0"]
build-backend = "flit_core.buildapi"