Skip to content

Commit

Permalink
do not use deprecated package
Browse files Browse the repository at this point in the history
Signed-off-by: Tim van Katwijk <timvankatwijk@hotmail.com>
  • Loading branch information
tim-vk committed Jan 6, 2023
1 parent d0c40e5 commit ff6e964
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ jobs:
srpm_build_deps:
- python3-pip
- python3-setuptools_scm
- Deprecated
3 changes: 1 addition & 2 deletions dockerfile_parse/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import logging
import os
import re
from deprecated import deprecated
from contextlib import contextmanager
from shlex import quote

Expand Down Expand Up @@ -862,12 +861,12 @@ def context_structure(self):
return instructions


@deprecated(reason="Use image_name_from instead.")
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.")

Check failure

Code scanning / CodeQL

Unused exception object Error

Instantiating an exception, but not raising it, has no effect.
image, name = image_name_from(from_value)
return str(image) if image else None, name

Expand Down
3 changes: 1 addition & 2 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pytest>=4.1.0
pytest-cov
pytest-html
flake8
Deprecated
flake8

0 comments on commit ff6e964

Please sign in to comment.