From 49a12400fd40ff540476f697a671c28f0a21053f Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sun, 1 Mar 2026 08:52:35 +0000 Subject: [PATCH] chore: remove legacy wmill_pg python client (#8155) The wmill_pg package (psycopg2 wrapper for running PostgreSQL queries) has been fully replaced by Windmill's native PostgreSQL support. Remove the package directory and all references from build, publish, install, version, LSP, and dependabot configs. Co-authored-by: Claude Opus 4.6 --- .github/change-versions-mac.sh | 3 -- .github/change-versions.sh | 3 -- .github/dependabot.yml | 6 --- lsp/Pipfile | 1 - python-client/build.sh | 1 - python-client/install.sh | 3 -- python-client/publish.sh | 2 - python-client/wmill_pg/README.md | 17 ------- .../dist/wmill_pg-1.245.0-py3-none-any.whl | Bin 2299 -> 0 bytes .../wmill_pg/dist/wmill_pg-1.245.0.tar.gz | Bin 1933 -> 0 bytes python-client/wmill_pg/pyproject.toml | 48 ------------------ python-client/wmill_pg/wmill_pg/__init__.py | 1 - python-client/wmill_pg/wmill_pg/client.py | 40 --------------- python-client/wmill_pg/wmill_pg/py.typed | 1 - 14 files changed, 126 deletions(-) delete mode 100644 python-client/wmill_pg/README.md delete mode 100644 python-client/wmill_pg/dist/wmill_pg-1.245.0-py3-none-any.whl delete mode 100644 python-client/wmill_pg/dist/wmill_pg-1.245.0.tar.gz delete mode 100644 python-client/wmill_pg/pyproject.toml delete mode 100644 python-client/wmill_pg/wmill_pg/__init__.py delete mode 100644 python-client/wmill_pg/wmill_pg/client.py delete mode 100644 python-client/wmill_pg/wmill_pg/py.typed diff --git a/.github/change-versions-mac.sh b/.github/change-versions-mac.sh index b12d83b530..d4d709f86f 100755 --- a/.github/change-versions-mac.sh +++ b/.github/change-versions-mac.sh @@ -15,11 +15,8 @@ sed -i '' -e "/\"version\": /s/: .*,/: \"$VERSION\",/" ${root_dirpath}/typescrip sed -i '' -e "/\"version\": /s/: .*,/: \"$VERSION\",/" ${root_dirpath}/frontend/package.json sed -i '' -e "/^version =/s/= .*/= \"$VERSION\"/" ${root_dirpath}/python-client/wmill/pyproject.toml sed -i '' -e "/^windmill-api =/s/= .*/= \"\\^$VERSION\"/" ${root_dirpath}/python-client/wmill/pyproject.toml -sed -i '' -e "/^version =/s/= .*/= \"$VERSION\"/" ${root_dirpath}/python-client/wmill_pg/pyproject.toml sed -i '' -e "/^[[:space:]]*ModuleVersion[[:space:]]*=/s/= .*/= '$VERSION'/" ${root_dirpath}/powershell-client/WindmillClient/WindmillClient.psd1 -# sed -i '' -e "/^wmill =/s/= .*/= \"\\^$VERSION\"/" python-client/wmill_pg/pyproject.toml sed -i '' -e "/^wmill =/s/= .*/= \">=$VERSION\"/" ${root_dirpath}/lsp/Pipfile -sed -i '' -e "/^wmill_pg =/s/= .*/= \">=$VERSION\"/" ${root_dirpath}/lsp/Pipfile sed -i '' -E "s/name = \"windmill\"\nversion = \"[^\"]*\"\\n(.*)/name = \"windmill\"\nversion = \"$VERSION\"\\n\\1/" ${root_dirpath}/backend/Cargo.lock diff --git a/.github/change-versions.sh b/.github/change-versions.sh index 7db47d014c..759d8f793f 100755 --- a/.github/change-versions.sh +++ b/.github/change-versions.sh @@ -16,11 +16,8 @@ sed -i -e "/\"version\": /s/: .*,/: \"$VERSION\",/" ${root_dirpath}/typescript-c sed -i -e "/\"version\": /s/: .*,/: \"$VERSION\",/" ${root_dirpath}/frontend/package.json sed -i -e "/^version =/s/= .*/= \"$VERSION\"/" ${root_dirpath}/python-client/wmill/pyproject.toml sed -i -e "/^windmill-api =/s/= .*/= \"\\^$VERSION\"/" ${root_dirpath}/python-client/wmill/pyproject.toml -sed -i -e "/^version =/s/= .*/= \"$VERSION\"/" ${root_dirpath}/python-client/wmill_pg/pyproject.toml sed -i -e "/^[[:space:]]*ModuleVersion[[:space:]]*=/s/= .*/= '$VERSION'/" ${root_dirpath}/powershell-client/WindmillClient/WindmillClient.psd1 -# sed -i -e "/^wmill =/s/= .*/= \"\\^$VERSION\"/" ${root_dirpath}/python-client/wmill_pg/pyproject.toml sed -i -e "/^wmill =/s/= .*/= \">=$VERSION\"/" ${root_dirpath}/lsp/Pipfile -sed -i -e "/^wmill_pg =/s/= .*/= \">=$VERSION\"/" ${root_dirpath}/lsp/Pipfile sed -i -zE "s/name = \"windmill\"\nversion = \"[^\"]*\"\\n(.*)/name = \"windmill\"\nversion = \"$VERSION\"\\n\\1/" ${root_dirpath}/backend/Cargo.lock diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9559a252a4..80970d1e76 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -31,9 +31,3 @@ updates: directory: "/python-client/wmill" schedule: interval: "weekly" - - # Maintain dependencies for wmill_pg python client - - package-ecosystem: "pip" - directory: "/python-client/wmill_pg" - schedule: - interval: "weekly" diff --git a/lsp/Pipfile b/lsp/Pipfile index 5e96167e73..6ece442b78 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -5,7 +5,6 @@ name = "pypi" [packages] wmill = ">=1.647.0" -wmill_pg = ">=1.647.0" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/python-client/build.sh b/python-client/build.sh index 7abcd92a09..825d0f3933 100755 --- a/python-client/build.sh +++ b/python-client/build.sh @@ -61,7 +61,6 @@ mv windmill-api/README.md.tmp windmill-api/README.md cd windmill-api && poetry build cd ../wmill && poetry build -cd ../wmill_pg && poetry build cd .. && echo "windmill-api/" >> .gitignore # Build documentation (similar to typescript-client/build_typedoc.sh) diff --git a/python-client/install.sh b/python-client/install.sh index ae463574fb..6201928d0f 100755 --- a/python-client/install.sh +++ b/python-client/install.sh @@ -3,14 +3,11 @@ set -e rm windmill-api/dist/* || true rm wmill/dist/* || true -rm wmill_pg/dist/* || true ./build.sh pip3 install windmill-api/dist/*.whl --force-reinstall --user --break-system-packages pip3 install wmill/dist/*.whl --force-reinstall --user --break-system-packages -pip3 install wmill_pg/dist/*.whl --force-reinstall --user --break-system-packages rm -rf windmill-api/ rm -rf wmill/dist/* -rm -rf install wmill_pg/dist/* diff --git a/python-client/publish.sh b/python-client/publish.sh index b6610ebf7f..6b1d1b3d5d 100755 --- a/python-client/publish.sh +++ b/python-client/publish.sh @@ -5,7 +5,5 @@ set -e cd windmill-api && poetry publish --username __token__ --password $PYPI_PASSWORD -n || true cd ../wmill && poetry publish --username __token__ --password $PYPI_PASSWORD -n || true -sleep 5 -cd ../wmill_pg && poetry publish --username __token__ --password $PYPI_PASSWORD -n || true rm -rf windmill-api/ diff --git a/python-client/wmill_pg/README.md b/python-client/wmill_pg/README.md deleted file mode 100644 index 4e043806be..0000000000 --- a/python-client/wmill_pg/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# wmill - -The postgres extension client for the [Windmill](https://windmill.dev) platform. - -[windmill-api](https://pypi.org/project/windmill-api/). - -## Quickstart - -```python -import wmill_pg - - -def main(): - my_list = query("UPDATE demo SET value = 'value' RETURNING key, value") - for key, value in my_list: - ... -``` diff --git a/python-client/wmill_pg/dist/wmill_pg-1.245.0-py3-none-any.whl b/python-client/wmill_pg/dist/wmill_pg-1.245.0-py3-none-any.whl deleted file mode 100644 index 5e487f5b880b7c1781082e243b5079c7d6695e78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2299 zcmaKt2{e>@AIE28?6NO~!th>8#xS-b8BB&5VT^3ACd#sxAu*Cv<8%L10(vgxA)6-yo)`@%f4QqjeANwRsMwGg#YxS_e zsQQnd^m0NI-u0}fa2$BcGb?sOw3B6K?C+2j5+QQjYVs)d^q|s7T~^q^2}MGX)7YDJ zi2bzAjQeJ&2+5yIL2X^@h*1cyx2x$X*zUiob6BuR?f$h7zdLFqB;*1$5R1iJ=0XE6 zj!C$MeMoXFETg+)i5hQZlx4kA1|M6XY#8P%Cd9tAtTK<>hq@w7{1-ggRD-yJV3P!a z0od?Z>nObo!BvyZ(Ec?^FlDxWLI2;K`Kshc@tY>ilx;d#GVE01CX(i&l*MQtvOZdB z`gYd0ctpJ6XM<1?V3L1YvUpS0^Rz4JjiD3fr!^PuMz(t>Ao8jX=v{*cN9@`yWOsBu z_<^#p;xz!4i#P2RLid`YY(Y2u**7#4K>}cIw!Mub+`3?QiZ4FrC%W2Z(wql zw1R!euj*U_m|Z{CCYLvn-deqBtm*f@@t5faK9(7$ z_7%)|Hfa-&jvIzpG{mrxsevtamRjinHBMae1sipD#SIJ%!T5`VFYP8X(^}cRs^_NU z7LlE_H-ojY3@)+|C!QnI( z@tn!JGBq^Sv&BD(^n8+!|( z#=TX!Y2_R#O~xvGt{ED2Ldc#!7cr@^u#;>9i&mpNGs(I6oZKMTeGI6JZUE6|hlW+~`2--j@mPXHw4cG+z^Dr~Ac$MHbqU>1+#0eal zm_KLKKN4DBlXi(lsp?=qoi^S=r>NHPYyqE+Cdtwlo0}nFLe(#)@CNny(O096jp;`-B1@fmKSlFlSdWI!zM8u0yrQ!%_iZkH zOPn&DI3aT3Nb&n&az-K$Xki*$fUGDAqBj<;a!DYPTLdkC`KkCxdl7f;bqAR@ro*f} zZP9mRs^ao8{Ue^oB1SrVUE*RHG5NtuMzBOzjfz{c^0n^KQV@Q_t~*>snuk*_!N;0Z@c-!BP+u&~2e#?Y-p6U+c+FB^S;R}Tu~GeAsXH8peKX+tawl&*u0 zICIqSc4?M5Jp8Ng#$KqFiA!ovU zso=jua=(55DEw;wb&vf!gK;2y8iT&p^Ebdhn`0mCf0F!#2JHJj?XO(hqd+{L QEj*mNg3}BJyr19x0O#3~j{pDw diff --git a/python-client/wmill_pg/dist/wmill_pg-1.245.0.tar.gz b/python-client/wmill_pg/dist/wmill_pg-1.245.0.tar.gz deleted file mode 100644 index e539cc5f8882bec7eeb2e5362bc2390890191493..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1933 zcmV;82XgoyiwFn+00002|95R^Y;0d}XDu-@wsZGEr&Ayjk`VJPAZVNC(|^AONb1FLdgH0%>s|1CkVpW# zSS%LY#R8;5I^Unto1YmCnArO&a7ujX-*LLV&9f?Z9nbal@Xg*6AkQQf(EZ-G32z@q zl1J>o9qjk_ok4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;$ug9%udkZvL<9-HHFZ!(QLS|4)Hu_#G9O5VPsiB^7<09-rd= zz%{G?+g$&rzx-ssIr;I|NA~}}xBqv&{vH4C_6Fwu=ab+alT>Y=?Z1}i-6QM~7oE@u zcC7U+5VWqVj0BzMQAE{t_>bNFKtCrDv(+V!5x(#426|gw4S{~v7emmYzRfYh+c!C? zLYqaDha>#?wGMPv-G{JG_5F$wetpm-!}hBlaQq>pS;ps_0oSTWJR0F&&)-15sYtFs z-cc_XZ%6oOJCD=8-;9nnyIuQ- zBnEqx_65W?BP_vsJ7CI}L2?bdZ*v>^F>XVf(80jKz`(%3z`(%3z`(%3z`(%3z`(%3 Tz`(%Zzk`1RcvLNx08jt`z<%UW diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml deleted file mode 100644 index eae37b843d..0000000000 --- a/python-client/wmill_pg/pyproject.toml +++ /dev/null @@ -1,48 +0,0 @@ -[tool.poetry] -name = "wmill-pg" -version = "1.647.0" -description = "An extension client for the wmill client library focused on pg" -license = "Apache-2.0" -homepage = "https://windmill.dev" -documentation = "https://windmill.dev" - -authors = ["Ruben Fiszel "] - -readme = "README.md" -packages = [ - {include = "wmill_pg"}, -] -include = ["wmill_pg/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" -wmill = "^1.5.0" -psycopg2-binary = "*" - -[build-system] -requires = ["poetry>=1.0.2", "poetry-dynamic-versioning"] -build-backend = "poetry.masonry.api" - -[tool.poetry-dynamic-versioning] -enable = true -vcs = "git" -style = "semver" -format-jinja = "{% if distance == 0 %}{{ base }}{% else %}{{ base }}+{{ distance }}.{{ commit }}{% endif %}" - - -[tool.black] -line-length = 120 -target_version = ['py36', 'py37', 'py38'] -exclude = ''' -( - /( - | \.git - | \.venv - | \.mypy_cache - )/ -) -''' - -[tool.isort] -line_length = 120 -profile = "black" diff --git a/python-client/wmill_pg/wmill_pg/__init__.py b/python-client/wmill_pg/wmill_pg/__init__.py deleted file mode 100644 index 421945bc42..0000000000 --- a/python-client/wmill_pg/wmill_pg/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .client import * diff --git a/python-client/wmill_pg/wmill_pg/client.py b/python-client/wmill_pg/wmill_pg/client.py deleted file mode 100644 index 73b5efc3fe..0000000000 --- a/python-client/wmill_pg/wmill_pg/client.py +++ /dev/null @@ -1,40 +0,0 @@ -from typing import Any - -import wmill - -import psycopg2 - - -def query(query: str, connection: "str | dict[str, Any]" = "g/all/postgres") -> "list[tuple[Any, ...]] | None": - """ - Query a postgres database using psycopg2 library underneath. See its documentation for more info. - - Args: - query: The query as string, without ending ';' - resource: The path of the resource of type 'postgres' containing the connection info. - The default value is 'g/all/postgres'. It is by convention the default postgres - db of any given workspace. - - Return: - Either None if it is a non returning statement or a list of tuple for statement with return values. - """ - if isinstance(connection, str): - pg_con = wmill.get_resource(connection) - if pg_con is None: - raise Exception(f"Resource {connection} not found") - else: - pg_con = connection - - - conn = psycopg2.connect(**pg_con) - cur = conn.cursor() - cur.execute(f"{query};") - if cur.description: - res = cur.fetchall() - else: - res = None - conn.commit() - cur.close() - conn.close() - return res - diff --git a/python-client/wmill_pg/wmill_pg/py.typed b/python-client/wmill_pg/wmill_pg/py.typed deleted file mode 100644 index 7632ecf775..0000000000 --- a/python-client/wmill_pg/wmill_pg/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561