Commit 3222fe3c by Sébastien Eustace Committed by Arun Babu Neelicattu

Increment lock file version

parent 80581105
...@@ -27,7 +27,7 @@ logger = logging.getLogger(__name__) ...@@ -27,7 +27,7 @@ logger = logging.getLogger(__name__)
class Locker(object): class Locker(object):
_VERSION = "1.0" _VERSION = "1.1"
_relevant_keys = ["dependencies", "dev-dependencies", "source", "extras"] _relevant_keys = ["dependencies", "dev-dependencies", "source", "extras"]
......
...@@ -38,7 +38,7 @@ foo = ["C"] ...@@ -38,7 +38,7 @@ foo = ["C"]
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -35,7 +35,7 @@ foo = ["D"] ...@@ -35,7 +35,7 @@ foo = ["D"]
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -24,7 +24,7 @@ python-versions = "*" ...@@ -24,7 +24,7 @@ python-versions = "*"
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -2,7 +2,7 @@ package = [] ...@@ -2,7 +2,7 @@ package = []
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
...@@ -8,7 +8,7 @@ python-versions = "*" ...@@ -8,7 +8,7 @@ python-versions = "*"
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -8,7 +8,7 @@ python-versions = "*" ...@@ -8,7 +8,7 @@ python-versions = "*"
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -39,7 +39,7 @@ python-versions = "*" ...@@ -39,7 +39,7 @@ python-versions = "*"
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -19,7 +19,7 @@ A = "^1.0" ...@@ -19,7 +19,7 @@ A = "^1.0"
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -22,7 +22,7 @@ python = ">=3.6,<4.0" ...@@ -22,7 +22,7 @@ python = ">=3.6,<4.0"
[metadata] [metadata]
python-versions = "~2.7 || ^3.4" python-versions = "~2.7 || ^3.4"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -30,7 +30,7 @@ python-versions = "*" ...@@ -30,7 +30,7 @@ python-versions = "*"
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -16,7 +16,7 @@ python-versions = "*" ...@@ -16,7 +16,7 @@ python-versions = "*"
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -96,7 +96,7 @@ url = "project_with_transitive_file_dependencies" ...@@ -96,7 +96,7 @@ url = "project_with_transitive_file_dependencies"
[metadata] [metadata]
content-hash = "123456789" content-hash = "123456789"
lock-version = "1.0" lock-version = "1.1"
python-versions = "*" python-versions = "*"
[metadata.files] [metadata.files]
......
...@@ -29,7 +29,7 @@ url = "tests/fixtures/project_with_extras" ...@@ -29,7 +29,7 @@ url = "tests/fixtures/project_with_extras"
[metadata] [metadata]
content-hash = "123456789" content-hash = "123456789"
lock-version = "1.0" lock-version = "1.1"
python-versions = "*" python-versions = "*"
[metadata.files] [metadata.files]
......
...@@ -34,7 +34,7 @@ python-versions = "*" ...@@ -34,7 +34,7 @@ python-versions = "*"
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -30,7 +30,7 @@ python-versions = "*" ...@@ -30,7 +30,7 @@ python-versions = "*"
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -52,7 +52,7 @@ python-versions = "*" ...@@ -52,7 +52,7 @@ python-versions = "*"
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -60,7 +60,7 @@ url = "project_with_transitive_file_dependencies" ...@@ -60,7 +60,7 @@ url = "project_with_transitive_file_dependencies"
[metadata] [metadata]
content-hash = "123456789" content-hash = "123456789"
lock-version = "1.0" lock-version = "1.1"
python-versions = "*" python-versions = "*"
[metadata.files] [metadata.files]
......
...@@ -28,7 +28,7 @@ python-versions = "*" ...@@ -28,7 +28,7 @@ python-versions = "*"
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -39,7 +39,7 @@ python-versions = "*" ...@@ -39,7 +39,7 @@ python-versions = "*"
[metadata] [metadata]
python-versions = "~2.7 || ^3.4" python-versions = "~2.7 || ^3.4"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -30,7 +30,7 @@ foo = ["A"] ...@@ -30,7 +30,7 @@ foo = ["A"]
[metadata] [metadata]
python-versions = "~2.7 || ^3.4" python-versions = "~2.7 || ^3.4"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -38,7 +38,7 @@ foo = ["A"] ...@@ -38,7 +38,7 @@ foo = ["A"]
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -16,7 +16,7 @@ python-versions = "*" ...@@ -16,7 +16,7 @@ python-versions = "*"
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -81,7 +81,7 @@ python-versions = "*" ...@@ -81,7 +81,7 @@ python-versions = "*"
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -24,7 +24,7 @@ python-versions = "~2.7 || ^3.3" ...@@ -24,7 +24,7 @@ python-versions = "~2.7 || ^3.3"
[metadata] [metadata]
python-versions = "~2.7 || ^3.4" python-versions = "~2.7 || ^3.4"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -38,7 +38,7 @@ python-versions = "*" ...@@ -38,7 +38,7 @@ python-versions = "*"
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -28,7 +28,7 @@ python-versions = "*" ...@@ -28,7 +28,7 @@ python-versions = "*"
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -13,7 +13,7 @@ url = "tests/fixtures/wheel_with_no_requires_dist/demo-0.1.0-py2.py3-none-any.wh ...@@ -13,7 +13,7 @@ url = "tests/fixtures/wheel_with_no_requires_dist/demo-0.1.0-py2.py3-none-any.wh
[metadata] [metadata]
python-versions = "*" python-versions = "*"
lock-version = "1.0" lock-version = "1.1"
content-hash = "123456789" content-hash = "123456789"
[metadata.files] [metadata.files]
......
...@@ -5,6 +5,7 @@ import pytest ...@@ -5,6 +5,7 @@ import pytest
import tomlkit import tomlkit
from poetry.core.packages.project_package import ProjectPackage from poetry.core.packages.project_package import ProjectPackage
from poetry.core.semver.version import Version
from poetry.packages.locker import Locker from poetry.packages.locker import Locker
from ..helpers import get_dependency from ..helpers import get_dependency
...@@ -57,7 +58,7 @@ version = "1.2" ...@@ -57,7 +58,7 @@ version = "1.2"
[metadata] [metadata]
content-hash = "115cf985d932e9bf5f540555bbdd75decbb62cac81e399375fc19f6277f8c1d8" content-hash = "115cf985d932e9bf5f540555bbdd75decbb62cac81e399375fc19f6277f8c1d8"
lock-version = "1.0" lock-version = "1.1"
python-versions = "*" python-versions = "*"
[metadata.files] [metadata.files]
...@@ -95,7 +96,7 @@ redis = ["redis (>=2.10.5)"] ...@@ -95,7 +96,7 @@ redis = ["redis (>=2.10.5)"]
[metadata] [metadata]
content-hash = "c3d07fca33fba542ef2b2a4d75bf5b48d892d21a830e2ad9c952ba5123a52f77" content-hash = "c3d07fca33fba542ef2b2a4d75bf5b48d892d21a830e2ad9c952ba5123a52f77"
lock-version = "1.0" lock-version = "1.1"
python-versions = "~2.7 || ^3.4" python-versions = "~2.7 || ^3.4"
[metadata.files] [metadata.files]
...@@ -135,7 +136,7 @@ version = "1.0.0" ...@@ -135,7 +136,7 @@ version = "1.0.0"
[metadata] [metadata]
content-hash = "115cf985d932e9bf5f540555bbdd75decbb62cac81e399375fc19f6277f8c1d8" content-hash = "115cf985d932e9bf5f540555bbdd75decbb62cac81e399375fc19f6277f8c1d8"
lock-version = "1.0" lock-version = "1.1"
python-versions = "*" python-versions = "*"
[metadata.files] [metadata.files]
...@@ -175,7 +176,7 @@ foo = ["B (>=1.0.0)"] ...@@ -175,7 +176,7 @@ foo = ["B (>=1.0.0)"]
[metadata] [metadata]
content-hash = "115cf985d932e9bf5f540555bbdd75decbb62cac81e399375fc19f6277f8c1d8" content-hash = "115cf985d932e9bf5f540555bbdd75decbb62cac81e399375fc19f6277f8c1d8"
lock-version = "1.0" lock-version = "1.1"
python-versions = "*" python-versions = "*"
[metadata.files] [metadata.files]
...@@ -205,7 +206,7 @@ foo = ["bar"] ...@@ -205,7 +206,7 @@ foo = ["bar"]
[metadata] [metadata]
content-hash = "115cf985d932e9bf5f540555bbdd75decbb62cac81e399375fc19f6277f8c1d8" content-hash = "115cf985d932e9bf5f540555bbdd75decbb62cac81e399375fc19f6277f8c1d8"
lock-version = "1.0" lock-version = "1.1"
python-versions = "*" python-versions = "*"
[metadata.files] [metadata.files]
...@@ -245,7 +246,7 @@ url = "https://foo.bar" ...@@ -245,7 +246,7 @@ url = "https://foo.bar"
[metadata] [metadata]
content-hash = "115cf985d932e9bf5f540555bbdd75decbb62cac81e399375fc19f6277f8c1d8" content-hash = "115cf985d932e9bf5f540555bbdd75decbb62cac81e399375fc19f6277f8c1d8"
lock-version = "1.0" lock-version = "1.1"
python-versions = "*" python-versions = "*"
[metadata.files] [metadata.files]
...@@ -261,11 +262,13 @@ def test_locker_should_emit_warnings_if_lock_version_is_newer_but_allowed( ...@@ -261,11 +262,13 @@ def test_locker_should_emit_warnings_if_lock_version_is_newer_but_allowed(
content = """\ content = """\
[metadata] [metadata]
content-hash = "c3d07fca33fba542ef2b2a4d75bf5b48d892d21a830e2ad9c952ba5123a52f77" content-hash = "c3d07fca33fba542ef2b2a4d75bf5b48d892d21a830e2ad9c952ba5123a52f77"
lock-version = "1.1" lock-version = "{version}"
python-versions = "~2.7 || ^3.4" python-versions = "~2.7 || ^3.4"
[metadata.files] [metadata.files]
""" """.format(
version=".".join(Version.parse(Locker._VERSION).next_minor.text.split(".")[:2])
)
caplog.set_level(logging.WARNING, logger="poetry.packages.locker") caplog.set_level(logging.WARNING, logger="poetry.packages.locker")
locker.lock.write(tomlkit.parse(content)) locker.lock.write(tomlkit.parse(content))
...@@ -326,7 +329,7 @@ B = {version = "^1.0.0", extras = ["a", "b", "c"], optional = true} ...@@ -326,7 +329,7 @@ B = {version = "^1.0.0", extras = ["a", "b", "c"], optional = true}
[metadata] [metadata]
content-hash = "115cf985d932e9bf5f540555bbdd75decbb62cac81e399375fc19f6277f8c1d8" content-hash = "115cf985d932e9bf5f540555bbdd75decbb62cac81e399375fc19f6277f8c1d8"
lock-version = "1.0" lock-version = "1.1"
python-versions = "*" python-versions = "*"
[metadata.files] [metadata.files]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment