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
12 changes: 8 additions & 4 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
strategy:
matrix:
python-version: [
'3.10',
'3.11',
'3.12',
'3.13',
'3.14',
'3.15',
]

steps:
Expand All @@ -37,16 +37,20 @@ jobs:
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
cd python && pip install .[dev]
cd python && pip install . --group test
- name: Run tests
run: cd python && tox
env:
TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }}
- uses: astral-sh/ruff-action@v3
- uses: astral-sh/ruff-action@v4.1.0
with:
src: "./python"
args: "--version"
- name: Lint code
run: ruff check -v
- name: Check formatting
run: cd python && black --check .
run: ruff format -v
1 change: 1 addition & 0 deletions python/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build/
dist/
*.egg-info/
*.lock
1 change: 0 additions & 1 deletion python/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include README.rst
include LICENSE
include tox.ini
recursive-include http_ece/tests *
global-exclude */__pycache__/*

1 change: 0 additions & 1 deletion python/http_ece/tests/test_ece.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def logbuf(msg, buf):
logmsg(msg + ": [" + str(len(buf)) + "]")
for i in list(range(0, len(buf), 48)):
logmsg(" " + repr(buf[i : i + 48]))
return


def b64e(arg):
Expand Down
45 changes: 37 additions & 8 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,36 @@ build-backend = "setuptools.build_meta"
name = "http_ece"
version = "1.2.1"
license = "MIT"
license-files = ["LICENSE"]
authors = [{ name = "Martin Thomson", email = "martin.thomson@gmail.com" }]
keywords = ["crypto http"]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
]
description = "Encrypted Content Encoding for HTTP"
readme = { file = "README.rst", content-type = "text/x-rst" }
requires-python = ">=3.10"
requires-python = ">=3.11"
dependencies = ["cryptography>=46.0.1"]

[project.optional-dependencies]
dev = [
"black>=26.3.1",
"pytest",
[dependency-groups]
lint = [
"ruff==0.17.4",
]
test = [
"pytest>=9",
"pytest-cov",
"ruff==0.14.10",
"tox",
"tox>=4.22",
"tox-gh",
]
dev = [
{ include-group = "lint" },
{ include-group = "test" },
]

[project.urls]
Repository = "https://github.com/web-push-libs/encrypted-content-encoding"
Expand All @@ -52,3 +58,26 @@ lint.select = ["A", "F", "FURB", "I", "PERF", "PT", "PTH", "RUF", "S", "UP"]

[tool.setuptools]
packages = ["http_ece"]

[tool.tox]
env_list = [
"py311",
"py312",
"py313",
"py314",
"py315",
]

[tool.tox.env_run_base]
description = "run tests with pytest under {base_python}"
dependency_groups = ["test"]
commands = [
["pytest", "{posargs}"],
]

[tool.tox.gh.python]
"3.11" = ["py311"]
"3.12" = ["py312"]
"3.13" = ["py313"]
"3.14" = ["py314"]
"3.15" = ["py315"]
31 changes: 0 additions & 31 deletions python/tox.ini

This file was deleted.

Loading