This repository has been archived by the owner on Sep 5, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Current upgrade guide is confusing especially when upgrading from v2.0.0 to v3.0.0 because some of the change is only introduced at v2.0.0. I fixed this. This is just a documentation fix rather than code fix, so note that following checks are not passed --- Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-datacatalog/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕 --- ## Additional question There are three way to invoke API-calling methods: (1) pass keyword arguments, (2) pass `request` argument with request class and (3) pass `request` argument with dict. The auto-migration tool `fixup_datacatalog_v1_keywords.py` fixes code to use method (3) even if the methods accepts keyword arguments. However, IMO, it's poorly typed and not linter/autocompletion-friendly. Actually what is the recommended way? And is there a plan to remove support of method (1)? | | Available since | Typed | Note | |:---|:---|:---|:---| | (1) | v1 | ◎ (since v2) | | | (2) | v2 | △ | Code looks redundant | | (3) | v2 | ☓ | | (1) ```py response = client.create_entry_group( parent=parent, entry_group_id=entry_group_id, entry_group=entry_group ) ``` (2) ```py response = client.create_entry_group( datacatalog.CreateEntryGroupRequest( parent=parent, entry_group_id=entry_group_id, entry_group=entry_group ) ) ``` (3) ```py response = client.create_entry_group( request={ "parent": parent, "entry_group_id": entry_group_id, "entry_group": entry_group } ) ```
- Loading branch information