Merge pull request #1384 from yuvipanda/no-warnings

Use self.log.warning instead of warnings.warn
pull/1399/head
Simon Li 2025-01-03 17:07:29 +00:00 zatwierdzone przez GitHub
commit dd097a229a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 2 dodań i 4 usunięć

Wyświetl plik

@ -16,7 +16,6 @@ import shutil
import sys
import tempfile
import time
import warnings
from urllib.parse import urlparse
import entrypoints
@ -267,7 +266,7 @@ class Repo2Docker(Application):
"""
p = get_platform()
if p == "linux/arm64":
warnings.warn(
self.log.warning(
"Building for linux/arm64 is experimental. "
"To use the recommended platform set --Repo2Docker.platform=linux/amd64. "
"To silence this warning set --Repo2Docker.platform=linux/arm64."

Wyświetl plik

@ -2,7 +2,6 @@
import os
import re
import warnings
from collections.abc import Mapping
from functools import lru_cache
@ -355,7 +354,7 @@ class CondaBuildPack(BaseImage):
@property
def py2(self):
"""Am I building a Python 2 kernel environment?"""
warnings.warn(
self.log.warning(
"CondaBuildPack.py2 is deprecated in 2023.2. Use CondaBuildPack.separate_kernel_env.",
DeprecationWarning,
stacklevel=2,