labtasker-client 2.2.0__tar.gz → 2.3.0__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 (26) hide show
  1. labtasker_client-2.3.0/PKG-INFO +17 -0
  2. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/pyproject.toml +9 -6
  3. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/__init__.py +1 -1
  4. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/cli.py +5 -4
  5. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/config.py +6 -1
  6. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/journal.py +3 -1
  7. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/models.py +3 -1
  8. labtasker_client-2.2.0/PKG-INFO +0 -14
  9. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/.gitignore +0 -0
  10. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/LICENSE +0 -0
  11. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/__main__.py +0 -0
  12. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/api.py +0 -0
  13. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/binding.py +0 -0
  14. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/client.py +0 -0
  15. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/command_template.py +0 -0
  16. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/command_worker.py +0 -0
  17. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/errors.py +0 -0
  18. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/execution.py +0 -0
  19. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/local.py +0 -0
  20. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/observations.py +0 -0
  21. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/paths.py +0 -0
  22. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/py.typed +0 -0
  23. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/tee.py +0 -0
  24. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/types.py +0 -0
  25. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/validation.py +0 -0
  26. {labtasker_client-2.2.0 → labtasker_client-2.3.0}/src/labtasker/worker.py +0 -0
@@ -0,0 +1,17 @@
1
+ Metadata-Version: 2.5
2
+ Name: labtasker-client
3
+ Version: 2.3.0
4
+ Summary: A small task queue for parallel model inference and evaluation
5
+ Project-URL: Homepage, https://github.com/luocfprime/labtasker
6
+ Project-URL: Repository, https://github.com/luocfprime/labtasker.git
7
+ Author-email: lcf <luocfprime@gmail.com>
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE
10
+ Requires-Python: >=3.10
11
+ Requires-Dist: httpx[socks]<1,>=0.25.2
12
+ Requires-Dist: packaging>=21.3
13
+ Requires-Dist: pydantic<3,>=2.12; python_version >= '3.14'
14
+ Requires-Dist: pydantic<3,>=2.5.3; python_version < '3.13'
15
+ Requires-Dist: pydantic<3,>=2.9; python_version >= '3.13' and python_version < '3.14'
16
+ Requires-Dist: tomli>=2.0.1; python_version < '3.11'
17
+ Requires-Dist: typer<1,>=0.19
@@ -4,17 +4,20 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "labtasker-client"
7
- version = "2.2.0"
7
+ version = "2.3.0"
8
8
  description = "A small task queue for parallel model inference and evaluation"
9
- requires-python = ">=3.11"
9
+ requires-python = ">=3.10"
10
10
  license = "Apache-2.0"
11
11
  license-files = ["LICENSE"]
12
12
  authors = [{ name = "lcf", email = "luocfprime@gmail.com" }]
13
13
  dependencies = [
14
- "httpx[socks]>=0.28,<1",
15
- "packaging>=24,<27",
16
- "pydantic>=2.13.5,<3",
17
- "typer>=0.16,<1",
14
+ "httpx[socks]>=0.25.2,<1",
15
+ "packaging>=21.3",
16
+ "pydantic>=2.5.3,<3; python_version < '3.13'",
17
+ "pydantic>=2.9,<3; python_version >= '3.13' and python_version < '3.14'",
18
+ "pydantic>=2.12,<3; python_version >= '3.14'",
19
+ "tomli>=2.0.1; python_version < '3.11'",
20
+ "typer>=0.19,<1",
18
21
  ]
19
22
 
20
23
  [project.urls]
