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

Feature/release 6 0 0 #1382

Merged
merged 185 commits into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
5f143a2
Remove deprecated method delete_row
cgkoutzigiannis Jun 15, 2022
eb2cd32
Update version to 6.0.0
lavigne958 Dec 14, 2022
6f157dc
Remove unused Makefile
lavigne958 Dec 14, 2022
2657ede
Update python versions
lavigne958 Dec 14, 2022
212f204
Upgrade google auth/oauth dependencies to latest version
lavigne958 Dec 14, 2022
e769224
Remove deprecated methods
lavigne958 Dec 16, 2022
8f6b19d
Revert "Remove deprecated methods"
lavigne958 Dec 18, 2022
42e6223
Add typing: gspread/url.py
lavigne958 Dec 20, 2022
a8fb051
Add typing: gspread/cell.py
lavigne958 Dec 23, 2022
2395766
Add typing: gspread/exceptions.py
lavigne958 Dec 23, 2022
9a28579
Fix Cell typing
lavigne958 Dec 23, 2022
d134422
Fix typo in docstring
lavigne958 Dec 23, 2022
a8a57b8
Fix typing in Exception.py
lavigne958 Dec 23, 2022
5b86813
Initial typing in client.py
OskarBrzeski Jan 1, 2023
73c0395
Black Formatting
OskarBrzeski Jan 2, 2023
30dd9ad
isort Formatting
OskarBrzeski Jan 2, 2023
090de3c
codespell - do not parse mypy folder
lavigne958 Jan 2, 2023
0cc9e5a
format code
lavigne958 Jan 2, 2023
6935abd
Merge branch 'burnash:feature/release_6_0_0' into feature/release_6_0_0
OskarBrzeski Jan 2, 2023
356dba1
Merge pull request #1062 from cgkoutzigiannis/remove-delete-row
lavigne958 Jan 3, 2023
b53dcd7
Typing changes in client.py
OskarBrzeski Jan 3, 2023
9192b54
Mypy ignore comment
OskarBrzeski Jan 5, 2023
e23d17e
Merge pull request #1159 from OskarBrzeski/feature/release_6_0_0
lavigne958 Jan 10, 2023
5a99088
test CI with new types
lavigne958 Jan 10, 2023
8130a94
Typing changes in utils.py used by cell.py
lavigne958 Mar 4, 2023
b4b7b4b
add typing for client.py
lavigne958 Mar 14, 2023
fcc5291
Merge branch 'master' into feature/release_6_0_0
lavigne958 Mar 14, 2023
164c132
apply new black format
lavigne958 Mar 14, 2023
2b87c0d
Bump isort from 5.11.4 to 5.12.0
dependabot[bot] Apr 4, 2023
e0d5776
move the http client out of the actual client
lavigne958 May 1, 2023
e212e5c
Move all HTTP requests to the http_client
lavigne958 May 11, 2023
7b43795
fix doc in auth
lavigne958 May 14, 2023
d8de175
pin urllib3 version to match vrcpy imports
lavigne958 May 4, 2023
a7aa6c4
Merge pull request #1190 from burnash/split_client_http_client
lavigne958 May 16, 2023
045a92a
Merge branch 'master' into feature/release_6_0_0
lavigne958 May 16, 2023
8c7dbfb
Add typing for auth.py, client.py and http_client.py
lavigne958 May 16, 2023
e582d31
Add sketch typing for utils.py
butvinm May 28, 2023
542ad12
Merge pull request #1187 from alifeee/fix_spelling
lavigne958 May 30, 2023
7c5a06a
Fix incorrect types
butvinm May 31, 2023
5f829df
Format with 'tox -e format'
butvinm May 31, 2023
1e53fde
Replace 'Cell' with Any for linting pass
butvinm May 31, 2023
1817f5f
Remove TypedDict for compatibility with python3.8
butvinm May 31, 2023
f717465
Update tests for changes at #7c5a06a
butvinm May 31, 2023
7ae1bc2
Add TYPE_CHECKING imports
butvinm Jun 3, 2023
7876450
Revert default blank to Optional[AnyStr]
butvinm Jun 7, 2023
52c4517
Merge pull request #1196 from butvinm/feature/release_6_0_0
lavigne958 Jun 8, 2023
33bf5bd
Merge branch 'master' into feature/release_6_0_0
lavigne958 Jun 18, 2023
6551efe
Remove accepted_kwargs decorator
lavigne958 Jun 18, 2023
5f22248
add `test_get_values_with_args_or_kwargs`
alifeee Jun 18, 2023
cf66822
Merge pull request #1229 from burnash/feature/remove_decorators_kwargs
alifeee Jun 18, 2023
4e4caf5
remove Python 3.7 references
alifeee Jun 21, 2023
30c9659
remove python 3.7 workflow
alifeee Jun 21, 2023
b5d18f4
Merge pull request #1234 from burnash/remove/python-3.7
alifeee Jun 22, 2023
cd593c3
retrigger checks
alifeee Jun 25, 2023
2fa0515
remove python 3.7 workflow
alifeee Jun 21, 2023
4139c83
Merge branch 'feature/release_6_0_0' into dependabot/pip/isort-5.12.0
alifeee Jun 25, 2023
fee64a0
bump flake8 to 6.0.0
alifeee Jun 25, 2023
1e0138f
Merge pull request #1165 from burnash/dependabot/pip/isort-5.12.0
lavigne958 Jun 25, 2023
9400a33
Merge branch 'feature/release_6_0_0' into dependabot/pip/flake8-6.0.0
alifeee Jun 25, 2023
0d8e309
Merge pull request #1236 from burnash/dependabot/pip/flake8-6.0.0
alifeee Jun 25, 2023
0b506ff
Merge branch 'master' into merge_master_into_6.0.0
lavigne958 Jun 26, 2023
d7e968a
Fix dependecy versions
lavigne958 Jun 26, 2023
c624f26
Merge pull request #1241 from burnash/merge_master_into_6.0.0
lavigne958 Jun 28, 2023
4182e7d
ignore docs/build
alifeee Jun 29, 2023
4bf668b
Remplace named tuples with enums
lavigne958 Jun 19, 2023
b4dc700
Use package strEnum for string enums
lavigne958 Jul 6, 2023
e3b2b05
Update tests
lavigne958 Jul 6, 2023
3dbd429
revert changes from extracting enum values
lavigne958 Jul 7, 2023
36b796e
Merge pull request #1250 from burnash/feature/replace_named_tuple_to_…
lavigne958 Jul 9, 2023
1fb93fc
type valueRange class
lavigne958 May 27, 2023
5c6d5a4
temp: type worksheet
lavigne958 May 29, 2023
e3cc279
Add missing types, fix wrong types
lavigne958 Jul 18, 2023
36e573a
fix typing
lavigne958 Jul 18, 2023
fa39eb3
rename JSONAnyType to JSONResponse
lavigne958 Jul 24, 2023
eb85235
force value to be str type - might be changed later
lavigne958 Jul 24, 2023
ac6b678
Merge pull request #1254 from burnash/feature/add_type_hints_worksheets
lavigne958 Jul 31, 2023
30ccb5a
Implement hex color conversion
idonec Aug 12, 2023
728c70f
Merge branch 'master' into feature/release_6_0_0
lavigne958 Aug 13, 2023
46549d3
Install dependency type files for mypy
lavigne958 Aug 13, 2023
fa90df2
Merge branch 'feature/release_6_0_0' into feature/release_6_0_0
alifeee Aug 13, 2023
bcbf639
update cassette (after merge)
alifeee Aug 13, 2023
a3e12e2
Modify `convert_colors_to_hex_value` to accept floats
idonec Aug 14, 2023
24cd982
Use `typing.Mapping` for Python 3.8 Compatibility
idonec Aug 15, 2023
f602d8d
Round color values in `convert_hex_to_colors`
idonec Aug 16, 2023
7abf1e2
Merge branch 'master' into feature/release_5_0_0
lavigne958 Aug 18, 2023
58c4d1a
Updated `test_set_tab_color` to compare hex values
idonec Aug 20, 2023
1b87cb2
Modify `update_tab_color` to accept hex value
idonec Aug 31, 2023
495c7c0
remove lastUpdateTime
alifeee Sep 10, 2023
c09ec58
remove unused import
alifeee Sep 10, 2023
b7b4cd9
alias get_values to call get
alifeee Sep 10, 2023
d7a1d7d
fill blanks in worksheet_test
alifeee Sep 10, 2023
20df26a
rearrange get arguments in worksheet_test
alifeee Sep 10, 2023
4053fac
allow ValueRange constructor to take in values
alifeee Sep 10, 2023
fc97d96
ensure ValueRange metadata is held
alifeee Sep 10, 2023
f118ad6
add test_get_returns_ValueRange_with_metadata
alifeee Sep 10, 2023
cb08726
export ValueRange from gspread
alifeee Sep 10, 2023
b946836
add test cassette
alifeee Sep 10, 2023
608789f
Merge pull request #1270 from idonec/feature/release_6_0_0
lavigne958 Sep 10, 2023
15f5d6e
Merge pull request #1295 from burnash/deprecation/remove-lastUpdateTime
alifeee Sep 11, 2023
51f8e8c
undo changes to `from_json` by...
alifeee Sep 20, 2023
d216069
undo changes to from_json
alifeee Sep 21, 2023
e9090ce
Merge branch 'master' into feature/release_6_0_0-updated
alifeee Oct 19, 2023
f4dc39c
remove old tab_color method
alifeee Oct 19, 2023
a8b35df
remove updated @property
alifeee Oct 19, 2023
cb75c80
import missing APIError
alifeee Oct 19, 2023
26c9756
replace "self" with "self.http_client" in client.py
alifeee Oct 19, 2023
b7c0a94
replace sheet colours
alifeee Oct 19, 2023
d590d07
remove `test_accepted_kwargs` test
alifeee Oct 19, 2023
46eab5a
fix color test (v6 uses hex colors only now)
alifeee Oct 19, 2023
65eeb4e
formatting
alifeee Oct 19, 2023
fc336cb
update cassette
alifeee Oct 19, 2023
813e15a
switch `update` arguments
alifeee Oct 19, 2023
1a9ba57
`tox -e format`
alifeee Oct 19, 2023
36d4e51
fix `tox -e lint` violations
alifeee Oct 19, 2023
2799068
Merge branch 'feature/release_6_0_0' into alias/get_values
alifeee Oct 19, 2023
192877e
add "GridRangeType" enum
alifeee Oct 19, 2023
63b6197
allow `get` to pad_values and change return type via kwargs
alifeee Oct 19, 2023
d882420
make `get_values` call `get` with default kwargs
alifeee Oct 19, 2023
a358884
undo test changes
alifeee Oct 19, 2023
65581f6
change args in arg test to match kwargs
alifeee Oct 19, 2023
8b49b29
assert `get` behaviour
alifeee Oct 19, 2023
107c1c4
assert `get_values` behaviour
alifeee Oct 19, 2023
fd43b27
test cassettes
alifeee Oct 19, 2023
ddf3db6
`tox -e format`
alifeee Oct 19, 2023
53d5428
fiddle method signature around a bit
alifeee Oct 19, 2023
d342365
change lambda function to dict
alifeee Oct 19, 2023
195543d
update warning for lastUpdateTime to a deprecation warning
alifeee Oct 19, 2023
8f8fa6b
add return type back to get_all_records
alifeee Oct 19, 2023
2c701d8
un-expand color dictionary
alifeee Oct 24, 2023
6b12458
do not expand color_dict (and rename)
alifeee Oct 25, 2023
ba7bfc6
Merge pull request #1320 from burnash/feature/release_6_0_0-updated
alifeee Oct 26, 2023
cedc63e
Merge branch 'master' into feature/release_6_0_0
alifeee Oct 28, 2023
25499bf
replace f-strings with format
alifeee Oct 28, 2023
e46f75b
Merge branch 'feature/release_6_0_0' into alias/get_values
alifeee Oct 28, 2023
0de1239
add test for fill_gaps for non-rectangular array
alifeee Oct 28, 2023
dea0e47
replace readme references of `get_values` with `get`
alifeee Oct 28, 2023
602f6ed
alter get_values test
alifeee Oct 28, 2023
6627b53
tox -e format 🙄
alifeee Oct 28, 2023
90ddb78
add warning if args swapped (and re-swap back)
alifeee Oct 28, 2023
6474f67
add test that using `update` in old way still works
alifeee Oct 28, 2023
a2ed963
tox -e format 🙄
alifeee Oct 28, 2023
da058b8
add test_get_and_get_values_have_same_signature
alifeee Oct 19, 2023
92a4f7e
allow get_values to emulate get
alifeee Oct 31, 2023
a0db203
Revert "add test_get_and_get_values_have_same_signature"
alifeee Oct 31, 2023
91d31f9
add test_get_and_get_values_have_same_signature
alifeee Oct 19, 2023
da10320
make signature test better
alifeee Oct 31, 2023
f46c2c3
make arrguments explicit in get_values...
alifeee Oct 31, 2023
ddd46db
tox -e format
alifeee Oct 31, 2023
3ca7e11
ignore mypy complaint for `format`
alifeee Oct 31, 2023
f492eba
make default_blank type `Any`
alifeee Oct 31, 2023
51b1f7d
replace spreadsheet `id` type with int from str
alifeee Oct 31, 2023
8618e6c
make payload `Dict[str, Any]`
alifeee Oct 31, 2023
4f24f59
make params `ParamsType`
alifeee Oct 31, 2023
d0a0b48
add type check to lint
alifeee Oct 31, 2023
e453155
Improve `Worksheet.sort()` signature
lavigne958 Nov 1, 2023
ef67b7b
Merge pull request #1337 from burnash/1321-add-missing-type-hints
alifeee Nov 1, 2023
6602fbd
Merge pull request #1336 from burnash/warning/update-swapped-args
alifeee Nov 1, 2023
603fae9
Merge pull request #1342 from burnash/improvement/change_sort_signaure
lavigne958 Nov 1, 2023
6944c1f
Merge pull request #1296 from burnash/alias/get_values
alifeee Nov 5, 2023
6457676
remove `.first()` function
alifeee Nov 5, 2023
22da222
deprecate `use_index` in `get_records`
alifeee Nov 5, 2023
fac44cb
remove `use_index` from `get_records`
alifeee Nov 5, 2023
735feb8
Merge pull request #1344 from burnash/fix/type-issue
alifeee Nov 6, 2023
eab107b
Merge commit '735feb8e8ba15ccdb079540147c9048de855a3da' into remove/g…
alifeee Nov 6, 2023
7974168
Merge pull request #1345 from burnash/remove/get_records---use_index
alifeee Nov 7, 2023
5660483
increase warning stacklevel from 1 to 2
alifeee Dec 4, 2023
9df2564
Merge pull request #1361 from burnash/warning-stacklevel
alifeee Dec 4, 2023
7cf5d0c
Merge branch 'master' into feature/merge_master
lavigne958 Dec 14, 2023
a1431b7
skip pip version CVE
lavigne958 Dec 14, 2023
da4739b
Merge pull request #1371 from burnash/feature/merge_master
lavigne958 Dec 15, 2023
1b0a167
Merge branch 'master' into feature/merge_master
lavigne958 Dec 16, 2023
0b79db3
Merge pull request #1372 from burnash/feature/merge_master
lavigne958 Dec 27, 2023
483a1db
remove get_records
alifeee Dec 29, 2023
74980b8
tox -e format
alifeee Dec 29, 2023
63c4c5e
Merge pull request #1374 from burnash/simplify-get-records
alifeee Jan 9, 2024
61a054c
Add util function `to_record` to build records
lavigne958 Jan 15, 2024
d7c110f
Merge pull request #1377 from burnash/feature/add_utils_get_records
alifeee Jan 19, 2024
51f9f25
Revert "Merge pull request #1377 from burnash/feature/add_utils_get_r…
alifeee Jan 19, 2024
3f5e483
improve docstring - add small example
lavigne958 Jan 18, 2024
1075572
Add migration guide for method `get_all_records`
lavigne958 Jan 19, 2024
de307cb
Add util function `to_record` to build records
lavigne958 Jan 15, 2024
8465fce
briefen migration guide readme
alifeee Jan 20, 2024
406e0a1
Merge pull request #1378 from burnash/feature/add_utils_get_records
lavigne958 Jan 20, 2024
07ab681
Merge branch 'master' into feature/release_6_0_0
lavigne958 Jan 25, 2024
2c4d117
Merge pull request #1381 from burnash/feature/merge_master_into_relea…
lavigne958 Jan 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.x"]
python: ["3.8", "3.9", "3.10", "3.11", "3.x"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -29,7 +29,6 @@ jobs:
if: ${{ matrix.python >= '3.8' }}
- run: tox -e lint
- run: tox -e py
- run: mypy --install-types --ignore-missing-imports . || true
- run: shopt -s globstar && pyupgrade --py3-only **/*.py # --py36-plus
- run: safety check -i 42559 -i 62044 # pip <= 20.1.1, we upgrade it just above
- run: tox -e build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.9"
- name: Setup tox
run: pip install tox
- name: Run linter
Expand Down
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Features:
pip install gspread
```

Requires Python 3.7+
Requirements: Python 3.8+.

## Basic Usage

Expand Down Expand Up @@ -190,22 +190,30 @@ values_list = worksheet.col_values(1)
### Getting All Values From a Worksheet as a List of Lists

```python
list_of_lists = worksheet.get_values()
from gspread.utils import GridRangeType
list_of_lists = worksheet.get(return_type=GridRangeType.ListOfLists)
```

### Getting a range of values

Receive only the cells with a value in them
Receive only the cells with a value in them.

```python
>>> worksheet.get_values("A1:B4")
>>> worksheet.get("A1:B4")
[['A1', 'B1'], ['A2']]
```

Receive a lists of lists matching the requested size
regardless if values are empty or not
Receive a rectangular array around the cells with values in them.

```python
>>> worksheet.get("A1:B4", pad_values=True)
[['A1', 'B1'], ['A2', '']]
```

Receive an array matching the request size regardless of if values are empty or not.

```python
>>> worksheet.get_values("A1:B4", maintain_size=True)
>>> worksheet.get("A1:B4", maintain_size=True)
[['A1', 'B1'], ['A2', ''], ['', ''], ['', '']]
```

Expand Down
3 changes: 0 additions & 3 deletions docs/api/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ Client

.. autoclass:: gspread.Client
:members:

.. autoclass:: gspread.client.BackoffClient
:members:
13 changes: 13 additions & 0 deletions docs/api/http_client.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
HTTP Client
===========

.. note::

This class is not intended to be used directly.
It is used by all gspread models to interact with the Google API

.. autoclass:: gspread.HTTPClient
:members:

.. autoclass:: gspread.BackOffHTTPClient
:members:
1 change: 1 addition & 0 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ API Reference
top-level
auth
client
http_client
models/index
utils
exceptions
10 changes: 0 additions & 10 deletions docs/api/utils.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
Utils
=====

.. autonamedtuple:: gspread.utils.Dimension
.. autonamedtuple:: gspread.utils.DateTimeOption
.. autonamedtuple:: gspread.utils.ExportFormat
.. autonamedtuple:: gspread.utils.MergeType
.. autonamedtuple:: gspread.utils.MimeType
.. autonamedtuple:: gspread.utils.PasteOrientation
.. autonamedtuple:: gspread.utils.PasteType
.. autonamedtuple:: gspread.utils.ValueInputOption
.. autonamedtuple:: gspread.utils.ValueRenderOption

.. automodule:: gspread.utils
:members:
:undoc-members:
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sphinx==5.3.0
sphinx==6.2.1
sphinx_rtd_theme
sphinx-toolbox
7 changes: 4 additions & 3 deletions gspread/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Google Spreadsheets Python API"""

__version__ = "5.12.4"
__version__ = "6.0.0"
__author__ = "Anton Burnashev"


Expand All @@ -12,13 +12,14 @@
service_account_from_dict,
)
from .cell import Cell
from .client import BackoffClient, Client, ClientFactory
from .client import Client
from .exceptions import (
GSpreadException,
IncorrectCellLabel,
NoValidUrlKeyFound,
SpreadsheetNotFound,
WorksheetNotFound,
)
from .http_client import BackOffHTTPClient, HTTPClient
from .spreadsheet import Spreadsheet
from .worksheet import Worksheet
from .worksheet import ValueRange, Worksheet
Loading