Title: v2.3.0 breaks local testing with the pubsub-emulator · Issue #290 · googleapis/python-pubsub · GitHub
Open Graph Title: v2.3.0 breaks local testing with the pubsub-emulator · Issue #290 · googleapis/python-pubsub
X Title: v2.3.0 breaks local testing with the pubsub-emulator · Issue #290 · googleapis/python-pubsub
Description: Environment details OS type and version: MacOS 10.15.7 pipenv version: pipenv, version 2020.11.15 google-cloud-pubsub version: 2.3.0 docker Docker version 20.10.2, build 2291f61 Pubsub emulator image: google/cloud-sdk:327.0.0-emulators #...
Open Graph Description: Environment details OS type and version: MacOS 10.15.7 pipenv version: pipenv, version 2020.11.15 google-cloud-pubsub version: 2.3.0 docker Docker version 20.10.2, build 2291f61 Pubsub emulator ima...
X Description: Environment details OS type and version: MacOS 10.15.7 pipenv version: pipenv, version 2020.11.15 google-cloud-pubsub version: 2.3.0 docker Docker version 20.10.2, build 2291f61 Pubsub emulator ima...
Opengraph URL: https://github.com/googleapis/python-pubsub/issues/290
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"v2.3.0 breaks local testing with the pubsub-emulator","articleBody":"#### Environment details\r\n\r\n - OS type and version: MacOS 10.15.7\r\n - pipenv version: pipenv, version 2020.11.15\r\n - `google-cloud-pubsub` version: 2.3.0\r\n - docker Docker version 20.10.2, build 2291f61\r\n - Pubsub emulator image: google/cloud-sdk:327.0.0-emulators\r\n \r\n```\r\n# ./Pipfile\r\n\r\n[[source]]\r\nurl = \"https://pypi.org/simple\"\r\nverify_ssl = true\r\nname = \"pypi\"\r\n\r\n[packages]\r\ngoogle-cloud-pubsub = \"*\"\r\n\r\n[dev-packages]\r\nwatchgod = \"*\"\r\nautopep8 = \"*\"\r\npytest = \"*\"\r\n\r\n[requires]\r\npython_version = \"3.8\"\r\n\r\n```\r\n\r\n```\r\n# ./.env\r\n\r\nPUBSUB_EMULATOR_HOST=\"localhost:8087\"\r\nPUBSUB_PROJECT_ID=\"myproject\"\r\n```\r\n \r\n#### Steps to reproduce\r\n\r\n 1. start local emulator with docker\r\n```\r\n❯ docker run --rm --name local-pubsub-emulator -p 8087:8087 google/cloud-sdk:327.0.0-emulators gcloud beta emulators pubsub start --project=myproject --host-port=0.0.0.0:8087\r\n```\r\n 2. run create topic script\r\n```\r\n❯ pipenv run python ./create.py\r\n```\r\n\r\n#### Code example\r\n\r\n```python\r\n# ./create.py\r\n\r\ndef create_topic(project_id, topic_id):\r\n \"\"\"Create a new Pub/Sub topic.\"\"\"\r\n from google.cloud import pubsub_v1\r\n import os\r\n\r\n publisher = pubsub_v1.PublisherClient()\r\n topic_path = publisher.topic_path(project_id, topic_id)\r\n\r\n topic = publisher.create_topic(request={\"name\": topic_path})\r\n\r\n print(\"Created topic: {}\".format(topic.name))\r\n\r\n\r\nif __name__ == '__main__':\r\n print('try to create a topic...')\r\n create_topic('myproject', 'mytopic')\r\n```\r\n\r\n#### Stack trace\r\n```\r\n❯ pipenv run python ./create.py\r\nLoading .env environment variables...\r\ntry to create a topic...\r\nE0210 15:39:00.548809000 4527218112 ssl_transport_security.cc:1458] Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.\r\nE0210 15:39:00.556706000 4527218112 ssl_transport_security.cc:1458] Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.\r\nE0210 15:39:01.966730000 4527218112 ssl_transport_security.cc:1458] Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.\r\n...\r\n```\r\n\r\n#### Workaround\r\n\r\nDowngrade to `google-cloud-pubsub~=2.2.0` and everything works fine.\r\n\r\n```\r\n❯ pipenv run python ./create.py\r\nLoading .env environment variables...\r\ntry to create a topic...\r\nCreated topic: projects/myproject/topics/mytopic\r\n```","author":{"url":"https://github.com/tibohei-tamedia","@type":"Person","name":"tibohei-tamedia"},"datePublished":"2021-02-10T14:47:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/290/python-pubsub/issues/290"}
| 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:6bc9df2d-f2e3-74a2-f58f-f490aa940774 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA62:1C6E1F:24C5AB:30AD6F:6A52C795 |
| html-safe-nonce | ee2600fe36f5d8691cdfc3542ea1ddcad53aaad09365ca7c53434187e0c22d3b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTYyOjFDNkUxRjoyNEM1QUI6MzBBRDZGOjZBNTJDNzk1IiwidmlzaXRvcl9pZCI6IjYxNDg5ODM1Nzc0NDM1NTIyMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | da8b942093bdf17dc6adffaa49e6142b58951ccecf16af0c0cd79d7dbe7a29aa |
| hovercard-subject-tag | issue:805579721 |
| 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-pubsub/290/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ab9fafcf64671b8c2d287847c0f66ca78eea3f6969380bc8c3f83fc3534fa6b7/googleapis/python-pubsub/issues/290 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ab9fafcf64671b8c2d287847c0f66ca78eea3f6969380bc8c3f83fc3534fa6b7/googleapis/python-pubsub/issues/290 |
| og:image:alt | Environment details OS type and version: MacOS 10.15.7 pipenv version: pipenv, version 2020.11.15 google-cloud-pubsub version: 2.3.0 docker Docker version 20.10.2, build 2291f61 Pubsub emulator ima... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tibohei-tamedia |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-pubsub git https://github.com/googleapis/python-pubsub.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992581 |
| octolytics-dimension-repository_nwo | googleapis/python-pubsub |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992581 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-pubsub |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width