etcd-client-py 0.2.4__tar.gz → 0.4.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 (35) hide show
  1. etcd_client_py-0.4.0/.github/workflows/ci.yml +152 -0
  2. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/Cargo.lock +390 -396
  3. etcd_client_py-0.4.0/Cargo.toml +19 -0
  4. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/Makefile +1 -1
  5. etcd_client_py-0.4.0/PKG-INFO +257 -0
  6. etcd_client_py-0.4.0/README.md +240 -0
  7. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/etcd_client.pyi +28 -36
  8. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/pyproject.toml +1 -0
  9. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/src/client.rs +6 -3
  10. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/src/communicator.rs +26 -76
  11. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/src/compare.rs +23 -14
  12. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/src/condvar.rs +3 -3
  13. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/src/error.rs +7 -6
  14. etcd_client_py-0.4.0/src/lib.rs +75 -0
  15. etcd_client_py-0.4.0/src/lock_manager.rs +182 -0
  16. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/src/txn.rs +4 -3
  17. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/src/watch.rs +3 -3
  18. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/src/watch_event.rs +36 -19
  19. etcd_client_py-0.4.0/src/watch_event_stream.rs +59 -0
  20. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/tests/harness.py +76 -69
  21. etcd_client_py-0.2.4/.github/workflows/ci.yml +0 -134
  22. etcd_client_py-0.2.4/Cargo.toml +0 -18
  23. etcd_client_py-0.2.4/PKG-INFO +0 -46
  24. etcd_client_py-0.2.4/README.md +0 -29
  25. etcd_client_py-0.2.4/src/lib.rs +0 -66
  26. etcd_client_py-0.2.4/src/lock_manager.rs +0 -173
  27. etcd_client_py-0.2.4/src/watch_event_stream.rs +0 -55
  28. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/.gitignore +0 -0
  29. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/LICENSE +0 -0
  30. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/py.typed +0 -0
  31. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/pytest.ini +0 -0
  32. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/requirements.txt +0 -0
  33. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/src/txn_response.rs +0 -0
  34. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/tests/conftest.py +0 -0
  35. {etcd_client_py-0.2.4 → etcd_client_py-0.4.0}/tests/test.py +0 -0
