Fail if run with Python below 3.10

This commit is contained in:
Wiktor Niesiobędzki 2023-07-19 11:49:56 +00:00 committed by Wiktor Niesiobędzki
parent 84eb5f0d72
commit 94daeab14b
1 changed files with 5 additions and 0 deletions

View File

@ -11,3 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sys
if sys.version_info.major < 3 or (sys.version_info.major == 3 and sys.version_info.minor < 10):
raise RuntimeError("Tests require at least version 3.10 of Python. Current version is: {}".format(sys.version))