← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~jugmac00/lpcraft:fix-deprecation-use_snapshots into lpcraft:main

 

Jürgen Gmach has proposed merging ~jugmac00/lpcraft:fix-deprecation-use_snapshots into lpcraft:main.

Commit message:
Fix deprecation warning in `lxd.launch`

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jugmac00/lpcraft/+git/lpcraft/+merge/437782
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/lpcraft:fix-deprecation-use_snapshots into lpcraft:main.
diff --git a/NEWS.rst b/NEWS.rst
index 86d21cc..2da4038 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -2,6 +2,13 @@
 Version history
 ===============
 
+0.0.46 (unreleased)
+===================
+
+- Update dependencies.
+
+- Fix deprecation warning in `lxd.launch` (changed API in `craft-providers`).
+
 0.0.45 (2023-02-15)
 ===================
 
diff --git a/lpcraft/providers/_lxd.py b/lpcraft/providers/_lxd.py
index 0d325a6..a2e0927 100644
--- a/lpcraft/providers/_lxd.py
+++ b/lpcraft/providers/_lxd.py
@@ -55,7 +55,7 @@ class _LXDLauncher(Protocol):
         auto_create_project: bool = False,
         ephemeral: bool = False,
         map_user_uid: bool = False,
-        use_snapshots: bool = False,
+        use_base_instance: bool = False,
         project: str = "default",
         remote: str = "local",
         lxc: lxd.LXC = _lxc_client,
@@ -305,7 +305,7 @@ class LXDProvider(Provider):
                 auto_clean=True,
                 auto_create_project=True,
                 map_user_uid=True,
-                use_snapshots=True,
+                use_base_instance=True,
                 project=self.lxd_project,
                 remote=self.lxd_remote,
                 lxc=self.lxc,
diff --git a/lpcraft/providers/tests/test_lxd.py b/lpcraft/providers/tests/test_lxd.py
index 5df5fc5..3b32768 100644
--- a/lpcraft/providers/tests/test_lxd.py
+++ b/lpcraft/providers/tests/test_lxd.py
@@ -461,7 +461,7 @@ class TestLXDProvider(TestCase):
                         auto_clean=True,
                         auto_create_project=True,
                         map_user_uid=True,
-                        use_snapshots=True,
+                        use_base_instance=True,
                         project="test-project",
                         remote="test-remote",
                         lxc=mock_lxc,
diff --git a/requirements.txt b/requirements.txt
index 32ab7f2..9930c45 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -6,35 +6,35 @@
 #
 certifi==2022.12.7
     # via requests
-charset-normalizer==2.1.1
+charset-normalizer==3.0.1
     # via requests
 craft-cli==1.2.0
     # via -r requirements.in
-craft-providers==1.6.2
+craft-providers==1.7.2
     # via -r requirements.in
 idna==3.4
     # via requests
-platformdirs==2.6.0
+platformdirs==3.0.0
     # via craft-cli
 pluggy==1.0.0
     # via -r requirements.in
-pydantic==1.10.2
+pydantic==1.10.5
     # via
     #   -r requirements.in
     #   craft-cli
     #   craft-providers
-python-dotenv==0.21.0
+python-dotenv==0.21.1
     # via -r requirements.in
 pyyaml==6.0
     # via
     #   -r requirements.in
     #   craft-cli
     #   craft-providers
-requests==2.28.1
+requests==2.28.2
     # via requests-unixsocket
 requests-unixsocket==0.3.0
     # via craft-providers
-typing-extensions==4.4.0
+typing-extensions==4.5.0
     # via pydantic
-urllib3==1.26.13
+urllib3==1.26.14
     # via requests
diff --git a/setup.cfg b/setup.cfg
index 6caa534..290bcff 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
 [metadata]
 name = lpcraft
-version = 0.0.45
+version = 0.0.46.dev0
 description = Runner for Launchpad CI jobs
 long_description = file: README.rst
 long_description_content_type = text/x-rst

Follow ups