diff --git a/dockerfile_parse/parser.py b/dockerfile_parse/parser.py index 1274be1..9255a22 100644 --- a/dockerfile_parse/parser.py +++ b/dockerfile_parse/parser.py @@ -11,6 +11,7 @@ import logging import os import re +import warnings from contextlib import contextmanager from shlex import quote @@ -867,7 +868,7 @@ def image_from(from_value): :param from_value: string like "image:tag" or "image:tag AS name" :return: tuple of the image and stage name, e.g. ("image:tag", None) """ - DeprecationWarning("Use image_name_from instead.") + warnings.warn("Use image_name_from instead.", DeprecationWarning) image, name = image_name_from(from_value) return str(image) if image else None, name