Skip to content

Commit 730e55d

Browse files
committed
feat: migrate to protobuf 6.31.1 and uv
1 parent ad8664d commit 730e55d

28 files changed

+2706
-3577
lines changed

.build.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches: [master]
9+
10+
jobs:
11+
tests:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v6
16+
17+
- name: Set up Python 3.10
18+
uses: actions/setup-python@v6
19+
with:
20+
python-version: "3.10"
21+
22+
- name: Install the latest version of uv
23+
uses: astral-sh/setup-uv@v7
24+
25+
- name: Install dependencies
26+
run: uv sync
27+
28+
- name: Setup etcd
29+
uses: supplypike/setup-bin@v5
30+
with:
31+
uri: "https://github.com/etcd-io/etcd/releases/download/v3.6.6/etcd-v3.6.6-linux-amd64.tar.gz"
32+
name: "etcd"
33+
version: "3.6.6"
34+
subPath: "etcd-v3.6.6-linux-amd64"
35+
36+
- name: Setup etcdutl
37+
uses: supplypike/setup-bin@v5
38+
with:
39+
uri: "https://github.com/etcd-io/etcd/releases/download/v3.6.6/etcd-v3.6.6-linux-amd64.tar.gz"
40+
name: "etcdutl"
41+
version: "3.6.6"
42+
subPath: "etcd-v3.6.6-linux-amd64"
43+
44+
- name: Setup etcdctl
45+
uses: supplypike/setup-bin@v5
46+
with:
47+
uri: "https://github.com/etcd-io/etcd/releases/download/v3.6.6/etcd-v3.6.6-linux-amd64.tar.gz"
48+
name: "etcdctl"
49+
version: "3.6.6"
50+
subPath: "etcd-v3.6.6-linux-amd64"
51+
52+
- name: test all etcd tools
53+
run: |
54+
ls /opt/hostedtoolcache/etcdctl/3.6.6/x64/etcd-v3.6.6-linux-amd64
55+
etcdctl --help
56+
etcdutl --help
57+
etcd --help
58+
59+
- name: Run proto generation
60+
run: tox run -e genproto
61+
62+
- name: Run lint
63+
run: tox run -e ruff
64+
65+
- name: Run test
66+
run: tox run -e py310

CONTRIBUTING.rst

Lines changed: 0 additions & 164 deletions
This file was deleted.

Dockerfile

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
1-
FROM python:3.9
1+
FROM python:3.10
22

33
ARG HTTP_PROXY
44
ARG http_proxy
55
ARG HTTPS_PROXY
66
ARG https_proxy
7-
ENV TEST_ETCD_VERSION v3.3.10
7+
8+
RUN mkdir /python-etcd3
9+
10+
ENV TEST_ETCD_VERSION=v3.6.6
11+
ENV UV_CACHE_DIR=/python-etcd3/.cache/uv
812

913
RUN curl -L https://github.com/etcd-io/etcd/releases/download/${TEST_ETCD_VERSION}/etcd-${TEST_ETCD_VERSION}-linux-amd64.tar.gz | tar xzvf -
10-
ENV PATH $PATH:/etcd-${TEST_ETCD_VERSION}-linux-amd64
14+
ENV PATH=$PATH:/etcd-${TEST_ETCD_VERSION}-linux-amd64
1115

12-
RUN pip install -U tox
16+
COPY --from=ghcr.io/astral-sh/uv:0.9.16 /uv /uvx /bin/
17+
ENV PATH=$PATH:/etcd-${TEST_ETCD_VERSION}-linux-amd64
18+
COPY . .
19+
RUN uv sync
1320

14-
RUN mkdir python-etcd3
15-
WORKDIR python-etcd3
16-
# Rebuild this layer .tox when tox.ini or requirements changes
21+
WORKDIR /python-etcd3
1722
COPY tox.ini ./
18-
COPY requirements/base.txt requirements/test.txt ./requirements/
19-
20-
RUN tox -epy39 --notest
23+
RUN uv run tox -epy310 --notest
2124

