mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-13 14:16:54 +00:00
Function dependency typos currently reach the environment build before
failing. Validate pip requirements with
`packaging.requirements.Requirement` and conda requirements with
Rattler's MatchSpec parser when constructing a function definition,
before source packaging or registration. Errors identify the original
entry and its index.
```python
@lancedb.function(pip=["numpy", "torch>=2.0,,<3"])
def score(value: float) -> float:
return value
# ValueError: invalid pip[1] requirement 'torch>=2.0,,<3': ...
```
Preserves pip extras, markers, named references, bare archive/git URLs,
and conda channel/build specifications. The existing native extension
exposes the conda parser, so no additional Python package is required.
Adds regression coverage for invalid and supported forms, including the
deprecated `udf` alias.
58 lines
1.7 KiB
TOML
58 lines
1.7 KiB
TOML
[package]
|
|
name = "lancedb-python"
|
|
version = "0.42.0-beta.11"
|
|
publish = false
|
|
edition.workspace = true
|
|
description = "Python bindings for LanceDB"
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
keywords.workspace = true
|
|
categories.workspace = true
|
|
rust-version = "1.95.0"
|
|
|
|
[lib]
|
|
name = "_lancedb"
|
|
crate-type = ["cdylib"]
|
|
|
|
[dependencies]
|
|
arc-swap = "1.9"
|
|
arrow = { workspace = true, features = ["pyarrow"] }
|
|
async-trait.workspace = true
|
|
bytes.workspace = true
|
|
lancedb.workspace = true
|
|
datafusion-common.workspace = true
|
|
lance-core.workspace = true
|
|
lance-arrow.workspace = true
|
|
lance-namespace.workspace = true
|
|
lance-namespace-impls.workspace = true
|
|
lance-io.workspace = true
|
|
env_logger.workspace = true
|
|
log.workspace = true
|
|
# Maturin enables extension-module mode for Python builds. Keeping it out of
|
|
# Cargo features lets Rust unit tests link against libpython.
|
|
pyo3 = { version = "0.29", features = ["abi3-py310", "chrono", "uuid"] }
|
|
chrono.workspace = true
|
|
pyo3-async-runtimes = { version = "0.29", features = [
|
|
"attributes",
|
|
"tokio-runtime",
|
|
] }
|
|
reqwest.workspace = true
|
|
rattler_conda_types = { version = "0.58.3", default-features = false }
|
|
pin-project.workspace = true
|
|
futures.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
snafu.workspace = true
|
|
tokio.workspace = true
|
|
uuid.workspace = true
|
|
libc = "0.2"
|
|
|
|
[build-dependencies]
|
|
pyo3-build-config = "0.29"
|
|
|
|
[features]
|
|
default = ["remote", "lancedb/aws", "lancedb/gcs", "lancedb/azure", "lancedb/dynamodb", "lancedb/oss", "lancedb/huggingface", "lancedb/cos", "lancedb/goosefs", "lancedb/metrics-otel"]
|
|
fp16kernels = ["lancedb/fp16kernels"]
|
|
remote = ["lancedb/remote"]
|
|
experimental-functions = ["lancedb/experimental-functions"]
|