Skip to content
Merged
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 src/judge0/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@

JUDGE0_IMPLICIT_CE_CLIENT = None
JUDGE0_IMPLICIT_EXTRA_CE_CLIENT = None
SUPPRESS_PREVIEW_WARNING = os.getenv("JUDGE0_SUPPRESS_PREVIEW_WARNING")

logger = logging.getLogger(__name__)
suppress_preview_warning = os.getenv("JUDGE0_SUPPRESS_PREVIEW_WARNING") is not None


def _get_implicit_client(flavor: Flavor) -> Client:
Expand Down Expand Up @@ -107,7 +107,7 @@ def _get_implicit_client(flavor: Flavor) -> Client:


def _get_preview_client(flavor: Flavor) -> Union[Judge0CloudCE, Judge0CloudExtraCE]:
if SUPPRESS_PREVIEW_WARNING is not None:
if not suppress_preview_warning:
logger.warning(
"You are using a preview version of the client which is not recommended"
" for production.\n"
Expand Down