Update to Python 3.12
* Remove toml dependency since that comes with Python as of 3.11 * Update toml usage to tomllib in config.py * Update `with open(...)` for toml file reading to be 'rb' * Update Pipfile.lock for locked dependencies to work with Python 3.12 Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import dataclasses
|
||||
from pathlib import Path
|
||||
from typing import IO, Any, Mapping, Sequence, Set
|
||||
|
||||
import toml
|
||||
import tomllib
|
||||
|
||||
|
||||
PluginConfig = Mapping[str, Any]
|
||||
@@ -34,7 +33,7 @@ class ServerConfig:
|
||||
loglevel: str | None = None
|
||||
|
||||
def load(self, fp: IO[str]):
|
||||
obj = toml.load(fp)
|
||||
obj = tomllib.load(fp)
|
||||
|
||||
if "server" not in obj:
|
||||
raise ConfigError("server", "must be present")
|
||||
|
||||
Reference in New Issue
Block a user