Skip to content

Commit

Permalink
docs: update the error messages for using unsupported Pythons
Browse files Browse the repository at this point in the history
  • Loading branch information
joanise committed Mar 26, 2024
1 parent cbfd608 commit c06516a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions g2p/deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@

import g2p._version

if sys.version_info < (3, 6): # pragma: no cover
if sys.version_info < (3, 7): # pragma: no cover
sys.exit(
f"Python 3.6 or more recent is required by g2p. You are using {sys.version}.\n"
"Python 3.7 or more recent is required by g2p.\n"
f"You are using Python {sys.version}.\n"
"Please use a newer version of Python."
)

Expand Down
9 changes: 9 additions & 0 deletions g2p/tests/test_studio.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,18 @@
gunicorn --worker-class eventlet -w 1 g2p.app:APP --no-sendfile --bind 0.0.0.0:5000 --daemon
"""

import sys
from datetime import datetime
from random import sample

if sys.version_info < (3, 8): # pragma: no cover
sys.exit(
"g2p/tests/test_studio.py relies on unittest.IsolatedAsyncioTestCase,\n"
"which is only available in Python 3.8 or later.\n"
f"You are using Python {sys.version}."
"Please use a newer version of Python."
)

# flake8: noqa: C901
from unittest import IsolatedAsyncioTestCase, main

Expand Down

0 comments on commit c06516a

Please sign in to comment.