googleapis / googleapis/google-cloud-python

Find and deprecate leaky abstractions

Aperta
#15,296 1 commento 0 reazioni 1 assegnatario Rivendicata da @gkevinzheng Vedi su GitHub
api: bigtable priority: p3 type: feature request
Lingua principale
Python
Stelle
5.4k
Fork
1.8k
Merge medio
3g 4h
PR unite (30g)
122

Descrizione

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)

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.