This is an automated email from the ASF dual-hosted git repository.
shahar1 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 90d8fc8135c Fix Microsoft WinRM provider import failure under lowest
dependencies (#69333)
90d8fc8135c is described below
commit 90d8fc8135c16edc502078651b905f16356539c4
Author: Jarek Potiuk <[email protected]>
AuthorDate: Fri Jul 3 18:03:13 2026 +0200
Fix Microsoft WinRM provider import failure under lowest dependencies
(#69333)
pywinrm imports `spnego.ContextProxy`, which pyspnego only exposes from
version 0.4.0 onwards. The winrm provider only declared `pywinrm>=0.5.0` and
left pyspnego unbounded, so lowest-dependency resolution selected a
pre-0.4.0
pyspnego and the provider failed at import time with
`module 'spnego' has no attribute 'ContextProxy'`, breaking the LowestDeps
CI
job. Flooring pyspnego directly keeps the lowest-dependency resolution on a
version that actually provides the attribute pywinrm needs.
---
providers/microsoft/winrm/README.rst | 1 +
providers/microsoft/winrm/docs/index.rst | 1 +
providers/microsoft/winrm/pyproject.toml | 4 ++++
uv.lock | 2 ++
4 files changed, 8 insertions(+)
diff --git a/providers/microsoft/winrm/README.rst
b/providers/microsoft/winrm/README.rst
index 2ce40f86a57..70977ffbcd1 100644
--- a/providers/microsoft/winrm/README.rst
+++ b/providers/microsoft/winrm/README.rst
@@ -56,6 +56,7 @@ PIP package Version required
``apache-airflow`` ``>=2.11.0``
``apache-airflow-providers-common-compat`` ``>=1.12.0``
``pywinrm`` ``>=0.5.0``
+``pyspnego`` ``>=0.4.0``
========================================== ==================
The changelog for the provider package can be found in the
diff --git a/providers/microsoft/winrm/docs/index.rst
b/providers/microsoft/winrm/docs/index.rst
index 2a0e46dfcfb..61e7d425d7f 100644
--- a/providers/microsoft/winrm/docs/index.rst
+++ b/providers/microsoft/winrm/docs/index.rst
@@ -102,6 +102,7 @@ PIP package Version required
``apache-airflow`` ``>=2.11.0``
``apache-airflow-providers-common-compat`` ``>=1.12.0``
``pywinrm`` ``>=0.5.0``
+``pyspnego`` ``>=0.4.0``
========================================== ==================
Downloading official packages
diff --git a/providers/microsoft/winrm/pyproject.toml
b/providers/microsoft/winrm/pyproject.toml
index 4efc46026ac..9c3ed8b10f9 100644
--- a/providers/microsoft/winrm/pyproject.toml
+++ b/providers/microsoft/winrm/pyproject.toml
@@ -62,6 +62,10 @@ dependencies = [
"apache-airflow>=2.11.0",
"apache-airflow-providers-common-compat>=1.12.0",
"pywinrm>=0.5.0",
+ # pywinrm imports ``spnego.ContextProxy``, which pyspnego only exposes
from 0.4.0 onwards.
+ # Floor it directly so lowest-dependency resolution does not pick a
pre-0.4.0 pyspnego
+ # (which fails at import time with ``module 'spnego' has no attribute
'ContextProxy'``).
+ "pyspnego>=0.4.0",
]
[dependency-groups]
diff --git a/uv.lock b/uv.lock
index 939b97ad4cc..ab695b6fea6 100644
--- a/uv.lock
+++ b/uv.lock
@@ -6386,6 +6386,7 @@ source = { editable = "providers/microsoft/winrm" }
dependencies = [
{ name = "apache-airflow" },
{ name = "apache-airflow-providers-common-compat" },
+ { name = "pyspnego" },
{ name = "pywinrm" },
]
@@ -6404,6 +6405,7 @@ docs = [
requires-dist = [
{ name = "apache-airflow", editable = "." },
{ name = "apache-airflow-providers-common-compat", editable =
"providers/common/compat" },
+ { name = "pyspnego", specifier = ">=0.4.0" },
{ name = "pywinrm", specifier = ">=0.5.0" },
]