Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: |
3.8
3.9
3.10
3.11
3.12
3.13
- name: Install build tools
run: |
python -m pip install hatch
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
python-version: '3.13'
- name: Install build tools
run: |
python -m pip install hatch
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
python-version: '3.13'
- name: Install build tools
run: |
python -m pip install hatch
Expand Down
46 changes: 26 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ authors = [
description = 'Pure Python SASL client and server library.'
license = { file = 'LICENSE.md' }
readme = { file = 'README.md', content-type = 'text/markdown' }
requires-python = '~=3.8'
requires-python = '~=3.9'
classifiers = [
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'License :: OSI Approved :: MIT License',
'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 :: 3.13',
]
dependencies = [
'typing-extensions',
Expand All @@ -61,6 +61,22 @@ LOGIN = 'pysasl.mechanism.login:LoginMechanism'
PLAIN = 'pysasl.mechanism.plain:PlainMechanism'
XOAUTH2 = 'pysasl.mechanism.oauth:OAuth2Mechanism'

[project.optional-dependencies]
dev = [
'mypy',
'pyright',
'pytest',
'pytest-cov',
'ruff',
'pycodestyle',
'autopep8',
]
doc = [
'sphinx',
'sphinx-autodoc-typehints',
'cloud_sptheme',
]

[tool.hatch.version]
path = 'pysasl/__about__.py'

Expand All @@ -79,11 +95,13 @@ module = 'importlib_metadata.*'
ignore_missing_imports = true

[tool.ruff]
line-length = 79

[tool.ruff.lint]
select = ['ANN', 'B', 'E', 'F', 'N', 'S', 'W']
ignore = ['ANN101', 'ANN102', 'ANN401', 'N818', 'S101']
line-length = 79

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"test/*" = ['ANN', 'S104']

[tool.autopep8]
Expand All @@ -103,33 +121,21 @@ exclude_lines = [
]

[tool.hatch.envs.default]
dependencies = [
'mypy',
'pyright',
'pytest',
'pytest-cov',
'ruff',
'pycodestyle',
'autopep8',
]
features = ['dev']

[tool.hatch.envs.default.scripts]
run-pytest = 'py.test --cov-report=term-missing --cov=pysasl'
run-mypy = 'mypy pysasl test'
run-pyright = 'pyright pysasl test'
run-ruff = 'ruff pysasl test'
run-ruff = 'ruff check pysasl test'
run-autopep8 = 'autopep8 --exit-code -dr pysasl test'
check = ['run-pytest', 'run-autopep8', 'run-mypy', 'run-pyright', 'run-ruff']

[[tool.hatch.envs.all.matrix]]
python = ['3.8', '3.9', '3.10', '3.11', '3.12']
python = ['3.9', '3.10', '3.11', '3.12', '3.13']

[tool.hatch.envs.doc]
dependencies = [
'sphinx',
'sphinx-autodoc-typehints',
'cloud_sptheme',
]
features = ['doc']

[tool.hatch.envs.doc.scripts]
build = 'make -C doc html'
Expand Down
2 changes: 1 addition & 1 deletion pysasl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def named(cls, names: Iterable[bytes]) -> Self:

@classmethod
def _get_builtin_mechanisms(cls) -> Iterable[Mechanism]:
group = mechanism.__package__
group = mechanism.__package__ or ''
for entry_point in entry_points(group=group):
mech_cls = entry_point.load()
yield mech_cls(entry_point.name)
Expand Down