jigkit 0.3.0__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {jigkit-0.3.0 → jigkit-0.3.1}/PKG-INFO +1 -1
- {jigkit-0.3.0 → jigkit-0.3.1}/pyproject.toml +1 -1
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/logging.py +3 -2
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_heartbeat.py +20 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/.gitignore +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/LICENSE +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/README.md +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/__init__.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/db.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/delivery.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/healthcheck.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/heartbeat.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/influx/__init__.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/influx/lineprotocol.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/influx/sink.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/migrations.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/models.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/notify.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/py.typed +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/ratelimit.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/scheduler.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/secrets.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/settings.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/sinks.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/spool.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/testing/__init__.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/testing/http.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/testing/migrations.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/testing/notify.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/web/__init__.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/web/guard.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/web/health.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/web/manifest.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/web/server.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/src/jigkit/web/spa.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/conftest.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/sample_app/alembic/env.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/sample_app/alembic/script.py.mako +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/sample_app/alembic/versions/0001_initial.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/sample_app/alembic.ini +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/sample_app/sample_schema.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_db.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_delivery.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_healthcheck.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_influx_lineprotocol.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_influx_read.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_influx_sink.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_logging.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_migrations.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_models.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_notify.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_ratelimit.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_scheduler.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_secrets.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_settings.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_sinks.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_spool.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_testing_plugin.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_version.py +0 -0
- {jigkit-0.3.0 → jigkit-0.3.1}/tests/test_web.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: jigkit
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: The shared foundations of small self-hosted web apps: settings, database, migrations, logging, health checks and test fixtures
|
|
5
5
|
Project-URL: Homepage, https://github.com/jmerhar/jigkit
|
|
6
6
|
Project-URL: Changelog, https://github.com/jmerhar/jigkit/blob/main/CHANGELOG.md
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "jigkit"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.1"
|
|
8
8
|
description = "The shared foundations of small self-hosted web apps: settings, database, migrations, logging, health checks and test fixtures"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.14"
|
|
@@ -30,8 +30,9 @@ FOLLOW_ROOT = ("uvicorn", "uvicorn.access", "uvicorn.error")
|
|
|
30
30
|
|
|
31
31
|
#: Loggers held at WARNING however low the application goes. httpx logs every request's URL at
|
|
32
32
|
#: INFO and httpcore logs headers at DEBUG, and URLs and headers carry credentials: push-monitor
|
|
33
|
-
#: tokens, bot tokens, session cookies.
|
|
34
|
-
|
|
33
|
+
#: tokens, bot tokens, session cookies. httpx2 and httpcore2, which jigkit's own HTTP clients
|
|
34
|
+
#: use, log the same under their own names.
|
|
35
|
+
QUIET = ("httpx", "httpcore", "httpx2", "httpcore2")
|
|
35
36
|
|
|
36
37
|
# Marks the handlers this module installed, so a repeated call replaces them rather than stacking
|
|
37
38
|
# a second copy that logs every line twice.
|
|
@@ -168,3 +168,23 @@ async def test_each_call_reports_whether_it_got_through() -> None:
|
|
|
168
168
|
await heartbeat.call()
|
|
169
169
|
|
|
170
170
|
assert results == [False, True]
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
async def test_at_info_the_push_token_never_reaches_the_log(
|
|
174
|
+
caplog: pytest.LogCaptureFixture,
|
|
175
|
+
) -> None:
|
|
176
|
+
"""The HTTP client logs each request's URL at INFO; jigkit's logging keeps it below that."""
|
|
177
|
+
from jigkit.logging import QUIET, apply_level
|
|
178
|
+
|
|
179
|
+
levels = {name: logging.getLogger(name).level for name in QUIET}
|
|
180
|
+
apply_level("INFO")
|
|
181
|
+
try:
|
|
182
|
+
with caplog.at_level(logging.INFO):
|
|
183
|
+
async with serving(StubServer(status=200)) as stub, httpx2.AsyncClient() as client:
|
|
184
|
+
await Heartbeat(client, stub.url + "/api/push/T0KEN", interval_seconds=60).call()
|
|
185
|
+
finally:
|
|
186
|
+
for name, level in levels.items():
|
|
187
|
+
logging.getLogger(name).setLevel(level)
|
|
188
|
+
|
|
189
|
+
assert stub.requests[0].path == "/api/push/T0KEN"
|
|
190
|
+
assert "T0KEN" not in caplog.text
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|