Skip to content

Commit 04c5bca

Browse files
authored
fix(deps): pin kubernetes!=36.0.0 due to broken bearer-token auth (#2732)
* Pin kubernetes!=36.0.0 due to broken bearer-token auth kubernetes v36.0.0 has a regression where auth_settings() no longer recognizes the 'authorization' key in api_key, silently dropping the Authorization header from all API requests. The upstream fix (PR #2585) is merged but not yet released. Exclude 36.0.0 until a patched v36.x ships. Ref: kubernetes-client/python#2582 * Pin python-benedict<0.34.0 for Python 3.9 compatibility python-benedict 0.34.0 dropped Python 3.9 support, using str|bytes union syntax that requires Python 3.10+. Pin to <0.34.0 since v4.19 CI still tests against Python 3.9. * Upgrade minimum Python requirement to 3.10 The project now requires Python 3.10 or later. This allows removing version-specific dependency pins and conditional resolution markers throughout the lock file, significantly simplifying dependency management. Removed python-fsutil dependency and updated python-benedict to remove its upper version bound since it now supports Python 3.10+.
2 parents 75dc209 + 693ecaf commit 04c5bca

2 files changed

Lines changed: 971 additions & 765 deletions

File tree

pyproject.toml

Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool.pytest.ini_options]
22
markers = [
33
"incremental: Mark tests as incremental",
4-
"kubevirt: Mark tests as kubevirt tests"
4+
"kubevirt: Mark tests as kubevirt tests",
55
]
66
addopts = [
77
"--pdbcls=IPython.terminal.debugger:TerminalPdb",
@@ -13,15 +13,11 @@ addopts = [
1313
"--cov=ocp_resources.utils.constants",
1414
"--cov=ocp_resources.utils.utils",
1515
"--cov=ocp_resources.exceptions",
16-
"--cov=class_generator"
16+
"--cov=class_generator",
1717
]
1818

1919
[tool.coverage.run]
20-
omit = [
21-
"tests/*",
22-
"class_generator/tests/*",
23-
"class_generator/scripts/tests/*"
24-
]
20+
omit = ["tests/*", "class_generator/tests/*", "class_generator/scripts/tests/*"]
2521

2622
[tool.coverage.report]
2723
fail_under = 60
@@ -36,38 +32,38 @@ line-length = 120
3632
fix = true
3733
output-format = "grouped"
3834

39-
[tool.ruff.format]
40-
exclude = [ ".git", ".venv", ".mypy_cache", ".tox", "__pycache__" ]
35+
[tool.ruff.format]
36+
exclude = [".git", ".venv", ".mypy_cache", ".tox", "__pycache__"]
4137

4238
[tool.mypy]
4339
no_implicit_optional = true
4440
show_error_codes = true
4541
warn_unused_ignores = true
4642

4743
[tool.hatch.build.targets.wheel]
48-
packages = [ "ocp_resources", "class_generator", "fake_kubernetes_client" ]
44+
packages = ["ocp_resources", "class_generator", "fake_kubernetes_client"]
4945

5046
[tool.uv]
51-
dev-dependencies = [ "ipdb>=0.13.13", "ipython>=8.12.3" ]
47+
dev-dependencies = ["ipdb>=0.13.13", "ipython>=8.12.3"]
5248

5349
[project]
54-
requires-python = ">=3.9"
50+
requires-python = ">=3.10"
5551
name = "openshift-python-wrapper"
5652
version = "4.19.5"
5753
description = "Wrapper around https://github.com/kubernetes-client/python"
5854
readme = "README.md"
5955
license = "Apache-2.0"
60-
keywords = [ "Openshift", "Kubevirt", "Openshift Virtualization" ]
56+
keywords = ["Openshift", "Kubevirt", "Openshift Virtualization"]
6157
classifiers = [
6258
"Programming Language :: Python :: 3",
63-
"Operating System :: OS Independent"
59+
"Operating System :: OS Independent",
6460
]
6561
dependencies = [
6662
"cloup>=3.0.5",
6763
"colorlog>=6.8.2",
6864
"deepdiff>=8.0.1",
6965
"jinja2>=3.1.4",
70-
"kubernetes>=31.0.0",
66+
"kubernetes>=31.0.0,!=36.0.0", # Excluded: v36.0.0 has broken bearer-token auth (https://github.com/kubernetes-client/python/issues/2582), remove once v36.0.1+ ships with the fix
7167
"packaging>=24.1",
7268
"pyhelper-utils>=0.0.42",
7369
"python-benedict>=0.33.2",
@@ -76,37 +72,37 @@ dependencies = [
7672
"rich>=13.9.2",
7773
"ruff>=0.6.9",
7874
"timeout-sampler>=0.0.46",
79-
"xmltodict>=0.13.0"
75+
"xmltodict>=0.13.0",
8076
]
8177

82-
[[project.authors]]
83-
name = "Meni Yakove"
84-
email = "myakove@gmail.com"
78+
[[project.authors]]
79+
name = "Meni Yakove"
80+
email = "myakove@gmail.com"
8581

86-
[[project.authors]]
87-
name = "Ruth Netser"
88-
email = "rnetser@gmail.com"
82+
[[project.authors]]
83+
name = "Ruth Netser"
84+
email = "rnetser@gmail.com"
8985

90-
[[project.maintainers]]
91-
name = "Meni Yakove"
92-
email = "myakove@gmail.com"
86+
[[project.maintainers]]
87+
name = "Meni Yakove"
88+
email = "myakove@gmail.com"
9389

94-
[[project.maintainers]]
95-
name = "Ruth Netser"
96-
email = "rnetser@gmail.com"
90+
[[project.maintainers]]
91+
name = "Ruth Netser"
92+
email = "rnetser@gmail.com"
9793

98-
[project.urls]
99-
homepage = "https://github.com/RedHatQE/openshift-python-wrapper"
100-
documentation = "https://openshift-python-wrapper.readthedocs.io/en/latest/"
101-
Download = "https://pypi.org/project/openshift-python-wrapper/"
102-
"Bug Tracker" = "https://github.com/RedHatQE/openshift-python-wrapper/issues"
94+
[project.urls]
95+
homepage = "https://github.com/RedHatQE/openshift-python-wrapper"
96+
documentation = "https://openshift-python-wrapper.readthedocs.io/en/latest/"
97+
Download = "https://pypi.org/project/openshift-python-wrapper/"
98+
"Bug Tracker" = "https://github.com/RedHatQE/openshift-python-wrapper/issues"
10399

104-
[project.scripts]
105-
class-generator = "class_generator.class_generator:main"
100+
[project.scripts]
101+
class-generator = "class_generator.class_generator:main"
106102

107103
[build-system]
108-
requires = [ "hatchling" ]
104+
requires = ["hatchling"]
109105
build-backend = "hatchling.build"
110106

111107
[dependency-groups]
112-
tests = [ "pytest>=8.3.5", "pytest-cov>=6.1.1" ]
108+
tests = ["pytest>=8.3.5", "pytest-cov>=6.1.1"]

0 commit comments

Comments
 (0)