Skip to content

Commit

Permalink
V0.1.39 release (#256)
Browse files Browse the repository at this point in the history
* add duckdb dialect

* bump versions for release

* disable aarch64 manylinux wheels
  • Loading branch information
wseaton authored Oct 30, 2023
1 parent 8146294 commit d864658
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.1.37
current_version = 0.1.39
commit = True
tag = True

Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ jobs:
with:
poetry-version: 1.3.2
- name: Install package deps
run: |
run: |
poetry install
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -75,13 +75,13 @@ jobs:
shell: bash
env:
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
MACOSX_DEPLOYMENT_TARGET: '10.9'
MACOSX_DEPLOYMENT_TARGET: "10.9"
ARCHFLAGS: -arch x86_64 -arch arm64
PYO3_CROSS_LIB_DIR: /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib
run: poetry run python setup.py bdist_wheel && poetry install

- name: Build Python package
if: matrix.os != 'macos-latest'
if: matrix.os != 'macos-latest'
run: poetry run python setup.py bdist_wheel && poetry install

- name: pytest
Expand All @@ -108,13 +108,12 @@ jobs:
fail-fast: false
matrix:
include:
- {tag: manylinux2014, arch: x86_64}
- {tag: manylinux2014, arch: i686}
- {tag: manylinux2014, arch: aarch64}
# TODO: figure out a way to renable this, for now it's far too slow
- { tag: manylinux2014, arch: x86_64 }
- { tag: manylinux2014, arch: i686 }
# TODO: figure out a way to renable these, for now far too slow
# to run in github actions (> 6hrs)
# - {tag: manylinux2014, arch: ppc64le}

# - {tag: manylinux2014, arch: aarch64}
runs-on: ubuntu-latest
needs: lint
steps:
Expand Down Expand Up @@ -159,10 +158,9 @@ jobs:
publish:
runs-on: ubuntu-latest
needs: [manylinux-build, native-build, source-build]
steps:

steps:
- uses: actions/download-artifact@v2
with:
with:
name: wheels
path: dist/

Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sqloxide"
version = "0.1.36"
version = "0.1.39"
authors = ["Will Eaton <me@wseaton.com>"]
edition = "2018"

Expand All @@ -9,13 +9,13 @@ name = "sqloxide"
crate-type = ["cdylib"]

[dependencies]
pythonize = "0.19"
pythonize = "0.20"
serde = "1.0.171"

[dependencies.pyo3]
version = "0.19.1"
version = "0.20.0"
features = ["extension-module"]

[dependencies.sqlparser]
version = "0.36.1"
version = "0.39.0"
features = ["serde", "visitor"]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "sqloxide"
version = "0.1.37"
version = "0.1.39"
repository = "https://github.com/wseaton/sqloxide"
license = "MIT"
description = "Python bindings for sqlparser-rs"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup_kwargs = {
"name": "sqloxide",
"version": "0.1.37",
"version": "0.1.39",
"description": "Python bindings for sqlparser-rs",
"long_description": open("readme.md").read(),
"long_description_content_type": "text/markdown",
Expand Down
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ fn string_to_dialect(dialect: &str) -> Box<dyn Dialect> {
"ansi" => Box::new(AnsiDialect {}),
"bigquery" | "bq" => Box::new(BigQueryDialect {}),
"clickhouse" => Box::new(ClickHouseDialect {}),
"duckdb" => Box::new(DuckDbDialect {}),
"generic" => Box::new(GenericDialect {}),
"hive" => Box::new(HiveDialect {}),
"ms" | "mssql" => Box::new(MsSqlDialect {}),
Expand All @@ -39,6 +40,7 @@ fn string_to_dialect(dialect: &str) -> Box<dyn Dialect> {
/// Available `dialects`:
/// - generic
/// - ansi
/// - duckdb
/// - hive
/// - ms (mssql)
/// - mysql
Expand All @@ -56,12 +58,10 @@ fn parse_sql(py: Python, sql: &str, dialect: &str) -> PyResult<PyObject> {
let parse_result = Parser::parse_sql(&*chosen_dialect, sql);

let output = match parse_result {
Ok(statements) => {
pythonize(py, &statements).map_err(|e| {
let msg = e.to_string();
PyValueError::new_err(format!("Python object serialization failed.\n\t{msg}"))
})?
}
Ok(statements) => pythonize(py, &statements).map_err(|e| {
let msg = e.to_string();
PyValueError::new_err(format!("Python object serialization failed.\n\t{msg}"))
})?,
Err(e) => {
let msg = e.to_string();
return Err(PyValueError::new_err(format!(
Expand Down

0 comments on commit d864658

Please sign in to comment.