launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #32615
[Merge] ~alvarocs/lp-signing/+git/lp-signing-1:upgrade-noble into lp-signing:master
Alvaro Crespo Serrano has proposed merging ~alvarocs/lp-signing/+git/lp-signing-1:upgrade-noble into lp-signing:master.
Commit message:
Upgrade application and dependencies to be compatible with Ubuntu Noble LTS
The lp-signing app currently runs on bionic and since focal will be the oldest supported Ubuntu version on PS8, we need to upgrade it to run on the latest Ubuntu LTS.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~alvarocs/lp-signing/+git/lp-signing-1/+merge/487377
The lp-signing app currently runs on bionic and since focal will be the oldest supported Ubuntu version on PS8, we need to upgrade it to run on the latest Ubuntu LTS. Update the app, upgrade the dependencies as needed and get the lp-signing test suite passing on Noble.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~alvarocs/lp-signing/+git/lp-signing-1:upgrade-noble into lp-signing:master.
diff --git a/lp_signing/tests/test_webapi.py b/lp_signing/tests/test_webapi.py
index d997724..bc22156 100644
--- a/lp_signing/tests/test_webapi.py
+++ b/lp_signing/tests/test_webapi.py
@@ -3,7 +3,7 @@
import base64
import json
-from datetime import datetime, timedelta
+from datetime import datetime, timedelta, timezone
from pathlib import Path
from tempfile import TemporaryDirectory
@@ -2373,7 +2373,7 @@ class TestInjectView(TestCase):
"key-type": "UEFI",
"private-key": base64.b64encode(private_key).decode("UTF-8"),
"public-key": base64.b64encode(public_key).decode("UTF-8"),
- "created-at": (datetime.utcnow()).isoformat(),
+ "created-at": (datetime.now(timezone.utc)).isoformat(),
"description": "UEFI test description",
}
)
@@ -2400,7 +2400,7 @@ class TestInjectView(TestCase):
"key-type": "KMOD",
"private-key": base64.b64encode(private_key).decode("UTF-8"),
"public-key": base64.b64encode(public_key).decode("UTF-8"),
- "created-at": (datetime.utcnow()).isoformat(),
+ "created-at": (datetime.now(timezone.utc)).isoformat(),
"description": "KMOD test description",
}
)
@@ -2439,7 +2439,7 @@ class TestInjectView(TestCase):
"key-type": "KMOD",
"private-key": base64.b64encode(private_key).decode("UTF-8"),
"public-key": base64.b64encode(public_key).decode("UTF-8"),
- "created-at": (datetime.utcnow()).isoformat(),
+ "created-at": (datetime.now(timezone.utc)).isoformat(),
"description": "PPA test-owner test-archive",
}
)
@@ -2466,7 +2466,7 @@ class TestInjectView(TestCase):
"key-type": "OPAL",
"private-key": base64.b64encode(private_key).decode("UTF-8"),
"public-key": base64.b64encode(public_key).decode("UTF-8"),
- "created-at": (datetime.utcnow()).isoformat(),
+ "created-at": (datetime.now(timezone.utc)).isoformat(),
"description": "PPA test-owner test-archive",
}
)
@@ -2505,7 +2505,7 @@ class TestInjectView(TestCase):
"key-type": "OPAL",
"private-key": "",
"public-key": "",
- "created-at": (datetime.utcnow()).isoformat(),
+ "created-at": (datetime.now(timezone.utc)).isoformat(),
"description": "PPA test-owner test-archive",
}
)
@@ -2532,7 +2532,7 @@ class TestInjectView(TestCase):
"key-type": "SIPL",
"private-key": base64.b64encode(private_key).decode("UTF-8"),
"public-key": base64.b64encode(public_key).decode("UTF-8"),
- "created-at": (datetime.utcnow()).isoformat(),
+ "created-at": (datetime.now(timezone.utc)).isoformat(),
"description": "PPA test-owner test-archive",
}
)
@@ -2571,7 +2571,7 @@ class TestInjectView(TestCase):
"key-type": "SIPL",
"private-key": "",
"public-key": "",
- "created-at": (datetime.utcnow()).isoformat(),
+ "created-at": (datetime.now(timezone.utc)).isoformat(),
"description": "PPA test-owner test-archive",
}
)
@@ -2598,7 +2598,7 @@ class TestInjectView(TestCase):
"key-type": "FIT",
"private-key": base64.b64encode(private_key).decode("UTF-8"),
"public-key": base64.b64encode(public_key).decode("UTF-8"),
- "created-at": (datetime.utcnow()).isoformat(),
+ "created-at": (datetime.now(timezone.utc)).isoformat(),
"description": "PPA test-owner test-archive",
}
)
@@ -2637,7 +2637,7 @@ class TestInjectView(TestCase):
"key-type": "FIT",
"private-key": "",
"public-key": "",
- "created-at": (datetime.utcnow()).isoformat(),
+ "created-at": (datetime.now(timezone.utc)).isoformat(),
"description": "PPA test-owner test-archive",
}
)
@@ -2697,7 +2697,7 @@ class TestInjectView(TestCase):
"key-type": "OPENPGP",
"private-key": base64.b64encode(b"").decode("UTF-8"),
"public-key": base64.b64encode(b"").decode("UTF-8"),
- "created-at": datetime.utcnow().isoformat(),
+ "created-at": datetime.now(timezone.utc).isoformat(),
"description": "OpenPGP test description",
}
)
@@ -2718,7 +2718,7 @@ class TestInjectView(TestCase):
"key-type": "CV2_KERNEL",
"private-key": base64.b64encode(private_key).decode("UTF-8"),
"public-key": base64.b64encode(public_key).decode("UTF-8"),
- "created-at": datetime.utcnow().isoformat(),
+ "created-at": datetime.now(timezone.utc).isoformat(),
"description": "PPA test-owner test-archive",
}
)
@@ -2753,7 +2753,7 @@ class TestInjectView(TestCase):
"key-type": "CV2_KERNEL",
"private-key": "",
"public-key": "",
- "created-at": datetime.utcnow().isoformat(),
+ "created-at": datetime.now(timezone.utc).isoformat(),
"description": "PPA test-owner test-archive",
}
)
@@ -2782,7 +2782,7 @@ class TestInjectView(TestCase):
"public-key": base64.b64encode(bytes(public_key)).decode(
"UTF-8"
),
- "created-at": (datetime.utcnow()).isoformat(),
+ "created-at": (datetime.now(timezone.utc)).isoformat(),
"description": "PPA test-owner test-archive",
}
)
@@ -2818,7 +2818,7 @@ class TestInjectView(TestCase):
"public-key": base64.b64encode(bytes(public_key)).decode(
"UTF-8"
),
- "created-at": (datetime.utcnow()).isoformat(),
+ "created-at": (datetime.now(timezone.utc)).isoformat(),
"description": "PPA test-owner test-archive",
},
index=1,
@@ -2864,7 +2864,7 @@ class TestInjectView(TestCase):
"key-type": "FIT",
"private-key": base64.b64encode(private_key).decode("UTF-8"),
"public-key": base64.b64encode(public_key).decode("UTF-8"),
- "created-at": (datetime.utcnow()).isoformat(),
+ "created-at": (datetime.now(timezone.utc)).isoformat(),
"description": "PPA test-owner test-archive",
}
)
@@ -2899,7 +2899,7 @@ class TestInjectView(TestCase):
"key-type": "FIT",
"private-key": base64.b64encode(private_key).decode("UTF-8"),
"public-key": base64.b64encode(public_key).decode("UTF-8"),
- "created-at": (datetime.utcnow()).isoformat(),
+ "created-at": (datetime.now(timezone.utc)).isoformat(),
"description": "PPA test-owner test-archive",
}
)
@@ -2944,7 +2944,7 @@ class TestInjectView(TestCase):
"public-key": base64.b64encode(bytes(public_key)).decode(
"UTF-8"
),
- "created-at": (datetime.utcnow()).isoformat(),
+ "created-at": (datetime.now(timezone.utc)).isoformat(),
"description": "PPA test-owner test-archive",
}
)
@@ -2981,7 +2981,7 @@ class TestInjectView(TestCase):
"public-key": base64.b64encode(bytes(public_key)).decode(
"UTF-8"
),
- "created-at": (datetime.utcnow()).isoformat(),
+ "created-at": (datetime.now(timezone.utc)).isoformat(),
"description": "PPA test-owner test-archive",
},
index=1,
@@ -3006,7 +3006,7 @@ class TestInjectView(TestCase):
Path(tmp), KeyType.FIT, common_name
)
- existent_date = datetime.utcnow()
+ existent_date = datetime.now()
resp = self.post_inject(
{
"key-type": "FIT",
@@ -3043,7 +3043,7 @@ class TestInjectView(TestCase):
),
)
- older_date = datetime.utcnow() - timedelta(days=3)
+ older_date = datetime.now(timezone.utc) - timedelta(days=3)
resp = self.post_inject(
{
"key-type": "FIT",
@@ -3066,7 +3066,7 @@ class TestInjectView(TestCase):
authorizations=[self.clients[0], self.clients[1]],
),
)
- self.assertEqual(pytz.utc.localize(older_date), key.created_at)
+ self.assertEqual(older_date, key.created_at)
class TestAddAuthorizationView(TestCase):
Follow ups