diff --git a/.flake8 b/.flake8 new file mode 100644 index 000000000..d2f090777 --- /dev/null +++ b/.flake8 @@ -0,0 +1,15 @@ +[flake8] +exclude = + docs/* + resources/* + licenses/* +max-complexity = 45 +max-line-length = 90 +min-python-version = 3.9.0 +per-file-ignores = + singlestoredb/__init__.py:F401 + singlestoredb/fusion/__init__.py:F401 + singlestoredb/fusion/grammar.py:E501 + singlestoredb/http/__init__.py:F401 + singlestoredb/management/__init__.py:F401 + singlestoredb/mysql/__init__.py:F401 diff --git a/.github/workflows/code-check.yml b/.github/workflows/code-check.yml index dc19d8952..8bad6fd3b 100644 --- a/.github/workflows/code-check.yml +++ b/.github/workflows/code-check.yml @@ -39,12 +39,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements.txt - pip install -r test-requirements.txt - - - name: Install SingleStore package - run: | - pip install . + pip install -e ".[dev]" - name: Check for changes in monitored directories id: check-changes diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 7a456260a..9b388cf62 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -33,12 +33,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements.txt - pip install -r test-requirements.txt - - - name: Install SingleStore package - run: | - pip install . + pip install -e ".[dev]" - name: Run MySQL protocol tests run: | diff --git a/.github/workflows/fusion-docs.yml b/.github/workflows/fusion-docs.yml index 11b94e298..c82840512 100644 --- a/.github/workflows/fusion-docs.yml +++ b/.github/workflows/fusion-docs.yml @@ -27,10 +27,6 @@ jobs: run: | python --version python -m pip install --upgrade pip - pip install -r requirements.txt - - - name: Install package - run: | pip install . - name: Build Fusion docs diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4b89ea077..e555bc4a3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -39,7 +39,7 @@ jobs: run: | python --version python -m pip install --upgrade pip - pip install -r requirements.txt + pip install . - name: Initialize database id: initialize-database @@ -78,8 +78,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements.txt - pip install -r test-requirements.txt + pip install -e ".[dev]" - name: Build sdist if: runner.os == 'Linux' @@ -211,7 +210,7 @@ jobs: run: | python --version python -m pip install --upgrade pip - pip install -r requirements.txt + pip install . - name: Drop database if: ${{ always() }} diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index 5dad06360..27c2a9282 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -24,7 +24,7 @@ jobs: run: | python --version python -m pip install --upgrade pip - pip install -r requirements.txt + pip install . - name: Initialize database id: initialize-database @@ -111,12 +111,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements.txt - pip install -r test-requirements.txt - - - name: Install SingleStore package - run: | - pip install . --no-build-isolation + pip install -e ".[dev]" - name: Run tests if: ${{ matrix.driver != 'https' }} @@ -151,7 +146,7 @@ jobs: run: | python --version python -m pip install --upgrade pip - pip install -r requirements.txt + pip install . - name: Drop database if: ${{ always() }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 524ce3581..b9a9cf276 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,16 +29,12 @@ repos: rev: v3.12.0 hooks: - id: reorder-python-imports - args: [--py36-plus] + args: [--py39-plus] - repo: https://github.com/asottile/add-trailing-comma rev: v3.1.0 hooks: - id: add-trailing-comma args: [--py36-plus] -- repo: https://github.com/asottile/setup-cfg-fmt - rev: v2.5.0 - hooks: - - id: setup-cfg-fmt - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.14.1 hooks: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ebf27708c..d6ca0304b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,8 +27,13 @@ pre-commit run --all-files To create a test environment, do the following: ``` -pip install -r requirements.txt -pip install -r test-requirements.txt +pip install -e ".[dev]" +``` + +Or if you only need specific dependency groups: +``` +pip install -e ".[test]" # Just testing dependencies +pip install -e ".[docs]" # Just documentation dependencies ``` If you have Docker installed, you can run the tests as follows. Note that diff --git a/RELEASE.md b/RELEASE.md index 3af452714..30fd56dda 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -8,7 +8,7 @@ resources/bump_version.py < major | minor | patch > ``` -This will bump the version number in `setup.cfg` and `singlestoredb/__init__.py` +This will bump the version number in `pyproject.toml` and `singlestoredb/__init__.py` using semantic versioning rules: minor bump for new features, patch bump for bug fixes. It will genarete a list of changes since the last version and ask for confirmation of the release notes in `docs/src/whatsnew.rst`. diff --git a/accel.c b/accel.c index b1ef0419d..a785b9754 100644 --- a/accel.c +++ b/accel.c @@ -3079,11 +3079,11 @@ static PyObject *dump_rowdat_1_numpy(PyObject *self, PyObject *args, PyObject *k PyErr_SetString(PyExc_ValueError, "value is outside the valid range for UNSIGNED INT"); \ goto error; \ } -#define CHECK_BIGINT(x, unsigned_input) if ((x) < ((unsigned_input) ? 0 : -9223372036854775808) || (x) > 9223372036854775807) { \ +#define CHECK_BIGINT(x, unsigned_input) if ((x) < ((unsigned_input) ? 0 : INT64_MIN) || (x) > INT64_MAX) { \ PyErr_SetString(PyExc_ValueError, "value is outside the valid range for BIGINT"); \ goto error; \ } -#define CHECK_UNSIGNED_BIGINT(x, unsigned_input) if ((x) < 0 || (x) > 18446744073709551615) { \ +#define CHECK_UNSIGNED_BIGINT(x, unsigned_input) if ((x) < 0) { \ PyErr_SetString(PyExc_ValueError, "value is outside the valid range for UNSIGNED BIGINT"); \ goto error; \ } diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..256ff3a4b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,118 @@ +[build-system] +requires = ["build", "setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "singlestoredb" +version = "1.15.8" +description = "Interface to the SingleStoreDB database and workspace management APIs" +readme = {file = "README.md", content-type = "text/markdown"} +license = {text = "Apache-2.0"} +authors = [ + {name = "SingleStore", email = "support@singlestore.com"} +] +requires-python = ">=3.9" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Database", +] +dependencies = [ + "PyJWT", + "parsimonious", + "requests", + "sqlparams", + "tomli>=1.1.0; python_version < '3.11'", + "typing-extensions<=4.13.2; python_version < '3.11'", +] + +[project.urls] +Homepage = "https://github.com/singlestore-labs/singlestoredb-python" + +[project.optional-dependencies] +dataframe = ["ibis-singlestoredb"] +dbt = ["dbt-singlestore"] +docker = ["docker"] +ed22519 = ["PyNaCl>=1.4.0"] +gssapi = ["gssapi"] +ibis = ["ibis-singlestoredb"] +kerberos = ["gssapi"] +pytest = ["pytest"] +rsa = ["cryptography"] +sqlalchemy = ["sqlalchemy-singlestoredb>=1.0.0"] +vectorstore = ["singlestore-vectorstore>=0.1.2"] + +# Development dependency groups +test = [ + "coverage", + "dash", + "fastapi", + "ipython", + "jupysql", + "pandas", + "parameterized", + "polars", + "pyarrow", + "pydantic", + "pytest", + "pytest-cov", + "singlestore-vectorstore>=0.1.2", + "uvicorn", +] +docs = [ + "sphinx", + "sphinx_rtd_theme", +] +build = [ + "build", + "setuptools>=61.0", + "wheel", +] +dev = [ + "singlestoredb[test,docs,build]", +] + +[project.entry-points.pytest11] +singlestoredb = "singlestoredb.pytest" + +[tool.setuptools] +include-package-data = true + +[tool.setuptools.packages.find] +exclude = ["docs*", "resources*", "examples*", "licenses*"] + +[tool.setuptools.package-data] +"*" = ["*.typed", "*.sql", "*.csv", "*.ipynb"] + +[tool.pytest.ini_options] +markers = [ + "management", +] + +[tool.mypy] +check_untyped_defs = true +disallow_any_generics = true +disallow_incomplete_defs = true +disallow_untyped_defs = true +no_implicit_optional = true +warn_redundant_casts = true +warn_unused_ignores = false + +[[tool.mypy.overrides]] +module = "testing.*" +disallow_untyped_defs = false + +[[tool.mypy.overrides]] +module = "tests.*" +disallow_untyped_defs = false + +[tool.coverage.run] +source_pkgs = ["singlestoredb"] + +[tool.coverage.report] +omit = [ + "setup.py", + "*/tests/*", + "*/docs/*", +] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index bdc386103..000000000 --- a/requirements.txt +++ /dev/null @@ -1,9 +0,0 @@ -build -parsimonious -PyJWT -requests -setuptools -sqlparams -tomli>=1.1.0; python_version < '3.11' -typing_extensions<=4.13.2 -wheel diff --git a/resources/build_docs.py b/resources/build_docs.py index aa78b2c42..628f3a1fd 100755 --- a/resources/build_docs.py +++ b/resources/build_docs.py @@ -27,10 +27,10 @@ import sys import time from pathlib import Path +from re import Match from typing import Any from typing import Dict from typing import List -from typing import Match from typing import Optional # Detect script location and set up paths diff --git a/resources/bump_version.py b/resources/bump_version.py index 7345772ef..3730aec07 100755 --- a/resources/bump_version.py +++ b/resources/bump_version.py @@ -36,14 +36,14 @@ def step(step_num: int, total_steps: int, message: str) -> None: def get_current_version() -> str: - """Get the current version from setup.cfg.""" - setup_cfg_path = Path(__file__).parent.parent / 'setup.cfg' - with open(setup_cfg_path, 'r') as f: + """Get the current version from pyproject.toml.""" + pyproject_path = Path(__file__).parent.parent / 'pyproject.toml' + with open(pyproject_path, 'r') as f: content = f.read() - match = re.search(r'^version\s*=\s*(.+)$', content, re.MULTILINE) + match = re.search(r'^version\s*=\s*["\'](.+)["\']$', content, re.MULTILINE) if not match: - raise ValueError('Could not find version in setup.cfg') + raise ValueError('Could not find version in pyproject.toml') return match.group(1).strip() @@ -75,10 +75,10 @@ def update_version_in_file(file_path: Path, old_version: str, new_version: str) with open(file_path, 'r') as f: content = f.read() - # For setup.cfg - if file_path.name == 'setup.cfg': - pattern = r'^(version\s*=\s*)' + re.escape(old_version) + r'$' - replacement = r'\g<1>' + new_version + # For pyproject.toml + if file_path.name == 'pyproject.toml': + pattern = r'^(version\s*=\s*["\'])' + re.escape(old_version) + r'(["\'])$' + replacement = r'\g<1>' + new_version + r'\g<2>' content = re.sub(pattern, replacement, content, flags=re.MULTILINE) # For __init__.py @@ -307,7 +307,7 @@ def stage_files() -> None: status('📦 Staging files for commit...') files_to_stage = [ - 'setup.cfg', + 'pyproject.toml', 'singlestoredb/__init__.py', 'docs/src/whatsnew.rst', 'docs/', # All generated documentation files @@ -360,8 +360,8 @@ def main() -> None: step(2, 6, 'Updating version in files') start_time = time.time() - update_version_in_file(Path(__file__).parent.parent / 'setup.cfg', current_version, new_version) - status(' ✓ Updated setup.cfg') + update_version_in_file(Path(__file__).parent.parent / 'pyproject.toml', current_version, new_version) + status(' ✓ Updated pyproject.toml') update_version_in_file( Path(__file__).parent.parent / 'singlestoredb' / '__init__.py', @@ -399,7 +399,7 @@ def main() -> None: status('🔄 Reverting version changes...') # Revert version changes - update_version_in_file(Path(__file__).parent.parent / 'setup.cfg', new_version, current_version) + update_version_in_file(Path(__file__).parent.parent / 'pyproject.toml', new_version, current_version) update_version_in_file( Path(__file__).parent.parent / 'singlestoredb' / '__init__.py', new_version, diff --git a/resources/create_release.py b/resources/create_release.py index a7494ee7d..a67699ad0 100755 --- a/resources/create_release.py +++ b/resources/create_release.py @@ -13,7 +13,7 @@ python create_release.py [--version VERSION] [--dry-run] Examples: - python create_release.py # Use current version from setup.cfg + python create_release.py # Use current version from pyproject.toml python create_release.py --version 1.15.6 # Use specific version python create_release.py --dry-run # Preview without executing """ @@ -39,19 +39,19 @@ def step(step_num: int, total_steps: int, message: str) -> None: print(f'📍 Step {step_num}/{total_steps}: {message}', file=sys.stderr) -def get_version_from_setup_cfg() -> str: - """Extract the current version from setup.cfg.""" - setup_cfg_path = Path(__file__).parent.parent / 'setup.cfg' +def get_version_from_pyproject() -> str: + """Extract the current version from pyproject.toml.""" + pyproject_path = Path(__file__).parent.parent / 'pyproject.toml' - if not setup_cfg_path.exists(): - raise FileNotFoundError(f'Could not find setup.cfg at {setup_cfg_path}') + if not pyproject_path.exists(): + raise FileNotFoundError(f'Could not find pyproject.toml at {pyproject_path}') - with open(setup_cfg_path, 'r') as f: + with open(pyproject_path, 'r') as f: content = f.read() - match = re.search(r'^version\s*=\s*(.+)$', content, re.MULTILINE) + match = re.search(r'^version\s*=\s*["\'](.+)["\']$', content, re.MULTILINE) if not match: - raise ValueError('Could not find version in setup.cfg') + raise ValueError('Could not find version in pyproject.toml') return match.group(1).strip() @@ -228,14 +228,14 @@ def main() -> None: description='Create GitHub release for SingleStoreDB Python SDK', formatter_class=argparse.RawDescriptionHelpFormatter, epilog='''Examples: - %(prog)s # Use current version from setup.cfg + %(prog)s # Use current version from pyproject.toml %(prog)s --version 1.15.6 # Use specific version %(prog)s --dry-run # Preview without executing''', ) parser.add_argument( '--version', - help='Version to release (default: extract from setup.cfg)', + help='Version to release (default: extract from pyproject.toml)', ) parser.add_argument( @@ -267,8 +267,8 @@ def main() -> None: version = args.version status(f'Using specified version: {version}') else: - version = get_version_from_setup_cfg() - status(f'Extracted from setup.cfg: {version}') + version = get_version_from_pyproject() + status(f'Extracted from pyproject.toml: {version}') elapsed = time.time() - start_time status(f'✅ Version determined in {elapsed:.1f}s') diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index acf91319b..000000000 --- a/setup.cfg +++ /dev/null @@ -1,121 +0,0 @@ -[metadata] -name = singlestoredb -version = 1.15.8 -description = Interface to the SingleStoreDB database and workspace management APIs -long_description = file: README.md -long_description_content_type = text/markdown -url = https://github.com/singlestore-labs/singlestoredb-python -author = SingleStore -author_email = support@singlestore.com -license = Apache-2.0 -license_files = LICENSE -classifiers = - Development Status :: 5 - Production/Stable - License :: OSI Approved :: Apache Software License - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Topic :: Database - -[options] -packages = find: -install_requires = - PyJWT - build - parsimonious - requests - setuptools - sqlparams - wheel - tomli>=1.1.0;python_version < '3.11' - typing-extensions<=4.13.2;python_version < '3.11' -python_requires = >=3.9 -include_package_data = True -tests_require = - coverage - pytest - pandas - -[options.packages.find] -exclude = - docs* - resources* - examples* - licenses* - -[options.entry_points] -pytest11 = - singlestoredb = singlestoredb.pytest - -[options.extras_require] -dataframe = - ibis-singlestoredb -dbt = - dbt-singlestore -docker = - docker -ed22519 = - PyNaCl>=1.4.0 -gssapi = - gssapi -ibis = - ibis-singlestoredb -kerberos = - gssapi -pytest = - pytest -rsa = - cryptography -sqlalchemy = - sqlalchemy-singlestoredb>=1.0.0 -vectorstore = - singlestore-vectorstore>=0.1.2 - -[options.package_data] -* = - *.typed - *.sql - *.csv - *.ipynb - -[tool:pytest] -markers = - management - -[flake8] -exclude = - docs/* - resources/* - licenses/* -max-complexity = 45 -max-line-length = 90 -per-file-ignores = - singlestoredb/__init__.py:F401 - singlestoredb/fusion/__init__.py:F401 - singlestoredb/fusion/grammar.py:E501 - singlestoredb/http/__init__.py:F401 - singlestoredb/management/__init__.py:F401 - singlestoredb/mysql/__init__.py:F401 - -[mypy] -check_untyped_defs = true -disallow_any_generics = true -disallow_incomplete_defs = true -disallow_untyped_defs = true -no_implicit_optional = true -warn_redundant_casts = true -warn_unused_ignores = false - -[mypy-testing.*] -disallow_untyped_defs = false - -[mypy-tests.*] -disallow_untyped_defs = false - -[coverage:run] -source_pkgs = singlestoredb - -[coverage:report] -omit = - setup.py - */tests/* - */docs/* diff --git a/singlestoredb/connection.py b/singlestoredb/connection.py index 258ab5813..425def6f2 100644 --- a/singlestoredb/connection.py +++ b/singlestoredb/connection.py @@ -9,15 +9,15 @@ import sys import warnings import weakref +from collections.abc import Iterator from collections.abc import Mapping from collections.abc import MutableMapping +from collections.abc import Sequence from typing import Any from typing import Callable from typing import Dict -from typing import Iterator from typing import List from typing import Optional -from typing import Sequence from typing import Tuple from typing import Union from urllib.parse import parse_qs diff --git a/singlestoredb/functions/ext/asgi.py b/singlestoredb/functions/ext/asgi.py index f2e33a338..d9090b38f 100755 --- a/singlestoredb/functions/ext/asgi.py +++ b/singlestoredb/functions/ext/asgi.py @@ -48,15 +48,15 @@ import uuid import zipfile import zipimport +from collections.abc import Awaitable +from collections.abc import Iterable +from collections.abc import Sequence from types import ModuleType from typing import Any -from typing import Awaitable from typing import Callable from typing import Dict -from typing import Iterable from typing import List from typing import Optional -from typing import Sequence from typing import Set from typing import Tuple from typing import Union diff --git a/singlestoredb/functions/ext/rowdat_1.py b/singlestoredb/functions/ext/rowdat_1.py index 83052b671..94e966b77 100644 --- a/singlestoredb/functions/ext/rowdat_1.py +++ b/singlestoredb/functions/ext/rowdat_1.py @@ -1,11 +1,11 @@ #!/usr/bin/env python3 import struct import warnings +from collections.abc import Sequence from io import BytesIO from typing import Any from typing import List from typing import Optional -from typing import Sequence from typing import Tuple from typing import TYPE_CHECKING diff --git a/singlestoredb/functions/signature.py b/singlestoredb/functions/signature.py index 841be0eb2..69cbb437c 100644 --- a/singlestoredb/functions/signature.py +++ b/singlestoredb/functions/signature.py @@ -9,12 +9,12 @@ import sys import types import typing +from collections.abc import Sequence from typing import Any from typing import Callable from typing import Dict from typing import List from typing import Optional -from typing import Sequence from typing import Tuple from typing import TypeVar from typing import Union diff --git a/singlestoredb/functions/typing/__init__.py b/singlestoredb/functions/typing/__init__.py index 12770a78d..66bb98522 100644 --- a/singlestoredb/functions/typing/__init__.py +++ b/singlestoredb/functions/typing/__init__.py @@ -1,5 +1,5 @@ +from collections.abc import Iterable from typing import Any -from typing import Iterable from typing import Tuple from typing import TypeVar diff --git a/singlestoredb/functions/utils.py b/singlestoredb/functions/utils.py index 8849f32c0..6e4aa6295 100644 --- a/singlestoredb/functions/utils.py +++ b/singlestoredb/functions/utils.py @@ -4,10 +4,10 @@ import sys import types import typing +from collections.abc import Iterable from enum import Enum from typing import Any from typing import Dict -from typing import Iterable from typing import Tuple from typing import Union diff --git a/singlestoredb/fusion/handler.py b/singlestoredb/fusion/handler.py index 98b082893..b70d9e6d1 100644 --- a/singlestoredb/fusion/handler.py +++ b/singlestoredb/fusion/handler.py @@ -5,10 +5,10 @@ import re import sys import textwrap +from collections.abc import Iterable from typing import Any from typing import Callable from typing import Dict -from typing import Iterable from typing import List from typing import Optional from typing import Set diff --git a/singlestoredb/fusion/result.py b/singlestoredb/fusion/result.py index c9c0229a5..82640b7b7 100644 --- a/singlestoredb/fusion/result.py +++ b/singlestoredb/fusion/result.py @@ -2,8 +2,8 @@ from __future__ import annotations import re +from collections.abc import Iterable from typing import Any -from typing import Iterable from typing import List from typing import Optional from typing import Tuple diff --git a/singlestoredb/http/connection.py b/singlestoredb/http/connection.py index 1b5ceb515..28f48e8bf 100644 --- a/singlestoredb/http/connection.py +++ b/singlestoredb/http/connection.py @@ -10,13 +10,13 @@ import re import time from base64 import b64decode +from collections.abc import Iterable +from collections.abc import Sequence from typing import Any from typing import Callable from typing import Dict -from typing import Iterable from typing import List from typing import Optional -from typing import Sequence from typing import Tuple from typing import Union from urllib.parse import urljoin diff --git a/singlestoredb/management/utils.py b/singlestoredb/management/utils.py index c398f006d..5aa072e41 100644 --- a/singlestoredb/management/utils.py +++ b/singlestoredb/management/utils.py @@ -6,11 +6,11 @@ import os import re import sys +from collections.abc import Mapping from typing import Any from typing import Callable from typing import Dict from typing import List -from typing import Mapping from typing import Optional from typing import SupportsIndex from typing import Tuple diff --git a/singlestoredb/mysql/connection.py b/singlestoredb/mysql/connection.py index 7bc34f000..f96ebb0cd 100644 --- a/singlestoredb/mysql/connection.py +++ b/singlestoredb/mysql/connection.py @@ -13,9 +13,9 @@ import sys import traceback import warnings +from collections.abc import Iterable from typing import Any from typing import Dict -from typing import Iterable try: import _singlestoredb_accel diff --git a/singlestoredb/pytest.py b/singlestoredb/pytest.py index ae3b189c5..22efd68df 100644 --- a/singlestoredb/pytest.py +++ b/singlestoredb/pytest.py @@ -6,8 +6,8 @@ import subprocess import time import uuid +from collections.abc import Iterator from enum import Enum -from typing import Iterator from typing import Optional import pytest diff --git a/singlestoredb/tests/test_management.py b/singlestoredb/tests/test_management.py index b7ceb5e8d..dd176f3de 100755 --- a/singlestoredb/tests/test_management.py +++ b/singlestoredb/tests/test_management.py @@ -30,6 +30,7 @@ def shared_database_name(s): return re.sub(r'[^\w]', '', s).replace('-', '_').lower() +@pytest.mark.skip(reason='Legacy cluster Management API is going away') @pytest.mark.management class TestCluster(unittest.TestCase): diff --git a/singlestoredb/utils/config.py b/singlestoredb/utils/config.py index 8197ce72a..6b7cdd9f3 100644 --- a/singlestoredb/utils/config.py +++ b/singlestoredb/utils/config.py @@ -27,12 +27,12 @@ import contextlib import os import re +from collections.abc import Iterator +from collections.abc import Mapping from typing import Any from typing import Callable from typing import Dict -from typing import Iterator from typing import List -from typing import Mapping from typing import Optional from typing import Tuple from typing import Union diff --git a/singlestoredb/utils/mogrify.py b/singlestoredb/utils/mogrify.py index adcd46360..2785e46ab 100644 --- a/singlestoredb/utils/mogrify.py +++ b/singlestoredb/utils/mogrify.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 +from collections.abc import Sequence from typing import Any from typing import Dict from typing import Optional -from typing import Sequence from typing import Union from ..mysql import converters diff --git a/singlestoredb/utils/xdict.py b/singlestoredb/utils/xdict.py index bdeebc6ce..56a906e25 100644 --- a/singlestoredb/utils/xdict.py +++ b/singlestoredb/utils/xdict.py @@ -19,14 +19,14 @@ """Dictionary that allows setting nested keys by period (.) delimited strings.""" import copy import re +from collections.abc import ItemsView +from collections.abc import Iterable +from collections.abc import KeysView +from collections.abc import ValuesView from typing import Any from typing import Dict -from typing import ItemsView -from typing import Iterable -from typing import KeysView from typing import List from typing import Tuple -from typing import ValuesView def _is_compound_key(key: str) -> bool: diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index 641ad5f22..000000000 --- a/test-requirements.txt +++ /dev/null @@ -1,18 +0,0 @@ -coverage -dash -fastapi -ipython -jupysql -pandas -parameterized -polars -pyarrow -pydantic -pygeos ; python_version < '3.12' -pytest -pytest-cov -shapely -singlestore-vectorstore>=0.1.2 -sphinx -sphinx_rtd_theme -uvicorn