Skip to content

Commit

Permalink
Merge branch 'master' into oocha
Browse files Browse the repository at this point in the history
  • Loading branch information
lnkuiper committed Jul 21, 2023
2 parents 567f797 + 20cc683 commit 4758658
Show file tree
Hide file tree
Showing 12 changed files with 422 additions and 19 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/NightlyTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,7 @@ jobs:
- name: Run Python Tests
shell: bash
run: |
cd tools/pythonpkg
${GITHUB_WORKSPACE}/debug-build/bin/python3 -m pytest tests/fast --skiplist TestMemoryLeaks
${GITHUB_WORKSPACE}/debug-build/bin/python3 -m pytest tools/pythonpkg/tests/fast --skiplist TestMemoryLeaks
sqllogic:
name: Sqllogic tests
Expand Down
1 change: 0 additions & 1 deletion tools/pythonpkg/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ duckdb.cpp
duckdb.hpp
parquet_extension.cpp
parquet_extension.hpp
duckdb/
githash.list
includes.list
sources.list
Expand Down
1 change: 1 addition & 0 deletions tools/pythonpkg/MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ recursive-include duckdb *.h *.hpp *.cpp
include duckdb_python.cpp
recursive-include src *.h *.hpp *.cpp
recursive-include duckdb-stubs *.pyi
recursive-include duckdb
include cibw.toml
1 change: 0 additions & 1 deletion tools/pythonpkg/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ rm -rf $SCRIPTPATH/.eggs \
$SCRIPTPATH/duckdb.hpp \
$SCRIPTPATH/parquet_extension.cpp \
$SCRIPTPATH/parquet_extension.hpp \
$SCRIPTPATH/duckdb \
$SCRIPTPATH/duckdb_tarball

rm -f $SCRIPTPATH/sources.list \
Expand Down
18 changes: 9 additions & 9 deletions tools/pythonpkg/duckdb-stubs/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
# # stubgen override
# to help the sanity of maintainers.

from .typing import DuckDBPyType
from .functional import FunctionNullHandling, PythonUDFType
import duckdb.typing as typing
import duckdb.functional as functional
from duckdb.typing import DuckDBPyType
from duckdb.functional import FunctionNullHandling, PythonUDFType

# We also run this in python3.7, where this is needed
from typing_extensions import Literal
import typing
# stubgen override - missing import of Set
from typing import Any, ClassVar, Set, Optional, Callable
from io import StringIO, TextIOBase
Expand All @@ -22,7 +23,6 @@ import fsspec
import pyarrow.lib
import polars
# stubgen override - This should probably not be exposed
#_clean_default_connection: Any
apilevel: str
comment: token_type
default_connection: DuckDBPyConnection
Expand Down Expand Up @@ -100,7 +100,7 @@ class DuckDBPyConnection:
def fetchdf(self, *args, **kwargs) -> pandas.DataFrame: ...
def fetchmany(self, size: int = ...) -> list: ...
def fetchnumpy(self) -> dict: ...
def fetchone(self) -> typing.Optional[tuple]: ...
def fetchone(self) -> Optional[tuple]: ...
def from_arrow(self, arrow_object: object) -> DuckDBPyRelation: ...
def read_json(
self,
Expand Down Expand Up @@ -214,7 +214,7 @@ class DuckDBPyConnection:
def __enter__(self) -> DuckDBPyConnection: ...
def __exit__(self, exc_type: object, exc: object, traceback: object) -> None: ...
@property
def description(self) -> typing.Optional[list]: ...
def description(self) -> Optional[list]: ...

class DuckDBPyRelation:
def close(self) -> None: ...
Expand Down Expand Up @@ -244,7 +244,7 @@ class DuckDBPyRelation:
def fetchall(self) -> list: ...
def fetchmany(self, size: int = ...) -> list: ...
def fetchnumpy(self) -> dict: ...
def fetchone(self) -> typing.Optional[tuple]: ...
def fetchone(self) -> Optional[tuple]: ...
def fetchdf(self, *args, **kwargs) -> Any: ...
def fetch_arrow_table(self, rows_per_batch: int = ...) -> pyarrow.lib.Table: ...
def filter(self, filter_expr: str) -> DuckDBPyRelation: ...
Expand Down Expand Up @@ -494,7 +494,7 @@ def close(connection: DuckDBPyConnection = ...) -> None: ...
def commit(connection: DuckDBPyConnection = ...) -> DuckDBPyConnection: ...
def cursor(connection: DuckDBPyConnection = ...) -> DuckDBPyConnection: ...
def df(connection: DuckDBPyConnection = ...) -> pandas.DataFrame: ...
def description(connection: DuckDBPyConnection = ...) -> typing.Optional[list]: ...
def description(connection: DuckDBPyConnection = ...) -> Optional[list]: ...
def duplicate(connection: DuckDBPyConnection = ...) -> DuckDBPyConnection: ...
def execute(query: str, parameters: object = ..., multiple_parameter_sets: bool = ..., connection: DuckDBPyConnection = ...) -> DuckDBPyConnection: ...
def executemany(query: str, parameters: object = ..., connection: DuckDBPyConnection = ...) -> DuckDBPyConnection: ...
Expand All @@ -506,7 +506,7 @@ def fetchall(connection: DuckDBPyConnection = ...) -> list: ...
def fetchdf(*args, connection: DuckDBPyConnection = ..., **kwargs) -> pandas.DataFrame: ...
def fetchmany(size: int = ..., connection: DuckDBPyConnection = ...) -> list: ...
def fetchnumpy(connection: DuckDBPyConnection = ...) -> dict: ...
def fetchone(connection: DuckDBPyConnection = ...) -> typing.Optional[tuple]: ...
def fetchone(connection: DuckDBPyConnection = ...) -> Optional[tuple]: ...
def from_arrow(arrow_object: object, connection: DuckDBPyConnection = ...) -> DuckDBPyRelation: ...
def from_df(df: pandas.DataFrame = ..., connection: DuckDBPyConnection = ...) -> DuckDBPyRelation: ...
@overload
Expand Down
Loading

0 comments on commit 4758658

Please sign in to comment.