From 6aab802fa12e7b76c221cce88a990d9dbc80134b Mon Sep 17 00:00:00 2001
From: root <myles.penner@canonical.com>
Date: Tue, 20 Aug 2024 20:18:48 +0000
Subject: [PATCH] Fix issues related to py312

Summary of changes:
- Bump flake8 from 3.9.2 to 7.1.1
- Remove pinning for 'setuptools' and 'six'
- Add py312 section to tox.ini [testenv]

Change-Id: I8bb079b8230aa9e2a0a5d992dc9f29d88a3921b4
---
 requirements.txt      | 1 -
 test-requirements.txt | 1 -
 tox.ini               | 8 +++++++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/requirements.txt b/requirements.txt
index a4c487e..ee4ea02 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -22,7 +22,6 @@ cryptography<3.4
 netaddr>0.7.16,<0.8.0
 
 Jinja2>=2.6  # BSD License (3 clause)
-six>=1.9.0
 
 dnspython
 
diff --git a/test-requirements.txt b/test-requirements.txt
index 7c2c70f..130f349 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -8,7 +8,6 @@
 #       all of its own requirements and if it doesn't, fix it there.
 #
 pyparsing<3.0.0  # aodhclient is pinned in zaza and needs pyparsing < 3.0.0, but cffi also needs it, so pin here.
-setuptools<50.0.0  # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85
 
 requests>=2.18.4
 
diff --git a/tox.ini b/tox.ini
index 9016560..1c768a8 100644
--- a/tox.ini
+++ b/tox.ini
@@ -57,6 +57,12 @@ commands =
     {toxinidir}/rename.sh
     charmcraft clean
 
+[testenv:py312]
+basepython = python3.12
+deps =
+    -r{toxinidir}/requirements.txt
+    -r{toxinidir}/test-requirements.txt
+
 [testenv:py310]
 basepython = python3.10
 deps =
@@ -72,7 +78,7 @@ deps =
 [testenv:pep8]
 basepython = python3
 deps =
-    flake8==3.9.2
+    flake8==7.1.1
     git+https://github.com/juju/charm-tools.git
 commands = flake8 {posargs} hooks unit_tests tests actions lib files
            charm-proof