Skip to content

drop Python 3.7 #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out OQpy
Expand All @@ -23,7 +23,7 @@ jobs:

- name: Install poetry
run: |
make install-poetry
make install-poetry poetry_version=1.5.1
poetry --version
poetry config virtualenvs.in-project true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out OQpy
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out OQpy
Expand All @@ -93,7 +93,7 @@ jobs:

- name: Install poetry
run: |
make install-poetry
make install-poetry poetry_version=1.5.1
poetry --version
poetry config virtualenvs.in-project true
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ check-citation:
.PHONY: install-poetry
install-poetry:
command -v curl >/dev/null 2>&1 || { echo >&2 "please install curl and retry."; exit 1; }
curl -sSL https://install.python-poetry.org | python -
curl -sSL https://install.python-poetry.org | POETRY_VERSION=$(poetry_version) python -
17 changes: 10 additions & 7 deletions oqpy/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,23 @@
from __future__ import annotations

import math
import sys
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, Any, Iterable, Optional, Sequence, Union
from typing import (
TYPE_CHECKING,
Any,
Iterable,
Optional,
Protocol,
Sequence,
Union,
runtime_checkable,
)

import numpy as np
from openpulse import ast

from oqpy import classical_types

if sys.version_info >= (3, 8):
from typing import Protocol, runtime_checkable
else:
from typing_extensions import Protocol, runtime_checkable

if TYPE_CHECKING:
from oqpy import Program

Expand Down
Loading