Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- name: Bumping version
run: |
python ./scripts/version_bumper.py --target Cargo.toml "${{ github.ref_name }}"
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- name: Bumping version
run: |
python ./scripts/version_bumper.py --target Cargo.toml "${{ github.ref_name }}"
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@ jobs:
strategy:
matrix:
cmd:
- black
- isort
- ruff
- ruff-check
- ruff-format
- mypy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.13"
- name: Run lint check
uses: pre-commit/action@v3.0.0
with:
Expand Down Expand Up @@ -49,7 +48,6 @@ jobs:
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: -p scyllapy --all-features -- -W clippy::all -W clippy::pedantic -D warnings
pytest:
name: ${{matrix.job.os}}-${{matrix.py_version}}
services:
Expand All @@ -64,7 +62,7 @@ jobs:
- 9042:9042
strategy:
matrix:
py_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
py_version: ["3.11", "3.12", "3.13", "3.14"]
job:
- os: ubuntu-latest
ssl_cmd: sudo apt-get update && sudo apt-get install libssl-dev openssl
Expand Down
29 changes: 9 additions & 20 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: python isort
pass_filenames: false
always_run: true
args: ["python"]
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
name: python black
pass_filenames: false
always_run: true
args: ["python"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
Expand All @@ -30,13 +14,18 @@ repos:
pass_filenames: false
args: ["python"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.291
rev: v0.17.0
hooks:
- id: ruff
name: ruff
- id: ruff-check
name: ruff-check
pass_filenames: false
always_run: true
args: ["python", "--fix"]
- id: ruff-format
name: ruff-format
pass_filenames: false
always_run: true
args: ["python"]
- repo: local
hooks:
- id: fmt
Expand Down
26 changes: 13 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ crate-type = ["cdylib"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
chrono = "0.4.31"
chrono = "0.4.45"
eq-float = "0.1.0"
futures = "0.3.28"
log = "0.4.20"
openssl = { version = "0.10.57", features = ["vendored"] }
pyo3 = { version = "0.20.0", features = [
futures = "0.3.34"
log = "0.4.34"
openssl = { version = "0.10.81", features = ["vendored"] }
pyo3 = { version = "0.29.3", features = [
"auto-initialize",
"abi3-py38",
"abi3-py311",
"extension-module",
"chrono",
] }
pyo3-asyncio = { version = "0.20.0", features = ["tokio-runtime"] }
pyo3-log = "0.9.0"
pyo3-async-runtimes = { version = "0.29.0", features = ["tokio-runtime"] }
pyo3-log = "0.13.4"
rustc-hash = "1.1.0"
scylla = { version = "0.12.0", features = ["ssl", "full-serialization"] }
bigdecimal-04 = { package = "bigdecimal", version = "0.4" }
thiserror = "1.0.48"
tokio = { version = "1.32.0", features = ["bytes"] }
uuid = { version = "1.4.1", features = ["v4"] }
time = { version = "*", features = ["formatting", "macros"] }
bigdecimal-04 = { package = "bigdecimal", version = "0.4.11" }
thiserror = "1.0.69"
tokio = { version = "1.53.3", features = ["bytes"] }
uuid = { version = "1.28.0", features = ["v4"] }
time = { version = "0.3.55", features = ["formatting", "macros"] }

[profile.release]
lto = "fat"
Expand Down
152 changes: 83 additions & 69 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,108 +1,122 @@
[project]
name = "scyllapy"
description = "Async scylla driver for python"
requires-python = ">=3.8,<4"
readme = "README.md"
license = { file = "LICENSE" }
keywords = ["scylla", "cassandra", "async-driver", "scylla-driver"]
requires-python = ">=3.11,<4"
license-files = ["LICENSE"]
keywords = ["async-driver", "cassandra", "scylla", "scylla-driver"]
classifiers = [
"Typing :: Typed",
"Topic :: Database",
"Development Status :: 4 - Beta",
"Programming Language :: Rust",
"Operating System :: MacOS",
"Operating System :: Microsoft",
"Operating System :: POSIX :: Linux",
"Intended Audience :: Developers",
"Topic :: Database :: Front-Ends",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: MacOS",
"Operating System :: Microsoft",
"Operating System :: POSIX :: Linux",
"Programming Language :: Rust",
"Topic :: Database",
"Topic :: Database :: Front-Ends",
"Typing :: Typed",
]
dependencies = ["python-dateutil"]
dynamic = ["version"]

[tool.maturin]
python-source = "python"
module-name = "scyllapy._internal"
features = ["pyo3/extension-module"]
[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"

[tool.isort]
profile = "black"
multi_line_output = 3

[tool.maturin]
features = ["pyo3/extension-module"]
module-name = "scyllapy._internal"
python-source = "python"

[tool.mypy]
strict = true
mypy_path = "python"
ignore_missing_imports = true
allow_subclassing_any = true
allow_untyped_calls = true
disallow_subclassing_any = false
disallow_untyped_calls = false
pretty = true
show_error_codes = true
implicit_reexport = true
allow_untyped_decorators = true
warn_return_any = false
warn_unused_ignores = false

[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"
[tool.pytest]
anyio_mode = "auto"

[tool.ruff]
target-version = "py311"
exclude = [".venv/"]
line-length = 88

[tool.ruff.lint]
mccabe = { max-complexity = 10 }
# List of enabled rulsets.
# See https://docs.astral.sh/ruff/rules/ for more information.
select = [
"E", # Error
"F", # Pyflakes
"W", # Pycodestyle
"C90", # McCabe complexity
"N", # pep8-naming
"D", # Pydocstyle
"ANN", # Pytype annotations
"S", # Bandit
"B", # Bugbear
"COM", # Commas
"C4", # Comprehensions
"ISC", # Implicit string concat
"PIE", # Unnecessary code
"T20", # Catch prints
"PYI", # validate pyi files
"Q", # Checks for quotes
"RSE", # Checks raise statements
"RET", # Checks return statements
"SLF", # Self checks
"SIM", # Simplificator
"PTH", # Pathlib checks
"ERA", # Checks for commented out code
"PL", # PyLint checks
"RUF", # Specific to Ruff checks
"E", # Error
"F", # Pyflakes
"W", # Pycodestyle
"C90", # McCabe complexity
"I", # Isort
"N", # pep8-naming
"D", # Pydocstyle
"ANN", # Pytype annotations
"S", # Bandit
"B", # Bugbear
"COM", # Commas
"C4", # Comprehensions
"ISC", # Implicit string concat
"PIE", # Unnecessary code
"T20", # Catch prints
"PYI", # validate pyi files
"Q", # Checks for quotes
"RSE", # Checks raise statements
"RET", # Checks return statements
"SLF", # Self checks
"SIM", # Simplificator
"PTH", # Pathlib checks
"ERA", # Checks for commented out code
"PL", # PyLint checks
"RUF", # Specific to Ruff checks
"UP", # Pyupgrade
]
ignore = [
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"D211", # No blank lines allowed before class docstring
"D212", # Multi-line docstring summary should start at the first line
"D401", # First line should be in imperative mood
"D104", # Missing docstring in public package
"D100", # Missing docstring in public module
"ANN102", # Missing type annotation for self in method
"ANN101", # Missing type annotation for argument
"ANN401", # typing.Any are disallowed in `**kwargs
"PLR0913", # Too many arguments for function call
"D106", # Missing docstring in public nested class
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"D212", # Multi-line docstring summary should start at the first line
"D401", # First line should be in imperative mood
"D104", # Missing docstring in public package
"D100", # Missing docstring in public module
"ANN401", # typing.Any are disallowed in `**kwargs
"PLR0913", # Too many arguments for function call
"D106", # Missing docstring in public nested class
"PYI021", # Docstrings should not be included in stubs
"COM812", # Missing trailing comma in a list or tuple
]
exclude = [".venv/"]
mccabe = { max-complexity = 10 }
line-length = 88

[tool.ruff.per-file-ignores]
"python/scyllapy/*" = ["PYI021"]
[tool.ruff.lint.per-file-ignores]
"python/tests/*" = [
"S101", # Use of assert detected
"S608", # Possible SQL injection vector through string-based query construction
"D103", # Missing docstring in public function
"S311", # Standard pseudo-random generators are not suitable for security/cryptographic purposes
"S101", # Use of assert detected
"S301", # Use of pickle detected
"D103", # Missing docstring in public function
"SLF001", # Private member accessed
"S311", # Standard pseudo-random generators are not suitable for security/cryptographic purposes
"D101", # Missing docstring in public class
"PLR2004", # Magic value used in comparison
"B017", # Do not assert blind exception
"S608", # Possible SQL injection
]

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "pep257"
ignore-decorators = ["typing.overload"]

[tool.ruff.pylint]
[tool.ruff.lint.pylint]
allow-magic-value-types = ["int", "str", "float"]

[tool.uv]
package = false
16 changes: 8 additions & 8 deletions python/scyllapy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
__version__ = version("scyllapy")

__all__ = [
"__version__",
"Scylla",
"Consistency",
"Query",
"SerialConsistency",
"PreparedQuery",
"Batch",
"BatchType",
"Consistency",
"ExecutionProfile",
"InlineBatch",
"PreparedQuery",
"Query",
"QueryResult",
"SSLVerifyMode",
"Scylla",
"SerialConsistency",
"__version__",
"extra_types",
"InlineBatch",
"ExecutionProfile",
]
Loading
Loading