Skip to content

Commit 62669e7

Browse files
committed
Bump python-version lowerbound to 3.11
Also, updated 3rd party that was added to stdlib: - importlib.resources instead of importlib_resources - tomllib instead of tomli
1 parent 37fdf20 commit 62669e7

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "pulp-docs"
77
version = "0.0.1"
8+
requires-python = ">= 3.11"
89
dependencies = [
910
"mkdocs-material",
1011
"mkdocstrings",
@@ -13,10 +14,8 @@ dependencies = [
1314
"mkdocs-site-urls",
1415
"mkdocs-literate-nav",
1516
"bs4",
16-
"importlib_resources",
1717
"httpx",
1818
"rich",
19-
"tomli",
2019
]
2120

2221
[project.scripts]

src/pulp_docs/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import typing as t
55
from pathlib import Path
66

7-
from importlib_resources import files
7+
from importlib.resources import files
88

99
TMP_DIR = Path("tmp")
1010
WORKDIR = Path.home() / "workspace" / "multirepo-prototype"
@@ -36,8 +36,8 @@ def __init__(self, from_environ: bool = False):
3636
if from_environ is False:
3737
self.verbose = False
3838
self.workdir = Path().absolute()
39-
self.mkdocs_file = files("pulp_docs").joinpath("data/mkdocs.yml").absolute()
40-
self.repolist = files("pulp_docs").joinpath("data/repolist.yml").absolute()
39+
self.mkdocs_file = files("pulp_docs").joinpath("data/mkdocs.yml")
40+
self.repolist = files("pulp_docs").joinpath("data/repolist.yml")
4141
self.clear_cache = False
4242

4343
if env_mkdocs := os.environ.get("PULPDOCS_MKDOCS_FILE"):

src/pulp_docs/openapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from pathlib import Path
1111
from typing import NamedTuple, Optional
1212

13-
from importlib_resources import files
13+
from importlib.resources import files
1414

1515
from pulp_docs.constants import BASE_TMPDIR_NAME
1616
from pulp_docs.repository import Repos
@@ -20,7 +20,7 @@ def main(
2020
output_dir: Path, plugins_filter: Optional[list[str]] = None, dry_run: bool = False
2121
):
2222
"""Creates openapi json files for all or selected plugins in output dir."""
23-
repolist = files("pulp_docs").joinpath("data/repolist.yml").absolute()
23+
repolist = str(files("pulp_docs").joinpath("data/repolist.yml"))
2424
repos = Repos.from_yaml(repolist).get_repos(["content"])
2525
if plugins_filter:
2626
repos = [p for p in repos if p.name in plugins_filter]

src/pulp_docs/repository.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import httpx
2020
import configparser
21-
import tomli
21+
import tomllib
2222
import yaml
2323

2424
from pulp_docs.utils.general import get_git_ignored_files
@@ -151,7 +151,7 @@ def download(
151151
else:
152152
version_file = src_copy_path / "pyproject.toml"
153153
if version_file.exists():
154-
content = tomli.loads(version_file.read_text())
154+
content = tomllib.loads(version_file.read_text())
155155
self.version = (
156156
content.get("tool", {})
157157
.get("bumpversion", {})

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22
requires =
33
tox>=4
4-
env_list = py{38,39,310,311,312}
4+
env_list = py{311,312}
55

66
[testenv]
77
description = run tests

0 commit comments

Comments
 (0)