From a959f7f49b8aed536ac8fb15e21e628012167a5c Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Wed, 21 Jun 2023 11:03:08 +0200 Subject: [PATCH 01/12] Complete version extension of Python 3.9 70af119 'Extend python versions testing run against. ' --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index f0cddd28..85e2d52f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27, py35, py36, py37, py38 +envlist = py27, py35, py36, py37, py38, py39 [testenv] install_command = From 811e5d36eabd891dd1bff6e34edae737b7dcf97b Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Tue, 13 Jun 2023 16:15:16 +0200 Subject: [PATCH 02/12] Extend Python versions testing runs against - 3.10: released on 2021-10-04 - 3.11: released on 2022-10-24 --- .github/workflows/python-package.yml | 2 +- setup.py | 2 ++ tox.ini | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index d3f9b1a8..ef019a9c 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9', 'pypy3'] + python-version: ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3'] steps: - uses: actions/checkout@v2 diff --git a/setup.py b/setup.py index ece4577a..503b0170 100755 --- a/setup.py +++ b/setup.py @@ -44,6 +44,8 @@ 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', ]) diff --git a/tox.ini b/tox.ini index 85e2d52f..cd0660d1 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27, py35, py36, py37, py38, py39 +envlist = py27, py35, py36, py37, py38, py39, py310, py311 [testenv] install_command = From d7d02ba77e3b2682c233b4bc27430545dfd314fc Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Wed, 21 Jun 2023 11:11:06 +0200 Subject: [PATCH 03/12] Drop support for Python 2.7 - sunsetted on 2020-01-01 --- .github/workflows/python-package.yml | 2 +- setup.py | 1 - tox.ini | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index ef019a9c..654c0657 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3'] + python-version: ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3'] steps: - uses: actions/checkout@v2 diff --git a/setup.py b/setup.py index 503b0170..96d600d2 100755 --- a/setup.py +++ b/setup.py @@ -38,7 +38,6 @@ 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', diff --git a/tox.ini b/tox.ini index cd0660d1..4a33d0b6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27, py35, py36, py37, py38, py39, py310, py311 +envlist = py35, py36, py37, py38, py39, py310, py311 [testenv] install_command = From 3aed1989a0f8c3d455d08f6b553a4870d14f9e66 Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Wed, 21 Jun 2023 17:07:50 +0200 Subject: [PATCH 04/12] Drop unsupported compat case for `ord` --- dpkt/compat.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dpkt/compat.py b/dpkt/compat.py index 836a1e29..5fe30d23 100644 --- a/dpkt/compat.py +++ b/dpkt/compat.py @@ -3,11 +3,8 @@ from struct import pack, unpack import sys -if sys.version_info < (3,): - compat_ord = ord -else: - def compat_ord(char): - return char +def compat_ord(char): + return char try: from itertools import izip From 84e9d751b05e1216b8f6426de65b45d2cfd9bed7 Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Wed, 21 Jun 2023 17:08:19 +0200 Subject: [PATCH 05/12] Drop unsupported compat case for `izip` --- dpkt/compat.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dpkt/compat.py b/dpkt/compat.py index 5fe30d23..289c6006 100644 --- a/dpkt/compat.py +++ b/dpkt/compat.py @@ -6,11 +6,7 @@ def compat_ord(char): return char -try: - from itertools import izip - compat_izip = izip -except ImportError: - compat_izip = zip +compat_izip = zip try: from cStringIO import StringIO From 70eadc2865203a66359bcfdb37ce6ba668c10f33 Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Wed, 21 Jun 2023 17:09:08 +0200 Subject: [PATCH 06/12] Drop unsupported compat case for `iteritems` and `intround` --- dpkt/compat.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/dpkt/compat.py b/dpkt/compat.py index 289c6006..07da3e5f 100644 --- a/dpkt/compat.py +++ b/dpkt/compat.py @@ -18,19 +18,11 @@ def compat_ord(char): except ImportError: from io import BytesIO -if sys.version_info < (3,): - def iteritems(d, **kw): - return d.iteritems(**kw) +def iteritems(d, **kw): + return iter(d.items(**kw)) - def intround(num): - return int(round(num)) - -else: - def iteritems(d, **kw): - return iter(d.items(**kw)) - - # python3 will return an int if you round to 0 decimal places - intround = round +# python3 will return an int if you round to 0 decimal places +intround = round def ntole(v): From 752962ce8f7b97511a8021c4c0de39e061f4adc6 Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Wed, 21 Jun 2023 17:49:05 +0200 Subject: [PATCH 07/12] Update python-package.yml to use ubuntu-latest again reverts the workaround from #652 and resolves #651 --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 654c0657..7ac64231 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: python-version: ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3'] From 09c00b4def5187393e8d81ffdfd5b4e55d6472a7 Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Wed, 21 Jun 2023 18:07:39 +0200 Subject: [PATCH 08/12] Drop support for Python 3.5 - sunsetted on 2020-09-30 --- .github/workflows/python-package.yml | 2 +- setup.py | 1 - tox.ini | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 7ac64231..333a9969 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3'] + python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3'] steps: - uses: actions/checkout@v2 diff --git a/setup.py b/setup.py index 96d600d2..9dda65f7 100755 --- a/setup.py +++ b/setup.py @@ -38,7 +38,6 @@ 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', diff --git a/tox.ini b/tox.ini index 4a33d0b6..fd12ecd4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py35, py36, py37, py38, py39, py310, py311 +envlist = py36, py37, py38, py39, py310, py311 [testenv] install_command = From 24e3544f064f37607d27b5905e2a8d40be31370a Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Wed, 21 Jun 2023 18:08:43 +0200 Subject: [PATCH 09/12] Drop support for Python 3.6 - sunsetted on 2021-12-23 --- .github/workflows/python-package.yml | 2 +- setup.py | 1 - tox.ini | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 333a9969..8163981d 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3'] steps: - uses: actions/checkout@v2 diff --git a/setup.py b/setup.py index 9dda65f7..a6eea4f8 100755 --- a/setup.py +++ b/setup.py @@ -38,7 +38,6 @@ 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', diff --git a/tox.ini b/tox.ini index fd12ecd4..c81bdca1 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py36, py37, py38, py39, py310, py311 +envlist = py37, py38, py39, py310, py311 [testenv] install_command = From f07cd016db80e72cbbb68fc0013a3f222cd382e6 Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Fri, 23 Jun 2023 11:29:49 +0200 Subject: [PATCH 10/12] Update GitHub action 'checkout' to v3 --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/python-package.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 8f8f3a8a..82329774 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -35,7 +35,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 8163981d..964134ef 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -17,7 +17,7 @@ jobs: python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: From 67f85b02b9386af0d1d89cee7e3245125ee4052b Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Fri, 23 Jun 2023 11:30:05 +0200 Subject: [PATCH 11/12] Update GitHub action 'setup-python' to v4 --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 964134ef..e56d65d5 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} From dd2ac9a4040215294e5e7d60b3713ac29ac301fb Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Fri, 23 Jun 2023 12:29:45 +0200 Subject: [PATCH 12/12] Update pypy reference to 3.7 (was 3.6 implicitely) --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index e56d65d5..3e86cb14 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3.7'] steps: - uses: actions/checkout@v3