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

Commit

Permalink
docs: update the upgrade guide to be from 1.0 to 3.0 (#77)
Browse files Browse the repository at this point in the history
- [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 🦕
  • Loading branch information
ricardolsmendes committed Dec 7, 2020
1 parent cd7d4ba commit eed034a
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# 2.0.0 Migration Guide
# 3.0.0 Migration Guide

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.
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.

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

## Supported Python Versions

> **WARNING**: Breaking change
The 2.0.0 release requires Python 3.6+.
The 3.0.0 release requires Python 3.6+.


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

### More Details

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

**Before:**
```py
Expand All @@ -60,7 +60,7 @@ In `google-cloud-datacatalog<2.0.0`, parameters required by the API were positio
):
```

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

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

Expand Down Expand Up @@ -127,24 +127,19 @@ The submodules `enums` and `types` have been removed.
**Before:**
```py
from google.cloud import datacatalog_v1
entry = datacatalog_v1beta1.types.Entry()
entry.type = datacatalog_v1beta1.enums.EntryType.FILESET
entry = datacatalog_v1.types.Entry()
entry.type = datacatalog_v1.enums.EntryType.FILESET
```


**After:**
```py
from google.cloud import datacatalog_v1
entry = datacatalog_v1beta1.Entry()
entry.type = datacatalog_v1beta1.EntryType.FILESET
entry = datacatalog_v1.Entry()
entry.type = datacatalog_v1.EntryType.FILESET
```

## Project Path Helper Methods
## Common Resource Path Helper Methods

The project path helper method `project_path` has been removed. Please construct
this path manually.

```py
project = 'my-project'
project_path = f'projects/{project}'
```
The `location_path` method existing in `google-cloud-datacatalog<=1.0.0` was renamed to `common_location_path`.
And more resource path helper methods were added: `common_billing_account_path`, `common_folder_path`, `common_organization_path`, and `common_project_path`.

0 comments on commit eed034a

Please sign in to comment.