Skip to content

Commit

Permalink
deprecate MultiStageBuild
Browse files Browse the repository at this point in the history
  • Loading branch information
dcermak committed Aug 22, 2024
1 parent ba95036 commit fa6fae1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Breaking changes:
- change type of ``OciRuntimeBase.build_command`` from ``List[str]`` to
``Tuple[str, ...]``

- deprecate :py:class:`~pytest_container.build.MultiStageBuild` in favor
:py:class:`~pytest_container.container.MultiStageContainer`


Improvements and new features:

Expand Down
13 changes: 13 additions & 0 deletions pytest_container/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,23 @@
from typing import Optional
from typing import Union
from uuid import uuid4
import sys

from _pytest.config import Config
from _pytest.mark.structures import ParameterSet
from deprecation import deprecated
from pytest_container.container import Container
from pytest_container.container import container_and_marks_from_pytest_param
from pytest_container.container import DerivedContainer
from pytest_container.logging import _logger
from pytest_container.runtime import OciRuntimeBase
from pytest_container.runtime import ToParamMixin

if sys.version_info >= (3, 8):
from importlib import metadata
else:
import importlib_metadata as metadata

Check warning on line 33 in pytest_container/build.py

View check run for this annotation

Codecov / codecov/patch

pytest_container/build.py#L33

Added line #L33 was not covered by tests


@dataclass(frozen=True)
class GitRepositoryBuild(ToParamMixin):
Expand Down Expand Up @@ -83,6 +90,12 @@ def test_command(self) -> str:
return cd_cmd


@deprecated(
deprecated_in="0.5.0",
removed_in="0.6.0",
current_version=metadata.version("pytest_container"),
details="use MultiStageContainer instead",
) # type: ignore
@dataclass
class MultiStageBuild:
"""Helper class to perform multi-stage container builds using the
Expand Down

0 comments on commit fa6fae1

Please sign in to comment.