Skip to content

Commit 4a3d0b6

Browse files
authored
Merge branch 'master' into fix/update-requires-python-minimum
2 parents a9a338a + f9ae8a2 commit 4a3d0b6

File tree

5 files changed

+27
-11
lines changed

5 files changed

+27
-11
lines changed

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ runs:
4343

4444
- name: Caching for Pre-Commit
4545
if: ${{ inputs.pre-commit }}
46-
uses: actions/cache@v3
46+
uses: actions/cache@v4
4747
with:
4848
path: ~/.cache/pre-commit
4949
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}

.github/workflows/build-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
steps:
2828
- name: Check out selected branch
29-
uses: actions/checkout@v3
29+
uses: actions/checkout@v4
3030
with:
3131
ref: ${{ github.event.inputs.branch }}
3232
- name: Install uv

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
lint:
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424
- name: Setup python, vorta and dev deps
2525
uses: ./.github/actions/setup
2626
with:
@@ -37,7 +37,7 @@ jobs:
3737
matrix-unit: ${{ steps.set-matrix-unit.outputs.matrix }}
3838
matrix-integration: ${{ steps.set-matrix-integration.outputs.matrix }}
3939
steps:
40-
- uses: actions/checkout@v3
40+
- uses: actions/checkout@v4
4141

4242
- name: Give execute permission to script
4343
run: chmod +x ./.github/scripts/generate-matrix.sh
@@ -63,7 +63,7 @@ jobs:
6363
matrix: ${{fromJson(needs.prepare-matrix.outputs.matrix-unit)}}
6464

6565
steps:
66-
- uses: actions/checkout@v3
66+
- uses: actions/checkout@v4
6767

6868
- name: Install system dependencies
6969
uses: ./.github/actions/install-dependencies
@@ -99,7 +99,7 @@ jobs:
9999
run: echo $PKG_CONFIG_PATH && make test-unit
100100

101101
- name: Upload coverage to Codecov
102-
uses: codecov/codecov-action@v3
102+
uses: codecov/codecov-action@v4
103103
env:
104104
OS: ${{ runner.os }}
105105
python: ${{ matrix.python-version }}
@@ -116,7 +116,7 @@ jobs:
116116
matrix: ${{fromJson(needs.prepare-matrix.outputs.matrix-integration)}}
117117

118118
steps:
119-
- uses: actions/checkout@v3
119+
- uses: actions/checkout@v4
120120

121121
- name: Install system dependencies
122122
uses: ./.github/actions/install-dependencies

src/vorta/keyring/darwin.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ def delete_password(self, service, repo_url):
9494
try:
9595
result, password_length, password_buffer, keychain_item = SecKeychainFindGenericPassword(
9696
self.login_keychain,
97-
len(service),
97+
len(service.encode()),
9898
service.encode(),
99-
len(repo_url),
99+
len(repo_url.encode()),
100100
repo_url.encode(),
101101
None,
102102
None,
@@ -124,9 +124,9 @@ def get_password(self, service, repo_url):
124124
keychain_item,
125125
) = SecKeychainFindGenericPassword(
126126
self.login_keychain,
127-
len(service),
127+
len(service.encode()),
128128
service.encode(),
129-
len(repo_url),
129+
len(repo_url.encode()),
130130
repo_url.encode(),
131131
None,
132132
None,

tests/unit/test_keyring_darwin.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import sys
2+
import uuid
3+
4+
import pytest
5+
6+
7+
@pytest.mark.skipif(sys.platform != "darwin", reason="macOS only")
8+
def test_keyring_non_ascii_repo():
9+
from vorta.keyring.darwin import VortaDarwinKeyring
10+
11+
UNICODE_PW = 'password'
12+
REPO = 'vorta-test-repo-한글'
13+
14+
keyring = VortaDarwinKeyring()
15+
keyring.set_password('vorta-repo', REPO, UNICODE_PW)
16+
assert keyring.get_password("vorta-repo", REPO) == UNICODE_PW

0 commit comments

Comments
 (0)