Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps-dev): bump jupysql from 0.10.0 to 0.10.1 #766

Merged
merged 1 commit into from
Sep 3, 2023

chore(deps-dev): bump jupysql from 0.10.0 to 0.10.1

e8ba916
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

chore(deps-dev): bump jupysql from 0.10.0 to 0.10.1 #766

chore(deps-dev): bump jupysql from 0.10.0 to 0.10.1
e8ba916
Select commit
Loading
Failed to load commit list.
This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / Test Results - 3.9, true failed Aug 30, 2023 in 0s

1 fail, 2 pass in 3s

3 tests   2 ✔️  3s ⏱️
1 suites  0 💤
1 files    1

Results for commit e8ba916.

Annotations

Check warning on line 0 in duckdb_engine.tests.test_ibis

See this annotation in the file changed.

@github-actions github-actions / Test Results - 3.9, true

test_csv (duckdb_engine.tests.test_ibis) failed

results.xml [took 0s]
Raw output
sqlalchemy.exc.ProgrammingError: (duckdb.duckdb.InvalidInputException) Invalid Input Error: Required module 'pandas.core.arrays.arrow.dtype' failed to import, due to the following Python exception:
ModuleNotFoundError: No module named 'pandas.core.arrays.arrow.dtype'
[SQL: SELECT pg_catalog.pg_attribute.attname AS name, pg_catalog.format_type(pg_catalog.pg_attribute.atttypid, pg_catalog.pg_attribute.atttypmod) AS format_type, (SELECT pg_catalog.pg_get_expr(pg_catalog.pg_attrdef.adbin, pg_catalog.pg_attrdef.adrelid) AS pg_get_expr_1 
FROM pg_catalog.pg_attrdef 
WHERE pg_catalog.pg_attrdef.adrelid = pg_catalog.pg_attribute.attrelid AND pg_catalog.pg_attrdef.adnum = pg_catalog.pg_attribute.attnum AND pg_catalog.pg_attribute.atthasdef) AS "default", pg_catalog.pg_attribute.attnotnull AS not_null, pg_catalog.pg_class.relname AS table_name, pg_catalog.pg_description.description AS comment, NULL AS generated, NULL AS identity_options 
FROM pg_catalog.pg_class LEFT OUTER JOIN pg_catalog.pg_attribute ON pg_catalog.pg_class.oid = pg_catalog.pg_attribute.attrelid AND pg_catalog.pg_attribute.attnum > ? AND NOT pg_catalog.pg_attribute.attisdropped LEFT OUTER JOIN pg_catalog.pg_description ON pg_catalog.pg_description.objoid = pg_catalog.pg_attribute.attrelid AND pg_catalog.pg_description.objsubid = pg_catalog.pg_attribute.attnum JOIN pg_catalog.pg_namespace ON pg_catalog.pg_namespace.oid = pg_catalog.pg_class.relnamespace 
WHERE pg_catalog.pg_class.relkind = ANY (ARRAY[?, ?, ?, ?, ?]) AND pg_catalog.pg_table_is_visible(pg_catalog.pg_class.oid) AND pg_catalog.pg_namespace.nspname != ? AND pg_catalog.pg_class.relname IN (?) ORDER BY pg_catalog.pg_class.relname, pg_catalog.pg_attribute.attnum]
[parameters: (0, 'r', 'p', 'f', 'v', 'm', 'pg_catalog', '_ibis_read_csv_qlkyem2jxrdztgjowibxmmcysa')]
(Background on this error at: https://sqlalche.me/e/20/f405)
self = <sqlalchemy.engine.base.Connection object at 0x7fefbca47970>
dialect = <duckdb_engine.Dialect object at 0x7fefbcb5fa00>
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x7fefbc9eabe0>
statement = <sqlalchemy.dialects.postgresql.base.PGCompiler object at 0x7fefbc9eaac0>
parameters = [(0, 'r', 'p', 'f', 'v', 'm', ...)]

    def _exec_single_context(
        self,
        dialect: Dialect,
        context: ExecutionContext,
        statement: Union[str, Compiled],
        parameters: Optional[_AnyMultiExecuteParams],
    ) -> CursorResult[Any]:
        """continue the _execute_context() method for a single DBAPI
        cursor.execute() or cursor.executemany() call.
    
        """
        if dialect.bind_typing is BindTyping.SETINPUTSIZES:
            generic_setinputsizes = context._prepare_set_input_sizes()
    
            if generic_setinputsizes:
                try:
                    dialect.do_set_input_sizes(
                        context.cursor, generic_setinputsizes, context
                    )
                except BaseException as e:
                    self._handle_dbapi_exception(
                        e, str(statement), parameters, None, context
                    )
    
        cursor, str_statement, parameters = (
            context.cursor,
            context.statement,
            context.parameters,
        )
    
        effective_parameters: Optional[_AnyExecuteParams]
    
        if not context.executemany:
            effective_parameters = parameters[0]
        else:
            effective_parameters = parameters
    
        if self._has_events or self.engine._has_events:
            for fn in self.dispatch.before_cursor_execute:
                str_statement, effective_parameters = fn(
                    self,
                    cursor,
                    str_statement,
                    effective_parameters,
                    context,
                    context.executemany,
                )
    
        if self._echo:
            self._log_info(str_statement)
    
            stats = context._get_cache_stats()
    
            if not self.engine.hide_parameters:
                self._log_info(
                    "[%s] %r",
                    stats,
                    sql_util._repr_params(
                        effective_parameters,
                        batches=10,
                        ismulti=context.executemany,
                    ),
                )
            else:
                self._log_info(
                    "[%s] [SQL parameters hidden due to hide_parameters=True]",
                    stats,
                )
    
        evt_handled: bool = False
        try:
            if context.execute_style is ExecuteStyle.EXECUTEMANY:
                effective_parameters = cast(
                    "_CoreMultiExecuteParams", effective_parameters
                )
                if self.dialect._has_events:
                    for fn in self.dialect.dispatch.do_executemany:
                        if fn(
                            cursor,
                            str_statement,
                            effective_parameters,
                            context,
                        ):
                            evt_handled = True
                            break
                if not evt_handled:
                    self.dialect.do_executemany(
                        cursor,
                        str_statement,
                        effective_parameters,
                        context,
                    )
            elif not effective_parameters and context.no_parameters:
                if self.dialect._has_events:
                    for fn in self.dialect.dispatch.do_execute_no_params:
                        if fn(cursor, str_statement, context):
                            evt_handled = True
                            break
                if not evt_handled:
                    self.dialect.do_execute_no_params(
                        cursor, str_statement, context
                    )
            else:
                effective_parameters = cast(
                    "_CoreSingleExecuteParams", effective_parameters
                )
                if self.dialect._has_events:
                    for fn in self.dialect.dispatch.do_execute:
                        if fn(
                            cursor,
                            str_statement,
                            effective_parameters,
                            context,
                        ):
                            evt_handled = True
                            break
                if not evt_handled:
>                   self.dialect.do_execute(
                        cursor, str_statement, effective_parameters, context
                    )

.tox/ibis/lib/python3.9/site-packages/sqlalchemy/engine/base.py:1965: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/engine/default.py:921: in do_execute
    cursor.execute(statement, parameters)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <duckdb_engine.ConnectionWrapper object at 0x7fefbca47880>
statement = 'SELECT pg_catalog.pg_attribute.attname AS name, pg_catalog.format_type(pg_catalog.pg_attribute.atttypid, pg_catalog.p...pname != ? AND pg_catalog.pg_class.relname IN (?) ORDER BY pg_catalog.pg_class.relname, pg_catalog.pg_attribute.attnum'
parameters = (0, 'r', 'p', 'f', 'v', 'm', ...), context = None

    def execute(
        self,
        statement: str,
        parameters: Optional[Tuple] = None,
        context: Optional[Any] = None,
    ) -> None:
        try:
            if statement.lower() == "commit":  # this is largely for ipython-sql
                self.__c.commit()
            elif statement.lower() in ("register", "register(?, ?)"):
                assert parameters and len(parameters) == 2, parameters
                view_name, df = parameters
                self.__c.register(view_name, df)
            elif parameters is None:
                self.__c.execute(statement)
            else:
>               self.__c.execute(statement, parameters)
E               duckdb.duckdb.InvalidInputException: Invalid Input Error: Required module 'pandas.core.arrays.arrow.dtype' failed to import, due to the following Python exception:
E               ModuleNotFoundError: No module named 'pandas.core.arrays.arrow.dtype'

duckdb_engine/__init__.py:144: InvalidInputException

The above exception was the direct cause of the following exception:

tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-1/test_csv0')
ibis_conn = <ibis.backends.duckdb.Backend object at 0x7fefbcbb7e50>

    def test_csv(tmp_path: Path, ibis_conn: "Backend") -> None:
        path = tmp_path / "test.csv"
        with path.open("w") as fh:
            cfh = DictWriter(fh, ["mean"])
            cfh.writeheader()
            cfh.writerow({"mean": 6})
    
>       ibis_conn.register(f"csv://{path}")

duckdb_engine/tests/test_ibis.py:32: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/ibis/lib/python3.9/site-packages/ibis/backends/duckdb/__init__.py:331: in register
    return self.read_csv(source, table_name=table_name, **kwargs)
.tox/ibis/lib/python3.9/site-packages/ibis/backends/duckdb/__init__.py:446: in read_csv
    return self.table(table_name)
.tox/ibis/lib/python3.9/site-packages/ibis/backends/base/sql/alchemy/__init__.py:614: in table
    sqla_table = self._get_sqla_table(name, schema=schema)
.tox/ibis/lib/python3.9/site-packages/ibis/backends/duckdb/__init__.py:1008: in _get_sqla_table
    return super()._get_sqla_table(name, schema, **kwargs)
.tox/ibis/lib/python3.9/site-packages/ibis/backends/base/sql/alchemy/__init__.py:482: in _get_sqla_table
    table = sa.Table(
<string>:2: in __new__
    ???
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/util/deprecations.py:281: in warned
    return fn(*args, **kwargs)  # type: ignore[no-any-return]
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/sql/schema.py:437: in __new__
    return cls._new(*args, **kw)
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/sql/schema.py:492: in _new
    metadata._remove_table(name, schema)
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py:147: in __exit__
    raise exc_value.with_traceback(exc_tb)
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/sql/schema.py:487: in _new
    table.__init__(name, metadata, *args, _no_init=False, **kw)
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/sql/schema.py:867: in __init__
    self._autoload(
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/sql/schema.py:899: in _autoload
    conn_insp.reflect_table(
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/engine/reflection.py:1526: in reflect_table
    _reflect_info = self._get_reflection_info(
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/engine/reflection.py:2008: in _get_reflection_info
    columns=run(
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/engine/reflection.py:1994: in run
    res = meth(filter_names=_fn, **kw)
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/engine/reflection.py:922: in get_multi_columns
    self.dialect.get_multi_columns(
duckdb_engine/__init__.py:337: in get_multi_columns
    rows = list(connection.execute(query, params).mappings())
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/engine/base.py:1412: in execute
    return meth(
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/sql/elements.py:515: in _execute_on_connection
    return connection._execute_clauseelement(
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/engine/base.py:1635: in _execute_clauseelement
    ret = self._execute_context(
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/engine/base.py:1844: in _execute_context
    return self._exec_single_context(
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/engine/base.py:1984: in _exec_single_context
    self._handle_dbapi_exception(
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/engine/base.py:2339: in _handle_dbapi_exception
    raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/engine/base.py:1965: in _exec_single_context
    self.dialect.do_execute(
.tox/ibis/lib/python3.9/site-packages/sqlalchemy/engine/default.py:921: in do_execute
    cursor.execute(statement, parameters)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <duckdb_engine.ConnectionWrapper object at 0x7fefbca47880>
statement = 'SELECT pg_catalog.pg_attribute.attname AS name, pg_catalog.format_type(pg_catalog.pg_attribute.atttypid, pg_catalog.p...pname != ? AND pg_catalog.pg_class.relname IN (?) ORDER BY pg_catalog.pg_class.relname, pg_catalog.pg_attribute.attnum'
parameters = (0, 'r', 'p', 'f', 'v', 'm', ...), context = None

    def execute(
        self,
        statement: str,
        parameters: Optional[Tuple] = None,
        context: Optional[Any] = None,
    ) -> None:
        try:
            if statement.lower() == "commit":  # this is largely for ipython-sql
                self.__c.commit()
            elif statement.lower() in ("register", "register(?, ?)"):
                assert parameters and len(parameters) == 2, parameters
                view_name, df = parameters
                self.__c.register(view_name, df)
            elif parameters is None:
                self.__c.execute(statement)
            else:
>               self.__c.execute(statement, parameters)
E               sqlalchemy.exc.ProgrammingError: (duckdb.duckdb.InvalidInputException) Invalid Input Error: Required module 'pandas.core.arrays.arrow.dtype' failed to import, due to the following Python exception:
E               ModuleNotFoundError: No module named 'pandas.core.arrays.arrow.dtype'
E               [SQL: SELECT pg_catalog.pg_attribute.attname AS name, pg_catalog.format_type(pg_catalog.pg_attribute.atttypid, pg_catalog.pg_attribute.atttypmod) AS format_type, (SELECT pg_catalog.pg_get_expr(pg_catalog.pg_attrdef.adbin, pg_catalog.pg_attrdef.adrelid) AS pg_get_expr_1 
E               FROM pg_catalog.pg_attrdef 
E               WHERE pg_catalog.pg_attrdef.adrelid = pg_catalog.pg_attribute.attrelid AND pg_catalog.pg_attrdef.adnum = pg_catalog.pg_attribute.attnum AND pg_catalog.pg_attribute.atthasdef) AS "default", pg_catalog.pg_attribute.attnotnull AS not_null, pg_catalog.pg_class.relname AS table_name, pg_catalog.pg_description.description AS comment, NULL AS generated, NULL AS identity_options 
E               FROM pg_catalog.pg_class LEFT OUTER JOIN pg_catalog.pg_attribute ON pg_catalog.pg_class.oid = pg_catalog.pg_attribute.attrelid AND pg_catalog.pg_attribute.attnum > ? AND NOT pg_catalog.pg_attribute.attisdropped LEFT OUTER JOIN pg_catalog.pg_description ON pg_catalog.pg_description.objoid = pg_catalog.pg_attribute.attrelid AND pg_catalog.pg_description.objsubid = pg_catalog.pg_attribute.attnum JOIN pg_catalog.pg_namespace ON pg_catalog.pg_namespace.oid = pg_catalog.pg_class.relnamespace 
E               WHERE pg_catalog.pg_class.relkind = ANY (ARRAY[?, ?, ?, ?, ?]) AND pg_catalog.pg_table_is_visible(pg_catalog.pg_class.oid) AND pg_catalog.pg_namespace.nspname != ? AND pg_catalog.pg_class.relname IN (?) ORDER BY pg_catalog.pg_class.relname, pg_catalog.pg_attribute.attnum]
E               [parameters: (0, 'r', 'p', 'f', 'v', 'm', 'pg_catalog', '_ibis_read_csv_qlkyem2jxrdztgjowibxmmcysa')]
E               (Background on this error at: https://sqlalche.me/e/20/f405)

duckdb_engine/__init__.py:144: ProgrammingError