Merge ~mitchdz/ubuntu/+source/hibagent:mitch/noble-imdsv2-fix-proposed into ubuntu/+source/hibagent:ubuntu/devel

Proposed by Mitchell Dzurick
Status: Merged
Merge reported by: Mitchell Dzurick
Merged at revision: 1c9f5324f4ed63a3aeb9cc958c5c64665d7f8c25
Proposed branch: ~mitchdz/ubuntu/+source/hibagent:mitch/noble-imdsv2-fix-proposed
Merge into: ubuntu/+source/hibagent:ubuntu/devel
Diff against target: 52 lines (+30/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/hibagent-test-use-importlib.patch (+22/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Bryce Harrington (community) Approve
git-ubuntu import Pending
Review via email: mp+455922@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Bryce Harrington (bryce) wrote :

This was already uploaded by Seth, this MP should be updated or closed.

Btw, when making DEP3 metadata for a patch, multi-line Descriptions should have subsequent lines indented to column 2.

Also, if the fix is appropriate for Debian and/or upstream, it should be forwarded and noted in the metadata; if it's not worth forwarding, that is also worth mentioning with the reason why.

review: Approve
Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

Thanks Bryce! I was just about to go around and close my MPs.

There is no debian package, and these commits come directly from upstream.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index c056326..f99cc6b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
1hibagent (1.0.1+git20230216.9ac1209f7-0ubuntu3) noble; urgency=medium
2
3 * d/p/hibagent-test-use-importlib.patch: use importlib in
4 test/hibagent_test.py as imp was removed in python3.12 (LP: #2044029).
5
6 -- Mitchell Dzurick <mitchell.dzurick@canonical.com> Mon, 20 Nov 2023 15:51:14 -0700
7
1hibagent (1.0.1+git20230216.9ac1209f7-0ubuntu2) noble; urgency=medium8hibagent (1.0.1+git20230216.9ac1209f7-0ubuntu2) noble; urgency=medium
29
3 * d/p/do-nothing-if-ODH-is-configured.patch: do nothing if ODH is configured,10 * d/p/do-nothing-if-ODH-is-configured.patch: do nothing if ODH is configured,
diff --git a/debian/patches/hibagent-test-use-importlib.patch b/debian/patches/hibagent-test-use-importlib.patch
4new file mode 10064411new file mode 100644
index 0000000..2469a23
--- /dev/null
+++ b/debian/patches/hibagent-test-use-importlib.patch
@@ -0,0 +1,22 @@
1Description: use importlib instead of imp
2In python3.12, imp is removed. importlib is the replacement.
3Author: Mitchell Dzurick <mitchell.dzurick@canonical.com>
4Last-Update: 2023-11-20
5---
6This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
7--- a/test/hibagent_test.py
8+++ b/test/hibagent_test.py
9@@ -7,10 +7,11 @@
10 from tempfile import mktemp
11 from threading import Thread
12
13-import imp
14+import importlib.machinery
15 agent_file = os.path.dirname(os.path.abspath(__file__))+"/../../../../agent/hibagent"
16 with open(agent_file) as fl:
17- hibagent = imp.load_module('hibagent', fl, agent_file, ('py', 'rb', 1))
18+ loader = importlib.machinery.SourceFileLoader('hibagent', agent_file)
19+ hibagent = loader.load_module()
20
21 from time import sleep
22
diff --git a/debian/patches/series b/debian/patches/series
index 0b9774f..f519cd6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ fix-enable-ec2-spot-hibernation.patch
10setuptools-fix-package-discovery.patch10setuptools-fix-package-discovery.patch
11disable-hibernate-test.patch11disable-hibernate-test.patch
12do-nothing-if-ODH-is-configured.patch12do-nothing-if-ODH-is-configured.patch
13hibagent-test-use-importlib.patch

Subscribers

People subscribed via source and target branches