Skip to content

Commit dd097a2

Browse files
authored
Merge pull request #1384 from yuvipanda/no-warnings
Use self.log.warning instead of warnings.warn
2 parents 487e0e5 + 9d5084a commit dd097a2

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

repo2docker/app.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import sys
1717
import tempfile
1818
import time
19-
import warnings
2019
from urllib.parse import urlparse
2120

2221
import entrypoints
@@ -267,7 +266,7 @@ def _platform_default(self):
267266
"""
268267
p = get_platform()
269268
if p == "linux/arm64":
270-
warnings.warn(
269+
self.log.warning(
271270
"Building for linux/arm64 is experimental. "
272271
"To use the recommended platform set --Repo2Docker.platform=linux/amd64. "
273272
"To silence this warning set --Repo2Docker.platform=linux/arm64."

repo2docker/buildpacks/conda/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import os
44
import re
5-
import warnings
65
from collections.abc import Mapping
76
from functools import lru_cache
87

@@ -355,7 +354,7 @@ def uses_r(self):
355354
@property
356355
def py2(self):
357356
"""Am I building a Python 2 kernel environment?"""
358-
warnings.warn(
357+
self.log.warning(
359358
"CondaBuildPack.py2 is deprecated in 2023.2. Use CondaBuildPack.separate_kernel_env.",
360359
DeprecationWarning,
361360
stacklevel=2,

0 commit comments

Comments
 (0)