@@ -48,7 +48,7 @@ from labtasker.models import (
48
48
  from labtasker.types import JSONValue, TaskOrderField, TaskStatus, TaskUpdate
49
49
  from labtasker.worker import loop
50
50
 
51
- __version__ = "2.2.0"
51
+ __version__ = "2.3.0"
52
52
 
53
53
  __all__ = [
54
54
  "APIError",
@@ -7,7 +7,6 @@ from typing import Annotated, Any, TypeVar, cast
7
7
 
8
8
  import typer
9
9
  from pydantic import BaseModel
10
- from typer._click.core import Context as ClickContext
11
10
  from typer.core import TyperCommand
12
11
 
13
12
  from labtasker import __version__
@@ -82,10 +81,12 @@ def main(
82
81
  class _SeparatedCommand(TyperCommand):
83
82
  """Require the explicit boundary between Worker options and child argv."""
84
83
 
85
- def collect_usage_pieces(self, ctx: ClickContext) -> list[str]:
84
+ # Typer 0.26 vendored Click, so its internal Context type differs from the
85
+ # public typer.Context used by earlier supported releases.
86
+ def collect_usage_pieces(self, ctx: Any) -> list[str]:
86
87
  return [*super().collect_usage_pieces(ctx), "--", "COMMAND", "[ARG...]"]
87
88
 
88
- def parse_args(self, ctx: ClickContext, args: list[str]) -> list[str]:
89
+ def parse_args(self, ctx: Any, args: list[str]) -> list[str]:
89
90
  ctx.meta["labtasker_command_separator"] = "--" in args
90
91
  return super().parse_args(ctx, args)
91
92
 
@@ -172,7 +173,7 @@ def worker_loop(
172
173
  def task_submit(
173
174
  args: Annotated[
174
175
  str,
175
- typer.Option(help="Task arguments as one strict JSON object."),
176
+ typer.Option(metavar="<str>", help="Task arguments as one strict JSON object."),
176
177
  ] = "{}",
177
178
  name: Annotated[
178
179
  str | None,
@@ -1,7 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import os
4
- import tomllib
4
+ import sys
5
5
  from dataclasses import dataclass
6
6
  from pathlib import Path
7
7
  from typing import Literal, TypedDict
@@ -9,6 +9,11 @@ from urllib.parse import urlsplit, urlunsplit
9
9
 
10
10
  import httpx
11
11
 
12
+ if sys.version_info >= (3, 11):
13
+ import tomllib
14
+ else:
15
+ import tomli as tomllib
16
+
12
17
  from labtasker.errors import ConfigError
13
18
  from labtasker.local import LocalPaths, local_paths, require_local_capabilities
14
19
  from labtasker.validation import RequestValidationError, invalid_config, validate_identifier
@@ -4,7 +4,7 @@ import json
4
4
  import os
5
5
  import tempfile
6
6
  import threading
7
- from datetime import UTC, datetime
7
+ from datetime import datetime, timezone
8
8
  from pathlib import Path
9
9
  from typing import Literal, TypedDict, cast
10
10
 
@@ -18,6 +18,8 @@ from labtasker.validation import (
18
18
  validate_task_id,
19
19
  )
20
20
 
21
+ UTC = timezone.utc
22
+
21
23
  JournalPhase = Literal["running", "reporting", "acknowledged", "revoked"]
22
24
  TerminalAction = Literal["complete", "fail", "unclaim"]
23
25
  LOCAL_GITIGNORE = "*\n!.gitignore\n"
@@ -1,6 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
- from datetime import UTC, datetime
3
+ from datetime import datetime, timezone
4
4
  from pathlib import Path
5
5
  from typing import Literal
6
6
 
@@ -18,6 +18,8 @@ from labtasker.validation import (
18
18
  validate_unicode_scalar,
19
19
  )
20
20
 
21
+ UTC = timezone.utc
22
+
21
23
 
22
24
  class ResponseModel(BaseModel):
23
25
  model_config = ConfigDict(extra="ignore", frozen=True, strict=True)
@@ -1,14 +0,0 @@
1
- Metadata-Version: 2.5
2
- Name: labtasker-client
3
- Version: 2.2.0
4
- Summary: A small task queue for parallel model inference and evaluation
5
- Project-URL: Homepage, https://github.com/luocfprime/labtasker
6
- Project-URL: Repository, https://github.com/luocfprime/labtasker.git
7
- Author-email: lcf <luocfprime@gmail.com>
8
- License-Expression: Apache-2.0
9
- License-File: LICENSE
10
- Requires-Python: >=3.11
11
- Requires-Dist: httpx[socks]<1,>=0.28
12
- Requires-Dist: packaging<27,>=24
13
- Requires-Dist: pydantic<3,>=2.13.5
14
- Requires-Dist: typer<1,>=0.16