Comments (7)
Hi, I'm sorry about this issue ! I did not notice that the api_key
does not exists in newer version 😞
I will have a look and see how we can solve this.
from gspread.
I check the dependencies, this going to be annoying to solve 😞
- We introduced a breaking-change when adding the API Key authentication
In order to solve it properly, I suggest, @alifeee let me know if you think of something better
- add a new warning on the auth method
api_key()
that it's going to move to version 7.0.0 - release version 6.1.1 to let everyone get the warning
- wait for some time (I believe a couple of weeks at least ? ) for everyone to adapt
- remove the auth method
api_key()
😢 - release version 6.2.0 -> auth method
api_key()
does not exists anymore - add it back
- bump dependency to at least version 2.4.0 for
google_auth
- release version v7.0.0
this way anyone with a dependency on google_auth
< 2.4.0 can use gspread-6.2.2
Anyone else not blocked by this version can benefit of the new auth method.
from gspread.
Sounds like a good plan to me. My personal solution was to upgrade dependencies but it was a complex web requiring a lot of updates and it would have been nice to have an option to still use gspread
from gspread.
what do you think of the following change?
https://github.com/burnash/gspread/compare/master..fix/api_key-auth-version
Firstly, test-requirements.txt
uses the minimum versions specified by pyproject.toml
.
Secondly, the import
is attempted but silently fails. It is only noticeable if you are using api_key
for auth, in which case you will get an exception. Here is what it would look like to use with the following code
from gspread.auth import api_key
api_key("uijwaiofjwa")
I think this keeps backwards compatibility (people can still use gspread
on low versions of google-auth
), while also allowing api_key
to be used if desired (i.e., not removing the feature), with hopefully a nice error message.
Then, we can think in future of increasing the minimum version in pyproject.toml
, and removing this fix.
from gspread.
@alifeee thats looks great !
correct me if I'm wrong, the plan is:
- merge this fix on imports
- make a new release (6.1.1 - it's a bugfix only)
- later on....
- remove the fix
- bump dependency to a more recent version where
api_key
exists - release 7.0.0 (it's a breaking change as we bump the dependency to a new major version too)
if this is correct I think we should merge whatever fix we have to merge now + new features that have been waiting, then start working on version 7.0.0, what do you think ?
from gspread.
sounds good. we should make a PR from https://github.com/burnash/gspread/compare/master..fix/api_key-auth-version
not sure if it's that testable, will need a bit of manual testing, as version numbers are being screwed around with
I am in no rush to release 7.0.0. This bugfix seems reasonable to me as api_key
is not a widely used method (I think) so it will not affect many people.
from gspread.
sounds good. we should make a PR from https://github.com/burnash/gspread/compare/master..fix/api_key-auth-version
not sure if it's that testable, will need a bit of manual testing, as version numbers are being screwed around with
I am in no rush to release 7.0.0. This bugfix seems reasonable to me as
api_key
is not a widely used method (I think) so it will not affect many people.
agreed, we could simply fix it and keep going with new workaround.
from gspread.
Related Issues (20)
- Update examples of gspread usage /Readme.md HOT 8
- Reorder gspread client init arguments HOT 1
- improve documentation HOT 2
- cell.expand('table') feature requests HOT 7
- add `value_render_option` to examples (automatic conversion of currency) HOT 6
- Update conda forge package HOT 2
- A way to add DataValidation HOT 6
- Missing py.typed marker HOT 1
- AttributeError: 'HTTPClient' object has no attribute 'import_csv' HOT 3
- Unable to read public readonly spreadsheet HOT 4
- Add missing types HOT 2
- Disambiguating and filling in headers similar to Pandas HOT 8
- worksheet.add_protected_range() - impossible to create the `warning_only=True` range HOT 2
- ADC Authentication HOT 2
- HTTPSConnectionPool(host='oauth2.googleapis.com', port=443): Max retries exceeded with url: /token (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1000)'))) HOT 2
- Questions about Copilot + Open Source Software Hierarchy HOT 1
- Client.copy(..., copy_permissions=True) breaks when permission type is domain HOT 1
- Remove StrEnum dependency HOT 6
- Add support for append columns HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gspread.