-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace PyKerberos dependency with python-gssapi
This patch comprises the following changes: * Replace 'kerberos' with 'gssapi' * Modernize packaging by adding a hatch-based pyproject.toml * Remove lingering python2 support * Use a real kerberos realm for running tests (i.e. remove mock calls) Future TODO: * Support all GSSAPI backends generically and remove Kerberos references * Add many more tests to cover all remaining branches and cases Current test coverage report: ********************************************************************* cmd [1] | coverage run -m pytest tests ===== test session starts ===== platform linux -- Python 3.12.3, pytest-8.1.1, pluggy-1.4.0 rootdir: ~/src/wsgi-kerberos configfile: pyproject.toml collected 12 items tests/test_wsgi_kerberos.py ............ [100%] ===== 12 passed in 3.13s ===== cmd [2] | - coverage combine Combined data file .coverage.15380.XqZVXpnx cmd [3] | coverage report Name Stmts Miss Branch BrPart Cover ------------------------------------------------------------------- src/wsgi_kerberos/__init__.py 2 0 0 0 100% src/wsgi_kerberos/middleware.py 111 21 34 6 80% tests/__init__.py 0 0 0 0 100% tests/test_wsgi_kerberos.py 170 0 48 0 100% ------------------------------------------------------------------- TOTAL 283 21 82 6 92% *********************************************************************
- Loading branch information
Showing
14 changed files
with
707 additions
and
658 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
*.py[cod] | ||
venv | ||
|
||
# C extensions | ||
*.so | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "wsgi-kerberos" | ||
dynamic = ["version"] | ||
description = "Kerberos authentication support in WSGI Middleware" | ||
readme = "README.rst" | ||
requires-python = ">=3.8" | ||
license = "BSD-3-Clause" | ||
authors = [ | ||
{ name="Michael Komitee", email="mkomitee@gmail.com" }, | ||
] | ||
maintainers = [ | ||
{ name="Vitaly Shupak", email="vitaly.shupak@deshaw.com" }, | ||
] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Web Environment", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: BSD License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
"Topic :: Internet :: WWW/HTTP", | ||
"Topic :: Internet :: WWW/HTTP :: WSGI", | ||
"Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
dependencies = [ | ||
"gssapi", | ||
] | ||
|
||
[project.urls] | ||
Documentation = "https://github.com/unknown/wsgi-kerberos#readme" | ||
Issues = "https://github.com/deshaw/wsgi-kerberos/issues" | ||
Homepage = "https://github.com/deshaw/wsgi-kerberos" | ||
|
||
[tool.hatch.version] | ||
path = "src/wsgi_kerberos/__about__.py" | ||
|
||
[tool.hatch.envs.default] | ||
dependencies = [ | ||
"coverage[toml]>=6.5", | ||
"pytest", | ||
"k5test", | ||
"requests", | ||
"requests-gssapi", | ||
"wsgi-intercept", | ||
] | ||
|
||
[tool.hatch.envs.default.scripts] | ||
test = "pytest {args:tests}" | ||
test-cov = "coverage run -m pytest {args:tests}" | ||
cov-report = [ | ||
"- coverage combine", | ||
"coverage report", | ||
] | ||
cov = [ | ||
"test-cov", | ||
"cov-report", | ||
] | ||
|
||
[[tool.hatch.envs.all.matrix]] | ||
python = [ | ||
"3.8", | ||
"3.9", | ||
"3.10", | ||
"3.11", | ||
"3.12", | ||
] | ||
|
||
[tool.hatch.envs.types] | ||
dependencies = [ | ||
"mypy>=1.0.0", | ||
] | ||
[tool.hatch.envs.types.scripts] | ||
check = "mypy --install-types --non-interactive {args:src/wsgi_kerberos tests}" | ||
|
||
[tool.coverage.run] | ||
source_pkgs = ["wsgi_kerberos", "tests"] | ||
branch = true | ||
parallel = true | ||
omit = [ | ||
"src/wsgi_kerberos/__about__.py", | ||
] | ||
|
||
[tool.coverage.paths] | ||
wsgi_kerberos = ["src/wsgi_kerberos", "*/wsgi-kerberos/src/wsgi_kerberos"] | ||
tests = ["tests", "*/wsgi-kerberos/tests"] | ||
|
||
[tool.coverage.report] | ||
exclude_lines = [ | ||
"no cov", | ||
"if __name__ == .__main__.:", | ||
"if TYPE_CHECKING:", | ||
] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# SPDX-FileCopyrightText: Copyright 2013-2020 D. E. Shaw & Co., L.P. | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
__version__ = "1.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# SPDX-FileCopyrightText: Copyright 2013-2020 D. E. Shaw & Co., L.P. | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
from wsgi_kerberos.middleware import _DEFAULT_READ_MAX, KerberosAuthMiddleware | ||
|
||
__all__ = [ | ||
'KerberosAuthMiddleware', | ||
'_DEFAULT_READ_MAX' | ||
] |
Oops, something went wrong.