From b6d4d842c9ff4d4e554e3cc2b5a2c821828ebbfa Mon Sep 17 00:00:00 2001
From: Anton Akhmerov <anton.akhmerov@gmail.com>
Date: Sun, 1 Nov 2020 15:00:25 +0100
Subject: [PATCH] fix python 3.9 support

---
 CHANGELOG.md                        | 1 +
 environment-latest.yml              | 2 +-
 pytest.ini                          | 2 ++
 qsymm/groups.py                     | 1 -
 qsymm/tests/test_symmetry_finder.py | 2 +-
 5 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index bed572c..90bd12c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 ### Fixed
 
 + Avoided using deprecated functionality in latest scipy, numpy, and sympy
++ Fix syntax for python 3.9
 
 ### Removed
 
diff --git a/environment-latest.yml b/environment-latest.yml
index 4ed09bb..33dff4c 100644
--- a/environment-latest.yml
+++ b/environment-latest.yml
@@ -2,7 +2,7 @@ name: qsymm-latest
 channels:
     - conda-forge
 dependencies:
-    - python=3.8
+    - python=3.9
     - numpy
     - scipy
     - sympy
diff --git a/pytest.ini b/pytest.ini
index 8e76f5a..64b0685 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -6,3 +6,5 @@ filterwarnings =
     ignore:the matrix subclass is not the recommended way to represent matrices:PendingDeprecationWarning
     # Remove once we rely on sympy v1.3
     ignore:np\.asscalar\(a\) is deprecated since NumPy v1\.16, use a\.item\(\) instead:DeprecationWarning
+    # Remove once setuptools figures it out
+    ignore:lib2to3:PendingDeprecationWarning
diff --git a/qsymm/groups.py b/qsymm/groups.py
index 1ebeae1..b34de13 100644
--- a/qsymm/groups.py
+++ b/qsymm/groups.py
@@ -5,7 +5,6 @@ from functools import lru_cache
 from fractions import Fraction
 from numbers import Number
 from collections import OrderedDict
-from copy import deepcopy
 
 import numpy as np
 import tinyarray as ta
diff --git a/qsymm/tests/test_symmetry_finder.py b/qsymm/tests/test_symmetry_finder.py
index 3a57d3a..36aa2a0 100644
--- a/qsymm/tests/test_symmetry_finder.py
+++ b/qsymm/tests/test_symmetry_finder.py
@@ -29,7 +29,7 @@ def sumrep(*args):
 
 def test_cont_finder():
     # Test symmetry adapted basis
-    gens = sumrep((*2*[0.5*sigma[[3, 1, 2]]]))
+    gens = sumrep(*2*[0.5*sigma[[3, 1, 2]]])
     U2 = kwant_rmt.circular(len(gens[0]))
     gens2 = np.einsum('ij,ajk,kl->ail',(U2.T).conjugate(),gens,U2)
     U = symmetry_adapted_sun(gens, check=True)
-- 
GitLab