2225
COPY . ./
2326

24-
ENV ETCDCTL_API 3
25-
CMD ["tox", "-epy39"]
27+
CMD ["uv", "run", "tox", "-epy310"]

MANIFEST.in

Lines changed: 0 additions & 15 deletions
This file was deleted.

devbox.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.16.0/.schema/devbox.schema.json",
3+
"packages": [
4+
"etcd@3.6.6",
5+
"etcdctl@3.3.27"
6+
],
7+
"shell": {
8+
"init_hook": [
9+
"echo 'Welcome to devbox!' > /dev/null"
10+
],
11+
"scripts": {
12+
"test": [
13+
"echo \"Error: no test specified\" && exit 1"
14+
]
15+
}
16+
}
17+
}

devbox.lock

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"lockfile_version": "1",
3+
"packages": {
4+
"etcd@3.6.6": {
5+
"last_modified": "2025-12-03T03:51:48Z",
6+
"resolved": "github:NixOS/nixpkgs/cadcc8de247676e4751c9d4a935acb2c0b059113#etcd",
7+
"source": "devbox-search",
8+
"version": "3.6.6",
9+
"systems": {
10+
"aarch64-darwin": {
11+
"outputs": [
12+
{
13+
"name": "out",
14+
"path": "/nix/store/x30gai5yyj948xq7ahx3ax7zwm2slaws-etcd-3.6.6",
15+
"default": true
16+
}
17+
],
18+
"store_path": "/nix/store/x30gai5yyj948xq7ahx3ax7zwm2slaws-etcd-3.6.6"
19+
},
20+
"aarch64-linux": {
21+
"outputs": [
22+
{
23+
"name": "out",
24+
"path": "/nix/store/3qbjx0206m1can0zy6i9nhrwycd4v169-etcd-3.6.6",
25+
"default": true
26+
}
27+
],
28+
"store_path": "/nix/store/3qbjx0206m1can0zy6i9nhrwycd4v169-etcd-3.6.6"
29+
},
30+
"x86_64-darwin": {
31+
"outputs": [
32+
{
33+
"name": "out",
34+
"path": "/nix/store/rynwpvxjl0xw17mj1g7fdrgjpg4xarnr-etcd-3.6.6",
35+
"default": true
36+
}
37+
],
38+
"store_path": "/nix/store/rynwpvxjl0xw17mj1g7fdrgjpg4xarnr-etcd-3.6.6"
39+
},
40+
"x86_64-linux": {
41+
"outputs": [
42+
{
43+
"name": "out",
44+
"path": "/nix/store/qq37jgiqqm70qqfg9hnw3p0dhggfv8ns-etcd-3.6.6",
45+
"default": true
46+
}
47+
],
48+
"store_path": "/nix/store/qq37jgiqqm70qqfg9hnw3p0dhggfv8ns-etcd-3.6.6"
49+
}
50+
}
51+
},
52+
"etcdctl@3.3.27": {
53+
"last_modified": "2022-02-15T04:21:50Z",
54+
"resolved": "github:NixOS/nixpkgs/3a641defd170a4ef25ce8c7c64cb13f91f867fca#etcdctl",
55+
"source": "devbox-search",
56+
"version": "3.3.27"
57+
},
58+
"github:NixOS/nixpkgs/nixpkgs-unstable": {
59+
"last_modified": "2025-11-20T06:07:48Z",
60+
"resolved": "github:NixOS/nixpkgs/a8d610af3f1a5fb71e23e08434d8d61a466fc942?lastModified=1763618868&narHash=sha256-v5afmLjn%2FuyD9EQuPBn7nZuaZVV9r%2BJerayK%2F4wvdWA%3D"
61+
}
62+
}
63+
}

0 commit comments

Comments
 (0)