Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/python-bigquery
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.0.0
Choose a base ref
...
head repository: googleapis/python-bigquery
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.0.1
Choose a head ref
  • 9 commits
  • 16 files changed
  • 6 contributors

Commits on Mar 30, 2022

  1. Configuration menu
    Copy the full SHA
    8e4a7b4 View commit details
    Browse the repository at this point in the history
  2. chore(deps): update all dependencies (#1164)

    * chore(deps): update all dependencies
    
    * revert
    
    * revert
    
    * revert
    
    * revert
    
    * revert
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    * 🦉 Updates from OwlBot post-processor
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    Co-authored-by: Anthonios Partheniou <partheniou@google.com>
    Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
    3 people authored Mar 30, 2022
    Configuration menu
    Copy the full SHA
    b18c8fd View commit details
    Browse the repository at this point in the history
  3. chore(deps): update all dependencies (#1183)

    * chore(deps): update all dependencies
    
    * revert environment specific pins
    
    * fix typo
    
    * revert environment specific pins
    
    * revert environment specific pins
    
    Co-authored-by: Anthonios Partheniou <partheniou@google.com>
    renovate-bot and parthea authored Mar 30, 2022
    Configuration menu
    Copy the full SHA
    fe16ec0 View commit details
    Browse the repository at this point in the history
  4. chore: use === in requirements.txt for environment specific pins (#1184)

    * chore(deps): update all dependencies
    
    * chore(deps): use === in requirements.txt for environment specific pins
    
    Co-authored-by: Anthonios Partheniou <partheniou@google.com>
    renovate-bot and parthea authored Mar 30, 2022
    Configuration menu
    Copy the full SHA
    346fbc4 View commit details
    Browse the repository at this point in the history
  5. fix(deps): restore dependency on python-dateutil (#1187)

    * fix(deps): restore dependency on python-dateutil
    
    * fix(deps): remove redundante proto-plus
    
    Co-authored-by: Tim Swast <swast@google.com>
    parthea and tswast authored Mar 30, 2022
    Configuration menu
    Copy the full SHA
    212d7ec View commit details
    Browse the repository at this point in the history
  6. chore(deps): update all dependencies (#1185)

    * chore(deps): update all dependencies
    
    * chore: revert version bump for environment specific pins
    
    Co-authored-by: Anthonios Partheniou <partheniou@google.com>
    renovate-bot and parthea authored Mar 30, 2022
    Configuration menu
    Copy the full SHA
    65fc733 View commit details
    Browse the repository at this point in the history
  7. chore(python): add E231 to .flake8 ignore list (#1190)

    Source-Link: googleapis/synthtool@7ff4aad
    Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:462782b0b492346b2d9099aaff52206dd30bc8e031ea97082e6facecc2373244
    gcf-owl-bot[bot] authored Mar 30, 2022
    Configuration menu
    Copy the full SHA
    b4c7f5a View commit details
    Browse the repository at this point in the history
  8. fix(deps): raise exception when pandas is installed but db-dtypes is …

    …not (#1191)
    
    `db-dtypes` is already present in the `pandas` "extras", but this PR ensures that if pandas is present and db-dtypes is not, a more understandable error message is raised.
    
    ```
    google/cloud/bigquery/_pandas_helpers.py:991: ValueError
    ____________________________________ test_list_rows_nullable_scalars_extreme_dtypes[10] _____________________________________
    
        # Copyright 2019 Google LLC
        #
        # Licensed under the Apache License, Version 2.0 (the "License");
        # you may not use this file except in compliance with the License.
        # You may obtain a copy of the License at
        #
        #     http://www.apache.org/licenses/LICENSE-2.0
        #
        # Unless required by applicable law or agreed to in writing, software
        # distributed under the License is distributed on an "AS IS" BASIS,
        # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        # See the License for the specific language governing permissions and
        # limitations under the License.
        
        """Shared helper functions for connecting BigQuery and pandas."""
        
        import concurrent.futures
        from datetime import datetime
        import functools
        from itertools import islice
        import logging
        import queue
        import warnings
        
        try:
            import pandas  # type: ignore
        
            pandas_import_exception = None
        except ImportError as exc:  # pragma: NO COVER
            pandas = None
            pandas_import_exception = exc
        else:
            import numpy
        
        try:
    >       import db_dtypes  # type: ignore
    E       ModuleNotFoundError: No module named 'db_dtypes'
    
    google/cloud/bigquery/_pandas_helpers.py:36: ModuleNotFoundError
    
    The above exception was the direct cause of the following exception:
    
    bigquery_client = <google.cloud.bigquery.client.Client object at 0x11e2d3580>
    scalars_extreme_table = 'swast-scratch.python_bigquery_tests_system_20220330160830_ffff89.scalars_extreme_jsonl0x3ffeb'
    max_results = 10
    
        @pytest.mark.parametrize(
            ("max_results",),
            (
                (None,),
                (10,),
            ),  # Use BQ Storage API.  # Use REST API.
        )
        def test_list_rows_nullable_scalars_extreme_dtypes(
            bigquery_client, scalars_extreme_table, max_results
        ):
            # TODO(GH#836): Avoid INTERVAL columns until they are supported by the
            # BigQuery Storage API and pyarrow.
            schema = [
                bigquery.SchemaField("bool_col", enums.SqlTypeNames.BOOLEAN),
                bigquery.SchemaField("bignumeric_col", enums.SqlTypeNames.BIGNUMERIC),
                bigquery.SchemaField("bytes_col", enums.SqlTypeNames.BYTES),
                bigquery.SchemaField("date_col", enums.SqlTypeNames.DATE),
                bigquery.SchemaField("datetime_col", enums.SqlTypeNames.DATETIME),
                bigquery.SchemaField("float64_col", enums.SqlTypeNames.FLOAT64),
                bigquery.SchemaField("geography_col", enums.SqlTypeNames.GEOGRAPHY),
                bigquery.SchemaField("int64_col", enums.SqlTypeNames.INT64),
                bigquery.SchemaField("numeric_col", enums.SqlTypeNames.NUMERIC),
                bigquery.SchemaField("string_col", enums.SqlTypeNames.STRING),
                bigquery.SchemaField("time_col", enums.SqlTypeNames.TIME),
                bigquery.SchemaField("timestamp_col", enums.SqlTypeNames.TIMESTAMP),
            ]
        
            df = bigquery_client.list_rows(
                scalars_extreme_table,
                max_results=max_results,
                selected_fields=schema,
    >       ).to_dataframe()
    
    tests/system/test_pandas.py:1084: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    google/cloud/bigquery/table.py:1925: in to_dataframe
        _pandas_helpers.verify_pandas_imports()
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    
        def verify_pandas_imports():
            if pandas is None:
                raise ValueError(_NO_PANDAS_ERROR) from pandas_import_exception
            if db_dtypes is None:
    >           raise ValueError(_NO_DB_TYPES_ERROR) from db_dtypes_import_exception
    E           ValueError: Please install the 'db-dtypes' package to use this function.
    
    google/cloud/bigquery/_pandas_helpers.py:991: ValueError
    ```
    
    Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
    - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-bigquery/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
    - [ ] Ensure the tests and linter pass
    - [ ] Code coverage does not decrease (if any source code was changed)
    - [ ] Appropriate docs were updated (if necessary)
    
    Fixes #1188  🦕
    tswast authored Mar 30, 2022
    Configuration menu
    Copy the full SHA
    4333910 View commit details
    Browse the repository at this point in the history
  9. chore(main): release 3.0.1 (#1189)

    🤖 I have created a release *beep* *boop*
    ---
    
    
    ### [3.0.1](v3.0.0...v3.0.1) (2022-03-30)
    
    
    ### Bug Fixes
    
    * **deps:** raise exception when pandas is installed but db-dtypes is not ([#1191](#1191)) ([4333910](4333910))
    * **deps:** restore dependency on python-dateutil ([#1187](#1187)) ([212d7ec](212d7ec))
    
    ---
    This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
    release-please[bot] authored Mar 30, 2022
    Configuration menu
    Copy the full SHA
    c3740ac View commit details
    Browse the repository at this point in the history
Loading