python-pq 0.6.0__tar.gz → 0.6.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.
Files changed (23) hide show
  1. {python_pq-0.6.0 → python_pq-0.6.1}/PKG-INFO +13 -1
  2. {python_pq-0.6.0 → python_pq-0.6.1}/README.md +12 -0
  3. {python_pq-0.6.0 → python_pq-0.6.1}/pyproject.toml +1 -1
  4. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/__init__.py +1 -3
  5. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/logging.py +4 -5
  6. {python_pq-0.6.0 → python_pq-0.6.1}/LICENSE +0 -0
  7. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/client.py +0 -0
  8. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/config.py +0 -0
  9. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/migrations/README +0 -0
  10. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/migrations/__init__.py +0 -0
  11. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/migrations/env.py +0 -0
  12. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/migrations/script.py.mako +0 -0
  13. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/migrations/versions/20260109T055839Z_476683af098d_initial_schema.py +0 -0
  14. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/migrations/versions/20260109T063747Z_2483bec70083_add_client_id.py +0 -0
  15. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/migrations/versions/20260205T120000Z_a1b2c3d4e5f6_add_max_concurrent.py +0 -0
  16. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/migrations/versions/20260205T180000Z_b7c8d9e0f1a2_add_periodic_key.py +0 -0
  17. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/migrations/versions/20260217T120000Z_c3d4e5f6a7b8_add_periodic_active.py +0 -0
  18. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/migrations/versions/__init__.py +0 -0
  19. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/models.py +0 -0
  20. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/priority.py +0 -0
  21. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/registry.py +0 -0
  22. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/serialization.py +0 -0
  23. {python_pq-0.6.0 → python_pq-0.6.1}/src/pq/worker.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-pq
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: Postgres-backed job queue for Python
5
5
  Keywords: postgres,job-queue,task-queue,background-jobs,worker
6
6
  Author: ricwo
@@ -248,6 +248,18 @@ pq.run_worker(pre_execute=setup_tracing, post_execute=flush_tracing)
248
248
 
249
249
  Hooks run in the forked child, making them safe for fork-unsafe resources like OpenTelemetry.
250
250
 
251
+ ## Logging
252
+
253
+ pq uses [loguru](https://github.com/Delgan/loguru) internally and does **not** configure the logger on import. This means it inherits whatever logging setup the host application has already established.
254
+
255
+ If you are running pq as a standalone script and want pq's default log format, call `configure_logging()` explicitly during startup:
256
+
257
+ ```python
258
+ from pq.logging import configure_logging
259
+
260
+ configure_logging()
261
+ ```
262
+
251
263
  ## Serialization
252
264
 
253
265
  Arguments are serialized automatically:
@@ -212,6 +212,18 @@ pq.run_worker(pre_execute=setup_tracing, post_execute=flush_tracing)
212
212
 
213
213
  Hooks run in the forked child, making them safe for fork-unsafe resources like OpenTelemetry.
214
214
 
215
+ ## Logging
216
+
217
+ pq uses [loguru](https://github.com/Delgan/loguru) internally and does **not** configure the logger on import. This means it inherits whatever logging setup the host application has already established.
218
+
219
+ If you are running pq as a standalone script and want pq's default log format, call `configure_logging()` explicitly during startup:
220
+
221
+ ```python
222
+ from pq.logging import configure_logging
223
+
224
+ configure_logging()
225
+ ```
226
+
215
227
  ## Serialization
216
228
 
217
229
  Arguments are serialized automatically:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "python-pq"
3
- version = "0.6.0"
3
+ version = "0.6.1"
4
4
  description = "Postgres-backed job queue for Python"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -1,13 +1,11 @@
1
1
  """PQ - Postgres-backed task queue."""
2
2
 
3
- import pq.logging # noqa: F401 - configures loguru on import
4
-
5
3
  from pq.client import PQ
6
4
  from pq.models import Periodic, Task, TaskStatus
7
5
  from pq.priority import Priority
8
6
  from pq.worker import PostExecuteHook, PreExecuteHook, TaskTimeoutError
9
7
 
10
- __version__ = "0.6.0"
8
+ __version__ = "0.6.1"
11
9
 
12
10
  __all__ = [
13
11
  "PQ",
@@ -8,7 +8,10 @@ from loguru import logger
8
8
  def configure_logging() -> None:
9
9
  """Configure loguru with a clean, aligned format.
10
10
 
11
- Called automatically when pq is imported.
11
+ This is an opt-in helper for applications that want pq's default log
12
+ format. Call it explicitly during application startup. pq itself never
13
+ calls this function so it will not interfere with an existing loguru
14
+ configuration.
12
15
  """
13
16
  # Remove default handler
14
17
  logger.remove()
@@ -21,7 +24,3 @@ def configure_logging() -> None:
21
24
  level="DEBUG",
22
25
  colorize=True,
23
26
  )
24
-
25
-
26
- # Auto-configure on import
27
- configure_logging()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes