Skip to content

Commit d43690f

Browse files
committed
fix Blogger authentication warning on the deprecation of oauth2client.tools.run by switching [1] to run_flow
The warnging text is: WARNING:root:This function, oauth2client.tools.run(), and the use of the gflags library are deprecated and will be removed in a future version of the library. [1]: pandas-dev/pandas#8327 (comment)
1 parent 6da9097 commit d43690f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGES.rst

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ CHANGES
55
Development
66
===========
77

8+
* fix Blogger authentication warning on the deprecation of ``oauth2client.tools.run`` by switching_ to ``run_flow``.
9+
10+
.. _switching: https://github.com/pydata/pandas/issues/8327#issuecomment-97282417
11+
812
Version 0.9.0 (2014-09-09T03:06:03Z)
913
====================================
1014

bpy/services/blogger.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2013-2014 by Yu-Jie Lin
1+
# Copyright (C) 2013-2015 by Yu-Jie Lin
22
#
33
# Permission is hereby granted, free of charge, to any person obtaining a copy
44
# of this software and associated documentation files (the "Software"), to deal
@@ -71,7 +71,7 @@
7171
from apiclient.discovery import build
7272
from oauth2client.client import OAuth2WebServerFlow
7373
from oauth2client.file import Storage as BaseStorage
74-
from oauth2client.tools import run
74+
from oauth2client.tools import run_flow, argparser
7575

7676
API_STORAGE = 'b.dat'
7777

@@ -123,7 +123,7 @@ def auth(self):
123123
storage = Storage(API_STORAGE)
124124
credentials = storage.get()
125125
if credentials is None or credentials.invalid:
126-
credentials = run(FLOW, storage)
126+
credentials = run_flow(FLOW, storage, argparser.parse_args([]))
127127

128128
http = httplib2.Http()
129129
self.http = credentials.authorize(http)

0 commit comments

Comments
 (0)