kopia lustrzana https://github.com/jupyterhub/repo2docker
Merge pull request #1384 from yuvipanda/no-warnings
Use self.log.warning instead of warnings.warnpull/1399/head
commit
dd097a229a
|
@ -16,7 +16,6 @@ import shutil
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
import warnings
|
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
import entrypoints
|
import entrypoints
|
||||||
|
@ -267,7 +266,7 @@ class Repo2Docker(Application):
|
||||||
"""
|
"""
|
||||||
p = get_platform()
|
p = get_platform()
|
||||||
if p == "linux/arm64":
|
if p == "linux/arm64":
|
||||||
warnings.warn(
|
self.log.warning(
|
||||||
"Building for linux/arm64 is experimental. "
|
"Building for linux/arm64 is experimental. "
|
||||||
"To use the recommended platform set --Repo2Docker.platform=linux/amd64. "
|
"To use the recommended platform set --Repo2Docker.platform=linux/amd64. "
|
||||||
"To silence this warning set --Repo2Docker.platform=linux/arm64."
|
"To silence this warning set --Repo2Docker.platform=linux/arm64."
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import warnings
|
|
||||||
from collections.abc import Mapping
|
from collections.abc import Mapping
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
|
|
||||||
|
@ -355,7 +354,7 @@ class CondaBuildPack(BaseImage):
|
||||||
@property
|
@property
|
||||||
def py2(self):
|
def py2(self):
|
||||||
"""Am I building a Python 2 kernel environment?"""
|
"""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.",
|
"CondaBuildPack.py2 is deprecated in 2023.2. Use CondaBuildPack.separate_kernel_env.",
|
||||||
DeprecationWarning,
|
DeprecationWarning,
|
||||||
stacklevel=2,
|
stacklevel=2,
|
||||||
|
|
Ładowanie…
Reference in New Issue