diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index ffd0eecb17..078b8c39a6 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -286,7 +286,7 @@ jobs: if: github.event_name == 'schedule' uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Build pytket run: | cd pytket @@ -399,7 +399,7 @@ jobs: if: github.event_name == 'schedule' uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Build pytket run: | cd pytket @@ -527,7 +527,7 @@ jobs: if: github.event_name == 'schedule' uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Build pytket run: | cd pytket diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 97f5e75712..09f98e6e2e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-24.04 strategy: matrix: - python3-version: ['10', '11', '12'] + python3-version: ['10', '11', '12', '13'] steps: - uses: actions/checkout@v4 with: @@ -41,7 +41,7 @@ jobs: runs-on: 'buildjet-8vcpu-ubuntu-2204-arm' strategy: matrix: - python3-version: ['10', '11', '12'] + python3-version: ['10', '11', '12', '13'] steps: - uses: actions/checkout@v4 with: @@ -67,7 +67,7 @@ jobs: runs-on: macos-13 strategy: matrix: - python-version: ['3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 with: @@ -111,7 +111,7 @@ jobs: MACOSX_DEPLOYMENT_TARGET: '12.0' strategy: matrix: - python-version: ['3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 with: @@ -153,7 +153,7 @@ jobs: runs-on: windows-2022 strategy: matrix: - python-version: ['3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 with: @@ -194,7 +194,7 @@ jobs: runs-on: ubuntu-24.04 strategy: matrix: - python3-version: ['10', '11', '12'] + python3-version: ['10', '11', '12', '13'] steps: - name: Set up Python 3.${{ matrix.python3-version }} uses: actions/setup-python@v5 @@ -223,18 +223,13 @@ jobs: runs-on: 'buildjet-4vcpu-ubuntu-2204-arm' strategy: matrix: - python3-version: ['10', '11', '12'] + python3-version: ['10', '11', '12', '13'] steps: - uses: actions/checkout@v4 with: path: tket - name: Set up Python 3.${{ matrix.python3-version }} - # Use deadsnakes/action because Python for Linux/ARM is not available with - # actions/setup-python. - # Python 3.10 is the default python on Ubuntu 22.04, so this combination - # is not available from deadsnakes: use the default python in this case. - if: matrix.python3-version != '10' - uses: deadsnakes/action@v3.2.0 + uses: actions/setup-python@v5 with: python-version: "3.${{ matrix.python3-version }}" - name: Download wheel @@ -260,7 +255,7 @@ jobs: strategy: matrix: os: ['macos-13'] - python-version: ['3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13'] runs-on: ${{ matrix.os }} steps: - name: Set up Python ${{ matrix.python-version }} @@ -290,7 +285,7 @@ jobs: strategy: matrix: os: ['macos-14', 'macos-15'] - python-version: ['3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13'] runs-on: ${{ matrix.os }} steps: - name: Set up Python ${{ matrix.python-version }} @@ -320,7 +315,7 @@ jobs: runs-on: windows-2022 strategy: matrix: - python-version: ['3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13'] steps: - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 diff --git a/README.md b/README.md index ef9ab37e1a..da3d39cb72 100644 --- a/README.md +++ b/README.md @@ -72,9 +72,9 @@ depend on the features they support. The compiler version can be controlled by setting `CC` and `CXX` in your environment (e.g. `CC=gcc-11` and `CXX=g++-11`), or on Debian-based Linux systems using `update-alternatives`. -You should also have Python (3.10, 3.11 or 3.12) and `pip` installed. We use -`cmake` and the package manager `conan` to build tket and pytket. The latter can -be installed with `pip`: +You should also have Python (3.10, 3.11, 3.12 or 3.13) and `pip` installed. We +use `cmake` and the package manager `conan` to build tket and pytket. The latter +can be installed with `pip`: ```shell pip install conan diff --git a/pytket/docs/changelog.rst b/pytket/docs/changelog.rst index a49a78806f..66e1482c38 100644 --- a/pytket/docs/changelog.rst +++ b/pytket/docs/changelog.rst @@ -1,6 +1,11 @@ Changelog ========= +1.33.2 (Unreleased) +------------------- + +* Support Python 3.13. + 1.33.1 (October 2024) --------------------- diff --git a/pytket/docs/getting_started.rst b/pytket/docs/getting_started.rst index e123a904a6..76a4236a14 100644 --- a/pytket/docs/getting_started.rst +++ b/pytket/docs/getting_started.rst @@ -7,8 +7,8 @@ NISQ (noisy intermediate-scale quantum) devices. The pytket package provides an API for interacting with tket and transpiling to and from other popular quantum circuit specifications. -Pytket is compatible with 64-bit Python 3.10, 3.11 and 3.12, on Linux, MacOS -(12.0 or later) and Windows. Install pytket from PyPI using: +Pytket is compatible with 64-bit Python 3.10, 3.11, 3.12 and 3.13, on Linux, +MacOS (12.0 or later) and Windows. Install pytket from PyPI using: :: diff --git a/pytket/docs/index.rst b/pytket/docs/index.rst index f8c40521d3..a11f899abc 100644 --- a/pytket/docs/index.rst +++ b/pytket/docs/index.rst @@ -5,8 +5,8 @@ pytket `numerous providers `_, allowing the tket tools to be used in conjunction with projects on their platforms. -``pytket`` is available for Python 3.10, 3.11 and 3.12, on Linux, MacOS and -Windows. To install, run +``pytket`` is available for Python 3.10, 3.11, 3.12 and 3.13, on Linux, MacOS +and Windows. To install, run :: diff --git a/pytket/docs/install.rst b/pytket/docs/install.rst index c5014b81c1..1fb014fb1a 100644 --- a/pytket/docs/install.rst +++ b/pytket/docs/install.rst @@ -36,7 +36,7 @@ Installation FAQs Is there a build of ``pytket`` for my system? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The core pytket package, as well as the separate extension modules are available on PyPI. Wheels are built to work on Linux, MacOS and Windows with Python versions 3.10, 3.11, or 3.12, and ``pip`` version 20.0.0+. +The core pytket package, as well as the separate extension modules are available on PyPI. Wheels are built to work on Linux, MacOS and Windows with Python versions 3.10, 3.11, 3.12 or 3.13, and ``pip`` version 20.0.0+. .. note:: On M1-based Macs running in native (arm64) mode, this command may fail diff --git a/pytket/package.md b/pytket/package.md index 3c01575718..2aca55d829 100644 --- a/pytket/package.md +++ b/pytket/package.md @@ -4,7 +4,7 @@ The source code for the TKET compiler can be found in [this github repository](h ## Installation -Installation is supported for Linux, MacOS and Windows. Installation requires python 3.10, 3.11 or 3.12. +Installation is supported for Linux, MacOS and Windows. Installation requires python 3.10, 3.11, 3.12 or 3.13. To install run the pip command: diff --git a/pytket/pytket/utils/distribution.py b/pytket/pytket/utils/distribution.py index 2deba9d9cc..9985f6c80d 100644 --- a/pytket/pytket/utils/distribution.py +++ b/pytket/pytket/utils/distribution.py @@ -64,7 +64,7 @@ def as_counter(self) -> Counter[T0]: @property def total(self) -> int: """Return the total number of observations.""" - return sum(self._C.values()) # Counter.total() new in 3.10 + return self._C.total() @property def support(self) -> Set[T0]: diff --git a/pytket/setup.py b/pytket/setup.py index bf365ece59..14f2000f02 100755 --- a/pytket/setup.py +++ b/pytket/setup.py @@ -219,6 +219,7 @@ def finalize_options(self): "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX :: Linux",