Skip to content

Commit

Permalink
fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxiaoying committed May 9, 2024
1 parent 0a83b56 commit ff8a694
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ jobs:
- name: Install other dependent tools
run: |
python -m pip install poetry
poetry run python -m pip install --user six
if [ ! -f "$HOME/.cargo/bin/just" ]; then curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to ~/.cargo/bin; fi
- name: Seed the database
Expand Down
2 changes: 1 addition & 1 deletion connectorx-python/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion connectorx-python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ pandas = {version = "^2", optional = true}
polars = {version = ">=0.8", optional = true}
pyarrow = {version = ">=4", optional = true}
python = ">=3.9,<3.13"
six = "^1.16.0"

[tool.poetry.extras]
all = ["dask", "pandas", "modin", "polars", "pyarrow"]
Expand Down
6 changes: 3 additions & 3 deletions connectorx-python/src/pandas/pandas_columns/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,9 @@ where
let end = start + len;
unsafe {
// allocate and write in the same time
*self.data.add(self.row_idx[i]) = PyList(
pyo3::types::PyList::new(py, &self.buffer[start..end]).into(),
);
let n = pyo3::types::PyList::new_bound(py, &self.buffer[start..end])
.unbind();
*self.data.add(self.row_idx[i]) = PyList(n);
};
start = end;
} else {
Expand Down
7 changes: 4 additions & 3 deletions connectorx-python/src/pandas/pandas_columns/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,10 @@ impl BytesColumn {
let end = start + len;
unsafe {
// allocate and write in the same time
*self.data.add(self.row_idx[i]) = PyBytes(
pyo3::types::PyBytes::new(py, &self.bytes_buf[start..end]).into(),
);
let b =
pyo3::types::PyBytes::new_bound(py, &self.bytes_buf[start..end])
.unbind();
*self.data.add(self.row_idx[i]) = PyBytes(b);
};
start = end;
} else {
Expand Down

0 comments on commit ff8a694

Please sign in to comment.