From 561fd4e670ad296c5b7a2850442243e6fb51f265 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 6 Sep 2025 21:57:19 +0200 Subject: [PATCH 1/5] python313Packages.fast-query-parsers: init at 1.0.3 Ultra-fast query string and url-encoded form-data parsers https://github.com/litestar-org/fast-query-parsers --- .../fast-query-parsers/default.nix | 49 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/fast-query-parsers/default.nix diff --git a/pkgs/development/python-modules/fast-query-parsers/default.nix b/pkgs/development/python-modules/fast-query-parsers/default.nix new file mode 100644 index 000000000000..971a38394137 --- /dev/null +++ b/pkgs/development/python-modules/fast-query-parsers/default.nix @@ -0,0 +1,49 @@ +{ + lib, + buildPythonPackage, + cargo, + fetchFromGitHub, + poetry-core, + pytestCheckHook, + rustc, + rustPlatform, +}: + +buildPythonPackage rec { + pname = "fast-query-parsers"; + version = "1.0.3"; + pyproject = true; + + src = fetchFromGitHub { + owner = "litestar-org"; + repo = "fast-query-parsers"; + tag = "v${version}"; + hash = "sha256-08xL0sOmUzsZYtM1thYUV93bj9ERr3LaVrW46zBrzeE="; + }; + + cargoDeps = rustPlatform.fetchCargoVendor { + inherit src; + name = "${pname}-${version}"; + hash = "sha256-kp5bCmHYMS/e8eM6HrRw0JlVaxwPscFGDLQ0PX4ZIC4="; + }; + + build-system = [ + cargo + poetry-core + rustPlatform.cargoSetupHook + rustPlatform.maturinBuildHook + rustc + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "fast_query_parsers" ]; + + meta = { + description = "Ultra-fast query string and url-encoded form-data parsers"; + homepage = "https://github.com/litestar-org/fast-query-parsers"; + changelog = "https://github.com/litestar-org/fast-query-parsers/releases/tag/${src.tag}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 868696153ff8..41e88045b20e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5009,6 +5009,8 @@ self: super: with self; { fast-histogram = callPackage ../development/python-modules/fast-histogram { }; + fast-query-parsers = callPackage ../development/python-modules/fast-query-parsers { }; + fast-simplification = callPackage ../development/python-modules/fast-simplification { }; fastai = callPackage ../development/python-modules/fastai { }; From b68ec0c4bfc7052e465ccb579c2b1ab0f3c747ef Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 6 Sep 2025 22:10:27 +0200 Subject: [PATCH 2/5] python313Packages.targ: init at 0.6.0 Python CLI using type hints and docstrings https://github.com/piccolo-orm/targ/ --- .../python-modules/targ/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/targ/default.nix diff --git a/pkgs/development/python-modules/targ/default.nix b/pkgs/development/python-modules/targ/default.nix new file mode 100644 index 000000000000..1e56fa49d012 --- /dev/null +++ b/pkgs/development/python-modules/targ/default.nix @@ -0,0 +1,41 @@ +{ + lib, + buildPythonPackage, + colorama, + docstring-parser, + fetchFromGitHub, + pytestCheckHook, + setuptools, +}: + +buildPythonPackage rec { + pname = "targ"; + version = "0.6.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "piccolo-orm"; + repo = "targ"; + tag = version; + hash = "sha256-myQe8Gpnx5CqKnYNK0PZ2P7o+eVWKLInjyTaZd30WxU="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + colorama + docstring-parser + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "targ" ]; + + meta = { + description = "Python CLI using type hints and docstrings"; + homepage = "https://github.com/piccolo-orm/targ/"; + changelog = "https://github.com/piccolo-orm/targ/blob/${src.tag}/CHANGES.rst"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 41e88045b20e..0505c3713341 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17910,6 +17910,8 @@ self: super: with self; { tapsaff = callPackage ../development/python-modules/tapsaff { }; + targ = callPackage ../development/python-modules/targ { }; + tasklib = callPackage ../development/python-modules/tasklib { }; taskw = callPackage ../development/python-modules/taskw { }; From 0e5f235660ab274d3a38552596e42a2ae1f490a8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 7 Sep 2025 00:02:43 +0200 Subject: [PATCH 3/5] python313Packages.piccolo: init at 1.28.0 ORM and query builder which supports asyncio https://github.com/piccolo-orm/piccolo --- .../python-modules/piccolo/default.nix | 106 ++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 108 insertions(+) create mode 100644 pkgs/development/python-modules/piccolo/default.nix diff --git a/pkgs/development/python-modules/piccolo/default.nix b/pkgs/development/python-modules/piccolo/default.nix new file mode 100644 index 000000000000..94b0802bb192 --- /dev/null +++ b/pkgs/development/python-modules/piccolo/default.nix @@ -0,0 +1,106 @@ +{ + lib, + aiosqlite, + asyncpg, + black, + buildPythonPackage, + colorama, + email-validator, + fetchFromGitHub, + httpx, + inflection, + jinja2, + orjson, + postgresql, + postgresqlTestHook, + pydantic, + pytestCheckHook, + python-dateutil, + setuptools, + targ, + typing-extensions, +}: + +buildPythonPackage rec { + pname = "piccolo"; + version = "1.28.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "piccolo-orm"; + repo = "piccolo"; + tag = version; + hash = "sha256-5VzcMLPf12E+IEOaTUrxHl0W9r7NPUY542qOanrjG4w="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + black + colorama + inflection + jinja2 + pydantic + targ + typing-extensions + ]; + + optional-dependencies = { + orjson = [ orjson ]; + postgres = [ asyncpg ]; + sqlite = [ aiosqlite ]; + }; + + nativeCheckInputs = [ + email-validator + httpx + postgresql + postgresqlTestHook + pytestCheckHook + python-dateutil + ] + ++ lib.flatten (builtins.attrValues optional-dependencies); + + pythonImportsCheck = [ "piccolo" ]; + + disabledTests = [ + # Timing issues + "TestMigrations" + "TestForwardsBackwards" + "TestMigrationManager" + "TestTableStorage" + "TestGraph" + "TestDumpLoad" + "test_add_column" + "test_altering_table_in_schema" + "test_auto_all" + "test_auto" + "test_clean" + "test_column_name_correct" + "test_create_table" + "test_get_table_classes" + "test_integer_to_bigint" + "test_integer_to_varchar" + "test_lazy_reference_to_app" + "test_lazy_table_reference" + "test_new" + "test_on_conflict" + "test_psql" + "test_run" + "test_set_digits" + "test_set_length" + "test_set_null" + "test_shared" + "test_show_all" + "test_warn_if_are_conflicting_objects" + "test_warn_if_is_conflicting" + ]; + + meta = { + description = "ORM and query builder which supports asyncio"; + homepage = "https://github.com/piccolo-orm/piccolo"; + changelog = "https://github.com/piccolo-orm/piccolo/blob/${src.tag}/CHANGES.rst"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0505c3713341..ac83eb3458ef 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11660,6 +11660,8 @@ self: super: with self; { piccata = callPackage ../development/python-modules/piccata { }; + piccolo = callPackage ../development/python-modules/piccolo { }; + piccolo-theme = callPackage ../development/python-modules/piccolo-theme { }; pick = callPackage ../development/python-modules/pick { }; From bca042ad9c05c6448eb0b8ca80175b0850e5d3eb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 7 Sep 2025 00:12:45 +0200 Subject: [PATCH 4/5] python313Packages.litestar: refactor --- .../python-modules/litestar/default.nix | 113 +++++++++++++----- 1 file changed, 85 insertions(+), 28 deletions(-) diff --git a/pkgs/development/python-modules/litestar/default.nix b/pkgs/development/python-modules/litestar/default.nix index ed087bbc005d..f8c95329e9b5 100644 --- a/pkgs/development/python-modules/litestar/default.nix +++ b/pkgs/development/python-modules/litestar/default.nix @@ -7,37 +7,55 @@ hatchling, # dependencies + annotated-types, anyio, asyncpg, + attrs, + brotli, click, cryptography, fsspec, httpx, jinja2, + jsbeautifier, litestar-htmx, mako, + minijinja, + fast-query-parsers, msgspec, multidict, + multipart, picologging, polyfactory, + piccolo, + prometheus-client, psutil, + opentelemetry-instrumentation-asgi, psycopg, + pydantic-extra-types, + pydantic, + email-validator, + pyjwt, pyyaml, redis, - rich, rich-click, + rich, + structlog, time-machine, - trio, typing-extensions, + uvicorn, + valkey, # tests - pytestCheckHook, - pytest-lazy-fixtures, - pytest-xdist, - pytest-mock, + httpx-sse, pytest-asyncio, - pytest-timeout, + pytest-lazy-fixtures, + pytest-mock, pytest-rerunfailures, + pytest-timeout, + pytest-xdist, + pytestCheckHook, + trio, versionCheckHook, }: @@ -53,61 +71,100 @@ buildPythonPackage rec { hash = "sha256-67O/NxPBBLa1QfH1o9laOAQEin8jRA8SkcV7QEzCjI0="; }; - build-system = [ - hatchling - ]; + build-system = [ hatchling ]; dependencies = [ anyio asyncpg click - cryptography + fast-query-parsers fsspec httpx - jinja2 litestar-htmx - mako msgspec multidict - picologging + multipart polyfactory psutil - psycopg pyyaml - redis rich rich-click - time-machine - trio typing-extensions ]; + optional-dependencies = { + annotated-types = [ annotated-types ]; + attrs = [ attrs ]; + brotli = [ brotli ]; + cli = [ + jsbeautifier + uvicorn + ]; + cryptography = [ cryptography ]; + htmx = [ litestar-htmx ]; + jinja = [ jinja2 ]; + jwt = [ + cryptography + pyjwt + ]; + mako = [ mako ]; + minijinja = [ minijinja ]; + opentelemetry = [ opentelemetry-instrumentation-asgi ]; + piccolo = [ piccolo ]; + picologging = [ picologging ]; + polyfactory = [ polyfactory ]; + prometheus = [ prometheus-client ]; + pydantic = [ + pydantic + email-validator + pydantic-extra-types + ]; + redis = [ redis ] ++ redis.optional-dependencies.hiredis; + # sqlalchemy = [ advanced-alchemy ]; + structlog = [ structlog ]; + valkey = [ valkey ] ++ valkey.optional-dependencies.libvalkey; + yaml = [ pyyaml ]; + }; + nativeCheckInputs = [ - pytestCheckHook - pytest-lazy-fixtures - pytest-xdist - pytest-mock + httpx-sse pytest-asyncio - pytest-timeout + pytest-lazy-fixtures + pytest-mock pytest-rerunfailures + pytest-timeout + pytest-xdist + pytestCheckHook + time-machine + trio versionCheckHook ]; + versionCheckProgramArg = "version"; __darwinAllowLocalNetworking = true; + preCheck = '' + export PATH=$out/bin:$PATH + ''; + enabledTestPaths = [ - # Follow github CI + # Follow GitHub CI "docs/examples/" ]; + disabledTests = [ + # StartupError + "test_subprocess_async_client" + ]; + meta = { - homepage = "https://litestar.dev/"; - platforms = lib.platforms.unix; - maintainers = with lib.maintainers; [ bot-wxt1221 ]; - changelog = "https://github.com/litestar-org/litestar/releases/tag/${src.tag}"; description = "Production-ready, Light, Flexible and Extensible ASGI API framework"; + homepage = "https://litestar.dev/"; + changelog = "https://github.com/litestar-org/litestar/releases/tag/${src.tag}"; license = lib.licenses.mit; mainProgram = "litestar"; + maintainers = with lib.maintainers; [ bot-wxt1221 ]; + platforms = lib.platforms.unix; }; } From f922c3c1ee32bc2fa6066a32bc8a6c62f7537c0f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 7 Sep 2025 00:42:14 +0200 Subject: [PATCH 5/5] python313Packages.weaviate-client: add deprecation - disable failing tests --- .../weaviate-client/default.nix | 44 +++++++++++-------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/pkgs/development/python-modules/weaviate-client/default.nix b/pkgs/development/python-modules/weaviate-client/default.nix index 6f94a76e928b..9a5ada4dc0f3 100644 --- a/pkgs/development/python-modules/weaviate-client/default.nix +++ b/pkgs/development/python-modules/weaviate-client/default.nix @@ -2,26 +2,27 @@ lib, authlib, buildPythonPackage, + deprecation, + fastapi, fetchFromGitHub, - grpcio, + flask, grpcio-health-checking, grpcio-tools, + grpcio, + h5py, httpx, + litestar, + numpy, + pandas, + polars, pydantic, + pytest-asyncio, + pytest-httpserver, + pytestCheckHook, pythonOlder, requests, setuptools-scm, validators, - pytestCheckHook, - numpy, - pytest-httpserver, - pandas, - polars, - h5py, - litestar, - pytest-asyncio, - flask, - fastapi, }: buildPythonPackage rec { @@ -48,19 +49,20 @@ buildPythonPackage rec { dependencies = [ authlib - grpcio + deprecation + fastapi flask + grpcio grpcio-health-checking grpcio-tools h5py httpx - pydantic - numpy litestar - fastapi - polars - requests + numpy pandas + polars + pydantic + requests validators ]; @@ -80,11 +82,15 @@ buildPythonPackage rec { disabledTests = [ # Need network - "test_bearer_token" "test_auth_header_with_catchall_proxy" + "test_bearer_token" + "test_client_with_extra_options" + "test_integration_config" + "test_refresh_async" + "test_refresh_of_refresh_async" + "test_refresh_of_refresh" "test_token_refresh_timeout" "test_with_simple_auth_no_oidc_via_api_key" - "test_client_with_extra_options" ]; enabledTestPaths = [