googleapis / googleapis/google-cloud-python

Find and deprecate leaky abstractions

Open
#15,296 1 comment 0 reactions 1 assignee Claimed by @gkevinzheng View on GitHub
api: bigtable priority: p3 type: feature request
Dominant language
Python
Stars
5.4k
Forks
1.8k
Avg merge
3d 4h
Merged PRs (30d)
122

Description

go/bigtable_legacy_deprecation details a few places where library internals are exposed publicly. For the most part, these are internal varaibles that aren't marked as internal. They shouldn't be widely used, but are techincailly part of the public API surface.

We should identify these, and either:
1. update the docstrings to make it clear that usage is not supported
2. mark variables as private using underscore notation
3. raise exceptions in places they are used

We should also make note of these changes in the [UPGRADING.md file](https://github.com/googleapis/google-cloud-python/issues/15297)

I'd suggest doing a PR trying to resolve of this before starting the majority of the shim work.

We should probably open two PRs for this:
1. a PR to main marking these as deprecated now, so it's not a big surprise when they are removed later
2. a PR into the `v3` branch, removing them for the major release

Examples:
- [PartialRowData.resonse_iterator](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/row_data.py#L160)
- [PartialRowsData's construtor](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/row_data.py#L143)
- [Retry object on_error callbacks](https://github.com/googleapis/python-bigtable/blob/4492f9fe2760d423944672264c2c1770488a9c8c/google/cloud/bigtable/table.py#L585)
- [Mutations Batcher callbacks](https://github.com/googleapis/python-bigtable/blob/7cab3e88b7c7e880d7ecaa574f70a88fe35c700f/google/cloud/bigtable/batcher.py#L215)
- maybe this can be partially supported?
- [RowFilter.to_pb](https://github.com/googleapis/python-bigtable/blob/3648d7000df4a108524e29a9c55639dc92c1c2cc/google/cloud/bigtable/row_filters.py#L190)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.