From 74d3ac7d07d6ecdc8f888568c0b7fcdf59f1038c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20M=C3=BCller?= Date: Sun, 1 Jan 2023 16:06:43 +0100 Subject: [PATCH] Feature/python3 11 (#576) * updated requirements * use python3.11 in release actions * fixed np.complex deprecation --- .github/workflows/release_linux.yml | 4 ++-- .github/workflows/release_linux_modern.yml | 11 ++++++----- .github/workflows/release_macos.yml | 6 +++--- .github/workflows/release_win.yml | 6 +++--- NanoVNASaver/Windows/TDR.py | 2 +- requirements.txt | 2 +- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release_linux.yml b/.github/workflows/release_linux.yml index cc4f078..81f2304 100644 --- a/.github/workflows/release_linux.yml +++ b/.github/workflows/release_linux.yml @@ -23,9 +23,9 @@ jobs: run: | python3.9 -m venv build . build/bin/activate - python -m pip install pip==22.2.2 setuptools==65.3.0 + python -m pip install pip==22.3.1 setuptools==65.6.3 pip install -r requirements.txt - pip install PyInstaller==5.4.1 + pip install PyInstaller==5.7.0 - name: Build binary run: | . build/bin/activate diff --git a/.github/workflows/release_linux_modern.yml b/.github/workflows/release_linux_modern.yml index 483f8d8..5255262 100644 --- a/.github/workflows/release_linux_modern.yml +++ b/.github/workflows/release_linux_modern.yml @@ -15,17 +15,18 @@ jobs: uses: actions/checkout@v2 - name: Install python run: | + sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get update - sudo apt install -y python3.10 python3-pip python3.10-venv \ - python3.10-dev \ + sudo apt install -y python3.11 python3-pip python3.11-venv \ + python3.11-dev \ python3-pyqt5 - name: Install dependencies and pyinstall run: | - python3.10 -m venv build + python3.11 -m venv build . build/bin/activate - python -m pip install pip==22.2.2 setuptools==65.3.0 + python -m pip install pip==22.3.1 setuptools==65.6.3 pip install -r requirements.txt - pip install PyInstaller==5.4.1 + pip install PyInstaller==5.7.0 - name: Build binary run: | . build/bin/activate diff --git a/.github/workflows/release_macos.yml b/.github/workflows/release_macos.yml index 1118f9f..7ec1d24 100644 --- a/.github/workflows/release_macos.yml +++ b/.github/workflows/release_macos.yml @@ -15,12 +15,12 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: 3.11 - name: Install dependencies and pyinstall run: | - python -m pip install pip==22.2.2 setuptools==65.3.0 + python -m pip install pip==22.3.1 setuptools==65.6.3 pip install -r requirements.txt - pip install PyInstaller==5.4.1 + pip install PyInstaller==5.7.0 - name: Build binary run: | pyinstaller --onefile -n nanovna-saver nanovna-saver.py diff --git a/.github/workflows/release_win.yml b/.github/workflows/release_win.yml index c0e0356..4221c81 100644 --- a/.github/workflows/release_win.yml +++ b/.github/workflows/release_win.yml @@ -18,13 +18,13 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: 3.11 architecture: ${{ matrix.arch }} - name: Install dependencies and pyinstall run: | - python -m pip install pip==22.2.2 setuptools==65.3.0 + python -m pip install pip==22.3.1 setuptools==65.6.3 pip install -r requirements.txt - pip install PyInstaller==5.4.1 + pip install PyInstaller==5.7.0 - name: Build binary run: | pyinstaller --onefile -n nanovna-saver.exe nanovna-saver.py diff --git a/NanoVNASaver/Windows/TDR.py b/NanoVNASaver/Windows/TDR.py index 37bdfc6..1e9f22a 100644 --- a/NanoVNASaver/Windows/TDR.py +++ b/NanoVNASaver/Windows/TDR.py @@ -132,7 +132,7 @@ class TDRWindow(QtWidgets.QWidget): logger.info("Cannot compute cable length at 0 span") return - s11 = [np.complex(d.re, d.im) for d in self.app.data.s11] + s11 = [complex(d.re, d.im) for d in self.app.data.s11] window = np.blackman(len(self.app.data.s11)) windowed_s11 = window * s11 diff --git a/requirements.txt b/requirements.txt index 85a69b3..508a322 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ pyserial==3.5 PyQt5==5.15.7 -numpy==1.23.5 +numpy==1.24.1 scipy==1.9.3 Cython==0.29.32