Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix!: drop support for Python 2.7 / 3.5#212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tseaver merged 28 commits intomasterfrom210-drop-python-2.7
Aug 3, 2021
Merged

Conversation

@tseaver
Copy link
Contributor

@tseavertseaver commentedJun 15, 2021
edited
Loading

  • Dropsix.
  • Drop other Python 2.7-specific workarounds (collections_abc, etc.)
  • Dropu" prefixes for text strings.
  • Droppytz (perDrop use of pytz #73).

Release-As: 2.0.0b1

Closes#210.

@tseavertseaver requested a review froma team as acode ownerJune 15, 2021 20:04
@google-clagoogle-clabot added the cla: yesThis human has signed the Contributor License Agreement. labelJun 15, 2021
Copy link
Contributor

@plamutplamut left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Generally looks good, just spotted a few legacy bits that were not cleaned yet.

There are also a few remaining references to"2.7" and"Python 2" (comments, workarounds, etc.) that can be removed. And maybe theworkaround for the lack ofCondition.wait_for() method in Python 2.7.


Edit: Oh, and we also use themock shim in unit tests (installed in noxfile's default session), we can now switch to importing the standard library'sunittest.mock.

Edit 2: We can also get rid of severaldef next(self) methods and replace them with__next__(self).

# limitations under the License.

__version__="1.30.0"
__version__="2.0.0-b1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Is this a new process, i.e. having a preliminary release instead of immediately switching to 2.0.0? Also, should this be beta or an RC?

FWIW, the approach itself does seem sensible to me.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

As a semver-major / breaking change, I thought it was reasonable to do a short beta. I could be persuaded that it should be an RC, but I want folks to consider carefully whether they install it in production until we've gotten feedback that all is OK.

@tseaver
Copy link
ContributorAuthor

tseaver commentedJun 16, 2021
edited
Loading

@plamut Thanks for the review

There are also a few remaining references to "2.7" and "Python 2" (comments, workarounds, etc.) that can be removed.

I'll leave the bit indocs/auth.rst for now. I'm working through a couple of others.

And maybe the workaround for the lack of Condition.wait_for() method in Python 2.7.

I added#211 to track that change: I didn't want to think that hard in the middle of a big janitorial cleanup.

Edit: Oh, and we also use themock shim in unit tests (installed in noxfile's default session), we can now switch
to importing the standard library's unittest.mock.

We can't replaceimport mock wholesale withfrom unittest import mock, because the stdlib version doesn't havemock.AsyncMock before Python 3.8.

Edit 2: We can also get rid of several def next(self) methods and replace them withnext(self).

4165633,ad7b40b,dbc234f.

Copy link
Contributor

@plamutplamut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM, thanks for the additional cleanup.

It's totally fine to defer some of the less trivial (and thus risky) changes to a separate PR, esp. with issues to track them.

@tseavertseaver added the do not mergeIndicates a pull request not ready for merge, due to either quality or timing. labelJun 18, 2021
@tseaver
Copy link
ContributorAuthor

Marked asdo not merge pending discussion over the versioning policy next week with@busunkim96,@crwilcox, et al.

@tseavertseaver added the owlbot:runAdd this label to trigger the Owlbot post processor. labelJul 14, 2021
@gcf-owl-botgcf-owl-botbot removed the owlbot:runAdd this label to trigger the Owlbot post processor. labelJul 14, 2021
@tseavertseaver added the semver: majorHint for users that this is an API breaking change. labelJul 14, 2021
@tseaver
Copy link
ContributorAuthor

Ugh, OwlBot is restoring the2.7 reference in the templated `scripts/readme-gen/templates/install_deps.tmpl.rst'. Seegoogleapis/synthtool#1173.

@tseavertseaver added semver: majorHint for users that this is an API breaking change. and removed semver: majorHint for users that this is an API breaking change. do not mergeIndicates a pull request not ready for merge, due to either quality or timing. labelsAug 3, 2021
@tseavertseaver merged commita30f004 intomasterAug 3, 2021
@tseavertseaver deleted the 210-drop-python-2.7 branchAugust 3, 2021 17:59
This was referencedAug 3, 2021
busunkim96 pushed a commit that referenced this pull requestAug 18, 2021
🤖 I have created a release \*beep\* \*boop\*---## [2.0.0](https://www.github.com/googleapis/python-api-core/compare/v2.0.0-b1...v2.0.0) (2021-08-18)### ⚠ BREAKING CHANGES* drop support for Python 2.7 / 3.5 ([#212](https://www.github.com/googleapis/python-api-core/issues/212)) ([a30f004](https://www.github.com/googleapis/python-api-core/commit/a30f004e74f709d46e905dd819c71f43354e9ac9))### Bug Fixes* bump grpcio version to use stable aio API ([#234](https://www.github.com/googleapis/python-api-core/issues/234)) ([bdbf889](https://www.github.com/googleapis/python-api-core/commit/bdbf889210b709d7c1945f2160bcba9161b4dd2e))* strip trailing _ from field mask paths ([#228](https://www.github.com/googleapis/python-api-core/issues/228)) ([ff6ef1b](https://www.github.com/googleapis/python-api-core/commit/ff6ef1bd07fa68307b7c82c910416d770e7b3416))---This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
@tseavertseaver mentioned this pull requestSep 27, 2021
parthea added a commit that referenced this pull requestSep 6, 2022
* fix: strip trailing _ from field mask paths (#228)* fix!: drop support for Python 2.7 / 3.5 (#212)Drop 'six' moduleDrop 'u"' prefixes for textRemove other Python 2.7 workaroundsDrop use of 'pytz'Dxpand range to allow 'google-auth' 2.x versionsRemove 'general_helpers.wraps': except for a backward-compatibilityimport, 'functools.wraps' does everything wee need on Python >= 3.6.Remove 'packaging' dependencyRelease-As: 2.0.0b1Closes#74.Closes#215.* chore: release 2.0.0b1 (#243)* chore: remove non-custom rules from sync-repo-settings (#241)Seehttps://github.com/googleapis/repo-automation-bots/blob/63c858e539e1f4d9bb8ea66e12f9c0a0de5fef55/packages/sync-repo-settings/src/required-checks.json#L40-L50 for defaults.* chore(python): avoid `.nox` directories when building docs (#249)Source-Link:googleapis/synthtool@7e1f6daPost-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:a1a891041baa4ffbe1a809ac1b8b9b4a71887293c9101c88e8e255943c5aec2d* chore: avoid duplicating pins of grpcio in noxfile (#246)Rely on the pins in 'setup.py' as the Source of Truth.See#234 (review)* chore: drop mention of Python 2.7 from templates (#252)Source-Link:googleapis/synthtool@facee4cPost-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:9743664022bd63a8084be67f144898314c7ca12f0a03e422ac17c733c129d803Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>* chore: update if_transient_error docs to match behaviour (#253)Fixes#185 🦕* fix: bump grpcio version to use stable aio API (#234)* tests: silence a warning from 'charset_normalizer' (#247)* chore: release 2.0.0 (#254):robot: I have created a release \*beep\* \*boop\*---## [2.0.0](https://www.github.com/googleapis/python-api-core/compare/v2.0.0-b1...v2.0.0) (2021-08-18)### ⚠ BREAKING CHANGES* drop support for Python 2.7 / 3.5 ([#212](https://www.github.com/googleapis/python-api-core/issues/212)) ([a30f004](https://www.github.com/googleapis/python-api-core/commit/a30f004e74f709d46e905dd819c71f43354e9ac9))### Bug Fixes* bump grpcio version to use stable aio API ([#234](https://www.github.com/googleapis/python-api-core/issues/234)) ([bdbf889](https://www.github.com/googleapis/python-api-core/commit/bdbf889210b709d7c1945f2160bcba9161b4dd2e))* strip trailing _ from field mask paths ([#228](https://www.github.com/googleapis/python-api-core/issues/228)) ([ff6ef1b](https://www.github.com/googleapis/python-api-core/commit/ff6ef1bd07fa68307b7c82c910416d770e7b3416))---This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).* chore(python): disable dependency dashboard (#266)* chore: migrate default branch to main (#264)* tests: close coverage gap for race condition (#261)Closes#260* fix: do not error on LROs with no response or error (#258)Co-authored-by: Tres Seaver <tseaver@palladion.com>* chore: release 2.0.1 (#267)Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>* chore(python): group renovate prs (#270)* chore: remove obsolete dependency in setup.py (#269)Co-authored-by: Tres Seaver <tseaver@palladion.com>* chore: removing owlbot directives for conversion to main (#272)chore: removing owlbot directives for conversion to main* feat: add grpc transcoding + tests (#259)* feat: add grpc transcoding + tests* 🦉 Updates from OwlBotSeehttps://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md* chore: tweak for clarity / idiomatic usage* chore: attempt to appease Sphinx* feat: add grpc transcoding + tests* Add functions to properly handle subfields* Add unit tests for get_field and delete_field.* Add function docstrings and incorporate correct native dict functions.* Add function docstrings and incorporate correct native dict functions.* Increase code coverage* Increase code coverage* Increase code coverage* Reformat filesCo-authored-by: Yonatan Getahun <yonmg@google.com>Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>Co-authored-by: Tres Seaver <tseaver@palladion.com>* feat: Add helper function to format query_params for rest transport. (#275)Co-authored-by: Kenneth Bandes <kbandes@google.com>* chore: relocate owl bot post processor (#280)chore: relocate owl bot post processor* tests: add explicit unit tests for '_StreamedResponseIterator' class (#281)* chore: add default_version and codeowner_team to .repo-metadata.json (#282)* chore: add default_version and codeowner_team to .repo-metadata.json* Assign@googleapis/actools-python as codeowner* build: use trampoline_v2 for python samples and allow custom dockerfile (#283)Source-Link:googleapis/synthtool@a7ed11ePost-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:6e7328583be8edd3ba8f35311c76a1ecbc823010279ccb6ab46b7a76e25eafccCo-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>* feat: add support for Python 3.10 (#284)Fix new deprecation warning for 'threading.Condition.notifyAll'.* chore: release 2.1.0 (#274)Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>* chore(python): Add kokoro configs for python 3.10 samples testing (#285)Source-Link:googleapis/synthtool@c6e69c4Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:58f73ba196b5414782605236dd0712a73541b44ff2ff4d3a36ec41092dd6fa5bCo-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>* fix: add mypy checking + 'py.typed' file (#290)* chore: release 2.1.1 (#291)Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>* tests: add testing w/o 'grpc' installed (#289)Closes#288.* feat: add 'GoogleAPICallError.error_details' property (#286)Based on 'google.rpc.status.details'.* chore(python): push cloud library docs to staging bucket for Cloud RAD (#295)Source-Link:googleapis/synthtool@7fd61f8Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:4ee57a76a176ede9087c14330c625a71553cf9c72828b2c0ca12f5338171ba60Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>* chore: release 2.2.0 (#293)Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>* fix: revert "fix: do not error on LROs with no response or error" (#294)Reverts#258From@TrucHLe > A while ago you helped me submit this pull request for the Python LRO client library. This was about making the LRO library not throw an error when receiving an empty LRO response. It turns out that the Python LRO library has always been behaving correctly by accepting empty LRO responses. It would just throw an error if the response field is NULL (see screenshot).>> Since then I've consulted other LRO client library owners (@vam-google ) and it turns out that the fault was in the CCAI Insights server code. CCAI Insights was returning NULL responses instead of empty responses (more context here b/202432905). Since then the issue has been fixed in our server and has rolled out to production, so reverting the Python LRO false fix wouldn't break our code sample.* chore: release 2.2.1 (#296)Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>* fix: make 'gapic_v1.method.DEFAULT' a typed object (#292)FBO checkers which need to verify default values for 'retry' / 'timeout'* chore: release 2.2.2 (#302):robot: I have created a release \*beep\* \*boop\*---### [2.2.2](https://www.github.com/googleapis/python-api-core/compare/v2.2.1...v2.2.2) (2021-11-02)### Bug Fixes* make 'gapic_v1.method.DEFAULT' a typed object ([#292](https://www.github.com/googleapis/python-api-core/issues/292)) ([ffc51f0](https://www.github.com/googleapis/python-api-core/commit/ffc51f03c7ce5d9f009ba859b8df385d52925578))---This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).* fix: handle bare 'grpc.Call' in 'from_grpc_error' (#298)* fix: handle bare 'grpc.Call' in 'from_grpc_error'Fixes:#297.* tests: add assertion for 'exception.details'* chore(python): add .github/CODEOWNERS as a templated file (#308)Source-Link:googleapis/synthtool@c5026b3Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:0e18b9475fbeb12d9ad4302283171edebb6baf2dfca1bd215ee3b34ed79d95d7Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>* ci: tweak mypy to check 'google.protobuf' (#310)Install the 'types-protobuf' package in support.* feat: add operations rest client to support long-running operations. (#311)* feat: add operations rest client to support long-running operations.* fix: address test coverage gaps in operations rest client.* fix: removed stray print statement.* fix: address lint, blacken, and mypy issues.* fix: address pytype, more coverage issues* fix: addressed additional pytype issues and one coverage line.* fix: renamed OperationsRestClient to AbstractOperationsClient.Co-authored-by: Kenneth Bandes <kbandes@google.com>* chore: release 2.3.0 (#314)Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>* ci: run lint / mypy / unit tests / coverage as GH actions (#287)Make GH Action checks required* feat: add support for 'error_info' (#315)* feat: Adds support for error_info.* chore: fixes pytype.Co-authored-by: Tres Seaver <tseaver@palladion.com>* fix: exclude function target from retry deadline exceeded exception message (#318)* Exclude function target from retry deadline exceeded exception message* apply similar patch in retry_async.pyCo-authored-by: Anthonios Partheniou <partheniou@google.com>* chore: use python-samples-reviewers (#328)* chore: update release_level in repo-metadata.json (#326)* chore: update .repo-metadata.json* revert* remove api_shortname* feat: iterator for processing JSON responses in REST streaming. (#317)* feat: files for REST server streaming.* chore: release 2.4.0 (#316)* chore: release 2.4.0* chore: delete#318 from log (already released)* Update changelog to include published versions* insert newline in changelog* insert newline in changelogCo-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>Co-authored-by: Anthonios Partheniou <partheniou@google.com>* build: switch to release-please for tagging (#331)* docs: fix typo in library name (#332)* chore(python): update release.sh to use keystore (#333)Source-Link:googleapis/synthtool@69fda12Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:ae600f36b6bc972b368367b6f83a1d91ec2c82a4a116b383d67d547c56fe6de3Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>Co-authored-by: Anthonios Partheniou <partheniou@google.com>* chore: move docs check from kokoro to GH actions (#334)* chore: move docs check from kokoro to GH actions* 🦉 Updates from OwlBotSeehttps://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md* 🦉 Updates from OwlBotSeehttps://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md* fix typoCo-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>* feat: add api_key to client options (#248)* feat: add api_key to client options* update* ci(python): run lint / unit tests / docs as GH actions (#336)* ci(python): run lint / unit tests / docs as GH actionsSource-Link:googleapis/synthtool@57be0cdPost-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:ed1f9983d5a935a89fe8085e8bb97d94e41015252c5b6c9771257cf8624367e6* revert changes to unittest gh action* move mypy check into separate workflow* update .sync-repo-settings to reflect changes to gh checks* use python 3.7 for lint checkCo-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>Co-authored-by: Anthonios Partheniou <partheniou@google.com>* fix(deps): remove setuptools from dependencies (#339)* fix(deps): remove setuptools from dependenciesFixes#338* chore: remove setuptools from constraints* chore(main): release 2.5.0 (#335)Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>* chore(deps): update actions/setup-python action to v3 (#346)Source-Link:googleapis/synthtool@571ee2cPost-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:660abdf857d3ab9aabcd967c163c70e657fcc5653595c709263af5f3fa23ef67* chore(deps): update all dependencies to v3 (#347)* chore(deps): update all dependencies to v3* 🦉 Updates from OwlBot post-processorSeehttps://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.mdCo-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>* feat: initial support for Extended Operations (#344)Certain APIs with Long-Running Operations deviate from the semanticsinhttps://google.aip.dev/151 and instead define custom operationmessages, aka Extended Operations.This change adds a PollingFuture subclass designed to be used withExtended Operations. It is analogous and broadly similar togoogle.api_core.operation.Operation and subclassesgoogle.api_core.future.polling.PollingFuture.The full description of Extended Operation semantics is beyond thescope of this change.* chore(deps): update actions/checkout action to v3 (#349)Source-Link:googleapis/synthtool@ca87909Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:6162c384d685c5fe22521d3f37f6fc732bf99a085f6d47b677dbcae97fc21392* chore(main): release 2.6.0 (#350)Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>* fix: Remove py2 tag from wheel (#343)Co-authored-by: Anthonios Partheniou <partheniou@google.com>* chore(main): release 2.6.1 (#352)Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>* feat: expose extra fields in ExtendedOperation (#351)The operation wrapped by ExtendedOperation may define other fields or methodsthat the user may wish to use.* chore(main): release 2.7.0 (#353)Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>* fix: add more context to error message. (#340)Co-authored-by: Anthonios Partheniou <partheniou@google.com>* chore(main): release 2.7.1 (#354)Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>* fix: allow grpc without grpcio-status (#355)* chore(python): use black==22.3.0 (#362)* chore(python): use black==22.3.0Source-Link:googleapis/synthtool@6fab84aPost-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe* ci: use black 22.3.0* 🦉 Updates from OwlBot post-processorSeehttps://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.mdCo-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>Co-authored-by: Anthonios Partheniou <partheniou@google.com>* chore(python): update .pre-commit-config.yaml to use black==22.3.0 (#363)Source-Link:googleapis/synthtool@7804adePost-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:eede5672562a32821444a8e803fb984a6f61f2237ea3de229d2de24453f4ae7d* chore(python): Enable size-label bot (#364)Source-Link:googleapis/synthtool@06e8279Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:b3500c053313dc34e07b1632ba9e4e589f4f77036a7cf39e1fe8906811ae0fceCo-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>* chore(python): add license header to auto-label.yaml (#365)Source-Link:googleapis/synthtool@eb78c98Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:8a5d3f6a2e43ed8293f34e06a2f56931d1e88a2694c3bb11b15df4eb256ad163Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>* fix: remove dependency on pkg_resources (#361)Fixes#360 🦕* chore(main): release 2.7.2 (#358)Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>* chore(deps): update all dependencies (#367)* chore(deps): update all dependencies* 🦉 Updates from OwlBot post-processorSeehttps://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.mdCo-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>* chore(python): use ubuntu 22.04 in docs image (#368)Source-Link:googleapis/synthtool@f15cc72Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:bc5eed3804aec2f05fad42aacf973821d9500c174015341f721a984a0825b6fd* fix: Avoid AttributeError if grpcio-status is not installed (#370)* test: use `not` instead of `is False` in assert (#366)* test: use == instead of is when comparing equality* use not instead of ==* test: fix KeyError in test_rest_streaming.py (#373)* chore(main): release 2.7.3 (#371)Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>* chore: [autoapprove] update readme_gen.py to include autoescape True (#374)Source-Link:googleapis/synthtool@6b4d5a6Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f792ee1320e03eda2d13a5281a2989f7ed8a9e50b73ef6da97fac7e1e850b149Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>* chore(python): auto approve template changes (#376)Source-Link:googleapis/synthtool@453a5d9Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:81ed5ecdfc7cac5b699ba4537376f3563f6f04122c4ec9e735d3b3dc1d43dd32* feat: adds support for audience in client_options (#379)feat: adds support for audience in client_options.* chore(main): release 2.8.0 (#381)Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>* fix(deps): require protobuf>= 3.15.0, <4.0.0dev (#385)Also adds upper limits for extras.fix(deps): require googleapis-common-protos >= 1.56.2* chore(main): release 2.8.1 (#386)Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>* chore: allow releases from older version branches (#388)* chore: allow releases from older version branches* 🦉 Updates from OwlBot post-processorSeehttps://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.mdCo-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>* docs: fix changelog header to consistent size (#394)* docs: Fix typo in the BackgroundConsumer docstring (#395)`UNAVAILABLE` instead of `UNVAILABLE`Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-api-core/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- [ ] Code coverage does not decrease (if any source code was changed)- [ ] Appropriate docs were updated (if necessary)Fixes #<issue_number_goes_here> 🦕* chore: test minimum dependencies in python 3.7 (#397)* chore: test minimum dependencies in python 3.7* remove duplicate entry* fix: drop support for grpc-gcp (#401)* fix(deps): allow protobuf < 5.0.0 (#400)* chore(main): release 2.8.2 (#396)Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>* fix: require python 3.7+ (#410)* chore(python): drop python 3.6Source-Link:googleapis/synthtool@4f89b13Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e7bb19d47c13839fe8c147e50e02e8b6cf5da8edd1af8b82208cd6f66cc2829c* require python 3.7+ in setup.py* remove python 3.6 sample configs* exclude templated README* remove python 3.6 from noxfile* remove python 3.6 from remaining files* remove testing/constraints-3.6.txtCo-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>Co-authored-by: Anthonios Partheniou <partheniou@google.com>* chore(deps): update actions/setup-python action to v4 (#419)* chore(deps): update actions/setup-python action to v4* 🦉 Updates from OwlBot post-processorSeehttps://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.mdCo-authored-by: Anthonios Partheniou <partheniou@google.com>Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>* doc: Update gcloud command for ADC (#406)ADC login command for gcloud is `gcloud auth application-default auth login`Co-authored-by: Anthonios Partheniou <partheniou@google.com>* chore: remove 'pip install' statements from python_library templates [autoapprove] (#424)Source-Link:googleapis/synthtool@1f37ce7Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:8e84e0e0d71a0d681668461bba02c9e1394c785f31a10ae3470660235b673086Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>* chore(python): exclude path in renovate.json [autoapprove] (#425)Source-Link:googleapis/synthtool@69fabaePost-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:562802bfac02e012a6ac34eda282f81d06e77326b82a32d7bbb1369ff552b387Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>* chore(python): update dependency distlib (#429)Source-Link:googleapis/synthtool@c4dd595Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:ce3c1686bc81145c81dd269bd12c4025c6b275b22d14641358827334fddb1d72Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>* feat: Make grpc transcode logic work in terms of protobuf python objects (#428)* feat: Make grpc transcode logic work in terms of protobuf python objects(for context: [gRPC Transcoding](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto#L44))Previously it worked on dictionaries only, but that causes problems.In GAPIC the dictionaries are created through the same logic as JSON (there is no better built-in way), thus applying [protobuf json mapping](https://developers.google.com/protocol-buffers/docs/proto3#json) conversion logic in the process. Unfortunately converting a protobuf object to a dictionary and to JSON, although similar, are not the same thing. Specifically the `Timestamp`, `Duration`, `FieldMask`, `uint64`, `int64`, and `*Value` protobuf messages are converted to strings for JSON (instead of being properly converted to dicts for most of those types, and `int64/uint64` converted to `int` respectively). As a result a rountrip that GAPIC was relying on (protobuf object -> dict -> transcode -> protobuf object) did not work properly. For example, when converted to dictionary, every int64 field would be converted to `string` (because it is what proto-JSON mapping spec requires), but later, when we need to rebuild a message from a transcoded dictionary that would fail with the following error:```TypeError: '0' has type str, but expected one of: int```Note, `*Rules` thing from proto-plus does not help, becuase the type may happen inside common native protobuf stub messsages (like `google.type.Money`), fields of which are outside of scope of the proto-plus custom conversion logic.Also, this change greatly simplifies the procedure of transcodding, eliminating multiple conversion steps (to and from dictionaries multiple times) making the whole logic significanly more efficient (python gapics are nutoriously known to be slow due to proto-plus stuff, so efficiency is important) and robust (JSON conversion logic does not interfere anymore with pure protobuf objects grpc transcoding)* reformat code using black* reformat code according to flake8Co-authored-by: Anthonios Partheniou <partheniou@google.com>* chore: fix path to requirements.txt in release script [autoapprove] (#430)Source-Link:googleapis/synthtool@fdba3edPost-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:1f0dbd02745fb7cf255563dab5968345989308544e52b7f460deadd5e78e63b0* fix: restore support for grpcio-gcp (#418)docs: add a note that grpcio-gcp is only supported in environments with protobuf < 4.x.xdocs: raise DeprecationWarning when 'grpcio-gcp' is usedfix(deps): require protobuf >= 3.20.1* chore(main): release 2.9.0 (#422)Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>* chore(python): update .kokoro/requirements.txt (#431)Source-Link:googleapis/synthtool@703554aPost-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:94961fdc5c9ca6d13530a6a414a49d2f607203168215d074cdb0a1df9ec31c0bCo-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>* feat: add 'strict' to flatten_query_params to lower-case bools (#433)* feat: add 'strict' to flatten_query_params to lower-case bools* pylintCo-authored-by: Anthonios Partheniou <partheniou@google.com>* chore(main): release 2.10.0 (#434)Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>* chore(python): exclude setup.py in renovate config (#436)Source-Link:googleapis/synthtool@56da63ePost-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:993a058718e84a82fda04c3177e58f0a43281a996c7c395e0a56ccc4d6d210d7* enable github actions checks* remove constraints for python 3.8* ci: fix coverCo-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>Co-authored-by: Tres Seaver <tseaver@palladion.com>Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com>Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>Co-authored-by: Lidi Zheng <lidiz@google.com>Co-authored-by: nicain <nicain.seattle@gmail.com>Co-authored-by: Yih-Jen Ku <yihjen.ku@gmail.com>Co-authored-by: Yonatan Getahun <yonmg@google.com>Co-authored-by: Ken Bandes <kbandes@comcast.net>Co-authored-by: Kenneth Bandes <kbandes@google.com>Co-authored-by: Jeffrey Rennie <rennie@google.com>Co-authored-by: Aza Tulepbergenov <aza.tulepber@gmail.com>Co-authored-by: Aza Tulepbergenov <atulep@google.com>Co-authored-by: Chris Wilson <46912004+sushicw@users.noreply.github.com>Co-authored-by: Tianzi Cai <tianzi@google.com>Co-authored-by: arithmetic1728 <58957152+arithmetic1728@users.noreply.github.com>Co-authored-by: WhiteSource Renovate <bot@renovateapp.com>Co-authored-by: Dov Shlachter <dovs@google.com>Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>Co-authored-by: Dorian Kind <dorian.kind@webrepublic.com>Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com>Co-authored-by: Mariatta Wijaya <Mariatta@users.noreply.github.com>Co-authored-by: sai-sunder-s <4540365+sai-sunder-s@users.noreply.github.com>Co-authored-by: Vadym Matsishevskyi <25311427+vam-google@users.noreply.github.com>Co-authored-by: Victor Chudnovsky <vchudnov@google.com>
This was referencedMay 30, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@chrisrossichrisrossiAwaiting requested review from chrisrossi

@crwilcoxcrwilcoxAwaiting requested review from crwilcox

@jimfultonjimfultonAwaiting requested review from jimfulton

@busunkim96busunkim96Awaiting requested review from busunkim96

@partheapartheaAwaiting requested review from parthea

1 more reviewer

@plamutplamutplamut approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

cla: yesThis human has signed the Contributor License Agreement.semver: majorHint for users that this is an API breaking change.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Drop Python 2.7 support

3 participants

@tseaver@plamut@parthea

[8]ページ先頭

©2009-2025 Movatter.jp