Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit eed034a

Browse files
docs: update the upgrade guide to be from 1.0 to 3.0 (#77)
- [x] 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 - N/A - Code coverage does not decrease (if any source code was changed) - N/A - [x] Appropriate docs were updated (if necessary) Fixes #76 🦕
1 parent cd7d4ba commit eed034a

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

UPGRADING.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# 2.0.0 Migration Guide
1+
# 3.0.0 Migration Guide
22

3-
The 2.0 release of the `google-cloud-datacatalog` client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-python), and includes substantial interface changes. Existing code written for earlier versions of this library will likely require updates to use this version. This document describes the changes that have been made, and what you need to do to update your usage.
3+
The 3.0 release of the `google-cloud-datacatalog` client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-python), and includes substantial interface changes. Existing code written for earlier versions of this library will likely require updates to use this version. This document describes the changes that have been made, and what you need to do to update your usage.
44

55
If you experience issues or have questions, please file an [issue](https://github.com/googleapis/python-datacatalog/issues).
66

77
## Supported Python Versions
88

99
> **WARNING**: Breaking change
10-
The 2.0.0 release requires Python 3.6+.
10+
The 3.0.0 release requires Python 3.6+.
1111

1212

1313
## Method Calls
@@ -45,7 +45,7 @@ return datacatalog.lookup_entry(request={'linked_resource': resource_name})
4545

4646
### More Details
4747

48-
In `google-cloud-datacatalog<2.0.0`, parameters required by the API were positional parameters and optional parameters were keyword parameters.
48+
In `google-cloud-datacatalog<=1.0.0`, parameters required by the API were positional parameters and optional parameters were keyword parameters.
4949

5050
**Before:**
5151
```py
@@ -60,7 +60,7 @@ In `google-cloud-datacatalog<2.0.0`, parameters required by the API were positio
6060
):
6161
```
6262

63-
In the 2.0.0 release, all methods have a single positional parameter `request`. Method docstrings indicate whether a parameter is required or optional.
63+
In the 3.0.0 release, all methods have a single positional parameter `request`. Method docstrings indicate whether a parameter is required or optional.
6464

6565
Some methods have additional keyword only parameters. The available parameters depend on the `google.api.method_signature` annotation specified by the API producer.
6666

@@ -127,24 +127,19 @@ The submodules `enums` and `types` have been removed.
127127
**Before:**
128128
```py
129129
from google.cloud import datacatalog_v1
130-
entry = datacatalog_v1beta1.types.Entry()
131-
entry.type = datacatalog_v1beta1.enums.EntryType.FILESET
130+
entry = datacatalog_v1.types.Entry()
131+
entry.type = datacatalog_v1.enums.EntryType.FILESET
132132
```
133133

134134

135135
**After:**
136136
```py
137137
from google.cloud import datacatalog_v1
138-
entry = datacatalog_v1beta1.Entry()
139-
entry.type = datacatalog_v1beta1.EntryType.FILESET
138+
entry = datacatalog_v1.Entry()
139+
entry.type = datacatalog_v1.EntryType.FILESET
140140
```
141141

142-
## Project Path Helper Methods
142+
## Common Resource Path Helper Methods
143143

144-
The project path helper method `project_path` has been removed. Please construct
145-
this path manually.
146-
147-
```py
148-
project = 'my-project'
149-
project_path = f'projects/{project}'
150-
```
144+
The `location_path` method existing in `google-cloud-datacatalog<=1.0.0` was renamed to `common_location_path`.
145+
And more resource path helper methods were added: `common_billing_account_path`, `common_folder_path`, `common_organization_path`, and `common_project_path`.

0 commit comments

Comments
 (0)