← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/lpcraft:py311 into lpcraft:main

 

Colin Watson has proposed merging ~cjwatson/lpcraft:py311 into lpcraft:main.

Commit message:
Add support for Python 3.11

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/lpcraft/+git/lpcraft/+merge/435272
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/lpcraft:py311 into lpcraft:main.
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 7b6a1bf..90d0547 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -33,4 +33,4 @@ repos:
     rev: v2.2.0
     hooks:
     -   id: setup-cfg-fmt
-        args: [--include-version-classifiers, --max-py-version=3.10]
+        args: [--include-version-classifiers, --max-py-version=3.11]
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index cf95e75..aee0311 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -28,6 +28,7 @@ List the ``tox`` environments available for this project.
     py38     -> run test suite
     py39     -> run test suite
     py310    -> run test suite
+    py311    -> run test suite
     coverage -> generate coverage report
 
 Run the project's tests.
diff --git a/NEWS.rst b/NEWS.rst
index 2b01545..4defd5a 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -6,6 +6,7 @@ Version history
 ===================
 
 - Fix the leakage of package repositories from a job to the next
+- Add support for Python 3.11.
 
 0.0.39 (2023-01-06)
 ===================
diff --git a/lpcraft/config.py b/lpcraft/config.py
index b614a00..7c36713 100644
--- a/lpcraft/config.py
+++ b/lpcraft/config.py
@@ -220,9 +220,9 @@ class PackageRepository(ModelConfigDefaults):
             for suite in self.suites:
                 assert self.components is not None
                 if self.trusted:
-                    yield f"{format} [trusted={self.trusted}] {self.url!s} {suite} {' '.join(self.components)}"  # noqa: E501
+                    yield f"{format.value} [trusted={self.trusted}] {self.url!s} {suite.value} {' '.join(self.components)}"  # noqa: E501
                 else:
-                    yield f"{format} {self.url!s} {suite} {' '.join(self.components)}"  # noqa: E501
+                    yield f"{format.value} {self.url!s} {suite.value} {' '.join(self.components)}"  # noqa: E501
 
 
 class Job(ModelConfigDefaults):
diff --git a/setup.cfg b/setup.cfg
index d115049..0cebca5 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -17,6 +17,7 @@ classifiers =
     Programming Language :: Python :: 3.8
     Programming Language :: Python :: 3.9
     Programming Language :: Python :: 3.10
+    Programming Language :: Python :: 3.11
     Programming Language :: Python :: Implementation :: CPython
 
 [options]
diff --git a/tox.ini b/tox.ini
index 409c12f..2aab910 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,6 +5,7 @@ envlist =
     py38
     py39
     py310
+    py311
     coverage
     docs