diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index b583178..d95e3ac 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -6,12 +6,10 @@ jobs: strategy: matrix: python-version: - - '3.7' - '3.8' - '3.9' - '3.10' - '3.11' - - 'pypy-3.7' - 'pypy-3.8' - 'pypy-3.9' allow-failure: @@ -37,7 +35,7 @@ jobs: sudo apt-get update sudo apt-get install yices2 pip install coverage codecov - pip install yowasp-yosys==0.20.* # last version compatible with Python 3.7 + pip install yowasp-yosys pip install -e .[builtin-yosys] pip install -r docs/requirements.txt - name: Preserve Wasm cache diff --git a/amaranth/__init__.py b/amaranth/__init__.py index 7f99c4a..1d57367 100644 --- a/amaranth/__init__.py +++ b/amaranth/__init__.py @@ -1,9 +1,7 @@ try: - try: - from importlib import metadata as importlib_metadata # py3.8+ stdlib - except ImportError: - import importlib_metadata # py3.7- shim + from importlib import metadata as importlib_metadata __version__ = importlib_metadata.version(__package__) + del importlib_metadata except ImportError: # No importlib_metadata. This shouldn't normally happen, but some people prefer not installing # packages via pip at all, instead using PYTHONPATH directly or copying the package files into diff --git a/amaranth/_toolchain/yosys.py b/amaranth/_toolchain/yosys.py index 9934354..eacac92 100644 --- a/amaranth/_toolchain/yosys.py +++ b/amaranth/_toolchain/yosys.py @@ -4,13 +4,7 @@ import re import subprocess import warnings import pathlib -try: - from importlib import metadata as importlib_metadata # py3.8+ stdlib -except ImportError: - try: - import importlib_metadata # py3.7- shim - except ImportError: - importlib_metadata = None # not installed +from importlib import metadata as importlib_metadata try: from importlib import resources as importlib_resources try: diff --git a/docs/changes.rst b/docs/changes.rst index 8618407..f27ec26 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -13,7 +13,7 @@ The language includes several new extension points for integration with :class:` Several issues with shape inference have been resolved. Notably, ``a - b`` where both ``a`` and ``b`` are unsigned now returns a signed value. -Support for Python 3.6 has been removed, and support for Python 3.11 and 3.12 has been added. +Support for Python 3.6 and 3.7 has been removed, and support for Python 3.11 and 3.12 has been added. Features deprecated in version 0.3 have been removed. In particular, the ``nmigen.*`` namespace is not provided, ``# nmigen:`` annotations are not recognized, and ``NMIGEN_*`` envronment variables are not used. diff --git a/docs/install.rst b/docs/install.rst index 5de6231..26ad58f 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -6,7 +6,7 @@ System requirements .. |yosys-version| replace:: 0.10 (or newer) -Amaranth HDL requires Python 3.7; it works on CPython_ 3.7 (or newer), and works faster on PyPy3.7_ 7.3.3 (or newer). Installation requires pip_ 23.0 (or newer). +Amaranth HDL requires Python 3.8; it works on CPython_ 3.8 (or newer), and works faster on PyPy3.8_ 7.3.7 (or newer). Installation requires pip_ 23.0 (or newer). For most workflows, Amaranth requires Yosys_ |yosys-version|. A compatible version of Yosys is distributed via PyPI_ for most popular platforms. @@ -17,7 +17,7 @@ Synthesizing, placing and routing an Amaranth design for an FPGA requires the FP .. TODO: Link to FPGA family docs here .. _CPython: https://www.python.org/ -.. _PyPy3.7: https://www.pypy.org/ +.. _PyPy3.8: https://www.pypy.org/ .. _pip: https://pip.pypa.io/ .. _Yosys: https://yosyshq.net/yosys/ .. _PyPI: https://pypi.org/ diff --git a/pyproject.toml b/pyproject.toml index de6a7f3..5ee95c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,9 +10,8 @@ description = "Amaranth hardware definition language" authors = [{name = "Amaranth HDL contributors"}] license = {file = "LICENSE.txt"} -requires-python = "~=3.7" +requires-python = "~=3.8" dependencies = [ - "importlib_metadata; python_version<'3.8'", # for __version__ and amaranth._toolchain.yosys "importlib_resources; python_version<'3.9'", # for amaranth._toolchain.yosys "pyvcd>=0.2.2,<0.5", # for amaranth.sim.pysim "Jinja2~=3.0", # for amaranth.build diff --git a/tests/utils.py b/tests/utils.py index 8a5aa77..1f01eb4 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -56,6 +56,7 @@ class FHDLTestCase(unittest.TestCase): mode {mode} depth {depth} wait on + multiclock on [engines] smtbmc