Skip to content

Commit

Permalink
Dependency optimization: tomli/tomllib
Browse files Browse the repository at this point in the history
  • Loading branch information
ri-gilfanov committed Sep 15, 2024
1 parent 2b7a4aa commit 891ec68
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ aiohttp-sqlalchemy
:target: https://pepy.tech/project/aiohttp-sqlalchemy
:alt: PyPI downloads count

.. |Python versions| image:: https://img.shields.io/badge/Python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue
.. |Python versions| image:: https://img.shields.io/badge/Python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue
:target: https://pypi.org/project/aiohttp-sqlalchemy/
:alt: Python version support

Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pytest = ">=8.3.3"
pytest-cov = ">=5.0.0"
Sphinx = ">=7.1.2"
sphinx_rtd_theme = ">=2.0.0"
tomli = ">=2.0.1"
tomli = { version = "^2.0.1", optional = true, python = "~3.8 || ~3.9 || ~3.10" }

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
8 changes: 6 additions & 2 deletions tests/test_aiohttp_sqlalchemy.py → tests/test_metainfo.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
from __future__ import annotations

import sys
from pathlib import Path

import tomli
if sys.version_info < (3, 11):
import tomli as tomllib
else:
import tomllib

from aiohttp_sqlalchemy import __version__


def test_version() -> None:
with Path("./pyproject.toml").open("rb") as f:
pyproject = tomli.load(f)
pyproject = tomllib.load(f)
version = pyproject["tool"]["poetry"]["version"]
assert __version__ == version

0 comments on commit 891ec68

Please sign in to comment.