chore: use tomllib on Python 3.11 (#1047)

* Use tomllib on Python 3.11

* delint

Co-authored-by: hauntsaninja <>
This commit is contained in:
Shantanu
2022-04-16 00:00:57 -04:00
committed by GitHub
co-authored by hauntsaninja <>
parent 9ae6ae2756
commit 6d4431306e
8 changed files with 48 additions and 16 deletions
+7 -2
View File
@@ -1,6 +1,11 @@
import sys
from typing import Dict, List
import tomli
if sys.version_info >= (3, 11):
import tomllib
else:
import tomli as tomllib
from packaging.version import Version
from cibuildwheel.extra import Printable, dump_python_configurations
@@ -12,7 +17,7 @@ def test_compare_configs():
txt = f1.read()
with open(resources_dir / "build-platforms.toml", "rb") as f2:
dict_txt = tomli.load(f2)
dict_txt = tomllib.load(f2)
new_txt = dump_python_configurations(dict_txt)
print(new_txt)