File: remove_undeclared_dependency_on_toml.patch

package info (click to toggle)
python-djangorestframework-yaml 3.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 268 kB
  • sloc: python: 483; makefile: 11
file content (19 lines) | stat: -rw-r--r-- 652 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- a/tests/_test_version.py
+++ b/tests/_test_version.py
@@ -1,6 +1,6 @@
 from pathlib import Path
 
-import toml
+import tomllib
 from django.test import TestCase
 
 import rest_framework_yaml
@@ -12,7 +12,7 @@
     def test_versions_are_in_sync(self) -> None:
         """Ensure that the version on pyproject.toml and package.__init__.py match."""
         path = Path(__file__).parent.parent / "pyproject.toml"
-        pyproject = toml.loads(path.read_text())
+        pyproject = tomllib.loads(path.read_text())
         pyproject_version = pyproject["tool"]["poetry"]["version"]
 
         package_init_version = rest_framework_yaml.__version__