Author SHA1 Message Date
klemek a8943a78dc chore: 1.5.3
Python Lint CI / ruff (push) Successful in 2m8s
Python Lint CI / ruff-format-check (push) Successful in 2m30s
Docker CI / docker-build (push) Successful in 4m55s
Python Lint CI / ty (push) Successful in 2m2s
Python Test CI / coverage (push) Successful in 2m57s
2026-07-17 16:03:33 +02:00
klemek 118daf1e8c feat: remove default favicon
Docker CI / docker-build (push) Has been cancelled
Python Lint CI / ruff-format-check (push) Has been cancelled
Python Lint CI / ty (push) Has been cancelled
Python Lint CI / ruff (push) Has been cancelled
Python Test CI / coverage (push) Has been cancelled
2026-07-17 16:03:18 +02:00
klemek 5b4cba44d0 tools(make): release target 2026-06-25 14:34:25 +02:00
7 changed files with 16 additions and 8 deletions
+8
View File
@@ -130,3 +130,11 @@ docker-build: ## docker build
.PHONY: docker-run .PHONY: docker-run
docker-run: docker-build ## docker run docker-run: docker-build ## docker run
@$(DOCKER) run -it -p $(PORT):80 -v ./data:/data $(DOCKER_TAG) --debug --no-certbot --no-https --host localhost:$(PORT) run @$(DOCKER) run -it -p $(PORT):80 -v ./data:/data $(DOCKER_TAG) --debug --no-certbot --no-https --host localhost:$(PORT) run
.PHONY: release-%
release-%: .venv ## release major/minor/patch
$(UV) version --bump=$*
git add pyproject.toml uv.lock
git commit -m "chore: $$(uv version --short)"
git tag "release/$$(uv version --short)" -m "$$(uv version)"
$(UV) build
+1 -1
View File
@@ -1,6 +1,6 @@
[project] [project]
name = "stapler" name = "stapler"
version = "1.5.2" version = "1.5.3"
description = "Static pages as simple as a gzip file" description = "Static pages as simple as a gzip file"
requires-python = ">=3.14" requires-python = ">=3.14"
dependencies = [ dependencies = [
+1 -1
View File
@@ -16,7 +16,7 @@ class DataDir:
] ]
PATH_REGEX = re.compile(r"^[\w-]+$") PATH_REGEX = re.compile(r"^[\w-]+$")
NEEDED_FILES: typing.ClassVar[list[str]] = ["favicon.ico", "robots.txt"] NEEDED_FILES: typing.ClassVar[list[str]] = ["robots.txt"]
def __init__(self, root_path: str) -> None: def __init__(self, root_path: str) -> None:
self.logger: logging.Logger = logging.getLogger(self.__class__.__name__) self.logger: logging.Logger = logging.getLogger(self.__class__.__name__)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

+1 -1
View File
@@ -294,7 +294,7 @@ class RequestHandler(http.server.SimpleHTTPRequestHandler, BaseHandler):
UPDATE_PATH_REGEX = re.compile(r"^\/([\w-]+)\/?$") UPDATE_PATH_REGEX = re.compile(r"^\/([\w-]+)\/?$")
GET_PATH_REGEX = re.compile(r"^\/([\w-]+)($|\/)") GET_PATH_REGEX = re.compile(r"^\/([\w-]+)($|\/)")
HOST_PART_REGEX = re.compile(r"^([a-z0-9]|[a-z0-9][a-z0-9-]{,61}[a-z0-9])$") HOST_PART_REGEX = re.compile(r"^([a-z0-9]|[a-z0-9][a-z0-9-]{,61}[a-z0-9])$")
AUTHORIZED_PATHS: typing.ClassVar[list[str]] = ["/favicon.ico", "/robots.txt"] AUTHORIZED_PATHS: typing.ClassVar[list[str]] = ["/robots.txt"]
TOKEN_HEADER = "X-Token" # noqa: S105 TOKEN_HEADER = "X-Token" # noqa: S105
HOST_HEADER = "X-Host" HOST_HEADER = "X-Host"
HOST_ONLY_HEADER = "X-Host-Only" HOST_ONLY_HEADER = "X-Host-Only"
+4 -4
View File
@@ -1227,12 +1227,12 @@ class TestRequestHandler(BaseHandlerTestCase):
with ( with (
self.patch_call( self.patch_call(
"http.server.SimpleHTTPRequestHandler.translate_path", "http.server.SimpleHTTPRequestHandler.translate_path",
["/favicon.ico"], ["/robots.txt"],
), ),
self.seal_mocks(), self.seal_mocks(),
): ):
self.assertEqual( self.assertEqual(
handler.translate_path("/favicon.ico"), handler.translate_path("/robots.txt"),
None, None,
) )
@@ -1269,12 +1269,12 @@ class TestRequestHandler(BaseHandlerTestCase):
self.mock_call(self.registry.get_from_host, ["example.com"], Page("path")), self.mock_call(self.registry.get_from_host, ["example.com"], Page("path")),
self.patch_call( self.patch_call(
"http.server.SimpleHTTPRequestHandler.translate_path", "http.server.SimpleHTTPRequestHandler.translate_path",
["/favicon.ico"], ["/robots.txt"],
), ),
self.seal_mocks(), self.seal_mocks(),
): ):
self.assertEqual( self.assertEqual(
handler.translate_path("/favicon.ico"), handler.translate_path("/robots.txt"),
None, None,
) )
Generated
+1 -1
View File
@@ -212,7 +212,7 @@ wheels = [
[[package]] [[package]]
name = "stapler" name = "stapler"
version = "1.5.2" version = "1.5.3"
source = { editable = "." } source = { editable = "." }
dependencies = [ dependencies = [
{ name = "requests" }, { name = "requests" },