1
0
Fork 0

Merging upstream version 26.24.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-06-02 05:53:55 +02:00
parent c78999c8c9
commit 2b9f8478b0
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
53 changed files with 3642 additions and 3447 deletions

27
sqlglotrs/Cargo.lock generated
View file

@ -329,11 +329,10 @@ dependencies = [
[[package]]
name = "pyo3"
version = "0.22.6"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f402062616ab18202ae8319da13fa4279883a2b8a9d9f83f20dbade813ce1884"
checksum = "f239d656363bcee73afef85277f1b281e8ac6212a1d42aa90e55b90ed43c47a4"
dependencies = [
"cfg-if",
"indoc",
"libc",
"memoffset",
@ -347,9 +346,9 @@ dependencies = [
[[package]]
name = "pyo3-build-config"
version = "0.22.6"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b14b5775b5ff446dd1056212d778012cbe8a0fbffd368029fd9e25b514479c38"
checksum = "755ea671a1c34044fa165247aaf6f419ca39caa6003aee791a0df2713d8f1b6d"
dependencies = [
"once_cell",
"target-lexicon",
@ -357,9 +356,9 @@ dependencies = [
[[package]]
name = "pyo3-ffi"
version = "0.22.6"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ab5bcf04a2cdcbb50c7d6105de943f543f9ed92af55818fd17b660390fc8636"
checksum = "fc95a2e67091e44791d4ea300ff744be5293f394f1bafd9f78c080814d35956e"
dependencies = [
"libc",
"pyo3-build-config",
@ -367,9 +366,9 @@ dependencies = [
[[package]]
name = "pyo3-macros"
version = "0.22.6"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fd24d897903a9e6d80b968368a34e1525aeb719d568dba8b3d4bfa5dc67d453"
checksum = "a179641d1b93920829a62f15e87c0ed791b6c8db2271ba0fd7c2686090510214"
dependencies = [
"proc-macro2",
"pyo3-macros-backend",
@ -379,9 +378,9 @@ dependencies = [
[[package]]
name = "pyo3-macros-backend"
version = "0.22.6"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "36c011a03ba1e50152b4b394b479826cad97e7a21eb52df179cd91ac411cbfbe"
checksum = "9dff85ebcaab8c441b0e3f7ae40a6963ecea8a9f5e74f647e33fcf5ec9a1e89e"
dependencies = [
"heck",
"proc-macro2",
@ -503,7 +502,7 @@ dependencies = [
[[package]]
name = "sqlglotrs"
version = "0.4.2"
version = "0.5.0"
dependencies = [
"criterion",
"pyo3",
@ -526,9 +525,9 @@ dependencies = [
[[package]]
name = "target-lexicon"
version = "0.12.16"
version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a"
[[package]]
name = "tinytemplate"

View file

@ -1,6 +1,6 @@
[package]
name = "sqlglotrs"
version = "0.4.2"
version = "0.5.0"
edition = "2021"
license = "MIT"
@ -19,7 +19,7 @@ default = []
profiling = ["serde", "serde_json"]
[dependencies]
pyo3 = {version ="0.22.6", features = ["auto-initialize"]}
pyo3 = {version ="0.25"}
rustc-hash = { version = "2.1" }
# Optional dependencies used for profiling
@ -31,3 +31,4 @@ criterion = "0.5"
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1" }
sqlglotrs = { path = "." , features = ["profiling"] }
pyo3 = { version = "0.25", features = ["auto-initialize"] }

View file

@ -1,7 +1,7 @@
use crate::settings::TokenType;
use pyo3::prelude::PyListMethods;
use pyo3::types::{PyList, PyNone, PyString};
use pyo3::{pyclass, IntoPy, Py, PyObject, Python};
use pyo3::prelude::*;
use pyo3::types::{PyList, PyString};
use pyo3::{pyclass, Py, PyObject, Python};
#[derive(Debug)]
#[pyclass]
@ -36,13 +36,13 @@ impl Token {
) -> Token {
Python::with_gil(|py| Token {
token_type,
token_type_py: PyNone::get_bound(py).into_py(py),
text: PyString::new_bound(py, &text).into_py(py),
token_type_py: py.None(),
text: PyString::new(py, &text).unbind(),
line,
col,
start,
end,
comments: PyList::new_bound(py, &comments).into(),
comments: PyList::new(py, &comments).unwrap().unbind(),
})
}