Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use self.log.warning instead of warnings.warn #1384

Merged
merged 3 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
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
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