mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-28 20:23:36 +00:00
Remove Python 3.10 tomli fallbacks
With requires-python >=3.11, tomllib is always available, so the version-conditional tomli imports are dead code. - import tomllib directly in the cli and core config loaders, the mcp_server and platform_api config validators, dev_install.py, and the cli and cookiecutter tests; dev_install.py no longer pip-installs tomli on the fly - drop the tomli>=2.0; python_version<'3.11' dependency from cli, core, mcp_server, and platform_api, plus platform_api's backport comment - raise the fake-extension fixtures in cli/conftest.py, core/integration/conftest.py, and the charting test metadata to >=3.11 - relock cli, core, mcp_server, and platform_api; only the tomli requires-dist entry is removed and resolution markers are reordered, no package versions change
This commit is contained in:
@@ -3,15 +3,10 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import sys
|
||||
import tomllib
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
if sys.version_info >= (3, 11): # pragma: no cover
|
||||
import tomllib
|
||||
else: # pragma: no cover
|
||||
import tomli as tomllib
|
||||
|
||||
DEFAULT_CONFIG_NAMES: tuple[str, ...] = ("openbb.toml", ".openbb.toml")
|
||||
PYPROJECT_NAME = "pyproject.toml"
|
||||
PYPROJECT_TABLE: tuple[str, ...] = ("tool", "openbb-cli")
|
||||
|
||||
Reference in New Issue
Block a user