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 <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-03-01 08:52:35 +00:00
committed by GitHub
parent 36353359f6
commit 6eca08480a
14 changed files with 0 additions and 126 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -5,7 +5,6 @@ name = "pypi"
[packages]
wmill = ">=1.647.0"
wmill_pg = ">=1.647.0"
sendgrid = "*"
mysql-connector-python = "*"
pymongo = "*"

View File

@@ -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)

View File

@@ -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/*

View File

@@ -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/

View File

@@ -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:
...
```

View File

@@ -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 <ruben@windmill.dev>"]
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"

View File

@@ -1 +0,0 @@
from .client import *

View File

@@ -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

View File

@@ -1 +0,0 @@
# Marker file for PEP 561