From 940c0f072ccac86b88d55a7982ae021c54433926 Mon Sep 17 00:00:00 2001 From: "Tobias Wellnitz, DH1TW" Date: Sun, 2 Mar 2025 00:07:00 +0100 Subject: [PATCH] added support for python 3.13 --- .github/workflows/test.yml | 96 +++++++++++++++---------------- docs/source/changelog.rst | 7 +++ pyhamtools/version.py | 2 +- setup.py | 2 +- test/test_callinfo.py | 22 +++---- test/test_lookuplib_clublogxml.py | 10 ++-- 6 files changed, 73 insertions(+), 66 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bfa2430..de1a9fe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,52 +3,52 @@ name: Linux on: [push, pull_request] jobs: + test_linux_legacy: + # Ubuntu 20.04 is still required for python 3.6; this doesn't work on Ubuntu 22.04 anymore + runs-on: "ubuntu-20.04" + name: "Ubuntu 20.04 - Python ${{ matrix.python-version }}" + strategy: + matrix: + python-version: ["3.6"] + redis-version: [6] + + steps: + - uses: "actions/checkout@v3" + - uses: "actions/setup-python@v4" + with: + python-version: "${{ matrix.python-version }}" + cache: "pip" + cache-dependency-path: | + **/setup.py + **/requirements*.txt + + - name: "Install dependencies" + run: | + set -xe + sudo apt-get install -y libxml2-dev libxslt-dev + python -VV + python -m pip install --upgrade pip setuptools + python -m pip install -e . + python -m pip install -r requirements-pytest.txt + + - name: Start Redis + uses: supercharge/redis-github-action@1.2.0 + with: + redis-version: ${{ matrix.redis-version }} + + - name: "Run tests for ${{ matrix.python-version }}" + env: + CLUBLOG_APIKEY: ${{ secrets.CLUBLOG_APIKEY }} + QRZ_USERNAME: ${{ secrets.QRZ_USERNAME }} + QRZ_PWD: ${{ secrets.QRZ_PWD }} + PYTHON_VERSION: ${{ matrix.python-version }} + # delay the execution randomly by a couple of seconds to reduce the amount + # of concurrent API calls on Clublog and QRZ.com when all CI jobs execute simultaneously + run: | + sleep $[ ( $RANDOM % 10 ) + 1 ]s + pytest ./test + test_linux: - # Ubuntu 20.04 is still required for python 3.6; this doesn't work on Ubuntu 22.04 anymore - runs-on: "ubuntu-20.04" - name: "Ubuntu 20.04 - Python ${{ matrix.python-version }}" - strategy: - matrix: - python-version: ["3.6"] - redis-version: [6] - - steps: - - uses: "actions/checkout@v3" - - uses: "actions/setup-python@v4" - with: - python-version: "${{ matrix.python-version }}" - cache: "pip" - cache-dependency-path: | - **/setup.py - **/requirements*.txt - - - name: "Install dependencies" - run: | - set -xe - sudo apt-get install -y libxml2-dev libxslt-dev - python -VV - python -m pip install --upgrade pip setuptools - python -m pip install -e . - python -m pip install -r requirements-pytest.txt - - - name: Start Redis - uses: supercharge/redis-github-action@1.2.0 - with: - redis-version: ${{ matrix.redis-version }} - - - name: "Run tests for ${{ matrix.python-version }}" - env: - CLUBLOG_APIKEY: ${{ secrets.CLUBLOG_APIKEY }} - QRZ_USERNAME: ${{ secrets.QRZ_USERNAME }} - QRZ_PWD: ${{ secrets.QRZ_PWD }} - PYTHON_VERSION: ${{ matrix.python-version }} - # delay the execution randomly by a couple of seconds to reduce the amount - # of concurrent API calls on Clublog and QRZ.com when all CI jobs execute simultaneously - run: | - sleep $[ ( $RANDOM % 10 ) + 1 ]s - pytest ./test - - test_linux_ubuntu_22: runs-on: "ubuntu-22.04" name: "Ubuntu 22.04 - Python ${{ matrix.python-version }}" env: @@ -56,7 +56,7 @@ jobs: strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.7", "pypy3.8", "pypy3.9", "pypy3.10"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.8", "pypy3.9", "pypy3.10"] redis-version: [6] steps: @@ -121,7 +121,7 @@ jobs: name: "MacOS 12 - Python ${{ matrix.python-version }}" strategy: matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8", "pypy3.9", "pypy3.10"] + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.8", "pypy3.9", "pypy3.10"] redis-version: [6] steps: @@ -165,7 +165,7 @@ jobs: strategy: matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: "actions/checkout@v3" diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index fb93872..25a83c5 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -1,6 +1,13 @@ Changelog --------- +PyHamtools 0.11.0 +================ + +02. March 2025 + +* added support for Python 3.13 + PyHamtools 0.10.0 ================ diff --git a/pyhamtools/version.py b/pyhamtools/version.py index 8aeb2b4..b3e6bed 100644 --- a/pyhamtools/version.py +++ b/pyhamtools/version.py @@ -1,3 +1,3 @@ -VERSION = (0, 10, 0) +VERSION = (0, 11, 0) __release__ = ''.join(['-.'[type(x) == int]+str(x) for x in VERSION])[1:] __version__ = '.'.join((str(VERSION[0]), str(VERSION[1]))) diff --git a/setup.py b/setup.py index 68ade0f..b12e880 100755 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ setup(name='pyhamtools', "requests>=2.21.0", "ephem>=4.1.3", "beautifulsoup4>=4.7.1", - "lxml>=4.8.0,<5.0.0", + "lxml>=5.0.0", "redis>=2.10.6", ], **kw diff --git a/test/test_callinfo.py b/test/test_callinfo.py index 2d20541..3c7c672 100644 --- a/test/test_callinfo.py +++ b/test/test_callinfo.py @@ -90,12 +90,12 @@ response_prefix_VK9DWX_clublog = { } response_prefix_VK9DLX_clublog = { - u'adif': 147, + u'adif': 189, u'continent': u'OC', - u'country': u'LORD HOWE ISLAND', - u'cqz': 30, - u'latitude': -31.6, - u'longitude': 159.1 + u'country': u'NORFOLK ISLAND', + u'cqz': 32, + u'latitude': -29.0, + u'longitude': 168.0 } response_prefix_TA7I_clublog = { @@ -126,13 +126,13 @@ response_prefix_V26K_clublog = { } response_prefix_VK9DLX_countryfile = { - u'adif': 147, + u'adif': 189, u'continent': u'OC', - u'country': u'Lord Howe Island', - u'cqz': 30, + u'country': u'Norfolk Island', + u'cqz': 32, u'ituz': 60, - u'latitude': -31.55, - u'longitude': 159.08 + u'latitude': -29.03, + u'longitude': 167.93 } response_prefix_VK9GMW_clublog = { @@ -195,7 +195,7 @@ response_Exception_VK9XO_with_start_date = { 'country': 'CHRISTMAS ISLAND', 'continent': 'OC', 'latitude': -10.48, - 'longitude': 105.71, + 'longitude': 105.62, 'cqz': 29 } diff --git a/test/test_lookuplib_clublogxml.py b/test/test_lookuplib_clublogxml.py index 5241729..3e32afb 100644 --- a/test/test_lookuplib_clublogxml.py +++ b/test/test_lookuplib_clublogxml.py @@ -25,8 +25,8 @@ response_Exception_KC6MM_1990 = { 'adif': 22, 'country': u'PALAU', 'continent': u'OC', - 'latitude': 9.50, - 'longitude': 138.20, + 'latitude': 9.52, + 'longitude': 138.21, 'cqz': 27, } @@ -34,8 +34,8 @@ response_Exception_KC6MM_1992 = { 'adif': 22, 'country': u'PALAU', 'continent': u'OC', - 'latitude': 9.50, - 'longitude': 138.20, + 'latitude': 9.52, + 'longitude': 138.21, 'cqz': 27, } @@ -53,7 +53,7 @@ response_Exception_VK9XO_with_start_date = { 'country': u'CHRISTMAS ISLAND', 'continent': u'OC', 'latitude': -10.48, - 'longitude': 105.71, + 'longitude': 105.62, 'cqz': 29, }