instance_id stringlengths 10 57 | file_changes listlengths 1 15 | repo stringlengths 7 53 | base_commit stringlengths 40 40 | problem_statement stringlengths 11 52.5k | patch stringlengths 251 7.06M |
|---|---|---|---|---|---|
google__mobly-538 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mobly/controller_manager.py:ControllerManager.unregister_controllers",
"mobly/controller_manager.py:ControllerManager.get_controller_info_records"
],
"edited_modules": [
"mob... | google/mobly | df643c7778fa7980fdb5f634dc4f2d6227fef7e3 | Errors in `teardown_class` are not properly recorded
If Mobly encounters an error in the cleanup stage of `teardown_class`, the error would not be recorded anywhere except the cli output, which makes debugging difficult.
This points to a bigger problem: the errors occurred in base test and runner themselves are not ... | diff --git a/mobly/controller_manager.py b/mobly/controller_manager.py
index 75370dd..775ad3c 100644
--- a/mobly/controller_manager.py
+++ b/mobly/controller_manager.py
@@ -17,6 +17,7 @@ import copy
import logging
import yaml
+from mobly import expects
from mobly import records
from mobly import signals
@@ -152... |
google__mobly-571 | [
{
"changes": {
"added_entities": [
"mobly/records.py:uid"
],
"added_modules": [
"mobly/records.py:uid"
],
"edited_entities": null,
"edited_modules": [
"mobly/records.py:Error"
]
},
"file": "mobly/records.py"
}
] | google/mobly | 7ce7a10fc5efdd17760519d0efacd7e2e6370b45 | Support marking `UID` for tests
We have long had a `UID` field in our record object.
Let's provide a way for test writer to utilize this field. | diff --git a/mobly/records.py b/mobly/records.py
index 1dec134..4048554 100644
--- a/mobly/records.py
+++ b/mobly/records.py
@@ -17,6 +17,7 @@
import collections
import copy
import enum
+import functools
import io
import logging
import sys
@@ -34,6 +35,38 @@ OUTPUT_FILE_DEBUG_LOG = 'test_log.DEBUG'
OUTPUT_FILE_S... |
google__mobly-577 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mobly/config_parser.py:_load_config_file"
],
"edited_modules": [
"mobly/config_parser.py:_load_config_file"
]
},
"file": "mobly/config_parser.py"
},
{
"changes"... | google/mobly | fc844080ab152a1b1853197d62ecf0798b209002 | Reduce the number of adb calls made for `ad.getprop`
Right now, each getprop requires a separate adb call.
In large scale labs, this could create a huge amount of adb calls.
We should provide a new API to get multiple props in one call. | diff --git a/mobly/config_parser.py b/mobly/config_parser.py
index 2278ca6..d26f34b 100644
--- a/mobly/config_parser.py
+++ b/mobly/config_parser.py
@@ -152,7 +152,7 @@ def _load_config_file(path):
A dict that represents info in the config file.
"""
with io.open(utils.abs_path(path), 'r', encoding='u... |
google__mobly-582 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mobly/controllers/android_device.py:take_bug_reports",
"mobly/controllers/android_device.py:AndroidDevice.take_bug_report"
],
"edited_modules": [
"mobly/controllers/android_d... | google/mobly | ac5549a19bef84d226fa639da8b249ded508321e | Make `AndroidDevice.take_bug_report` more useful
Right now, `AndroidDevice.take_bug_report` is meant to be used in functions like `BaseTestClass.on_fail`, because it requires a test name and a test begin time.
There's no reason to lock the usage of `AndroidDevice.take_bug_report` like this. We should generalize the ... | diff --git a/mobly/controllers/android_device.py b/mobly/controllers/android_device.py
index 20204be..f55273d 100644
--- a/mobly/controllers/android_device.py
+++ b/mobly/controllers/android_device.py
@@ -55,6 +55,9 @@ KEY_SKIP_LOGCAT = 'skip_logcat'
DEFAULT_VALUE_SKIP_LOGCAT = False
SERVICE_NAME_LOGCAT = 'logcat'
... |
google__mobly-61 | [
{
"changes": {
"added_entities": null,
"added_modules": [
"mobly/controllers/android_device.py:SnippetError"
],
"edited_entities": [
"mobly/controllers/android_device.py:AndroidDevice.__init__",
"mobly/controllers/android_device.py:AndroidDevice.stop_services",
... | google/mobly | 365fbf66d656e282b9cb418992e2361dd4a92be7 | Snippet client reference is not removed from ad object after teardown
'load_snippet' sets a snippet client reference attribute on the AndroidDevice object.
We should remove the attribute after snippet is stopped. | diff --git a/mobly/controllers/android_device.py b/mobly/controllers/android_device.py
index af00375..f42cf40 100644
--- a/mobly/controllers/android_device.py
+++ b/mobly/controllers/android_device.py
@@ -49,6 +49,10 @@ class Error(signals.ControllerError):
pass
+class SnippetError(signals.ControllerError):
+ ... |
google__mobly-626 | [
{
"changes": {
"added_entities": [
"mobly/controllers/android_device.py:AndroidDevice.is_emulator"
],
"added_modules": null,
"edited_entities": [
"mobly/controllers/android_device.py:AndroidDevice.build_info"
],
"edited_modules": [
"mobly/controllers/a... | google/mobly | 4541f3a65fe6631fe3e9621b620472ce0ce66602 | Add is_emulator property to AndroidDevice | diff --git a/mobly/controllers/android_device.py b/mobly/controllers/android_device.py
index cb9ab52..c3197ca 100644
--- a/mobly/controllers/android_device.py
+++ b/mobly/controllers/android_device.py
@@ -18,6 +18,7 @@ from past.builtins import basestring
import contextlib
import logging
import os
+import re
import... |
google__mobly-629 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mobly/controllers/android_device.py:take_bug_reports",
"mobly/controllers/android_device.py:AndroidDevice._normalized_serial"
],
"edited_modules": [
"mobly/controllers/androi... | google/mobly | 2587dce6ac5c762e02503115fc979d0607acb9eb | Implement general utility for sanitizing windows file names
See https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file#naming-conventions
for invalid characters | diff --git a/mobly/controllers/android_device.py b/mobly/controllers/android_device.py
index c3197ca..54bf098 100644
--- a/mobly/controllers/android_device.py
+++ b/mobly/controllers/android_device.py
@@ -411,7 +411,7 @@ def take_bug_reports(ads, test_name=None, begin_time=None, destination=None):
if begin_time is... |
google__mobly-732 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mobly/controllers/android_device_lib/jsonrpc_client_base.py:JsonRpcClientBase.disconnect",
"mobly/controllers/android_device_lib/jsonrpc_client_base.py:JsonRpcClientBase.clear_host_port"
]... | google/mobly | 47446d2a94e3602b1c8ce87137aeaa3f69e8f4c7 | Snippet service's `is_alive` returns True even if the service is paused
It is not clearly defined if a paused service should be considered alive.
We should probably make a decision and documents it. | diff --git a/mobly/controllers/android_device_lib/jsonrpc_client_base.py b/mobly/controllers/android_device_lib/jsonrpc_client_base.py
index ebe0b67..e28f5a1 100644
--- a/mobly/controllers/android_device_lib/jsonrpc_client_base.py
+++ b/mobly/controllers/android_device_lib/jsonrpc_client_base.py
@@ -245,16 +245,27 @@ c... |
google__mobly-821 | [
{
"changes": {
"added_entities": [
"mobly/controllers/android_device_lib/jsonrpc_client_base.py:JsonRpcClientBase.close_socket_connection"
],
"added_modules": null,
"edited_entities": [
"mobly/controllers/android_device_lib/jsonrpc_client_base.py:JsonRpcClientBase.disconn... | google/mobly | c6145d2d18b6594420e5fa2ca95123d38e4b10ff | Android snippet client should clean event client when stopping
Android snippet client should set `self._event_client` to None when it is requested to stop. Otherwsie, after device reboot, the snippet client will still use the broken event client instead of creating a new one. | diff --git a/mobly/controllers/android_device_lib/jsonrpc_client_base.py b/mobly/controllers/android_device_lib/jsonrpc_client_base.py
index 39266dc..7d7e3a1 100644
--- a/mobly/controllers/android_device_lib/jsonrpc_client_base.py
+++ b/mobly/controllers/android_device_lib/jsonrpc_client_base.py
@@ -253,13 +253,17 @@ c... |
google__mobly-87 | [
{
"changes": {
"added_entities": [
"mobly/controllers/android_device.py:AndroidDevice.load_sl4a"
],
"added_modules": null,
"edited_entities": [
"mobly/controllers/android_device.py:destroy",
"mobly/controllers/android_device.py:_start_services_on_ads",
"mo... | google/mobly | 312070ed24d3e229689a374c7357267879fd2549 | Make sl4a a service that needs to be explicitly requested
Right now people have to explicitly say they don't need sl4a in config file, which is odd since most users don't use sl4a.
Let's flip the assumption and make sl4a an optional service that people can request in setup if needed. | diff --git a/README.md b/README.md
index f606ce5..16bb283 100644
--- a/README.md
+++ b/README.md
@@ -103,6 +103,7 @@ class HelloWorldTest(base_test.BaseTestClass):
# object is created from this.
self.ads = self.register_controller(android_device)
self.dut = self.ads[0]
+ self.dut.load_sl4a() # starts ... |
google__mobly-90 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mobly/controllers/android_device.py:AndroidDevice.load_snippet",
"mobly/controllers/android_device.py:AndroidDevice._start_sl4a",
"mobly/controllers/android_device.py:AndroidDevice._star... | google/mobly | 312070ed24d3e229689a374c7357267879fd2549 | Snippet client's _is_app_running() doesn't work properly, leading to race conditions
Slow loading snippets fail because _is_app_running() returns True even when nothing is on the other side of the socket.
This leads to race conditions between the snippet app really starting and the connection attempt.
```
>>> sock... | diff --git a/mobly/controllers/android_device.py b/mobly/controllers/android_device.py
index 0d108a8..de89289 100644
--- a/mobly/controllers/android_device.py
+++ b/mobly/controllers/android_device.py
@@ -558,12 +558,9 @@ class AndroidDevice(object):
'Snippet package "%s" has already been loaded un... |
google__sre_yield-21 | [
{
"changes": {
"added_entities": [
"sre_yield/__init__.py:RegexMembershipSequence.lookaround_parse_error"
],
"added_modules": null,
"edited_entities": [
"sre_yield/__init__.py:RegexMembershipSequence.sub_values",
"sre_yield/__init__.py:RegexMembershipSequence.__in... | google/sre_yield | 90a651accda89f798f6e88d8c62d08d809bf667d | Problem with lookaheads
Positive and negative lookaheads behave the same. This is as of [d997adf]
```
>>> x = sre_yield.AllStrings("(?!a)x?")
>>> len(x)
0
>>> x.raw.list_lengths
[([], 0), ({repeat base=1 low=0 high=1}, 2)]
```
| diff --git a/README.rst b/README.rst
index 06ca7b0..f2a7f90 100644
--- a/README.rst
+++ b/README.rst
@@ -110,6 +110,42 @@ This even works for simplistic backreferences, in this case to have matching quo
'000'
+Anchors and Lookaround
+======================
+
+Some very simple anchors are supported out of the b... |
google__timesketch-2507 | [
{
"changes": {
"added_entities": [
"api_client/python/timesketch_api_client/aggregation.py:Aggregation.aggregator_name"
],
"added_modules": null,
"edited_entities": [
"api_client/python/timesketch_api_client/aggregation.py:Aggregation.__init__",
"api_client/python... | google/timesketch | 8b35c3baf0d26eb1b11f5a0f113aa044d9c0e0da | Inconsistencies in the Aggregation section of the Timesketch API
Some inconsistencies in the TS Python API when interacting with aggregation. This was something that I found when calling [list_aggregations](https://github.com/google/timesketch/blob/1cef69b041c488878f062ce9e515313aa05f96cd/api_client/python/timesketch_a... | diff --git a/api_client/python/timesketch_api_client/aggregation.py b/api_client/python/timesketch_api_client/aggregation.py
index 4825b799..a64d6e7b 100644
--- a/api_client/python/timesketch_api_client/aggregation.py
+++ b/api_client/python/timesketch_api_client/aggregation.py
@@ -43,10 +43,11 @@ class Aggregation(res... |
google__timesketch-2586 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"timesketch/lib/utils.py:check_mapping_errors",
"timesketch/lib/utils.py:read_and_validate_csv",
"timesketch/lib/utils.py:read_and_validate_redline"
],
"edited_modules": [
... | google/timesketch | d55e8b604b599dfda8d197fa50c01f2584365c8b | Frontend-ng csv importer parses time wrong
**Describe the bug**
Importing a csv seems to miss a lot of accuracy of datetime.
E.g. this line:
```
2022-11-10T05-07-28+00:00,78Vh3h7,1668056848119860,Time Logged
```
Becomes:
```
{
"__ts_timeline_id": 17,
"datetime": "2022-11-10T05:00:00+00:00",
"me... | diff --git a/timesketch/lib/utils.py b/timesketch/lib/utils.py
index 6b6d006d..6493c552 100644
--- a/timesketch/lib/utils.py
+++ b/timesketch/lib/utils.py
@@ -205,12 +205,12 @@ def check_mapping_errors(headers, headers_mapping):
f"When create a new column, a default value must be assigned"
... |
google__timesketch-2867 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"api_client/python/timesketch_api_client/search.py:DateIntervalChip.date",
"api_client/python/timesketch_api_client/search.py:DateRangeChip.add_end_time",
"api_client/python/timesketch_ap... | google/timesketch | e330d439db50a6d502bc7e66e66bf98ac928e8c9 | [API Client] Update search module to support millisecond dates
**Describe the bug**
The new UI now allows date chips with millisecond precision. The API client needs to be updated to support these values.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to a sketch
2. Create a saved search with sub-secon... | diff --git a/api_client/python/timesketch_api_client/search.py b/api_client/python/timesketch_api_client/search.py
index 23b85486..a7c9a861 100644
--- a/api_client/python/timesketch_api_client/search.py
+++ b/api_client/python/timesketch_api_client/search.py
@@ -158,7 +158,9 @@ class DateIntervalChip(Chip):
""... |
google__timesketch-3024 | [
{
"changes": {
"added_entities": [
"api_client/python/timesketch_api_client/client.py:TimesketchApi.create_user",
"api_client/python/timesketch_api_client/client.py:TimesketchApi.list_users",
"api_client/python/timesketch_api_client/client.py:TimesketchApi.get_user"
],
... | google/timesketch | 11717abc3501e74f4b4e62147dad283e3d566712 | Surface user management via API client
**Is your feature request related to a problem? Please describe.**
I regularly want to create (and manage) users, via API, because I don't have direct CLI access to the server which hosts timesketch.
**Describe the solution you'd like**
I would like to have a feature, where I... | diff --git a/api_client/python/timesketch_api_client/client.py b/api_client/python/timesketch_api_client/client.py
index 0ffffe72..e9f13eee 100644
--- a/api_client/python/timesketch_api_client/client.py
+++ b/api_client/python/timesketch_api_client/client.py
@@ -451,6 +451,62 @@ class TimesketchApi:
sketch_id ... |
google__vimdoc-89 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"vimdoc/block.py:Block.__init__"
],
"edited_modules": [
"vimdoc/block.py:Block"
]
},
"file": "vimdoc/block.py"
},
{
"changes": {
"added_entities": [
... | google/vimdoc | 301b139ce8108bf6b8e814de5a36414034aa915b | More intuitive section/order handling
It's annoying how you don't have to specify section order with the `@order` directive until you add the first custom section, at which point you have to explicitly list every section ID in the order. You have to cross-reference the list of default sections if you want to preserve t... | diff --git a/vimdoc/block.py b/vimdoc/block.py
index e56c357..03bed17 100644
--- a/vimdoc/block.py
+++ b/vimdoc/block.py
@@ -16,6 +16,7 @@ class Block(object):
contain metadata statements specifying things like the plugin author, etc.
Args:
+ type: Block type, e.g. vim.SECTION or vim.FUNCTION.
is_second... |
google__vimdoc-97 | [
{
"changes": {
"added_entities": [
"vimdoc/block.py:Block.SetParentSection"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"vimdoc/block.py:Block"
]
},
"file": "vimdoc/block.py"
},
{
"changes": {
"added_entities": ... | google/vimdoc | 1634f964109d66746b2b79f083ef8e0cdb068ee4 | [usage]How to add something to an exist section?
@dbarnett Hi, I am author of SpaceVim, I want to use vimdoc generate doc for SpaceVim-layers. in this PR, https://github.com/SpaceVim/SpaceVim/pull/127 , I define a Layers section in `autoload/SpaceVim/layers.vim`, and all the layers is in `autoload/SpaceVim/layers/`, fo... | diff --git a/README.md b/README.md
index e322fcb..79fb40e 100644
--- a/README.md
+++ b/README.md
@@ -116,10 +116,13 @@ Available block directives include:
- `@private` marks a function private.
- `@section name[, id]` allows you to write a new section for the helpfile. The
id will be a lowercased version of name i... |
google__yapf-1173 | [
{
"changes": {
"added_entities": [
"yapf/pytree/subtype_assigner.py:_SubtypeAssigner.Visit_lambdef"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"yapf/pytree/subtype_assigner.py:_SubtypeAssigner"
]
},
"file": "yapf/pytree/subt... | google/yapf | c1d7a213f83ac09e6ddedf9d07277b08d9a26880 | `SPLIT_ALL[_TOP_LEVEL]_COMMA_SEPARATED_VALUES` breaks on tuple unpacking
```python
values = [
('a', '1'),
('b', '2'),
]
values = [
really_quite_long_function(some_quite_long_arg, value)
for some_quite_long_arg, value in values
]
```
with `SPLIT_ALL_COMMA_SEPARATED_VALUES` enabled being reformatted to
... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index d8127cf..ca880fb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,8 @@
### Fixed
- Fix SPLIT_ARGUMENTS_WHEN_COMMA_TERMINATED for one-item named argument lists
by taking precedence over SPLIT_BEFORE_NAMED_ASSIGNS.
+- Fix SPLIT_ALL_COMMA_SEPARATED_VALUES and SPLI... |
google__yapf-164 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"yapf/yapflib/subtype_assigner.py:_SubtypeAssigner.Visit_dictsetmaker"
],
"edited_modules": [
"yapf/yapflib/subtype_assigner.py:_SubtypeAssigner"
]
},
"file": "yapf/yapf... | google/yapf | 22c52a696d787ac9e8a45ea70dc6e1cae9b398de | Regression in formatting an argument expansion in a dictionary
`{a: b(*c)}` gets formatted to `{a: b( * c)}`
This regression occured in f30c1d26df3449950d95982f17568d03fe4a361f | diff --git a/yapf/yapflib/subtype_assigner.py b/yapf/yapflib/subtype_assigner.py
index f8c24cd..34391b3 100644
--- a/yapf/yapflib/subtype_assigner.py
+++ b/yapf/yapflib/subtype_assigner.py
@@ -73,7 +73,11 @@ class _SubtypeAssigner(pytree_visitor.PyTreeVisitor):
self._SetFirstLeafTokenSubtype(child,
... |
google__yapf-286 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"yapf/__init__.py:main"
],
"edited_modules": [
"yapf/__init__.py:main"
]
},
"file": "yapf/__init__.py"
},
{
"changes": {
"added_entities": null,
"add... | google/yapf | b8d20bd2d9d69fda6c1b102c0c07f97931e87132 | yapf returns an exit code of 2 on unformatted but valid input.
Hello there and thanks for developing this much appreciated python formatter.
I’m opening this issue as I’m not sure to understand the logic behind yapf's exit code return when applying it on unformatted and valid input. Indeed, yapf returns an exit code... | diff --git a/CHANGELOG b/CHANGELOG
index d331f8d..fd92065 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,8 +5,11 @@
## [0.11.1] UNRELEASED
### Fixed
- Enforce splitting each element in a dictionary if comma terminated.
-- It's okay to split in the middle of a dotted name if the whole expression is
- going to go over ... |
google__yapf-438 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"yapf/yapflib/comment_splicer.py:SpliceComments",
"yapf/yapflib/comment_splicer.py:_FindNextAncestor"
],
"edited_modules": [
"yapf/yapflib/comment_splicer.py:SpliceComments",
... | google/yapf | 8012f595c04e2c9b213ce4fec461644d1f1c81f6 | mistaken added indentation to comment when previous block ended in a comment
The specific issue is the final change, adding a level of indentation of the comment "attached" to the return statement, presumably because the previous block ended with a comment. While this is flipping where the comment was attached (eg: en... | diff --git a/CHANGELOG b/CHANGELOG
index 270d30c..e90c25b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,6 +5,8 @@
## [0.17.1] UNRELEASED
### Fixed
- Allow semicolons if the line is disabled.
+- Fix issue where subsequent comments at decreasing levels of indentation
+ were improperly aligned and/or caused output with... |
google__yapf-441 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"yapf/yapflib/pytree_unwrapper.py:PyTreeUnwrapper.Visit_testlist_gexp",
"yapf/yapflib/pytree_unwrapper.py:_DetermineMustSplitAnnotation"
],
"edited_modules": [
"yapf/yapflib/p... | google/yapf | 2e7952b348f6444f7a9d781f96bf0e8cdfea7895 | How to prevent YAPF from joining lines in dictionaries and lists?
YAPF converts
```
DJANGO_TEMPLATES_OPTIONS = {
"context_processors": []
}
```
to
```
DJANGO_TEMPLATES_OPTIONS = {"context_processors": []}
```
and I cannot find the option to disable such behavior.
Is it possible? | diff --git a/CHANGELOG b/CHANGELOG
index d7a465c..b05a6f4 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -13,6 +13,7 @@
- Corrected how `DEDENT_CLOSING_BRACKETS` and `COALESCE_BRACKETS` interacted.
- Fix return value to return a boolean.
- Correct vim plugin not to clobber edited code if yapf returns an error.
+- Ensured... |
google__yapf-485 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"yapf/yapflib/reformatter.py:_IsClassOrDef"
],
"edited_modules": [
"yapf/yapflib/reformatter.py:_IsClassOrDef"
]
},
"file": "yapf/yapflib/reformatter.py"
}
] | google/yapf | c67685c0f4bf04dc2d34f8d615fa256181913788 | Regression in formatting nested 'async def' functions
My style file has `blank_line_before_nested_class_or_def=False`.
Yapf 0.19.0 formats like:
```python
async def foo():
async def bar():
pass
```
Yapf 0.20.0 changes this to:
```python
async def foo():
async def bar():
pass... | diff --git a/yapf/yapflib/reformatter.py b/yapf/yapflib/reformatter.py
index 7ed7a62..299fef8 100644
--- a/yapf/yapflib/reformatter.py
+++ b/yapf/yapflib/reformatter.py
@@ -439,7 +439,7 @@ def _IsClassOrDef(uwline):
if uwline.first.value in {'class', 'def'}:
return True
- return (t.name for t in uwline.token... |
google__yapf-542 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"yapf/yapflib/reformatter.py:_CalculateNumberOfNewlines"
],
"edited_modules": [
"yapf/yapflib/reformatter.py:_CalculateNumberOfNewlines"
]
},
"file": "yapf/yapflib/refor... | google/yapf | c873f37236c6fb962b6a181bae6a2f2cab23ba6a | Space between modeline/shebang and module docstring
Imagine this file:
``` python
#!/usr/bin/env python
# -*- coding: utf-8 name> -*-
"""Some module docstring."""
def foobar():
pass
```
Running yapf on it produces this diff:
``` diff
--- yapf.py (original)
+++ yapf.py (reformatted)
@@ -1,6 +1,5 @@
#!/usr/bin... | diff --git a/CHANGELOG b/CHANGELOG
index 92806ad..e3cc518 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,11 @@
# All notable changes to this project will be documented in this file.
# This project adheres to [Semantic Versioning](http://semver.org/).
+## Unreleased
+### Added
+- The `BLANK_LINE_BEFORE_MODULE_DOC... |
google__yapf-543 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"yapf/__init__.py:main"
],
"edited_modules": [
"yapf/__init__.py:main"
]
},
"file": "yapf/__init__.py"
},
{
"changes": {
"added_entities": [
"yapf/... | google/yapf | 39e0290b2b0f9f678122391d29da6733081b99b9 | Ignore files
It was great if one could add files to ignore to a knobs config. This will apply for recursive mode. Sometimes there are auto generated files where it makes no sense to improve the style. | diff --git a/CHANGELOG b/CHANGELOG
index 698e6ea..504fcde 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,10 @@
# All notable changes to this project will be documented in this file.
# This project adheres to [Semantic Versioning](http://semver.org/).
+## [0.26.0] UNRELEASED
+### Added
+- Support additional file ... |
google__yapf-615 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"yapf/yapflib/format_decision_state.py:_IsLastScopeInLine"
],
"edited_modules": [
"yapf/yapflib/format_decision_state.py:_IsLastScopeInLine"
]
},
"file": "yapf/yapflib/f... | google/yapf | 841ad411adef77a38bf9e98f5ab843d65f3177d7 | DEDENT_CLOSING_BRACKETS does not seem to work if arguments fit in line
I am getting somewhat inconsistent formatting on code like this:
```python
def long_function_name(argument1: Tuple[str, int], argument2: List[str]) -> Iterator[str]:
pass
def ever_longer_function_name(argument1: Tuple[str, int], argument... | diff --git a/CHANGELOG b/CHANGELOG
index 83b26c9..698e6ea 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -6,6 +6,10 @@
### Added
- Added `INDENT_BLANK_LINES` knob to select whether the blank lines are empty
or indented consistently with the current block.
+### Fixed
+- Correctly determine if a scope is the last in line... |
google__yapf-668 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"yapf/yapflib/style.py:_ContinuationAlignStyleStringConverter"
],
"edited_modules": [
"yapf/yapflib/style.py:_ContinuationAlignStyleStringConverter"
]
},
"file": "yapf/y... | google/yapf | 9546d407a4f898cd341e4e12e4b7cd50b6c5c2a2 | _CreateConfigParserFromConfigString buggy for values with quotes - it captures quotes too
ver: 0.24
steps repeat:
yapf --style='{use_tabs: true, continuation_align_style: "valign-right"}' --style-help
gives:
yapf: '"valign-right"' is not a valid setting for CONTINUATION_ALIGN_STYLE. | diff --git a/CHANGELOG b/CHANGELOG
index 214f013..00f226f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -13,6 +13,8 @@
the list that is greater than the maximum line length in the block.
- Don't modify the vertical spacing of a line that has a comment "pylint:
disable=line-too-long". The line is expected to be too l... |
google__yapf-689 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"yapf/__init__.py:main"
],
"edited_modules": [
"yapf/__init__.py:main"
]
},
"file": "yapf/__init__.py"
},
{
"changes": {
"added_entities": null,
"add... | google/yapf | b65cd13fed16fc27d4dc45eee491dc1c2455fe08 | `split_before_first_argument` doesn't work on some cases
There seem to be some corner cases where `split_before_first_argument` doesn't seem to work as expected (at least not as I'd expect). For example using this style config
```
[style]
based_on_style = pep8
align_closing_bracket_with_visual_indent=True
coales... | diff --git a/CHANGELOG b/CHANGELOG
index ee72fdb..1df010a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -11,6 +11,9 @@
- Parse integer lists correctly, removing quotes if the list is within a
string.
- Adjust the penalties of bitwise operands for '&' and '^', similar to '|'.
+- Avoid splitting after opening parens if ... |
google__yapf-75 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"yapf/yapflib/reformatter.py:_RetainVerticalSpacing"
],
"edited_modules": [
"yapf/yapflib/reformatter.py:_RetainVerticalSpacing"
]
},
"file": "yapf/yapflib/reformatter.p... | google/yapf | cfb99aba49789019542ec6cb2b3f7215d1f9a04f | Fixing lines with a multi-line string inserts too many lines
Note: I have a fix for this #74.
```
code = '"""\ndocstring\n\n"""\n\nimport blah'
from yapf.yapflib.yapf_api import FormatCode
In [4]: FormatCode(code)
Out[4]: '"""\ndocstring\n\n"""\n\nimport blah\n'
In [5]: FormatCode(code, lines=[(2, 2)])
Out... | diff --git a/plugins/yapf.vim b/plugins/yapf.vim
index cdbb048..3b43104 100644
--- a/plugins/yapf.vim
+++ b/plugins/yapf.vim
@@ -23,7 +23,7 @@
function! yapf#YAPF() range
" Determine range to format.
let l:line_ranges = a:firstline . '-' . a:lastline
- let l:cmd = 'yapf --lines=' . l:line_ranges
+ let l:cmd = ... |
google__yapf-918 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "setup.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"yapf/yapflib/reformatter.py... | google/yapf | c6077954245bc3add82dafd853a1c7305a6ebd20 | README documents the wrong programmatic API
Both `FormatCode` and `FormatFile` return two-item tuples, but the README suggests they just return a string.
https://github.com/google/yapf/blob/c6077954245bc3add82dafd853a1c7305a6ebd20/yapf/yapflib/yapf_api.py#L137-L139 | diff --git a/README.rst b/README.rst
index e441317..56fb9d6 100644
--- a/README.rst
+++ b/README.rst
@@ -270,8 +270,11 @@ share several arguments which are described below:
>>> from yapf.yapflib.yapf_api import FormatCode # reformat a string of code
- >>> FormatCode("f ( a = 1, b = 2 )")
+ >>> formatted... |
google__yapf-954 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"yapf/yapflib/style.py:CreatePEP8Style",
"yapf/yapflib/style.py:CreateGoogleStyle",
"yapf/yapflib/style.py:CreateFacebookStyle"
],
"edited_modules": [
"yapf/yapflib/st... | google/yapf | da0dbb3567920a7b9faf25fce00443da7d7b1e00 | yapf 0.28.0 now removes blank line between class docstring and first function
Given this code:
```python
class Foo:
"""Cool class"""
def bar(self):
"""Cool function"""
pass
```
yapf 0.28.0 now removes the line after `"""Cool class"""`, which makes `pydocstyle` complain with:
> D20... | diff --git a/CHANGELOG b/CHANGELOG
index a35ce68..4cecbd3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -6,6 +6,10 @@
### Added
- Look at the 'pyproject.toml' file to see if it contains ignore file information
for YAPF.
+### Fixed
+- Enable `BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF` knob for "pep8" style, so
+ method de... |
googleapis__gapic-generator-python-1168 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gapic/schema/api.py:API.build"
],
"edited_modules": [
"gapic/schema/api.py:API"
]
},
"file": "gapic/schema/api.py"
}
] | googleapis/gapic-generator-python | 13b2028df5193f11aee40ae42ea5186aeb25eef3 | Naming conflict with generated client for google/cloud/dataplex/v1
There is a naming conflict with `metadata` the generated client for [dataplex v1](https://github.com/googleapis/googleapis-gen/tree/master/google/cloud/dataplex/v1/dataplex-v1-py) and as a result all of the `metadata` unit tests fail.
`metadata` exis... | diff --git a/gapic/schema/api.py b/gapic/schema/api.py
index 11cb77f2..c6b69cf3 100644
--- a/gapic/schema/api.py
+++ b/gapic/schema/api.py
@@ -262,12 +262,16 @@ class API:
file_descriptors,
), opts=opts)
+ # "metadata", "retry", "timeout", and "request" are reserved words in client method... |
googleapis__gapic-generator-python-654 | [
{
"changes": {
"added_entities": [
"gapic/schema/metadata.py:Address.__repr__"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"gapic/schema/metadata.py:Address"
]
},
"file": "gapic/schema/metadata.py"
},
{
"changes": {
... | googleapis/gapic-generator-python | d7829efe207a8730321279e594429e3bdbf2e080 | Map field message definitions do not consistently use module alias disambiguation
This is visible with Bigtable Admin. The generation produces output and generates no errors, but the generated unit tests fail.
```
from .bigtable_instance_admin import (CreateInstanceRequest, GetInstanceRequest, ListInstancesRequ... | diff --git a/gapic/schema/metadata.py b/gapic/schema/metadata.py
index 9459bb5e..b801bb76 100644
--- a/gapic/schema/metadata.py
+++ b/gapic/schema/metadata.py
@@ -90,6 +90,20 @@ class Address:
# Return the Python identifier.
return '.'.join(self.parent + (self.name,))
+ def __repr__(self) -> str:... |
googleapis__gapic-generator-python-717 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gapic/schema/naming.py:Naming.build",
"gapic/schema/naming.py:Naming.warehouse_package_name"
],
"edited_modules": [
"gapic/schema/naming.py:Naming"
]
},
"file":... | googleapis/gapic-generator-python | 39be474b4419dfa521ef51927fd36dbf257d68e3 | Allow package name to be customized via a generator option
https://github.com/googleapis/gapic-generator-python/blob/f86a47b6431e374ae1797061511b49fe6bf22daf/gapic/schema/naming.py#L186-L193
Occasionally we want to deviate from the generated provided `api.naming.warehouse_package_name`.
* The published package incl... | diff --git a/gapic/schema/naming.py b/gapic/schema/naming.py
index c591ad59..3f49a18a 100644
--- a/gapic/schema/naming.py
+++ b/gapic/schema/naming.py
@@ -42,6 +42,7 @@ class Naming(abc.ABC):
version: str = ''
product_name: str = ''
proto_package: str = ''
+ _warehouse_package_name: str = ''
de... |
googleapis__gax-python-125 | [
{
"changes": {
"added_entities": [
"google/gax/__init__.py:_CallSettings.merge"
],
"added_modules": [
"google/gax/__init__.py:_CallSettings"
],
"edited_entities": [
"google/gax/__init__.py:CallSettings.merge"
],
"edited_modules": [
"googl... | googleapis/gax-python | e8f6daaecfcbbf01fc78a54542108295aaf7f356 | Rename and refactor CallSettings
Currently we have CallSettings and CallOptions, and it's hard to say their roles and the differences.
Actually CallSettings is the settings (or configurations) for an API call (or a method), such as the page descriptors or bundling descriptors, retry parameters.
On the other hand,... | diff --git a/google/gax/__init__.py b/google/gax/__init__.py
index 64eea72..09c38a5 100644
--- a/google/gax/__init__.py
+++ b/google/gax/__init__.py
@@ -48,7 +48,7 @@ CallOptions belongs will attempt to inherit that field from its default
settings."""
-class CallSettings(object):
+class _CallSettings(object):
... |
googleapis__gax-python-127 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "google/gax/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/gax/gr... | googleapis/gax-python | d59635e37d2420908a2828da8f54c0bbbd4cf4e6 | Remove `beta` from gRPC imports
### What:
Change imports of `grpc.beta...` to `grpc...`.
### Why:
gRPC is almost GA, and gcloud has already made this change: https://github.com/GoogleCloudPlatform/gcloud-python/pull/2149 | diff --git a/google/gax/__init__.py b/google/gax/__init__.py
index 09c38a5..ef0116a 100644
--- a/google/gax/__init__.py
+++ b/google/gax/__init__.py
@@ -33,7 +33,7 @@ from __future__ import absolute_import
import collections
-__version__ = '0.12.5'
+__version__ = '0.13.0'
INITIAL_PAGE = object()
diff --git a/... |
googleapis__gax-python-132 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/gax/api_callable.py:_catch_errors"
],
"edited_modules": [
"google/gax/api_callable.py:_catch_errors"
]
},
"file": "google/gax/api_callable.py"
},
{
"chan... | googleapis/gax-python | 7b3172b9e8ebd1e513955bf60b42aa5f63d37d4a | Make it clear that the call may fail with the INVALID_ARGUMENT status code
### What:
Wrap the gRPC INVALID_ARGUMENT error with a pythonic VALUE_ERROR. We can do this with a special attribute that we consistently use for the wrapped gRPC error.
### Why:
Be more Pythonic.
See https://github.com/googleapis/googlea... | diff --git a/google/gax/api_callable.py b/google/gax/api_callable.py
index 622c08e..00c7763 100644
--- a/google/gax/api_callable.py
+++ b/google/gax/api_callable.py
@@ -36,8 +36,8 @@ import time
from future import utils
from . import (BackoffSettings, BundleOptions, bundling, _CallSettings, config,
- ... |
googleapis__google-auth-library-python-1243 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/auth/_cloud_sdk.py:get_project_id"
],
"edited_modules": [
"google/auth/_cloud_sdk.py:get_project_id"
]
},
"file": "google/auth/_cloud_sdk.py"
}
] | googleapis/google-auth-library-python | e2d263a2e79a35e8cc90aa338780d07c3313dc76 | Password prompt opened by `google.auth.default()` when credentials have expired
When you have a reauthentication policy set in Google Cloud and your crendentials have expired, calling `google.auth.default()` will open a `Please enter your password:` password prompt, instead if raising a `DefaultCredentialsError` as I b... | diff --git a/google/auth/_cloud_sdk.py b/google/auth/_cloud_sdk.py
index 40e6aec..36c5b01 100644
--- a/google/auth/_cloud_sdk.py
+++ b/google/auth/_cloud_sdk.py
@@ -14,12 +14,12 @@
"""Helpers for reading the Google Cloud SDK's configuration."""
-import json
import os
import subprocess
import six
+from googl... |
googleapis__google-auth-library-python-397 | [
{
"changes": {
"added_entities": [
"google/auth/transport/requests.py:TimeoutGuard.__init__",
"google/auth/transport/requests.py:TimeoutGuard.__enter__",
"google/auth/transport/requests.py:TimeoutGuard.__exit__"
],
"added_modules": [
"google/auth/transport/reque... | googleapis/google-auth-library-python | ab3dc1e26f5240ea3456de364c7c5cb8f40f9583 | Add timeout parameter to AuthorizedSession.request()
As a Google Cloud client library developer, I would like an easy way of specifying a timeout when making API calls using the `requests.AuthorizedSession` transport, for example:
```py
transport = AuthorizedSession(...)
transport.request(..., timeout=42)
```
... | diff --git a/google/auth/transport/requests.py b/google/auth/transport/requests.py
index d1971cd..f21c524 100644
--- a/google/auth/transport/requests.py
+++ b/google/auth/transport/requests.py
@@ -18,6 +18,7 @@ from __future__ import absolute_import
import functools
import logging
+import time
try:
import r... |
googleapis__google-auth-library-python-419 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/auth/compute_engine/_metadata.py:get"
],
"edited_modules": [
"google/auth/compute_engine/_metadata.py:get"
]
},
"file": "google/auth/compute_engine/_metadata.py"... | googleapis/google-auth-library-python | 09001f95c3be2f0c495ce5324885f6ff9ddd855d | Failure with Python 3.9 due to use of deprecated collections.Mapping
#### Environment details
- OS: Linux
- Python version: 3.9 alpha 2
- pip version: 19.3.1
- `google-auth` version: 1.10.0
#### Steps to reproduce
1. Use Python 3.9
2. Attempt to decode an ID Token:
google.oauth2.id_token.v... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9762d0c..70032ef 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,14 @@
[1]: https://pypi.org/project/google-auth/#history
+### [1.10.1](https://www.github.com/googleapis/google-auth-library-python/compare/v1.10.0...v1.10.1) (2020-01-10)
+
+
+### Bug Fixes
+
+*... |
googleapis__google-auth-library-python-421 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/auth/iam.py:Signer._make_signing_request"
],
"edited_modules": [
"google/auth/iam.py:Signer"
]
},
"file": "google/auth/iam.py"
},
{
"changes": {
"a... | googleapis/google-auth-library-python | af29c1a9fd9282b38867961e4053f74f018a3815 | google.auth.transport.Request is called with type(body) == str
According to eg https://google-auth.readthedocs.io/en/latest/reference/google.auth.html#google.auth.default, classes implementing google.auth.transport.Request will be called with a *body* parameter of type bytes. This makes sense, because the request agent... | diff --git a/google/auth/iam.py b/google/auth/iam.py
index a438726..0ab5b55 100644
--- a/google/auth/iam.py
+++ b/google/auth/iam.py
@@ -70,7 +70,9 @@ class Signer(crypt.Signer):
method = "POST"
url = _SIGN_BLOB_URI.format(self._service_account_email)
headers = {}
- body = json.dumps({... |
googleapis__google-auth-library-python-424 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/auth/jwt.py:decode"
],
"edited_modules": [
"google/auth/jwt.py:decode"
]
},
"file": "google/auth/jwt.py"
},
{
"changes": {
"added_entities": null,
... | googleapis/google-auth-library-python | f07fbe9995bc55d15c37bcf5fa1d00f90c846cf3 | Make a clear distinction between the transport timeout and the total method time timeout
It turned out that the concern from #406 was valid, unfortunately:
> A downstream library that is timeout-sensitive might still be affected by the change, because the new explicit timeout parameter changes the semantics of Autho... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 70032ef..bc1d040 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,13 @@
[1]: https://pypi.org/project/google-auth/#history
+### [1.10.2](https://www.github.com/googleapis/google-auth-library-python/compare/v1.10.1...v1.10.2) (2020-01-18)
+
+
+### Bug Fixes
+
+*... |
googleapis__google-auth-library-python-435 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/auth/transport/requests.py:Request.__call__",
"google/auth/transport/requests.py:AuthorizedSession.request"
],
"edited_modules": [
"google/auth/transport/requests.py:R... | googleapis/google-auth-library-python | 1b9de8dfbe4523f3170e47985ab523cb7865de48 | Set the default request timeout to something other than `None`
The [AuthorizedSession.requests()](https://github.com/googleapis/google-auth-library-python/blob/1b9de8dfbe4523f3170e47985ab523cb7865de48/google/auth/transport/requests.py#L242-L251) method does not specify a default timeout.
Since production code would ... | diff --git a/google/auth/transport/requests.py b/google/auth/transport/requests.py
index ce78e63..1c709d4 100644
--- a/google/auth/transport/requests.py
+++ b/google/auth/transport/requests.py
@@ -42,6 +42,8 @@ from google.auth import transport
_LOGGER = logging.getLogger(__name__)
+_DEFAULT_TIMEOUT = 120 # in se... |
googleapis__google-auth-library-python-500 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/auth/transport/requests.py:AuthorizedSession.configure_mtls_channel"
],
"edited_modules": [
"google/auth/transport/requests.py:AuthorizedSession"
]
},
"file": "g... | googleapis/google-auth-library-python | 06d7f97adaebb3b34ce6a159c23061dd2554e8ac | Make `verify_oauth2_token` check the issuer claim
It [doesn't](https://github.com/googleapis/google-auth-library-python/search?q=%22accounts.google.com%22&unscoped_q=%22accounts.google.com%22) look like the Python library checks for the issuer claim as it does for other language libraries ([Node.js](https://github.com/... | diff --git a/google/auth/transport/requests.py b/google/auth/transport/requests.py
index 9f55bea..4f5af7d 100644
--- a/google/auth/transport/requests.py
+++ b/google/auth/transport/requests.py
@@ -365,7 +365,11 @@ class AuthorizedSession(requests.Session):
six.raise_from(new_exc, caught_exc)
try... |
googleapis__google-auth-library-python-560 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/auth/_default.py:load_credentials_from_file",
"google/auth/_default.py:default"
],
"edited_modules": [
"google/auth/_default.py:load_credentials_from_file",
"g... | googleapis/google-auth-library-python | 9058f1fea680613d9717a62ee37dc294c11b9c8a | _default always sets `credentials.quota_project_id` to None
#546 introduced a bug where the quota project id always gets set to `None`. If no `quota_project_id` is passed to `load_credentials_from_file(...)` or `default(...)`, the existing project should not be overridden | diff --git a/google/auth/_default.py b/google/auth/_default.py
index f3e498b..694033f 100644
--- a/google/auth/_default.py
+++ b/google/auth/_default.py
@@ -116,11 +116,13 @@ def load_credentials_from_file(filename, scopes=None, quota_project_id=None):
try:
credentials = credentials.Credentials.fr... |
googleapis__google-auth-library-python-708 | [
{
"changes": {
"added_entities": [
"google/auth/_cloud_sdk.py:_run_subprocess_ignore_stderr"
],
"added_modules": [
"google/auth/_cloud_sdk.py:_run_subprocess_ignore_stderr"
],
"edited_entities": [
"google/auth/_cloud_sdk.py:get_project_id"
],
"ed... | googleapis/google-auth-library-python | 65074d3fbe488b95923dfa8335d071fa90bf383f | Getting project ID using Application Default Credentials fails when gcloud command writes anything to stderr
- OS: Ubuntu 20.04
- Python version: 3.8
- pip version: 20.0.2
- `google-auth` version: 1.19.2
#### Steps to reproduce
1. Arrange for gcloud to throw a warning. For example I'm suffering from ... | diff --git a/google/auth/_cloud_sdk.py b/google/auth/_cloud_sdk.py
index e772fe9..40e6aec 100644
--- a/google/auth/_cloud_sdk.py
+++ b/google/auth/_cloud_sdk.py
@@ -84,6 +84,13 @@ def get_application_default_credentials_path():
return os.path.join(config_path, _CREDENTIALS_FILENAME)
+def _run_subprocess_ignore... |
googleapis__google-auth-library-python-733 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/auth/jwt.py:decode"
],
"edited_modules": [
"google/auth/jwt.py:decode"
]
},
"file": "google/auth/jwt.py"
}
] | googleapis/google-auth-library-python | 82293fe2caaf5258babb5df1cff0a5ddc9e44b38 | Allow multiple audiences for `id_token.verify_token`
**Is your feature request related to a problem? Please describe.**
When decoding with `google.oauth2.id_token.verify_token` it only excepts one expected audience. This could be an issue when using Cloud IAP, which may require multiple audiences.
**Describe the so... | diff --git a/google/auth/jwt.py b/google/auth/jwt.py
index 8165dda..892f3a8 100644
--- a/google/auth/jwt.py
+++ b/google/auth/jwt.py
@@ -219,8 +219,9 @@ def decode(token, certs=None, verify=True, audience=None):
in the token's header.
verify (bool): Whether to perform signature and claim validatio... |
googleapis__google-auth-library-python-905 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/auth/impersonated_credentials.py:Credentials.sign_bytes"
],
"edited_modules": [
"google/auth/impersonated_credentials.py:Credentials"
]
},
"file": "google/auth/i... | googleapis/google-auth-library-python | bd0ccc5fe77d55f7a19f5278d6b60587c393ee3c | Errors in sign_bytes are not clear
**Is your feature request related to a problem? Please describe.**
When there is an error in the request made in the function [sign_bytes](https://github.com/googleapis/google-auth-library-python/blob/main/google/auth/impersonated_credentials.py#L274) is not clear what the real erro... | diff --git a/.coveragerc b/.coveragerc
index 494c03f..9ba3d3f 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -5,6 +5,7 @@ branch = True
omit =
*/samples/*
*/conftest.py
+ */google-cloud-sdk/lib/*
exclude_lines =
# Re-enable the standard pragma
pragma: NO COVER
diff --git a/google/auth/impersonat... |
googleapis__google-auth-library-python-oauthlib-300 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google_auth_oauthlib/flow.py:InstalledAppFlow.run_local_server"
],
"edited_modules": [
"google_auth_oauthlib/flow.py:InstalledAppFlow"
]
},
"file": "google_auth_oauthli... | googleapis/google-auth-library-python-oauthlib | a49216b44e5ccaf0c4e38b92259f31bbda003762 | Feature Request: Ability to specify an OAuth audience to InstalledAppFlow.run_local_server
**Is your feature request related to a problem? Please describe.**
I'm using Google's Identity Aware Proxy to provide an OAuth layer. When programmatically accessing an IAP protected resource, one is expected to provide a spe... | diff --git a/google_auth_oauthlib/flow.py b/google_auth_oauthlib/flow.py
index 7d8e521..f55a023 100644
--- a/google_auth_oauthlib/flow.py
+++ b/google_auth_oauthlib/flow.py
@@ -378,6 +378,7 @@ class InstalledAppFlow(Flow):
open_browser=True,
redirect_uri_trailing_slash=True,
timeout_seconds=N... |
googleapis__google-resumable-media-python-116 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/resumable_media/_download.py:Download.consume",
"google/resumable_media/_download.py:ChunkedDownload.consume_next_chunk"
],
"edited_modules": [
"google/resumable_media... | googleapis/google-resumable-media-python | 063b4f9f3ea3dff850d9ae46b2abf25d08312320 | Add request timeout
Hi
it seems that our project, which use https://github.com/GoogleCloudPlatform/google-cloud-python/tree/master/storage/google/cloud/storage, is getting stuck during upload.
Although we can't confirm it with absolute certainty, it may be good idea have request timeout in resumable-media anyway.
... | diff --git a/google/resumable_media/_download.py b/google/resumable_media/_download.py
index 5d2d10d..d775c21 100644
--- a/google/resumable_media/_download.py
+++ b/google/resumable_media/_download.py
@@ -171,7 +171,7 @@ class Download(DownloadBase):
response, _ACCEPTABLE_STATUS_CODES, self._get_status_cod... |
googleapis__google-resumable-media-python-129 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/resumable_media/_upload.py:get_next_chunk"
],
"edited_modules": [
"google/resumable_media/_upload.py:get_next_chunk"
]
},
"file": "google/resumable_media/_upload... | googleapis/google-resumable-media-python | 434828b00db2c72e7f67a0c5628cde2c3f87aeb4 | Blob.upload_from_file fails if 8MB < size-parameter < file-size
#### Environment details
- OS type and version: Linux Fedora 32 x86_64
- Python version: Python 3.8.2
- pip version: pip 20.1
- `google-cloud-storage` version: 1.28.1
#### Steps to reproduce
1. create a file larger than 8MB, e.g. 16... | diff --git a/google/resumable_media/_upload.py b/google/resumable_media/_upload.py
index bd4b197..dd5aaed 100644
--- a/google/resumable_media/_upload.py
+++ b/google/resumable_media/_upload.py
@@ -835,11 +835,12 @@ def get_next_chunk(stream, chunk_size, total_bytes):
ValueError: If there is no data left to con... |
googleapis__google-resumable-media-python-170 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/resumable_media/_helpers.py:_parse_checksum_header"
],
"edited_modules": [
"google/resumable_media/_helpers.py:_parse_checksum_header"
]
},
"file": "google/resum... | googleapis/google-resumable-media-python | cdea3eec76c7586a66b1641bca906f630d915c0e | Allow space in-between checksums in response headers
**Summary:** I encountered this bug when downloading files using the Google Cloud Storage Python libraries, but the bug is coming from the Resumable Media library. The current code (and [official docs](https://cloud.google.com/storage/docs/xml-api/reference-headers#... | diff --git a/google/resumable_media/_helpers.py b/google/resumable_media/_helpers.py
index f57827e..3e4acf2 100644
--- a/google/resumable_media/_helpers.py
+++ b/google/resumable_media/_helpers.py
@@ -317,7 +317,8 @@ def _parse_checksum_header(header_value, response, checksum_label):
matches = []
for checksum... |
googleapis__google-resumable-media-python-290 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/resumable_media/_upload.py:ResumableUpload._prepare_initiate_request"
],
"edited_modules": [
"google/resumable_media/_upload.py:ResumableUpload"
]
},
"file": "go... | googleapis/google-resumable-media-python | cee416449701b72e7fd532585a1f739b02b6ab32 | Using a signed Resumable Upload URL fails with 403 unless content_type is empty
#### Environment details
- Programming language: Python
- OS: Ubuntu 20.04 in WSL2
- Language runtime version: 3.8
- Package version: cee416449701b72e7fd532585a1f739b02b6ab32
#### Steps to reproduce
1. Generate a signe... | diff --git a/google/resumable_media/_upload.py b/google/resumable_media/_upload.py
index 9cf4020..dc22cd1 100644
--- a/google/resumable_media/_upload.py
+++ b/google/resumable_media/_upload.py
@@ -27,6 +27,7 @@ import os
import random
import re
import sys
+import urllib.parse
from google import resumable_media
f... |
googleapis__google-resumable-media-python-343 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/resumable_media/_upload.py:ResumableUpload._prepare_recover_request"
],
"edited_modules": [
"google/resumable_media/_upload.py:ResumableUpload"
]
},
"file": "goo... | googleapis/google-resumable-media-python | 942665f1bb01d2efb604e0be52736690160973b9 | After retry limit reached, ResumableUpload.transmit_next_chunk propagates exception with invalid==False
The code below with comments probably best describes the issue... it shows two workarounds. A third workaround (not shown) might be to look for a retry timeout exception and assume the ResumableUpload is invalid desp... | diff --git a/google/resumable_media/_upload.py b/google/resumable_media/_upload.py
index b4eac56..c681cc0 100644
--- a/google/resumable_media/_upload.py
+++ b/google/resumable_media/_upload.py
@@ -794,14 +794,8 @@ class ResumableUpload(UploadBase):
The headers **do not** incorporate the ``_headers`` on the... |
googleapis__google-resumable-media-python-375 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "google/resumable_media/requests/_request_helpers.py"
}
] | googleapis/google-resumable-media-python | 1aff914d6fe1351b6f4959f816a577414079fe95 | Add support for known network issues to be retryable
Add support for known network issues to be retryable and align behavior across Storage SDKs.
Such errors as below are categorized as known network/transfer errors in gsutil and gcloud, see internal doc go/python-storage-retry-known-errors for more details
|Know... | diff --git a/google/resumable_media/requests/_request_helpers.py b/google/resumable_media/requests/_request_helpers.py
index fbeda5a..051f0ba 100644
--- a/google/resumable_media/requests/_request_helpers.py
+++ b/google/resumable_media/requests/_request_helpers.py
@@ -17,6 +17,7 @@
This utilities are explicitly catere... |
googleapis__google-resumable-media-python-450 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/resumable_media/requests/download.py:Download.consume",
"google/resumable_media/requests/download.py:RawDownload.consume"
],
"edited_modules": [
"google/resumable_medi... | googleapis/google-resumable-media-python | 5d2091d78fb71e0d63254c5b731afb05af432104 | Incorrect start offset when range reads are interrupted
#### Environment details
GCP A100 machines
(unclear about exact software, as this bug was countered internally on Google infra when running on XManager Cloud)
#### Steps to reproduce
Given a range read of `start` to `end` bytes, if the read is interrupt... | diff --git a/google/resumable_media/requests/download.py b/google/resumable_media/requests/download.py
index 5d85b20..1472c9f 100644
--- a/google/resumable_media/requests/download.py
+++ b/google/resumable_media/requests/download.py
@@ -221,7 +221,7 @@ class Download(_request_helpers.RequestsMixin, _download.Download):... |
googleapis__proto-plus-python-140 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"proto/marshal/rules/struct.py:ValueRule.to_python"
],
"edited_modules": [
"proto/marshal/rules/struct.py:ValueRule"
]
},
"file": "proto/marshal/rules/struct.py"
}
] | googleapis/proto-plus-python | 6888d71d680a6adf9fb38e4fa0f78fa217ea952d | struct.Value fields raise an AttributeError when empty
Is this the expected behavior? I found it slightly confusing as I was playing with the AIPlatform library https://github.com/googleapis/python-aiplatform/pull/15#pullrequestreview-500502756
```py
import proto
from google.protobuf import struct_pb2 as struct #... | diff --git a/proto/marshal/rules/struct.py b/proto/marshal/rules/struct.py
index 53ef34f..27dfaf5 100644
--- a/proto/marshal/rules/struct.py
+++ b/proto/marshal/rules/struct.py
@@ -29,11 +29,15 @@ class ValueRule:
def to_python(self, value, *, absent: bool = None):
"""Coerce the given value to the appropr... |
googleapis__proto-plus-python-154 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "noxfile.py"
},
{
"changes": {
"added_entities": [
"proto/message.py:MessageMeta.to_dict"
],
"added_modules": null,
"ed... | googleapis/proto-plus-python | cd9003c68bb605654b41c711fea08c9403905917 | Provide `ignore_unknown_fields=True` option in `from_json` and `from_dict`
This blocking PR https://github.com/googleapis/python-bigquery/pull/332 (and as a result the `type` to `type_` change https://github.com/googleapis/python-bigquery/pull/316 and https://github.com/googleapis/python-bigquery/pull/328 with the new ... | diff --git a/docs/messages.rst b/docs/messages.rst
index 18dd4db..af23ea9 100644
--- a/docs/messages.rst
+++ b/docs/messages.rst
@@ -165,3 +165,13 @@ via the :meth:`~.Message.to_json` and :meth:`~.Message.from_json` methods.
new_song = Song.from_json(json)
+Similarly, messages can be converted into dictionarie... |
googleapis__proto-plus-python-348 | [
{
"changes": {
"added_entities": [
"proto/marshal/marshal.py:BaseMarshal.get_rule"
],
"added_modules": null,
"edited_entities": [
"proto/marshal/marshal.py:BaseMarshal.to_python",
"proto/marshal/marshal.py:BaseMarshal.to_proto"
],
"edited_modules": [
... | googleapis/proto-plus-python | 9270fe5979f062b32ab71dbdf2650e6aca4c291d | Marshal fails with TypeError when using cross api message
See test code here https://github.com/googleapis/proto-plus-python/pull/348/commits/e123ad8813823c477d1ff1494a1c6c1ba85bff89, with corresponding failure [here](https://github.com/googleapis/proto-plus-python/actions/runs/4426034682/jobs/7761831001).
See the f... | diff --git a/proto/marshal/marshal.py b/proto/marshal/marshal.py
index bd21cbc..e9fbbb9 100644
--- a/proto/marshal/marshal.py
+++ b/proto/marshal/marshal.py
@@ -159,6 +159,22 @@ class BaseMarshal:
for rule_class in stringy_numbers.STRINGY_NUMBER_RULES:
self.register(rule_class._proto_type, rule_cl... |
googleapis__python-api-core-155 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/api_core/iam.py:Policy.__getitem__"
],
"edited_modules": [
"google/api_core/iam.py:Policy"
]
},
"file": "google/api_core/iam.py"
}
] | googleapis/python-api-core | b4860fec797f7d9f02a7241b2b6cef2d27f96f28 | google.api_core.iam.Policy.__getitem__ does not correctly save empty bindings
We recently tried to upgrade a tool from 1.15.0 to 1.26.1 and found it breaks some code that handles IAM policies. The commit that introduces the bug was released in 1.16.0: https://github.com/googleapis/python-api-core/commit/fd47fda5e3f5ec... | diff --git a/google/api_core/iam.py b/google/api_core/iam.py
index f130936..d83cbf3 100644
--- a/google/api_core/iam.py
+++ b/google/api_core/iam.py
@@ -136,7 +136,10 @@ class Policy(collections_abc.MutableMapping):
for b in self._bindings:
if b["role"] == key:
return b["members"]... |
googleapis__python-api-core-17 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/api_core/client_options.py:ClientOptions.__init__"
],
"edited_modules": [
"google/api_core/client_options.py:ClientOptions"
]
},
"file": "google/api_core/client_... | googleapis/python-api-core | 0c2c556e149b0b6696b515f3cdbd10a698b4e30b | add client_cert_source to ClientOptions
google-api-go-client uses `WithClientCertSource` in `ClientOptions` to provide client cert/key, we need to add a `client_cert_source` to `ClientOptions` in python as well. | diff --git a/google/api_core/client_options.py b/google/api_core/client_options.py
index 137043f..7cb49c6 100644
--- a/google/api_core/client_options.py
+++ b/google/api_core/client_options.py
@@ -24,7 +24,12 @@ You can pass a client options object to a client.
from google.api_core.client_options import ClientOpti... |
googleapis__python-api-core-178 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "google/api_core/retry.py"
}
] | googleapis/python-api-core | f87bccbfda11d2c2d1a2ddb6611c1209e29289d9 | requests.exceptions.ConnectionError retry
Hi,
Could we add ConnectionError in list of retry so the client libraries which depend over api-core don't need to add.
`"/layers/google.python.pip/pip/lib/python3.8/site-packages/google/cloud/bigquery/client.py", line 561, in create_table api_response = self._call_api( ... | diff --git a/google/api_core/retry.py b/google/api_core/retry.py
index 43e4f07..f0f23bc 100644
--- a/google/api_core/retry.py
+++ b/google/api_core/retry.py
@@ -62,11 +62,13 @@ import logging
import random
import time
+import requests.exceptions
import six
from google.api_core import datetime_helpers
from goog... |
googleapis__python-api-core-546 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/api_core/client_options.py:ClientOptions.__init__"
],
"edited_modules": [
"google/api_core/client_options.py:ClientOptions"
]
},
"file": "google/api_core/client_... | googleapis/python-api-core | fc12b40bfc6e0c4bb313196e2e3a9c9374ce1c45 | Feat: Add support for universe_domain as a client option for TPC
`universe_domain` is required as an optional field in `google.api_core.ClientOptions` to enable users to explicitly configure universe domain as a client option.
This will enable API endpoint to be resolved using a templated value if a universe domain... | diff --git a/google/api_core/client_options.py b/google/api_core/client_options.py
index ee9f28a..e93f958 100644
--- a/google/api_core/client_options.py
+++ b/google/api_core/client_options.py
@@ -75,6 +75,11 @@ class ClientOptions(object):
authentication flows. Audience is typically a resource identifier.... |
googleapis__python-api-core-577 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "google/api_core/retry/__init__.py"
}
] | googleapis/python-api-core | ebc26351eb412f8ffa4d3df99722a21b9ce6b4cd | continue exposing some retry imports for backwards compatibility
For backwards compatibility, we need to expose some imports that were removed in #495. These include at least `google.api_core.datetime_helpers`, but other diffs in the imports that we may want to restore are `api_core.exceptions`, `datetime`, and `loggi... | diff --git a/google/api_core/retry/__init__.py b/google/api_core/retry/__init__.py
index 7942841..1724fdb 100644
--- a/google/api_core/retry/__init__.py
+++ b/google/api_core/retry/__init__.py
@@ -1,5 +1,4 @@
# Copyright 2017 Google LLC
-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may... |
googleapis__python-automl-110 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/automl_v1beta1/services/tables/tables_client.py:TablesClient.batch_predict"
],
"edited_modules": [
"google/cloud/automl_v1beta1/services/tables/tables_client.py:TablesCl... | googleapis/python-automl | df22fd569124dfc3f9b2568656fb6cddc4bcb07b | The `params` parameter is ignored in `batch_predict()` method
Passing a value to the `params` parameter in the `batch_predict()` method of `TablesClient` class does not have any effect.
For example, passing the value `params={'feature_importance': 'true'}` to `batch_predict()` is supposed to have feature importance... | diff --git a/google/cloud/automl_v1beta1/services/tables/tables_client.py b/google/cloud/automl_v1beta1/services/tables/tables_client.py
index 21028a3..f6e7889 100644
--- a/google/cloud/automl_v1beta1/services/tables/tables_client.py
+++ b/google/cloud/automl_v1beta1/services/tables/tables_client.py
@@ -2999,7 +2999,10... |
googleapis__python-bigquery-1889 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/bigquery/opentelemetry_tracing.py:_set_job_attributes"
],
"edited_modules": [
"google/cloud/bigquery/opentelemetry_tracing.py:_set_job_attributes"
]
},
"fi... | googleapis/python-bigquery | 3634405fa1b40ae5f69b06d7c7f8de4e3d246d92 | Extend the OTEL traces to track bytes billed and bytes processed
Extend OTEL traces to track bytes billed and bytes processed. Allowing developers to see how much data and cost was consumed as part of BigQueryJob trace | diff --git a/google/cloud/bigquery/opentelemetry_tracing.py b/google/cloud/bigquery/opentelemetry_tracing.py
index e2a05e4d..b5f6bf99 100644
--- a/google/cloud/bigquery/opentelemetry_tracing.py
+++ b/google/cloud/bigquery/opentelemetry_tracing.py
@@ -153,4 +153,12 @@ def _set_job_attributes(job_ref):
if job_ref.nu... |
googleapis__python-bigquery-1930 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/bigquery/retry.py:_job_should_retry"
],
"edited_modules": [
"google/cloud/bigquery/retry.py:_job_should_retry"
]
},
"file": "google/cloud/bigquery/retry.py... | googleapis/python-bigquery | c3f7b237383d4705ed6e720544728c4db61f6c83 | Retry requests.exceptions.ConnectionError
Hi Team,
Could you add a retry to this exception? We are running this code in Cloud Function and GKE infrastructure from time to time we get these errors
Bigquery SDK == google-cloud-bigquery==3.18.0
```
Error Type: <class 'requests.exceptions.ConnectionError'> error:... | diff --git a/google/cloud/bigquery/retry.py b/google/cloud/bigquery/retry.py
index c9898287..11103451 100644
--- a/google/cloud/bigquery/retry.py
+++ b/google/cloud/bigquery/retry.py
@@ -119,6 +119,14 @@ def _job_should_retry(exc):
if isinstance(exc, exceptions.RetryError):
exc = exc.cause
+ # Per ht... |
googleapis__python-bigquery-1944 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/bigquery/job/query.py:QueryJob.result"
],
"edited_modules": [
"google/cloud/bigquery/job/query.py:QueryJob"
]
},
"file": "google/cloud/bigquery/job/query.p... | googleapis/python-bigquery | 3e7a48d36e3c7bf6abe1b5550097178f6ca6e174 | QueryJob class break flow after upgrade to 3.21.0
Affect version: >=3.21.0, <=3.23.1
#### Steps to reproduce
``` python
from google.cloud import bigquery
import uuid
client = bigquery.Client()
from google.cloud.bigquery import QueryJob
QueryJob(job_id=str(uuid.uuid4()), query="select 1", client=client).res... | diff --git a/google/cloud/bigquery/job/query.py b/google/cloud/bigquery/job/query.py
index a8530271..8049b748 100644
--- a/google/cloud/bigquery/job/query.py
+++ b/google/cloud/bigquery/job/query.py
@@ -1585,6 +1585,11 @@ class QueryJob(_AsyncJob):
self._retry_do_query = retry_do_query
... |
googleapis__python-bigquery-1945 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/bigquery/dbapi/connection.py:Connection.__init__",
"google/cloud/bigquery/dbapi/connection.py:connect"
],
"edited_modules": [
"google/cloud/bigquery/dbapi/connec... | googleapis/python-bigquery | cc7b3995eef4f357f031e06389db07f949987eeb | Allow enabling/disabling the storage API on a per-connection basis
In #16, support was added for the BigQuery storage API in the form of a `bqstorage_client` which is passed to or created by [`connect()`](https://github.com/googleapis/python-bigquery/blob/b739596f37b8c00b375cc811c316b618097d761a/google/cloud/bigquery/d... | diff --git a/google/cloud/bigquery/dbapi/connection.py b/google/cloud/bigquery/dbapi/connection.py
index 66dee7df..a1a69b8f 100644
--- a/google/cloud/bigquery/dbapi/connection.py
+++ b/google/cloud/bigquery/dbapi/connection.py
@@ -35,12 +35,18 @@ class Connection(object):
A client that uses the faster BigQ... |
googleapis__python-bigquery-1952 | [
{
"changes": {
"added_entities": [
"google/cloud/bigquery/job/load.py:LoadJobConfig.column_name_character_map"
],
"added_modules": [
"google/cloud/bigquery/job/load.py:ColumnNameCharacterMap"
],
"edited_entities": null,
"edited_modules": [
"google/clou... | googleapis/python-bigquery | 5d10f1e94222e635cf008d83928555a628cdbb3f | support load job option ColumnNameCharacterMap
Support new field ColumnNameCharacterMap: https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#columnnamecharactermap | diff --git a/google/cloud/bigquery/job/load.py b/google/cloud/bigquery/job/load.py
index 17643545..e56ce16f 100644
--- a/google/cloud/bigquery/job/load.py
+++ b/google/cloud/bigquery/job/load.py
@@ -32,6 +32,26 @@ from google.cloud.bigquery.job.base import _JobReference
from google.cloud.bigquery.query import Connecti... |
googleapis__python-bigquery-1999 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/bigquery/_pandas_helpers.py:bq_to_arrow_field"
],
"edited_modules": [
"google/cloud/bigquery/_pandas_helpers.py:bq_to_arrow_field"
]
},
"file": "google/clo... | googleapis/python-bigquery | edcb79ca69dba30d8102abebb9d53bc76e4882ee | BUG: `bq_to_arrow_field` in `_pandas_helper.py` always sets `pyarrow.field` to nullable
[Current implementation](https://github.com/googleapis/python-bigquery/blob/fabb2baebdc8a046c4fa00f9e1a65495430b927d/google/cloud/bigquery/_pandas_helpers.py#L203) of `bq_to_arrow_field` always sets `pyarrow.field` to nullable.... | diff --git a/google/cloud/bigquery/_pandas_helpers.py b/google/cloud/bigquery/_pandas_helpers.py
index c21a0256..210ab487 100644
--- a/google/cloud/bigquery/_pandas_helpers.py
+++ b/google/cloud/bigquery/_pandas_helpers.py
@@ -200,7 +200,7 @@ def bq_to_arrow_field(bq_field, array_type=None):
# local NULL v... |
googleapis__python-bigquery-257 | [
{
"changes": {
"added_entities": [
"google/cloud/bigquery/external_config.py:HivePartitioningOptions.require_partition_filter"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"google/cloud/bigquery/external_config.py:HivePartitioningOptions"
... | googleapis/python-bigquery | a125160696d1453b04a66c967819f90e70e03a52 | Add require_partition_filter in bigquery.external_config.HivePartitioningOptions
I want to force partition filters when user run queries on external tables that uses HivePartitioning.
Please add property require_partition_filter within bigquery.external_config.HivePartitioningOptions()
I tried using table.require... | diff --git a/google/cloud/bigquery/external_config.py b/google/cloud/bigquery/external_config.py
index d702d9d8..112dfdba 100644
--- a/google/cloud/bigquery/external_config.py
+++ b/google/cloud/bigquery/external_config.py
@@ -586,6 +586,21 @@ class HivePartitioningOptions(object):
def source_uri_prefix(self, valu... |
googleapis__python-bigquery-326 | [
{
"changes": {
"added_entities": [
"google/cloud/bigquery/model.py:Model.to_api_repr"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"google/cloud/bigquery/model.py:Model"
]
},
"file": "google/cloud/bigquery/model.py"
}
] | googleapis/python-bigquery | 3be78b737add7111e24e912cd02fc6df75a07de6 | Add to_api_repr method to Model
Same as #299 but for models:
`AttributeError: 'Model' object has no attribute 'to_api_repr'`
Current workaround: using `model._properties` but object fields like `featureColumns` https://cloud.google.com/bigquery/docs/reference/rest/v2/models#Model will be missing. | diff --git a/google/cloud/bigquery/model.py b/google/cloud/bigquery/model.py
index 092d98c2..1143b71f 100644
--- a/google/cloud/bigquery/model.py
+++ b/google/cloud/bigquery/model.py
@@ -317,6 +317,14 @@ class Model(object):
def __repr__(self):
return "Model(reference={})".format(repr(self.reference))
+... |
googleapis__python-bigquery-401 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/bigquery/model.py:Model.from_api_repr"
],
"edited_modules": [
"google/cloud/bigquery/model.py:Model"
]
},
"file": "google/cloud/bigquery/model.py"
}
] | googleapis/python-bigquery | 5a422eb20c57dae66c5716fd319b66432d3edce6 | Make Model constructor robust against new model types
Follow-up to https://github.com/googleapis/python-bigquery/issues/293
[model_type](https://googleapis.dev/python/bigquery/latest/generated/google.cloud.bigquery.model.Model.html#google.cloud.bigquery.model.Model.model_type) appears to be the only enum. Maybe we p... | diff --git a/google/cloud/bigquery/model.py b/google/cloud/bigquery/model.py
index 1143b71f..0f5d8f83 100644
--- a/google/cloud/bigquery/model.py
+++ b/google/cloud/bigquery/model.py
@@ -305,9 +305,15 @@ class Model(object):
start_time = datetime_helpers.from_microseconds(1e3 * float(start_time))
... |
googleapis__python-bigquery-498 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/bigquery/dbapi/connection.py:Connection.close"
],
"edited_modules": [
"google/cloud/bigquery/dbapi/connection.py:Connection"
]
},
"file": "google/cloud/big... | googleapis/python-bigquery | d5735ea378eaeea8c0ecbed89daf02f5102c6a63 | Closing a connection tries to close already closed cursors
When closing a connection the library will call `.close()` on every cursor created for that connection, including closed ones. While the code works, it produces a lot of logs of error level, polluting the logs.
#### Environment details
- OS type and ver... | diff --git a/google/cloud/bigquery/dbapi/connection.py b/google/cloud/bigquery/dbapi/connection.py
index 300c77dc..459fc82a 100644
--- a/google/cloud/bigquery/dbapi/connection.py
+++ b/google/cloud/bigquery/dbapi/connection.py
@@ -76,7 +76,8 @@ class Connection(object):
self._bqstorage_client._transport.gr... |
googleapis__python-bigquery-571 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/bigquery/retry.py:_should_retry"
],
"edited_modules": [
"google/cloud/bigquery/retry.py:_should_retry"
]
},
"file": "google/cloud/bigquery/retry.py"
},
... | googleapis/python-bigquery | 8f274e8fad7308eca09c055d17d31f58fdc86909 | ConnectionError in Client.insert_rows_json()
We have a http Cloud Function that does some data processing and then streams to BQ. The function errors out sometimes because of either the bq client losing connection or it is the insert_rows that can't connect.
See below an example of a stack trace captured in the GCP l... | diff --git a/google/cloud/bigquery/retry.py b/google/cloud/bigquery/retry.py
index 4bc4b757..20a8e7b1 100644
--- a/google/cloud/bigquery/retry.py
+++ b/google/cloud/bigquery/retry.py
@@ -14,6 +14,7 @@
from google.api_core import exceptions
from google.api_core import retry
+import requests.exceptions
_RETRYABL... |
googleapis__python-bigquery-618 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/bigquery/dbapi/_helpers.py:raise_on_closed"
],
"edited_modules": [
"google/cloud/bigquery/dbapi/_helpers.py:raise_on_closed"
]
},
"file": "google/cloud/big... | googleapis/python-bigquery | f75dcdf3943b87daba60011c9a3b42e34ff81910 | Make DB API Cursors iterable
Thanks for stopping by to let us know something could be better!
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
Please run ... | diff --git a/google/cloud/bigquery/dbapi/_helpers.py b/google/cloud/bigquery/dbapi/_helpers.py
index 69694c98..beb3c5e7 100644
--- a/google/cloud/bigquery/dbapi/_helpers.py
+++ b/google/cloud/bigquery/dbapi/_helpers.py
@@ -276,7 +276,7 @@ def raise_on_closed(
"""Apply ``_raise_on_closed()`` decorator to public... |
googleapis__python-bigquery-619 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/bigquery/dbapi/_helpers.py:raise_on_closed"
],
"edited_modules": [
"google/cloud/bigquery/dbapi/_helpers.py:raise_on_closed"
]
},
"file": "google/cloud/big... | googleapis/python-bigquery | f75dcdf3943b87daba60011c9a3b42e34ff81910 | Percents de-escaping isn't handled when no parameters are used in the dbapi.
```python
>>> import google.cloud.bigquery.dbapi
>>> conn = google.cloud.bigquery.dbapi.connect()
/home/jim/p/g/python-bigquery/google/cloud/bigquery/client.py:444: UserWarning: Cannot create BigQuery Storage client, the dependency goog... | diff --git a/google/cloud/bigquery/dbapi/_helpers.py b/google/cloud/bigquery/dbapi/_helpers.py
index 69694c98..beb3c5e7 100644
--- a/google/cloud/bigquery/dbapi/_helpers.py
+++ b/google/cloud/bigquery/dbapi/_helpers.py
@@ -276,7 +276,7 @@ def raise_on_closed(
"""Apply ``_raise_on_closed()`` decorator to public... |
googleapis__python-bigquery-626 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/bigquery/_helpers.py:_float_to_json"
],
"edited_modules": [
"google/cloud/bigquery/_helpers.py:_float_to_json"
]
},
"file": "google/cloud/bigquery/_helpers... | googleapis/python-bigquery | 4396e70771af6889d3242c37c5ff2e80241023a2 | None or empty array parameter values aren't handled in the dbapi
```
>>> import google.cloud.bigquery.dbapi
>>> conn = google.cloud.bigquery.dbapi.connect()
/home/jim/p/g/python-bigquery/google/cloud/bigquery/client.py:444: UserWarning: Cannot create BigQuery Storage client, the dependency google-cloud-bigquery-stor... | diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 10f4ee7c..ae570eb0 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -5,8 +5,7 @@
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
# The @googleapis/api-bigquery is the default own... |
googleapis__python-bigquery-630 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/bigquery/dbapi/types.py:Binary"
],
"edited_modules": [
"google/cloud/bigquery/dbapi/types.py:Binary"
]
},
"file": "google/cloud/bigquery/dbapi/types.py"
... | googleapis/python-bigquery | a3224337dac217ec07df83bf0ad570b7aa6d2ec9 | The DB API Binary function should accept bytes.
```
(3.8) jim@ds9:~/p/g/python-bigquery-sqlalchemy$ python
Python 3.8.5 (default, Jan 27 2021, 15:41:15)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import google.cloud.bigquery.dbapi
>>> google.cloud.bigquery.dba... | diff --git a/google/cloud/bigquery/dbapi/types.py b/google/cloud/bigquery/dbapi/types.py
index 20eca9b0..717593ae 100644
--- a/google/cloud/bigquery/dbapi/types.py
+++ b/google/cloud/bigquery/dbapi/types.py
@@ -30,16 +30,28 @@ DateFromTicks = datetime.date.fromtimestamp
TimestampFromTicks = datetime.datetime.fromtimes... |
googleapis__python-bigquery-644 | [
{
"changes": {
"added_entities": [
"google/cloud/bigquery/query.py:ScalarQueryParameterType.with_name"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"google/cloud/bigquery/query.py:ScalarQueryParameterType"
]
},
"file": "google... | googleapis/python-bigquery | 6a48e80bc7d347f381b181f4cf81fef105d0ad0d | feat: add builder / copy method to `google.cloud.bigquery.query.ScalarQueryParameterType` that makes a copy with a new name
**Is your feature request related to a problem? Please describe.**
When constructing a [StructQueryParameterType](https://github.com/googleapis/python-bigquery/blob/6a48e80bc7d347f381b181f4cf8... | diff --git a/google/cloud/bigquery/query.py b/google/cloud/bigquery/query.py
index 3751eb12..d1e9a45a 100644
--- a/google/cloud/bigquery/query.py
+++ b/google/cloud/bigquery/query.py
@@ -16,6 +16,7 @@
from collections import OrderedDict
import copy
+from typing import Union
from google.cloud.bigquery.table impor... |
googleapis__python-bigquery-648 | [
{
"changes": {
"added_entities": [
"google/cloud/bigquery/query.py:ScalarQueryParameterType.with_name"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"google/cloud/bigquery/query.py:ScalarQueryParameterType"
]
},
"file": "google... | googleapis/python-bigquery | be3c49a72f0e04de4055f5ca7a99f821c2c8f240 | chore: use paths for --cov arguments in noxfile
https://github.com/googleapis/python-bigquery/blob/6a48e80bc7d347f381b181f4cf81fef105d0ad0d/noxfile.py#L80-L81
To pull https://github.com/googleapis/synthtool/pull/859 from templates. | diff --git a/google/cloud/bigquery/query.py b/google/cloud/bigquery/query.py
index 3751eb12..d1e9a45a 100644
--- a/google/cloud/bigquery/query.py
+++ b/google/cloud/bigquery/query.py
@@ -16,6 +16,7 @@
from collections import OrderedDict
import copy
+from typing import Union
from google.cloud.bigquery.table impor... |
googleapis__python-bigquery-66 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/bigquery/model.py:ModelReference.__repr__"
],
"edited_modules": [
"google/cloud/bigquery/model.py:ModelReference"
]
},
"file": "google/cloud/bigquery/model... | googleapis/python-bigquery | 2abdef82bed31601d1ca1aa92a10fea1e09f5297 | Bigquery: Model reference repr seems wrong for model_id
For `ModelReference`'s repr use project_id against model_id
https://github.com/googleapis/python-bigquery/blob/be5c8b1ede9a2d762fd5574c32587d125eca4713/google/cloud/bigquery/model.py#L432-L435 | diff --git a/google/cloud/bigquery/model.py b/google/cloud/bigquery/model.py
index d39ec5f2..a2510e86 100644
--- a/google/cloud/bigquery/model.py
+++ b/google/cloud/bigquery/model.py
@@ -430,6 +430,6 @@ class ModelReference(object):
return hash(self._key())
def __repr__(self):
- return "ModelRefe... |
googleapis__python-bigquery-660 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/bigquery/dbapi/cursor.py:Cursor.executemany"
],
"edited_modules": [
"google/cloud/bigquery/dbapi/cursor.py:Cursor"
]
},
"file": "google/cloud/bigquery/dbap... | googleapis/python-bigquery | 615d139be15bbbaea1517eb4a5d75b93055c6663 | DB API rowcount incorrect for executemany
```
(3.9) jim@ds9:~/p/g/python-bigquery$ python
>>> from google.cloud.bigquery.dbapi import connect
>>> conn = connect()
>>> cursor = conn.cursor()
>>> cursor.executemany("select %s", [[1],[2],[3]])
>>> cursor.rowcount
1
``` | diff --git a/google/cloud/bigquery/dbapi/cursor.py b/google/cloud/bigquery/dbapi/cursor.py
index f74781df..c8fc4937 100644
--- a/google/cloud/bigquery/dbapi/cursor.py
+++ b/google/cloud/bigquery/dbapi/cursor.py
@@ -218,6 +218,7 @@ class Cursor(object):
Sequence of many sets of parameter values.
... |
googleapis__python-bigquery-690 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "google/cloud/bigquery/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": [
"google/cloud/bigquery/enums.py:Ke... | googleapis/python-bigquery | d034a4d34be500f665bfa75c53d1badcb6750445 | Not able to use ScriptOptions
#### Environment details
- OS type and version: MacOs
- Python version: Python 3.6.6
- pip version: 20.2
- `google-cloud-bigquery` version: 2.18.0
#### Code example
```python
bigquery.QueryJobConfig(scriptOptions={"statementTimeoutMs": 10})
```
I am looking for a w... | diff --git a/google/cloud/bigquery/__init__.py b/google/cloud/bigquery/__init__.py
index f031cd81..94f87304 100644
--- a/google/cloud/bigquery/__init__.py
+++ b/google/cloud/bigquery/__init__.py
@@ -37,6 +37,7 @@ from google.cloud.bigquery.dataset import AccessEntry
from google.cloud.bigquery.dataset import Dataset
f... |
googleapis__python-bigquery-728 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/bigquery/_helpers.py:_float_to_json"
],
"edited_modules": [
"google/cloud/bigquery/_helpers.py:_float_to_json"
]
},
"file": "google/cloud/bigquery/_helpers... | googleapis/python-bigquery | ddd9ce714ebc496e22bc122e89f3bbee36ea15be | Cannot insert NaN and non-finite float values using Client.insert_rows()
Trying to insert a NaN using `Client.insert_rows` fails. I tracked it down to
```
def _float_to_json(value):
"""Coerce 'value' to an JSON-compatible representation."""
return value if value is None else float(value)
```
which sh... | diff --git a/google/cloud/bigquery/_helpers.py b/google/cloud/bigquery/_helpers.py
index 7602483c..77054542 100644
--- a/google/cloud/bigquery/_helpers.py
+++ b/google/cloud/bigquery/_helpers.py
@@ -17,6 +17,7 @@
import base64
import datetime
import decimal
+import math
import re
from google.cloud._helpers impor... |
googleapis__python-bigquery-750 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/bigquery/_pandas_helpers.py:dataframe_to_json_generator"
],
"edited_modules": [
"google/cloud/bigquery/_pandas_helpers.py:dataframe_to_json_generator"
]
},
... | googleapis/python-bigquery | ba86b2a6300ae5a9f3c803beeb42bda4c522e34c | Bug: `dataframe_to_json_generator` doesn't support `pandas.NA` type
#### Environment details
- OS type and version: Ubuntu 20.04.2
- Python version: `3.9.4`
- pip version: `21.1.2`
- `google-cloud-bigquery` version: `2.20.0`
#### Steps to reproduce
1. Run the code example below
#### Code exampl... | diff --git a/google/cloud/bigquery/_pandas_helpers.py b/google/cloud/bigquery/_pandas_helpers.py
index e93a99eb..285c0e83 100644
--- a/google/cloud/bigquery/_pandas_helpers.py
+++ b/google/cloud/bigquery/_pandas_helpers.py
@@ -780,7 +780,7 @@ def dataframe_to_json_generator(dataframe):
output = {}
for... |
googleapis__python-bigquery-storage-29 | [
{
"changes": {
"added_entities": [
"google/cloud/bigquery_storage_v1/reader.py:ReadRowsIterable._dtypes_from_avro"
],
"added_modules": null,
"edited_entities": [
"google/cloud/bigquery_storage_v1/reader.py:ReadRowsIterable.to_arrow",
"google/cloud/bigquery_storage... | googleapis/python-bigquery-storage | 77b373b2cc87bc6ed1c8476117f258b4c0d242f2 | ValueError: No objects to concatenate in to_dataframe method
If you have a small query result set and many streams, then often one of the reading streams doesn't get any pages to read (probably other streams get to read all the data before ??)
Pandas doesn't allow `concat` on empty list. `return pandas.concat(frame... | diff --git a/google/cloud/bigquery_storage_v1/reader.py b/google/cloud/bigquery_storage_v1/reader.py
index 9b6e3e6..09b0d99 100644
--- a/google/cloud/bigquery_storage_v1/reader.py
+++ b/google/cloud/bigquery_storage_v1/reader.py
@@ -287,7 +287,13 @@ class ReadRowsIterable(object):
record_batches = []
... |
googleapis__python-bigtable-157 | [
{
"changes": {
"added_entities": [
"google/cloud/bigtable/backup.py:Backup.get_iam_policy",
"google/cloud/bigtable/backup.py:Backup.set_iam_policy",
"google/cloud/bigtable/backup.py:Backup.test_iam_permissions"
],
"added_modules": null,
"edited_entities": null,
... | googleapis/python-bigtable | 02783630c28de3d1bc3e17be67c6fa87e8e64ef0 | BigTable: 'Table.mutate_rows' deadline exceeded for large mutations
Deadline exceeded for large mutation of BigQuery table; not necessarily a bug perhaps it would be helpful to other to add this to the docs, automatically batch mutations by size, make the timeout configurable, or document large data transfers as a pote... | diff --git a/google/cloud/bigtable/backup.py b/google/cloud/bigtable/backup.py
index 03a1c894..291ac783 100644
--- a/google/cloud/bigtable/backup.py
+++ b/google/cloud/bigtable/backup.py
@@ -21,6 +21,7 @@ from google.cloud.bigtable_admin_v2.gapic.bigtable_table_admin_client import (
BigtableTableAdminClient,
)
f... |
googleapis__python-cloud-core-100 | [
{
"changes": {
"added_entities": [
"google/cloud/client.py:Client.close"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"google/cloud/client.py:Client"
]
},
"file": "google/cloud/client.py"
}
] | googleapis/python-cloud-core | 32ba0c9e17e4e0cbe73cdc702219972e7ae18295 | Clients do not clean up Requests sessions
#### Environment details
- OS type and version: macOS
- Python version: 3.9
- `google-cloud-core` version: 1.4.3
- `google-cloud-storage` version: 1.33.0 (since it's related)
#### Steps to reproduce
This is a sibling issue to https://github.com/googleapis/go... | diff --git a/google/cloud/client.py b/google/cloud/client.py
index 0697741..9e09450 100644
--- a/google/cloud/client.py
+++ b/google/cloud/client.py
@@ -214,6 +214,21 @@ class Client(_ClientFactoryMixin):
self._http_internal.configure_mtls_channel(self._client_cert_source)
return self._http_intern... |
googleapis__python-cloud-core-54 | [
{
"changes": {
"added_entities": [
"google/cloud/client.py:_ClientFactoryMixin.from_service_account_info"
],
"added_modules": null,
"edited_entities": [
"google/cloud/client.py:_ClientFactoryMixin.from_service_account_json"
],
"edited_modules": [
"goog... | googleapis/python-cloud-core | 00cdb4d5040c4ef02dce6398520ffe6a0cd95b48 | Create client from service account stored in string
Hi,
This was raised in python-storage: https://github.com/googleapis/python-storage/issues/93
python-cloud-core library has support for [from_service_account_json](https://github.com/googleapis/python-cloud-core/blob/master/google/cloud/client.py#L50-L84), which... | diff --git a/google/cloud/client.py b/google/cloud/client.py
index fdb81a5..0cfffdb 100644
--- a/google/cloud/client.py
+++ b/google/cloud/client.py
@@ -51,6 +51,36 @@ class _ClientFactoryMixin(object):
_SET_PROJECT = False
+ @classmethod
+ def from_service_account_info(cls, info, *args, **kwargs):
+ ... |
googleapis__python-datastore-115 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/datastore/key.py:Key.id_or_name"
],
"edited_modules": [
"google/cloud/datastore/key.py:Key"
]
},
"file": "google/cloud/datastore/key.py"
}
] | googleapis/python-datastore | 5851522900fc07c9cc13e1af2cf7b54d709c9ddb | datastore Key id_or_name() returns None when id is 0
#### Description
Expecting the Key().is_partial to return False for a Key with id=0.
The is_partial property relies on the id_or_name property.
The id_or_name property returns None when the id=0, which is not expected. Expecting the id to be returned instead.
Th... | diff --git a/google/cloud/datastore/key.py b/google/cloud/datastore/key.py
index d03359b..c9beaeb 100644
--- a/google/cloud/datastore/key.py
+++ b/google/cloud/datastore/key.py
@@ -441,7 +441,9 @@ class Key(object):
:returns: The last element of the key's path if it is either an ``id``
or a ... |
googleapis__python-firestore-16 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/firestore_v1/transaction.py:Transaction.get_all",
"google/cloud/firestore_v1/transaction.py:Transaction.get"
],
"edited_modules": [
"google/cloud/firestore_v1/tr... | googleapis/python-firestore | 3a37ce9069b60d858f7669df2aaa0ef3814d654f | Firestore: Can't get data in transaction.get call
#### Environment details
1. Specify the API at the beginning of the title: Firestore
2. OS type and version: MacOS 10.15.2
3. Python version and virtual environment information: `python --version`: Python 3.7.4
4. google-cloud-<service> version: `pip show google-... | diff --git a/google/cloud/firestore_v1/transaction.py b/google/cloud/firestore_v1/transaction.py
index 9d4068c..04485a8 100644
--- a/google/cloud/firestore_v1/transaction.py
+++ b/google/cloud/firestore_v1/transaction.py
@@ -213,7 +213,7 @@ class Transaction(batch.WriteBatch):
.DocumentSnapshot: The next d... |
googleapis__python-firestore-219 | [
{
"changes": {
"added_entities": [
"google/cloud/firestore_v1/_helpers.py:DocumentExtractor.get_field_transform_pbs"
],
"added_modules": null,
"edited_entities": [
"google/cloud/firestore_v1/_helpers.py:DocumentExtractor.get_transform_pb",
"google/cloud/firestore_... | googleapis/python-firestore | 9b6c2f33351c65901ea648e4407b2817e5e70957 | Update cross-language conformance tests to latest spec
PR #205 re-enabled the `tests/unit/v1/test_cross_language.py` test suite, but did not pull in the latest versions of the [conformance test data files](https://github.com/googleapis/conformance-tests/commit/0bb8520e48c35b3e0dd45c328a1b38be35664b91), specifically usi... | diff --git a/google/cloud/firestore_v1/_helpers.py b/google/cloud/firestore_v1/_helpers.py
index f9f01e7..e98ec85 100644
--- a/google/cloud/firestore_v1/_helpers.py
+++ b/google/cloud/firestore_v1/_helpers.py
@@ -495,7 +495,9 @@ class DocumentExtractor(object):
return update_pb
- def get_transform_pb(se... |
googleapis__python-firestore-225 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/firestore_v1/_helpers.py:DocumentExtractorForMerge.has_updates",
"google/cloud/firestore_v1/_helpers.py:DocumentExtractorForMerge._get_update_mask",
"google/cloud/firestore_... | googleapis/python-firestore | db5f286772592460b2bf02df25a121994889585d | Raise Test Coverage
In order to expedite merging in a new microgenerated surface, coverage was dropped from 100% to 97%.
https://github.com/googleapis/python-firestore/tree/v2-staging
https://github.com/googleapis/python-firestore/pull/91
This work item tracks raising it back up again.
```
Name ... | diff --git a/google/cloud/firestore_v1/_helpers.py b/google/cloud/firestore_v1/_helpers.py
index fb2f73c..c1213e2 100644
--- a/google/cloud/firestore_v1/_helpers.py
+++ b/google/cloud/firestore_v1/_helpers.py
@@ -644,20 +644,6 @@ class DocumentExtractorForMerge(DocumentExtractor):
self.transform_merge = []
... |
googleapis__python-firestore-254 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/firestore_v1/base_client.py:BaseClient._firestore_api_helper"
],
"edited_modules": [
"google/cloud/firestore_v1/base_client.py:BaseClient"
]
},
"file": "go... | googleapis/python-firestore | 75d0a4821b09c3bed710353cf86082e41c28191f | Emulator with Anonymous Credentials is No Longer Possible
Previously on version `1.9.0`, setting the environment variable `FIRESTORE_EMULATOR_HOST` and providing `AnonymousCredentials` allowed the transport to be established successfully.
After upgrading to `2.0.0`, we are receiving a `DefaultCredentialsError` inste... | diff --git a/google/cloud/firestore_v1/base_client.py b/google/cloud/firestore_v1/base_client.py
index f532ec1..7b9b228 100644
--- a/google/cloud/firestore_v1/base_client.py
+++ b/google/cloud/firestore_v1/base_client.py
@@ -25,6 +25,7 @@ In the hierarchy of API concepts
"""
import os
+import grpc # type: ignore
... |
googleapis__python-firestore-280 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/cloud/firestore_v1/base_collection.py:BaseCollectionReference._prep_list_documents"
],
"edited_modules": [
"google/cloud/firestore_v1/base_collection.py:BaseCollectionReferenc... | googleapis/python-firestore | dffc580472193c7d3b0eecadc316d77afaa0d0bf | Firestore: coll_ref.list_documents() retrieves complete documents first, then returns doc_refs?
The current implementation of CollectionReference.list_documents() seems to be seriously flawed.
Reading the API documentation at https://googleapis.dev/python/firestore/latest/collection.html it returns a sequence of doc... | diff --git a/google/cloud/firestore_v1/base_collection.py b/google/cloud/firestore_v1/base_collection.py
index 956c4b4..1557057 100644
--- a/google/cloud/firestore_v1/base_collection.py
+++ b/google/cloud/firestore_v1/base_collection.py
@@ -183,6 +183,10 @@ class BaseCollectionReference(object):
"collectio... |
googleapis__python-firestore-821 | [
{
"changes": {
"added_entities": [
"google/cloud/firestore_v1/transforms.py:Sentinel.__copy__",
"google/cloud/firestore_v1/transforms.py:Sentinel.__deepcopy__"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"google/cloud/firestore_v1/... | googleapis/python-firestore | 81865ee2e1c6e3805c339e5db95e072d99297938 | SERVER_TIMESTAMP should survive deep copies (dataclasses.asdict)
## Problem
Currently `SERVER_TIMESTAMP` does not work if it has been copied via `copy.deepcopy`.
This is especially important for `dataclasses`.
Here is an example script to demonstrate the problem
```python
from google.cloud.firestore_v1.trans... | diff --git a/google/cloud/firestore_v1/transforms.py b/google/cloud/firestore_v1/transforms.py
index f1361c9..ae061f6 100644
--- a/google/cloud/firestore_v1/transforms.py
+++ b/google/cloud/firestore_v1/transforms.py
@@ -26,6 +26,14 @@ class Sentinel(object):
def __repr__(self):
return "Sentinel: {}".form... |
googleapis__python-genai-541 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"google/genai/chats.py:_BaseChat.__init__",
"google/genai/chats.py:Chat.__init__",
"google/genai/chats.py:Chats.create",
"google/genai/chats.py:AsyncChat.__init__",
"googl... | googleapis/python-genai | 2d12f544bc3f8d1e2720855f0fe3519881baaeb0 | Getting `AttributeError: 'dict' object has no attribute 'role'` when trying to use chats interface
When trying to use chat interface with populated chat history, I get an error saying `AttributeError: 'dict' object has no attribute 'role'` which the error suddenly appears, and this hasn't been an issue before, this sho... | diff --git a/google/genai/chats.py b/google/genai/chats.py
index a0f2b3c..5e6ce5a 100644
--- a/google/genai/chats.py
+++ b/google/genai/chats.py
@@ -19,7 +19,7 @@ from typing import AsyncIterator, Awaitable, Optional, Union, get_args
from . import _transformers as t
from . import types
from .models import AsyncModel... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.