diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9fc587f..2be7298 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- python-version: ["pypy-3.8", "3.8", "3.9", "3.10", "3.11"]
+ python-version: ["pypy-3.8", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Check out repository
uses: actions/checkout@v3
diff --git a/.gitpod.yml b/.gitpod.yml
index c192cd0..23d9055 100644
--- a/.gitpod.yml
+++ b/.gitpod.yml
@@ -7,7 +7,7 @@ tasks:
# Upgrade pyenv itself
pyenv update
- export PY_VERSIONS="3.8 3.9 3.10 3.11"
+ export PY_VERSIONS="3.8 3.9 3.10 3.11 3.12"
# Install all supported Python versions
for py in $PY_VERSIONS;
diff --git a/CHANGES.rst b/CHANGES.rst
index bcd5c63..4ed704f 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,11 @@
Changes
=======
+43.0 (2024-02-26)
+-----------------
+- Allow HTML5 ``picture`` tag through cleaner (#299)
+- Test against Python 3.12 (#300)
+
42.0 (2023-09-07)
-----------------
diff --git a/pyproject.toml b/pyproject.toml
index 72a50f1..dcae475 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "readme_renderer"
-version = "42.0"
+version = "43.0"
description = "readme_renderer is a library for rendering readme descriptions for Warehouse"
authors = [
{name = "The Python Packaging Authority", email = "admin@mail.pypi.org"}
@@ -24,6 +24,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Typing :: Typed"
diff --git a/readme_renderer/__main__.py b/readme_renderer/__main__.py
index d3ebab3..e7c1187 100644
--- a/readme_renderer/__main__.py
+++ b/readme_renderer/__main__.py
@@ -28,7 +28,7 @@ def main(cli_args: Optional[List[str]] = None) -> None:
# Infer the format of the description from package metadata.
if not content_format:
- content_type = message.get("Description-Content-Type", "text/x-rst") # type: ignore[attr-defined] # noqa: E501 https://github.com/python/typeshed/issues/10021
+ content_type = message.get("Description-Content-Type", "text/x-rst")
if content_type == "text/x-rst":
content_format = "rst"
elif content_type == "text/markdown":
diff --git a/readme_renderer/clean.py b/readme_renderer/clean.py
index b081e28..6cd5972 100644
--- a/readme_renderer/clean.py
+++ b/readme_renderer/clean.py
@@ -27,7 +27,7 @@
"dl", "dt", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "img", "p", "pre",
"span", "sub", "summary", "sup", "table", "tbody", "td", "th", "thead",
"tr", "tt", "kbd", "var", "input", "section", "aside", "nav", "s", "figure",
- "figcaption",
+ "figcaption", "picture",
}
ALLOWED_ATTRIBUTES = {
diff --git a/tests/fixtures/test_GFM_picture.html b/tests/fixtures/test_GFM_picture.html
new file mode 100644
index 0000000..460cf35
--- /dev/null
+++ b/tests/fixtures/test_GFM_picture.html
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tests/fixtures/test_GFM_picture.md b/tests/fixtures/test_GFM_picture.md
new file mode 100644
index 0000000..a6de454
--- /dev/null
+++ b/tests/fixtures/test_GFM_picture.md
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tox.ini b/tox.ini
index 8ae2e5d..4a92134 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist = py38,py39,py310,py311,pep8,packaging,noextra,mypy
+envlist = py38,py39,py310,py311,py312,pep8,packaging,noextra,mypy
isolated_build = True
[testenv]