Skip to content

Commit

Permalink
Merge pull request #1384 from yuvipanda/no-warnings
Browse files Browse the repository at this point in the history
Use self.log.warning instead of warnings.warn
  • Loading branch information
manics authored Jan 3, 2025
2 parents 487e0e5 + 9d5084a commit dd097a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions repo2docker/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import sys
import tempfile
import time
import warnings
from urllib.parse import urlparse

import entrypoints
Expand Down Expand Up @@ -267,7 +266,7 @@ def _platform_default(self):
"""
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."
Expand Down
3 changes: 1 addition & 2 deletions repo2docker/buildpacks/conda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import os
import re
import warnings
from collections.abc import Mapping
from functools import lru_cache

Expand Down Expand Up @@ -355,7 +354,7 @@ def uses_r(self):
@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,
Expand Down

0 comments on commit dd097a2

Please sign in to comment.