From 469c9760f498c67942d8c0414be5cad9ed7df4bf Mon Sep 17 00:00:00 2001 From: Guilhem Villemin Date: Tue, 21 Mar 2023 17:03:28 +0100 Subject: [PATCH 1/7] feat: add ssl option --- casbin_redis_watcher/options.py | 1 + 1 file changed, 1 insertion(+) diff --git a/casbin_redis_watcher/options.py b/casbin_redis_watcher/options.py index 306b76a..12307b1 100644 --- a/casbin_redis_watcher/options.py +++ b/casbin_redis_watcher/options.py @@ -19,6 +19,7 @@ class WatcherOptions: password = None host = "localhost" port = "6379" + ssl = False sub_client = None pub_client = None channel = None From d58d8ac41bc949c0d22caab81bc3ad6d75807a32 Mon Sep 17 00:00:00 2001 From: Guilhem Villemin Date: Tue, 21 Mar 2023 17:04:31 +0100 Subject: [PATCH 2/7] feat: set ssl according to option --- casbin_redis_watcher/watcher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/casbin_redis_watcher/watcher.py b/casbin_redis_watcher/watcher.py index 1a2ea14..869e6b2 100644 --- a/casbin_redis_watcher/watcher.py +++ b/casbin_redis_watcher/watcher.py @@ -146,7 +146,7 @@ def unmarshal_binary(data: bytes): def new_watcher(option: WatcherOptions): option.init_config() w = RedisWatcher() - rds = Redis(host=option.host, port=option.port, password=option.password) + rds = Redis(host=option.host, port=option.port, password=option.password, ssl=option.ssl) if rds.ping() is False: raise Exception("Redis server is not available.") w.sub_client = rds.client().pubsub() @@ -161,7 +161,7 @@ def new_watcher(option: WatcherOptions): def new_publish_watcher(option: WatcherOptions): option.init_config() w = RedisWatcher() - rds = Redis(host=option.host, port=option.port, password=option.password) + rds = Redis(host=option.host, port=option.port, password=option.password, ssl=option.ssl) if rds.ping() is False: raise Exception("Redis server is not available.") w.pub_client = rds.client() From a41bd59ef4fdc12de96b13405d1da276a4b20873 Mon Sep 17 00:00:00 2001 From: Guilhem Villemin Date: Tue, 21 Mar 2023 17:57:57 +0100 Subject: [PATCH 3/7] feat: latest version --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 03a829d..b087ee0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -casbin==1.16.8 -redis==4.3.4 +casbin==1.18.0 +redis==4.5.2 From 624d9b72a3fdca94e496ffa3eade518e45846457 Mon Sep 17 00:00:00 2001 From: Guilhem Villemin Date: Wed, 22 Mar 2023 17:27:10 +0100 Subject: [PATCH 4/7] docs: add ssl option --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f6ab1da..7930380 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ if __name__ == "main": test_option.host = "localhost" test_option.port = "6379" test_option.channel = "test" + test_option.ssl = False test_option.optional_update_callback = callback_function w = new_watcher(test_option) From 6051f808aa9d17660401808b4c1befc0458cda81 Mon Sep 17 00:00:00 2001 From: Guilhem Villemin Date: Wed, 22 Mar 2023 17:28:32 +0100 Subject: [PATCH 5/7] fix: remove python 3.6 add python 3.10 --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4cc94a8..1bffdfa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ 3.6, 3.7, 3.8, 3.9 ] + python-version: [ 3.7, 3.8, 3.9, 3.10 ] os: [ ubuntu-latest ] services: redis: @@ -101,4 +101,4 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - run: npx semantic-release \ No newline at end of file + run: npx semantic-release From c201cf60aa257a12073e56dfe34887cab2187a96 Mon Sep 17 00:00:00 2001 From: hsluoyz Date: Thu, 23 Mar 2023 00:50:21 +0800 Subject: [PATCH 6/7] fix: fix CI script --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1bffdfa..60bf1b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ 3.7, 3.8, 3.9, 3.10 ] + python-version: [ "3.7", "3.8", "3.9", "3.10" ] os: [ ubuntu-latest ] services: redis: From c39ccde662264a25b90624c75a1ae9c65b9695e5 Mon Sep 17 00:00:00 2001 From: hsluoyz Date: Thu, 23 Mar 2023 00:55:10 +0800 Subject: [PATCH 7/7] fix: fix CI Node version --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 60bf1b1..11f9e57 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -84,7 +84,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v2 with: - node-version: '16' + node-version: '18' - name: Setup run: npm install -g semantic-release @semantic-release/github @semantic-release/changelog @semantic-release/commit-analyzer @semantic-release/git @semantic-release/release-notes-generator semantic-release-pypi