Bug#972374: qiskit-terra: diff for NMU version 0.12.0-2.1

2020-10-17 Thread Graham Inggs
Hi Stefano

On Sat, 17 Oct 2020 at 21:03, Stefano Rivera  wrote:
> I've prepared an NMU for qiskit-terra (versioned as 0.12.0-2.1) and
> uploaded it to DELAYED/3. Please feel free to tell me if I
> should delay it longer.

This looks good to me, please feel free to reschedule to 0 days.

> Also, FYI, your git repo is missing on Salsa.

It was marked private and I've made it public now.

Regards
Graham



Bug#972374: qiskit-terra: diff for NMU version 0.12.0-2.1

2020-10-17 Thread Stefano Rivera
Control: tags 972374 + patch
Control: tags 972374 + pending

Dear maintainer,

I've prepared an NMU for qiskit-terra (versioned as 0.12.0-2.1) and
uploaded it to DELAYED/3. Please feel free to tell me if I
should delay it longer.

Also, FYI, your git repo is missing on Salsa.

Regards.

SR
diff -Nru qiskit-terra-0.12.0/debian/changelog qiskit-terra-0.12.0/debian/changelog
--- qiskit-terra-0.12.0/debian/changelog	2020-08-15 03:26:42.0 -0700
+++ qiskit-terra-0.12.0/debian/changelog	2020-10-17 11:53:16.0 -0700
@@ -1,3 +1,10 @@
+qiskit-terra (0.12.0-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Patch: Support Python 3.9, in test infrastructure. Closes: #972374
+
+ -- Stefano Rivera   Sat, 17 Oct 2020 11:53:16 -0700
+
 qiskit-terra (0.12.0-2) unstable; urgency=medium
 
   * d/patches: backport upstream fix. Closes: #964669
diff -Nru qiskit-terra-0.12.0/debian/patches/python3.9.patch qiskit-terra-0.12.0/debian/patches/python3.9.patch
--- qiskit-terra-0.12.0/debian/patches/python3.9.patch	1969-12-31 16:00:00.0 -0800
+++ qiskit-terra-0.12.0/debian/patches/python3.9.patch	2020-10-17 11:37:15.0 -0700
@@ -0,0 +1,33 @@
+Adapt to the new location of the private _AssertLogsContext class in Python 3.9
+
+Upstream has started to look at 3.9 support in
+https://github.com/Qiskit/qiskit-terra/pull/5189 but haven't fixed this, yet.
+
+Author: Stefano Rivera 
+Bug-Debian: https://bugs.debian.org/972374
+Forwarded: no
+--- a/qiskit/test/utils.py
 b/qiskit/test/utils.py
+@@ -16,9 +16,12 @@
+ 
+ import logging
+ import os
+-import unittest
+ from enum import Enum
+ from itertools import product
++try:
++from unittest._log import _AssertLogsContext
++except ImportError:
++from unittest.case import _AssertLogsContext
+ 
+ from qiskit import __path__ as qiskit_path
+ 
+@@ -68,7 +71,7 @@
+ logger.setLevel(level)
+ 
+ 
+-class _AssertNoLogsContext(unittest.case._AssertLogsContext):
++class _AssertNoLogsContext(_AssertLogsContext):
+ """A context manager used to implement TestCase.assertNoLogs()."""
+ 
+ # pylint: disable=inconsistent-return-statements
diff -Nru qiskit-terra-0.12.0/debian/patches/series qiskit-terra-0.12.0/debian/patches/series
--- qiskit-terra-0.12.0/debian/patches/series	2020-08-15 03:05:52.0 -0700
+++ qiskit-terra-0.12.0/debian/patches/series	2020-10-17 11:32:33.0 -0700
@@ -2,3 +2,4 @@
 0002-Simplify-networkx-dependency-declaration.patch
 0003-Trim-included-package_data-in-setup.py.patch
 0004-Fix-numpy-1.19.0-pulse-error-upstream-backport.patch
+python3.9.patch