Skip to content

Commit 353ed7d

Browse files
authored
Merge pull request #29 from aserto-dev/deps
Update dependencies and fix tests for topaz 0.32+
2 parents f7d7dec + d05f4a4 commit 353ed7d

15 files changed

Lines changed: 825 additions & 1215 deletions

.github/workflows/ci.yaml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ on:
1515

1616
env:
1717
VAULT_ADDR: https://vault.eng.aserto.com/
18-
18+
GO_VERSION: "1.22"
1919

2020
jobs:
2121
test:
2222
name: Run test
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Read Configuration
26-
uses: hashicorp/vault-action@v2.7.3
26+
uses: hashicorp/vault-action@v3
2727
id: vault
2828
with:
2929
url: ${{ env.VAULT_ADDR }}
@@ -39,7 +39,7 @@ jobs:
3939
git config --global url."git@github.com:".insteadOf https://github.com/
4040
4141
- name: Checkout Repo
42-
uses: actions/checkout@v2
42+
uses: actions/checkout@v4
4343

4444
- name: Set up Homebrew
4545
uses: Homebrew/actions/setup-homebrew@master
@@ -48,20 +48,20 @@ jobs:
4848
run: brew tap aserto-dev/tap && brew install aserto-dev/tap/topaz && topaz install
4949

5050
- name: Use python 3.9
51-
uses: actions/setup-python@v4
51+
uses: actions/setup-python@v5
5252
with:
53-
python-version: '3.9'
53+
python-version: '3.12'
5454

5555
- name: Install and configure Poetry
5656
uses: snok/install-poetry@v1
5757
with:
58-
version: 1.2.1
58+
version: 1.8.3
5959

6060
- name: Run lint
6161
run: |
6262
poetry install
6363
poetry run pyright .
64-
64+
6565
- name: Run tests
6666
run: |
6767
poetry run pytest -vv
@@ -73,7 +73,7 @@ jobs:
7373
name: Release to pypi
7474
steps:
7575
- name: Read Configuration
76-
uses: hashicorp/vault-action@v2.4.1
76+
uses: hashicorp/vault-action@v3
7777
id: vault
7878
with:
7979
url: ${{ env.VAULT_ADDR }}
@@ -83,17 +83,17 @@ jobs:
8383
kv/data/pypi "API_TOKEN" | POETRY_HTTP_BASIC_PYPI_PASSWORD;
8484
8585
- name: Checkout
86-
uses: actions/checkout@v3
86+
uses: actions/checkout@v4
8787
with:
8888
fetch-depth: 0
8989

9090
- name: Setup Go
91-
uses: actions/setup-go@v2
91+
uses: actions/setup-go@v5
9292
with:
9393
go-version: ${{ env.GO_VERSION }}
9494

9595
- name: Setup caching
96-
uses: actions/cache@v2
96+
uses: actions/cache@v4
9797
with:
9898
path: |
9999
~/.cache/go-build
@@ -119,12 +119,14 @@ jobs:
119119
go run mage.go deps
120120
121121
- name: Set up Python
122-
uses: actions/setup-python@v4
122+
uses: actions/setup-python@v5
123123
with:
124-
python-version: '3.10'
124+
python-version: '3.12'
125125

126126
- name: Install Poetry
127127
uses: snok/install-poetry@v1
128+
with:
129+
version: 1.8.3
128130

129131
- name: Build and push the python package
130132
env:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module github.com/aserto-dev/python-authorizer
22

3-
go 1.19
3+
go 1.22
44

55
require github.com/magefile/mage v1.14.0

poetry.lock

Lines changed: 668 additions & 114 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ packages = [
2929

3030
[tool.poetry.dependencies]
3131
python = "^3.8"
32-
aiohttp = "^3.8.0"
33-
grpcio = "^1.49.0"
34-
protobuf = "^4.21.0"
35-
aserto-authorizer = "^0.20.2"
36-
aserto-directory = "^0.31.3"
32+
aiohttp = "^3.9.5"
33+
grpcio = "^1.64.1"
34+
protobuf = "^5.27.2"
35+
aserto-authorizer = "^0.20.3"
36+
aserto-directory = "^0.31.4"
3737

3838
[tool.poetry.dev-dependencies]
3939
black = "^23.0"
4040
isort= "^5.9.0"
41-
pytest-asyncio = "^0.15.0"
41+
pytest-asyncio = "^0.23"
4242
pyright = "^1.1.0"
4343
requests = "^2.31.0"
4444

src/aserto/client/directory/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
from typing import Literal, Tuple
2+
23
from aserto.client.directory.channels import Channels
34

45
__all__ = ["Channels"]
56

7+
68
class NotFoundError(Exception):
79
pass
810

11+
912
class ConfigError(Exception):
1013
pass
1114

12-
Header = Literal["authorization", "aserto-tenant-id", "if-match", "if-none-match"]
13-
1415

15-
def get_metadata(api_key, tenant_id) -> Tuple[Tuple[Header, str], ...]:
16-
md: Tuple[Tuple[Header, str], ...] = ()
16+
def get_metadata(api_key, tenant_id) -> Tuple[Tuple[str, str], ...]:
17+
md: Tuple[Tuple[str, str], ...] = ()
1718
if api_key:
1819
md += (("authorization", f"basic {api_key}"),)
1920
if tenant_id:

test/assets/manifest.yaml

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

test/assets/objects.json

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

0 commit comments

Comments
 (0)