Title: Tailing streams on closing a bidi stream. · Issue #850 · googleapis/python-api-core · GitHub
Open Graph Title: Tailing streams on closing a bidi stream. · Issue #850 · googleapis/python-api-core
X Title: Tailing streams on closing a bidi stream. · Issue #850 · googleapis/python-api-core
Description: The close() method of the bidi module, resets the fields only when the self.call field is not None. def close(self): """Closes the stream.""" if self.call is None: return self._request_queue.put(None) self.call.cancel() .... This is prob...
Open Graph Description: The close() method of the bidi module, resets the fields only when the self.call field is not None. def close(self): """Closes the stream.""" if self.call is None: return self._request_queue.put(No...
X Description: The close() method of the bidi module, resets the fields only when the self.call field is not None. def close(self): """Closes the stream.""" if self.call is None: ret...
Opengraph URL: https://github.com/googleapis/python-api-core/issues/850
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Tailing streams on closing a bidi stream.","articleBody":"The `close()` method of the bidi module, resets the fields only when the self.call field is not None. \n\n```\n def close(self):\n \"\"\"Closes the stream.\"\"\"\n if self.call is None:\n return\n\n self._request_queue.put(None)\n self.call.cancel()\n ....\n```\n\nThis is problematic, when an exception is raised in the `open()` and we do not set the self.call. This scenario leads to the stream not getting closed properly(half closed state from server). And we are able to observe these tailing streams(which are causing further issues for us) incase of reopens and other retries. Also observed that these tailing streams get closed automatically after some time(15-20 mins).\n\n\n#### Environment details\nUsing gcloud installation.\n\n - OS type and version: Ubuntu 22.04.5 LTS, Mac OS Sequoia 15.7.1. Not tested on other OS.\n - Python version: Bundled python which comes with gcloud.\n - `google-api-core` version: Using gcloud installation version with 545.0.0\n\nSharing further information internally(@pujawadare googler), as some information may be sensitive.\n","author":{"url":"https://github.com/pujawadare","@type":"Person","name":"pujawadare"},"datePublished":"2025-10-28T14:11:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/850/python-api-core/issues/850"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5b6e6ea6-89ac-a3fe-38d6-b32fcdc2c18e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B0E2:30B552:471BD0:6866B3:6A4E0AD6 |
| html-safe-nonce | cf5e92eb3fbede8cdf769b290cb15c4778dd4cafa90aa22deacf413a51346eb6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMEUyOjMwQjU1Mjo0NzFCRDA6Njg2NkIzOjZBNEUwQUQ2IiwidmlzaXRvcl9pZCI6IjgyMTIyMTMyMDk2MDU0NzUwMzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 68d4e2d056d3df7b437df640a8e6fe89d4f0c530308cfbdb44dd6075590a4e1d |
| hovercard-subject-tag | issue:3561775309 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-api-core/850/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cf312b8149c06c4f8d3329b7b128d162a760c3cdc5a5af1c58e11d06de8f32de/googleapis/python-api-core/issues/850 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cf312b8149c06c4f8d3329b7b128d162a760c3cdc5a5af1c58e11d06de8f32de/googleapis/python-api-core/issues/850 |
| og:image:alt | The close() method of the bidi module, resets the fields only when the self.call field is not None. def close(self): """Closes the stream.""" if self.call is None: return self._request_queue.put(No... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pujawadare |
| hostname | github.com |
| expected-hostname | github.com |
| None | df0492960db29b4938cb72070351d6b1d0c6c0767b27ceb8394bbf4fcc0223c6 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-api-core git https://github.com/googleapis/python-api-core.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992456 |
| octolytics-dimension-repository_nwo | googleapis/python-api-core |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992456 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-api-core |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 51470c353b8a1f52a88d3e3cc2014b17ab8cc1ce |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width