From 0d480abde5ae7b8e6d0e6c470bade538fc766c8a Mon Sep 17 00:00:00 2001 From: Dave Keeshan Date: Fri, 25 Nov 2022 09:36:52 +0000 Subject: [PATCH 01/17] Add python 3.10 --- .github/workflows/regression-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml index 600a752..85e9243 100644 --- a/.github/workflows/regression-tests.yml +++ b/.github/workflows/regression-tests.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.6, 3.7, 3.8, 3.9, 3.10] steps: - uses: actions/checkout@v1 From fd1fdc81546ae4e28cfb4dbb31f76252d3304e8c Mon Sep 17 00:00:00 2001 From: Dave Keeshan Date: Fri, 25 Nov 2022 09:37:47 +0000 Subject: [PATCH 02/17] Add python 3.10 --- .github/workflows/regression-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml index 85e9243..7b594eb 100644 --- a/.github/workflows/regression-tests.yml +++ b/.github/workflows/regression-tests.yml @@ -11,7 +11,7 @@ jobs: matrix: python-version: [3.6, 3.7, 3.8, 3.9, 3.10] - steps: + steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} From 9f4e0399b5a979af921fe78fb858c25d8175b2ee Mon Sep 17 00:00:00 2001 From: Dave Keeshan Date: Fri, 25 Nov 2022 09:40:33 +0000 Subject: [PATCH 03/17] Update Actions versions --- .github/workflows/regression-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml index 7b594eb..fb04d3c 100644 --- a/.github/workflows/regression-tests.yml +++ b/.github/workflows/regression-tests.yml @@ -11,11 +11,11 @@ jobs: matrix: python-version: [3.6, 3.7, 3.8, 3.9, 3.10] - steps: - - uses: actions/checkout@v1 + 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 9d80c957dc63d9c15b0a86132a877fac2388810e Mon Sep 17 00:00:00 2001 From: Dave Keeshan Date: Fri, 25 Nov 2022 09:41:49 +0000 Subject: [PATCH 04/17] 3.10 needs to be surrounded by quotes --- .github/workflows/regression-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml index fb04d3c..3d17ecc 100644 --- a/.github/workflows/regression-tests.yml +++ b/.github/workflows/regression-tests.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9, 3.10] + python-version: [3.6, 3.7, 3.8, 3.9, "3.10"] steps: - uses: actions/checkout@v3 From e713d624b9389274d3a32801bacc5031d2ecd7ec Mon Sep 17 00:00:00 2001 From: Dave Keeshan Date: Fri, 25 Nov 2022 09:55:04 +0000 Subject: [PATCH 05/17] Add 3.11 and add to config for tox --- .github/workflows/regression-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml index 3d17ecc..6e67451 100644 --- a/.github/workflows/regression-tests.yml +++ b/.github/workflows/regression-tests.yml @@ -8,8 +8,9 @@ jobs: runs-on: ubuntu-20.04 strategy: + fail-fast: false # So that one fail doesn't stop remaining tests matrix: - python-version: [3.6, 3.7, 3.8, 3.9, "3.10"] + python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11"] steps: - uses: actions/checkout@v3 From 171c78ea2fce25471a970f7d565eb9b49d5eea49 Mon Sep 17 00:00:00 2001 From: Dave Keeshan Date: Fri, 25 Nov 2022 09:55:13 +0000 Subject: [PATCH 06/17] Add 3.11 and add to config for tox --- setup.cfg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 5d067e4..dd86289 100644 --- a/setup.cfg +++ b/setup.cfg @@ -46,7 +46,7 @@ addopts = # tox configuration [tox:tox] -envlist = py36, py37, py38, py39 +envlist = py36, py37, py38, py39, py310 [gh-actions] python = @@ -54,6 +54,8 @@ python = 3.7: py37 3.8: py38 3.9: py39 + 3.10: py310 + 3.11: py311 [testenv] setenv = @@ -82,4 +84,4 @@ source = # do not report dependencies [coverage:report] omit = - .tox/* \ No newline at end of file + .tox/* From 54887a90ef9cd6dc3475dd29536b773b3a496792 Mon Sep 17 00:00:00 2001 From: Dave Keeshan Date: Fri, 25 Nov 2022 10:04:18 +0000 Subject: [PATCH 07/17] Remove python 3.6, it no longers works with the current version of cocotb. Remove 3.11, tox-gh-actions not out of beta yet --- .github/workflows/regression-tests.yml | 2 +- setup.cfg | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml index 6e67451..da8c0cc 100644 --- a/.github/workflows/regression-tests.yml +++ b/.github/workflows/regression-tests.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false # So that one fail doesn't stop remaining tests matrix: - python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11"] + python-version: [3.7, 3.8, 3.9, "3.10"] steps: - uses: actions/checkout@v3 diff --git a/setup.cfg b/setup.cfg index dd86289..425cbd2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,7 +25,7 @@ classifiers = [options] packages = find_namespace: -python_requires = >=3.6 +python_requires = >=3.7 install_requires = cocotb @@ -46,16 +46,14 @@ addopts = # tox configuration [tox:tox] -envlist = py36, py37, py38, py39, py310 +envlist = py37, py38, py39, py310 [gh-actions] python = - 3.6: py36 3.7: py37 3.8: py38 3.9: py39 3.10: py310 - 3.11: py311 [testenv] setenv = From 4e37638930d55e72230072664894ee1657096021 Mon Sep 17 00:00:00 2001 From: Dave Keeshan Date: Fri, 25 Nov 2022 10:07:58 +0000 Subject: [PATCH 08/17] Change exmaple code: send -> write ; recv -> read --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c21d08f..9cd81b9 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,13 @@ To use these modules, import the one you need and connect it to the DUT: To send data into a design with a `UartSource`, call `write()` or `write_nowait()`. Accepted data types are iterables of ints, including lists, bytes, bytearrays, etc. Optionally, call `wait()` to wait for the transmit operation to complete. Example: - await uart_source.send(b'test data') + await uart_source.write(b'test data') # wait for operation to complete (optional) await uart_source.wait() To receive data with a `UartSink`, call `read()` or `read_nowait()`. Optionally call `wait()` to wait for new receive data. `read()` will block until at least 1 data byte is available. Both `read()` and `read_nowait()` will return up to _count_ bytes from the receive queue, or the entire contents of the receive queue if not specified. - data = await uart_sink.recv() + data = await uart_sink.read() #### Constructor parameters: From c3583b9b0112ba79e95ee2b9d8bb36a86f7f8a68 Mon Sep 17 00:00:00 2001 From: Dave Keeshan Date: Fri, 25 Nov 2022 10:10:48 +0000 Subject: [PATCH 09/17] Change cocotb.fork (which is being deprecated) to cocotb.start_soon: \n\tDeprecationWarning: cocotb.fork has been deprecated in favor of cocotb.start_soon and cocotb.start. --- cocotbext/uart/uart.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocotbext/uart/uart.py b/cocotbext/uart/uart.py index c64e603..d6dd0f5 100644 --- a/cocotbext/uart/uart.py +++ b/cocotbext/uart/uart.py @@ -65,7 +65,7 @@ def __init__(self, data, baud=9600, bits=8, stop_bits=1, *args, **kwargs): def _restart(self): if self._run_cr is not None: self._run_cr.kill() - self._run_cr = cocotb.fork(self._run(self._data, self._baud, self._bits, self._stop_bits)) + self._run_cr = cocotb.start_soon(self._run(self._data, self._baud, self._bits, self._stop_bits)) @property def baud(self): @@ -182,7 +182,7 @@ def __init__(self, data, baud=9600, bits=8, stop_bits=1, *args, **kwargs): def _restart(self): if self._run_cr is not None: self._run_cr.kill() - self._run_cr = cocotb.fork(self._run(self._data, self._baud, self._bits, self._stop_bits)) + self._run_cr = cocotb.start_soon(self._run(self._data, self._baud, self._bits, self._stop_bits)) @property def baud(self): From 252251eabd7a0815d2fecce19b947fcb6845edbe Mon Sep 17 00:00:00 2001 From: Dave Keeshan Date: Fri, 25 Nov 2022 10:56:56 +0000 Subject: [PATCH 10/17] Remove fail-fast option --- .github/workflows/regression-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml index da8c0cc..3a732ca 100644 --- a/.github/workflows/regression-tests.yml +++ b/.github/workflows/regression-tests.yml @@ -8,7 +8,6 @@ jobs: runs-on: ubuntu-20.04 strategy: - fail-fast: false # So that one fail doesn't stop remaining tests matrix: python-version: [3.7, 3.8, 3.9, "3.10"] From bf57837e8faf7af1b504c5e441e8dcdf1d3c41d4 Mon Sep 17 00:00:00 2001 From: Dave Keeshan Date: Sun, 8 Dec 2024 00:02:00 +0000 Subject: [PATCH 11/17] Update github actions revs, checkout@v4, setup-python@v5 --- .github/workflows/regression-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml index 3a732ca..55bfa73 100644 --- a/.github/workflows/regression-tests.yml +++ b/.github/workflows/regression-tests.yml @@ -12,10 +12,10 @@ jobs: python-version: [3.7, 3.8, 3.9, "3.10"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} From afc4324814f6eed58ec5f6e7ab564bf913442f23 Mon Sep 17 00:00:00 2001 From: Dave Keeshan Date: Sun, 8 Dec 2024 00:03:14 +0000 Subject: [PATCH 12/17] Move from ubuntu-20.04 to ubuntu-24.04 --- .github/workflows/regression-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml index 55bfa73..5120c94 100644 --- a/.github/workflows/regression-tests.yml +++ b/.github/workflows/regression-tests.yml @@ -5,7 +5,7 @@ on: [push, pull_request] jobs: build: name: Python ${{matrix.python-version}} - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: From 3e531458672f8b5d50c0469b1808b4d6c902ff8e Mon Sep 17 00:00:00 2001 From: Dave Keeshan Date: Sun, 8 Dec 2024 00:04:38 +0000 Subject: [PATCH 13/17] Add python 3.11, 3.12, 3.13 --- .github/workflows/regression-tests.yml | 2 +- setup.cfg | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml index 5120c94..3e43161 100644 --- a/.github/workflows/regression-tests.yml +++ b/.github/workflows/regression-tests.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: - python-version: [3.7, 3.8, 3.9, "3.10"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 diff --git a/setup.cfg b/setup.cfg index 425cbd2..d22f945 100644 --- a/setup.cfg +++ b/setup.cfg @@ -46,7 +46,7 @@ addopts = # tox configuration [tox:tox] -envlist = py37, py38, py39, py310 +envlist = py37, py38, py39, py310, py311, py312, py313 [gh-actions] python = @@ -54,6 +54,9 @@ python = 3.8: py38 3.9: py39 3.10: py310 + 3.11: py311 + 3.12: py312S + 3.13: py313 [testenv] setenv = From 1a4afdb65ea07dce7d3c86e377138d23f2a88c66 Mon Sep 17 00:00:00 2001 From: Dave Keeshan Date: Sun, 8 Dec 2024 00:05:47 +0000 Subject: [PATCH 14/17] Change tos setting from whitelist_externals to allowlist_externals --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index d22f945..eaaa467 100644 --- a/setup.cfg +++ b/setup.cfg @@ -73,7 +73,7 @@ commands = pytest --cov=cocotbext --cov=tests --cov-branch -n auto bash -c 'find . -type f -name "\.coverage" | xargs coverage combine --append' -whitelist_externals = +allowlist_externals = bash # combine if paths are different From 5700556c4cf0e7634169afdb4de32d24b5997a0e Mon Sep 17 00:00:00 2001 From: Dave Keeshan Date: Sun, 8 Dec 2024 00:07:32 +0000 Subject: [PATCH 15/17] Remove python 3.7, not available on ubuntu24.04 --- .github/workflows/regression-tests.yml | 2 +- setup.cfg | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml index 3e43161..a5ac86f 100644 --- a/.github/workflows/regression-tests.yml +++ b/.github/workflows/regression-tests.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 diff --git a/setup.cfg b/setup.cfg index eaaa467..9f32e37 100644 --- a/setup.cfg +++ b/setup.cfg @@ -46,11 +46,10 @@ addopts = # tox configuration [tox:tox] -envlist = py37, py38, py39, py310, py311, py312, py313 +envlist = py38, py39, py310, py311, py312, py313 [gh-actions] python = - 3.7: py37 3.8: py38 3.9: py39 3.10: py310 From 2fd8645cdd1fd2bb6b987ae31085728a872d7070 Mon Sep 17 00:00:00 2001 From: Dave Keeshan Date: Sun, 8 Dec 2024 00:11:47 +0000 Subject: [PATCH 16/17] change name from cocotbext-uart to cocotbext_uart, this is required for all future uploads to pypi, The is based on PEP-625, https://peps.python.org/pep-0625 --- setup.cfg | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index 9f32e37..0d069eb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ # package information [metadata] -name = cocotbext-uart +name = cocotbext_uart version = attr: cocotbext.uart.version.__version__ description = UART modules for cocotb keywords = uart, cocotb @@ -46,16 +46,14 @@ addopts = # tox configuration [tox:tox] -envlist = py38, py39, py310, py311, py312, py313 +envlist = py37, py38, py39, py310 [gh-actions] python = + 3.7: py37 3.8: py38 3.9: py39 3.10: py310 - 3.11: py311 - 3.12: py312S - 3.13: py313 [testenv] setenv = From f11eca69b188e76c10a76fddbd912e6c18376659 Mon Sep 17 00:00:00 2001 From: Dave Keeshan Date: Sun, 8 Dec 2024 00:12:13 +0000 Subject: [PATCH 17/17] change name from cocotbext-uart to cocotbext_uart, this is required for all future uploads to pypi, The is based on PEP-625, https://peps.python.org/pep-0625 --- setup.cfg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 0d069eb..051366a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -46,14 +46,16 @@ addopts = # tox configuration [tox:tox] -envlist = py37, py38, py39, py310 +envlist = py38, py39, py310, py311, py312, py313 [gh-actions] python = - 3.7: py37 3.8: py38 3.9: py39 3.10: py310 + 3.11: py311 + 3.12: py312S + 3.13: py313 [testenv] setenv =