Skip to content

Commit

Permalink
rename unified version to v4
Browse files Browse the repository at this point in the history
Signed-off-by: aiordache <[email protected]>
  • Loading branch information
aiordache committed Jul 8, 2020
1 parent 5d201ad commit 6c87809
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion compose/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from . import types
from ..const import COMPOSEFILE_V1 as V1
from ..const import COMPOSEFILE_V_LATEST as VERSION
from ..const import COMPOSEFILE_V4 as VERSION
from ..utils import build_string_dict
from ..utils import json_hash
from ..utils import parse_bytes
Expand Down
2 changes: 1 addition & 1 deletion compose/config/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from compose.config import types
from compose.const import COMPOSEFILE_V1 as V1
from compose.const import COMPOSEFILE_V_LATEST as VERSION
from compose.const import COMPOSEFILE_V4 as VERSION


def serialize_config_type(dumper, data):
Expand Down
6 changes: 3 additions & 3 deletions compose/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
WINDOWS_LONGPATH_PREFIX = '\\\\?\\'

COMPOSEFILE_V1 = ComposeVersion('1')
COMPOSEFILE_V_LATEST = ComposeVersion('4.0')
COMPOSEFILE_V4 = ComposeVersion('4.0')

# minimum DOCKER ENGINE API version needed to support
# features for each compose schema version
API_VERSIONS = {
COMPOSEFILE_V1: '1.21',
COMPOSEFILE_V_LATEST: '1.38',
COMPOSEFILE_V4: '1.38',
}

API_VERSION_TO_ENGINE_VERSION = {
API_VERSIONS[COMPOSEFILE_V1]: '1.9.0',
API_VERSIONS[COMPOSEFILE_V_LATEST]: '18.06.0',
API_VERSIONS[COMPOSEFILE_V4]: '18.06.0',
}
2 changes: 1 addition & 1 deletion tests/acceptance/cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from compose.cli.command import get_project
from compose.config.errors import DuplicateOverrideFileFound
from compose.const import COMPOSEFILE_V1 as V1
from compose.const import COMPOSEFILE_V_LATEST as VERSION
from compose.const import COMPOSEFILE_V4 as VERSION
from compose.container import Container
from compose.project import OneOffFilter
from compose.utils import nanoseconds_from_time_seconds
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/project_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from compose.config import types
from compose.config.types import VolumeFromSpec
from compose.config.types import VolumeSpec
from compose.const import COMPOSEFILE_V_LATEST as VERSION
from compose.const import COMPOSEFILE_V4 as VERSION
from compose.const import LABEL_PROJECT
from compose.const import LABEL_SERVICE
from compose.container import Container
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/testcases.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from compose.config.environment import Environment
from compose.const import API_VERSIONS
from compose.const import COMPOSEFILE_V1 as V1
from compose.const import COMPOSEFILE_V_LATEST as VERSION
from compose.const import COMPOSEFILE_V4 as VERSION
from compose.const import LABEL_PROJECT
from compose.progress_stream import stream_output
from compose.service import Service
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/config/config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from compose.config.serialize import serialize_ns_time_value
from compose.config.types import VolumeSpec
from compose.const import COMPOSEFILE_V1 as V1
from compose.const import COMPOSEFILE_V_LATEST as VERSION
from compose.const import COMPOSEFILE_V4 as VERSION
from compose.const import IS_WINDOWS_PLATFORM
from tests import mock
from tests import unittest
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/config/interpolation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from compose.config.interpolation import InvalidInterpolation
from compose.config.interpolation import TemplateWithDefaults
from compose.config.interpolation import UnsetRequiredSubstitution
from compose.const import COMPOSEFILE_V_LATEST as VERSION
from compose.const import COMPOSEFILE_V4 as VERSION


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/config/types_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from compose.config.types import VolumeFromSpec
from compose.config.types import VolumeSpec
from compose.const import COMPOSEFILE_V1 as V1
from compose.const import COMPOSEFILE_V_LATEST as VERSION
from compose.const import COMPOSEFILE_V4 as VERSION


def test_parse_extra_hosts_list():
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/project_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from compose.config.config import Config
from compose.config.types import VolumeFromSpec
from compose.const import COMPOSEFILE_V1 as V1
from compose.const import COMPOSEFILE_V_LATEST as VERSION
from compose.const import COMPOSEFILE_V4 as VERSION
from compose.const import DEFAULT_TIMEOUT
from compose.const import LABEL_SERVICE
from compose.container import Container
Expand Down

0 comments on commit 6c87809

Please sign in to comment.