@@ -0,0 +1,152 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - 'main'
7
+ - '[0-9]+.[0-9]+'
8
+ tags:
9
+ - '[0-9]+.[0-9]+.[0-9]+*'
10
+ pull_request:
11
+ merge_group:
12
+
13
+ jobs:
14
+
15
+ test:
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ platform: [
20
+ {os: "ubuntu-22.04", arch: "x86_64", etcd_arch: "amd64"},
21
+ {os: "ubuntu-22.04-arm", arch: "aarch64", etcd_arch: "arm64"},
22
+ ]
23
+ python-version: ["3.11", "3.12", "3.13"]
24
+ runs-on: ${{ matrix.platform.os }}
25
+ steps:
26
+ - name: Checkout the revision
27
+ uses: actions/checkout@v4
28
+ - name: Install etcd
29
+ run: |
30
+ wget https://github.com/etcd-io/etcd/releases/download/v3.5.18/etcd-v3.5.18-linux-${{ matrix.platform.etcd_arch }}.tar.gz
31
+ tar -xzf etcd-v3.5.18-linux-${{ matrix.platform.etcd_arch }}.tar.gz
32
+ mv etcd-v3.5.18-linux-${{ matrix.platform.etcd_arch }}/etcd* /usr/local/bin/
33
+ - name: Set up Python as Runtime
34
+ uses: actions/setup-python@v5
35
+ with:
36
+ python-version: ${{ matrix.python-version }}
37
+ - name: Set up Rust toolchain
38
+ uses: actions-rust-lang/setup-rust-toolchain@v1
39
+ with:
40
+ toolchain: stable
41
+ override: true
42
+ - name: Install protobuf compiler
43
+ run: |
44
+ sudo apt install -y protobuf-compiler
45
+ - name: Install dependencies and build the package
46
+ run: |
47
+ python -m pip install --upgrade pip
48
+ python -m pip install -r requirements.txt
49
+ python -m maturin build
50
+ python -m pip install .
51
+ - name: Test
52
+ run: |
53
+ python -m pytest
54
+
55
+ release-linux:
56
+ if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
57
+ needs: test
58
+ strategy:
59
+ fail-fast: false
60
+ matrix:
61
+ platform: [
62
+ {os: "ubuntu-22.04", arch: "x86_64", maturin_arch: "x86_64"},
63
+ {os: "ubuntu-22.04-arm", arch: "aarch64", maturin_arch: "aarch_64"},
64
+ ]
65
+ manylinux: ["manylinux2014"]
66
+ python-version: ["3.11", "3.12", "3.13"]
67
+ runs-on: ${{ matrix.platform.os }}
68
+ steps:
69
+ - name: Checkout the revision
70
+ uses: actions/checkout@v4
71
+ - name: Build the wheel
72
+ uses: PyO3/maturin-action@v1
73
+ env:
74
+ PROTOC: /home/runner/.local/bin/protoc
75
+ with:
76
+ command: build
77
+ args: --release -o dist -i python${{ matrix.python-version }}
78
+ before-script-linux: |
79
+ PB_REL="https://github.com/protocolbuffers/protobuf/releases"
80
+ curl -LO $PB_REL/download/v23.2/protoc-23.2-linux-${{ matrix.platform.maturin_arch }}.zip
81
+ unzip protoc-23.2-linux-${{ matrix.platform.maturin_arch }}.zip -d $HOME/.local
82
+ export PATH="$PATH:$HOME/.local/bin"
83
+ manylinux: ${{ matrix.manylinux }}
84
+ target: ${{ matrix.platform.arch }}
85
+ - name: Upload artifacts
86
+ uses: actions/upload-artifact@v4
87
+ with:
88
+ name: wheels-${{ matrix.manylinux }}-${{ matrix.platform.arch }}-${{ matrix.python-version }}
89
+ path: dist
90
+
91
+ release-macos:
92
+ if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
93
+ needs: test
94
+ runs-on: macos-latest
95
+ strategy:
96
+ fail-fast: false
97
+ matrix:
98
+ python-version: ["3.11", "3.12", "3.13"]
99
+ steps:
100
+ - name: Checkout the revision
101
+ uses: actions/checkout@v4
102
+ - name: Install prerequisites
103
+ run: |
104
+ brew install protobuf
105
+ - name: Build the wheel
106
+ uses: PyO3/maturin-action@v1
107
+ with:
108
+ command: build
109
+ args: --release -o dist --target universal2-apple-darwin -i python${{ matrix.python-version }}
110
+ - name: Upload artifacts
111
+ uses: actions/upload-artifact@v4
112
+ with:
113
+ name: wheels-macos-universal2-${{ matrix.python-version }}
114
+ path: dist/*
115
+
116
+ release-source:
117
+ if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
118
+ needs: test
119
+ runs-on: ubuntu-latest
120
+ steps:
121
+ - name: Checkout the revision
122
+ uses: actions/checkout@v4
123
+ - name: Set up Python as Runtime
124
+ uses: actions/setup-python@v5
125
+ with:
126
+ python-version: "3.13"
127
+ - name: Build the source distribution
128
+ run: |
129
+ pip install -U pip setuptools
130
+ pip install -U build
131
+ python -m build --sdist
132
+ - name: Upload artifacts
133
+ uses: actions/upload-artifact@v4
134
+ with:
135
+ name: wheels-src
136
+ path: dist
137
+
138
+ publish-to-pypi:
139
+ needs: [release-linux, release-macos, release-source]
140
+ environment: deploy-to-pypi
141
+ permissions:
142
+ id-token: write
143
+ runs-on: ubuntu-latest
144
+ steps:
145
+ - name: Download artifacts
146
+ uses: actions/download-artifact@v4
147
+ with:
148
+ pattern: wheels-*
149
+ path: dist
150
+ merge-multiple: true
151
+ - name: Publish to PyPI
152
+ uses: pypa/gh-action-pypi-publish@release/v1