Skip to content

Keep legacy proto-based types available for import #999

Closed
@plamut

Description

@plamut

As a follow-up to #814 and as discussed with @tswast on the chat, some users, that otherwise could upgrade to a 3.x version, would still need the legacy generated SQL model types that the 3.x version will remove.

We should add these models back to the codebase, but with the following restrictions:

  • These legacy files would be copy-pasted to their old place, but will not be generated anymore. The version to copy from main should be the time [Breaking Change] Remove google.cloud.bigquery_v2 directory and related code generation #814 was merged into v3.
  • The legacy models would not be exposed in the library's top-level namespace, nor would they be imported or used anywhere else in the code. Users will have to import them using the full module path, and at their own risk.
  • These types will not be maintained in any way, and will be ignored by type checks and test coverage. They will also eventually get out of sync with what the code generator would produce - this is intentional.
  • When importing anything from that legacy sub-package, a warning should be issued.

@tswast Feel free to update/correct the requirements above in case I misunderstood/misremembered them.

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.semver: majorHint for users that this is an API breaking change.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions