From e12f3b0b20094cbb3c697deb455c80d2dd6cca9d Mon Sep 17 00:00:00 2001
From: Brendan Forster <github@brendanforster.com>
Date: Mon, 5 Apr 2021 10:54:36 -0300
Subject: [PATCH 1/4] bump all usages of python to at least 3.6

---
 .github/workflows/ci.yml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a6228131..8a29ed7b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -42,7 +42,8 @@ jobs:
                              gnome-keyring \
                              libsecret-1-dev \
                              dbus-x11 \
-                             python-gnomekeyring
+                             python-gnomekeyring \
+                             python3
       if: ${{ matrix.os == 'ubuntu-16.04' }}
       name: Install additional dependencies
 
@@ -103,7 +104,7 @@ jobs:
     - uses: actions/checkout@v2
     - name: install additional dependencies
       run: |
-        apk add g++ make python2 libsecret-dev
+        apk add g++ make python3 libsecret-dev
 
     - run: npm install
       name: Setup environment
@@ -139,7 +140,7 @@ jobs:
         node-version: 15.x
         registry-url: 'https://registry.npmjs.org'
 
-    - run: sudo apt-get install libsecret-1-dev
+    - run: sudo apt-get install libsecret-1-dev python3
       name: Install additional dependencies
 
     - run: npm install

From 47c20824981406ad593ab4cbaa1faf0ef22194eb Mon Sep 17 00:00:00 2001
From: Brendan Forster <github@brendanforster.com>
Date: Mon, 5 Apr 2021 11:00:29 -0300
Subject: [PATCH 2/4] force a build of the native module to see this issue

---
 .github/workflows/ci.yml | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8a29ed7b..a2f8eb5a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -47,8 +47,10 @@ jobs:
       if: ${{ matrix.os == 'ubuntu-16.04' }}
       name: Install additional dependencies
 
-    - run: npm install
-      name: Setup environment
+    - name: Setup environment
+      run: |
+        npm install
+        npm run build
 
     - run: |
         echo "Initialize dbus..."
@@ -106,8 +108,10 @@ jobs:
       run: |
         apk add g++ make python3 libsecret-dev
 
-    - run: npm install
-      name: Setup environment
+    - name: Setup environment
+      run: |
+        npm install
+        npm run build
 
     - run: |
         npm run prebuild-node

From 7fcb8a6ae5c8a4166a661df1d2048496f7dd027e Mon Sep 17 00:00:00 2001
From: Brendan Forster <github@brendanforster.com>
Date: Mon, 5 Apr 2021 11:02:33 -0300
Subject: [PATCH 3/4] update to Ubuntu 18.04 and hopefully a compatible python
 version

---
 .github/workflows/ci.yml | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a2f8eb5a..753f1588 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -20,9 +20,9 @@ jobs:
     strategy:
       matrix:
         node-version: [15.x]
-        os: [ubuntu-16.04, windows-latest, macos-latest]
+        os: [ubuntu-18.04, windows-latest, macos-latest]
         include:
-          - os: ubuntu-16.04
+          - os: ubuntu-18.04
             friendlyName: Ubuntu
           - os: windows-latest
             friendlyName: Windows
@@ -44,7 +44,7 @@ jobs:
                              dbus-x11 \
                              python-gnomekeyring \
                              python3
-      if: ${{ matrix.os == 'ubuntu-16.04' }}
+      if: ${{ matrix.os == 'ubuntu-18.04' }}
       name: Install additional dependencies
 
     - name: Setup environment
@@ -62,11 +62,11 @@ jobs:
         echo "Create a test key using script..."
         python -c "import gnomekeyring;gnomekeyring.create_sync('login', '');"
         npm test
-      if: ${{ matrix.os == 'ubuntu-16.04' }}
+      if: ${{ matrix.os == 'ubuntu-18.04' }}
       name: Run tests (Linux)
 
     - run: npm test
-      if: ${{ matrix.os != 'ubuntu-16.04' }}
+      if: ${{ matrix.os != 'ubuntu-18.04' }}
       name: Run tests (Windows/macOS)
 
     - run: |
@@ -86,7 +86,7 @@ jobs:
         docker run --rm -v ${PWD}:/project node-keytar/i386 /bin/bash -c "cd /project && npm run prebuild-electron-ia32 && rm -rf build"
         docker build -t node-keytar/arm64-cross-compile docker/arm64-cross-compile
         docker run --rm -v ${PWD}:/project node-keytar/arm64-cross-compile /bin/bash -c "cd /project && npm run prebuild-electron-arm64"
-      if: ${{ matrix.os == 'ubuntu-16.04' }}
+      if: ${{ matrix.os == 'ubuntu-18.04' }}
       name: Prebuild (Linux x86 + ARM64)
 
     - run: |

From 83c6b857b9abc3b01819d9d3f90f467b922e848b Mon Sep 17 00:00:00 2001
From: Brendan Forster <github@brendanforster.com>
Date: Mon, 5 Apr 2021 11:06:33 -0300
Subject: [PATCH 4/4] try and use the new keyring package

---
 .github/workflows/ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 753f1588..8ea6a48e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -42,7 +42,7 @@ jobs:
                              gnome-keyring \
                              libsecret-1-dev \
                              dbus-x11 \
-                             python-gnomekeyring \
+                             python3-keyring \
                              python3
       if: ${{ matrix.os == 'ubuntu-18.04' }}
       name: Install additional dependencies
@@ -60,7 +60,7 @@ jobs:
         eval $(echo -n "" | /usr/bin/gnome-keyring-daemon --login)
         eval $(/usr/bin/gnome-keyring-daemon --components=secrets --start)
         echo "Create a test key using script..."
-        python -c "import gnomekeyring;gnomekeyring.create_sync('login', '');"
+        python -c "import keyring;keyring.set_password('login', '');"
         npm test
       if: ${{ matrix.os == 'ubuntu-18.04' }}
       name: Run tests (Linux)