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

ENH: update pandas-gbq to 0.8.0, adds credentials arg #23662

Merged
merged 3 commits into from Nov 17, 2018

Conversation

Projects
None yet
5 participants
@tswast
Copy link
Contributor

commented Nov 13, 2018

  • N/A closes #xxxx
  • tests added / passed
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry
@pep8speaks

This comment has been minimized.

Copy link

commented Nov 13, 2018

Hello @tswast! Thanks for submitting the PR.

reauth=False, if_exists='fail', private_key=None,
auth_local_webserver=False, table_schema=None, location=None,
progress_bar=True, verbose=None):
reauth=False, if_exists='fail', auth_local_webserver=False,

This comment has been minimized.

Copy link
@WillAyd

WillAyd Nov 13, 2018

Member

I realize private_key was listed as a breaking change for pandas-gbq but don't believe it was ever deprecated on our end. Is there no other way to go about this than just removing?

This comment has been minimized.

Copy link
@WillAyd

WillAyd Nov 13, 2018

Member

Whoops sorry I see it was just moved around in the signature. Any reason for doing that? Seems like it would be safer to keep in it's current position

This comment has been minimized.

Copy link
@tswast

tswast Nov 13, 2018

Author Contributor

I moved it to the end because that's where I was told to move verbose when we deprecated that. Seeing as there are already many keyword arguments preceding it, I don't think there's a risk of people using the position of the argument.

@WillAyd WillAyd added the IO Google label Nov 13, 2018

@codecov

This comment has been minimized.

Copy link

commented Nov 13, 2018

Codecov Report

Merging #23662 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #23662   +/-   ##
=======================================
  Coverage   92.24%   92.24%           
=======================================
  Files         161      161           
  Lines       51339    51339           
=======================================
  Hits        47360    47360           
  Misses       3979     3979
Flag Coverage Δ
#multiple 90.64% <ø> (ø) ⬆️
#single 42.34% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <ø> (ø) ⬆️
pandas/core/frame.py 97.02% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4b945a...d633cdf. Read the comment docs.

@@ -19,7 +19,7 @@
api_exceptions = pytest.importorskip("google.api_core.exceptions")
bigquery = pytest.importorskip("google.cloud.bigquery")
service_account = pytest.importorskip("google.oauth2.service_account")
pandas_gbq = pytest.importorskip('pandas_gbq')
pandas_gbq = pytest.importorskip("pandas_gbq", minversion="0.8.0")

This comment has been minimized.

Copy link
@jreback

jreback Nov 13, 2018

Contributor

no
you need to support the stated min. version

This comment has been minimized.

Copy link
@TomAugspurger

TomAugspurger Nov 13, 2018

Contributor

Why not bump the minimum version?

This comment has been minimized.

Copy link
@tswast

tswast Nov 14, 2018

Author Contributor

Dropped. Now it'll error instead of skip if an old version of pandas-gbq is installed.

This comment has been minimized.

Copy link
@WillAyd

WillAyd Nov 15, 2018

Member

Hmm where is this actually erroring?

This comment has been minimized.

Copy link
@tswast

tswast Nov 16, 2018

Author Contributor

It'll import at the call to pandas_gbq.read_gbq() or pandas_gbq.to_gbq() with a "unexpected 'credentials' argument". There are a couple of versions of pandas-gbq that used **kwargs in read_gbq(). Unfortunately, it will just ignore the extra argument in those older versions.

This comment has been minimized.

Copy link
@WillAyd

WillAyd Nov 16, 2018

Member

Do those kwargs begin at a certain version? Wondering if we shouldn't have test coverage for those to ensure behavior. Alternately could consider bumping the min version in our requirements files

This comment has been minimized.

Copy link
@tswast

tswast Nov 16, 2018

Author Contributor

I couldn't find any explicit versions for pandas-gbq in any requirements files. https://github.com/pandas-dev/pandas/search?q=pandas-gbq&unscoped_q=pandas-gbq

kwargs for read_gbq were removed in pydata/pandas-gbq@e7007a8 which corresponds to pandas-gbq version 0.5.0. Any version before that may silently fail.

reflect changes from the `Pandas-GBQ library version 0.8.0
<https://pandas-gbq.readthedocs.io/en/latest/changelog.html#changelog-0-8-0>`__.
Adds a ``credentials`` argument, which enables the use of any kind of
`google-auth credentials

This comment has been minimized.

Copy link
@jreback

jreback Nov 14, 2018

Contributor

can you also add this version change in the dependencies changed section (further down). and update install.rst

This comment has been minimized.

Copy link
@tswast

tswast Nov 15, 2018

Author Contributor

Done in d633cdf

tswast added some commits Nov 13, 2018

@tswast tswast force-pushed the tswast:pandas-gbq-0-8-0 branch from ef24b2c to d633cdf Nov 15, 2018

@jreback jreback added this to the 0.24.0 milestone Nov 15, 2018

@jreback

This comment has been minimized.

Copy link
Contributor

commented Nov 15, 2018

lgtm. @WillAyd over to you.

@WillAyd WillAyd merged commit 24bce1a into pandas-dev:master Nov 17, 2018

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
pandas-dev.pandas Build #20181115.6 succeeded
Details
@WillAyd

This comment has been minimized.

Copy link
Member

commented Nov 17, 2018

Thanks @tswast

@tswast tswast deleted the tswast:pandas-gbq-0-8-0 branch Nov 18, 2018

thoo added a commit to thoo/pandas that referenced this pull request Nov 19, 2018

Merge remote-tracking branch 'upstream/master' into io_csv_docstring_…
…fixed

* upstream/master: (46 commits)
  DEPS: bump xlrd min version to 1.0.0 (pandas-dev#23774)
  BUG: Don't warn if default conflicts with dialect (pandas-dev#23775)
  BUG: Fixing memory leaks in read_csv (pandas-dev#23072)
  TST: Extend datetime64 arith tests to array classes, fix several broken cases (pandas-dev#23771)
  STYLE: Specify bare exceptions in pandas/tests (pandas-dev#23370)
  ENH: between_time, at_time accept axis parameter (pandas-dev#21799)
  PERF: Use is_utc check to improve performance of dateutil UTC in DatetimeIndex methods (pandas-dev#23772)
  CLN: io/formats/html.py: refactor (pandas-dev#22726)
  API: Make Categorical.searchsorted returns a scalar when supplied a scalar (pandas-dev#23466)
  TST: Add test case for GH14080 for overflow exception (pandas-dev#23762)
  BUG: Don't extract header names if none specified (pandas-dev#23703)
  BUG: Index.str.partition not nan-safe (pandas-dev#23558) (pandas-dev#23618)
  DEPR: tz_convert in the Timestamp constructor (pandas-dev#23621)
  PERF: Datetime/Timestamp.normalize for timezone naive datetimes (pandas-dev#23634)
  TST: Use new arithmetic fixtures, parametrize many more tests (pandas-dev#23757)
  REF/TST: Add more pytest idiom to parsers tests (pandas-dev#23761)
  DOC: Add ignore-deprecate argument to validate_docstrings.py (pandas-dev#23650)
  ENH: update pandas-gbq to 0.8.0, adds credentials arg (pandas-dev#23662)
  DOC: Improve error message to show correct order (pandas-dev#23652)
  ENH: Improve error message for empty object array (pandas-dev#23718)
  ...

brute4s99 added a commit to brute4s99/pandas that referenced this pull request Nov 19, 2018

Pingviinituutti added a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019

Pingviinituutti added a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.