Title: HTTP20Adapter object has no attribute 'poolmanager' · Issue #306 · python-hyper/hyper · GitHub
Open Graph Title: HTTP20Adapter object has no attribute 'poolmanager' · Issue #306 · python-hyper/hyper
X Title: HTTP20Adapter object has no attribute 'poolmanager' · Issue #306 · python-hyper/hyper
Description: Using HTTP20Adapter with requests and closing the session (with context manager) results in attribute error. Usage: with requests.Session() as session: session.mount(current_app.config['APNS_SERVER'], hyper.contrib.HTTP20Adapter()) respo...
Open Graph Description: Using HTTP20Adapter with requests and closing the session (with context manager) results in attribute error. Usage: with requests.Session() as session: session.mount(current_app.config['APNS_SERVER...
X Description: Using HTTP20Adapter with requests and closing the session (with context manager) results in attribute error. Usage: with requests.Session() as session: session.mount(current_app.config['APNS_SE...
Opengraph URL: https://github.com/python-hyper/hyper/issues/306
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"HTTP20Adapter object has no attribute 'poolmanager'","articleBody":"Using `HTTP20Adapter` with `requests` and closing the session (with context manager) results in attribute error.\r\n\r\nUsage:\r\n```python\r\nwith requests.Session() as session:\r\n session.mount(current_app.config['APNS_SERVER'], hyper.contrib.HTTP20Adapter())\r\n response = session.post(...)\r\n response.raise_for_status()\r\n```\r\n\r\nError:\r\n```\r\n 118 print(response.request.headers)\r\n 119 else:\r\n--\u003e 120 print(response.headers[b'apns-id'])\r\n 121 \r\n 122 # try:\r\n\r\nblaze/.venv/lib/python3.5/site-packages/requests/sessions.py in __exit__(self, *args)\r\n 367 \r\n 368 def __exit__(self, *args):\r\n--\u003e 369 self.close()\r\n 370 \r\n 371 def prepare_request(self, request):\r\n\r\nblaze/.venv/lib/python3.5/site-packages/requests/sessions.py in close(self)\r\n 688 \"\"\"Closes all adapters and as such the session\"\"\"\r\n 689 for v in self.adapters.values():\r\n--\u003e 690 v.close()\r\n 691 \r\n 692 def mount(self, prefix, adapter):\r\n\r\nblaze/.venv/lib/python3.5/site-packages/requests/adapters.py in close(self)\r\n 304 which closes any pooled connections.\r\n 305 \"\"\"\r\n--\u003e 306 self.poolmanager.clear()\r\n 307 for proxy in self.proxy_manager.values():\r\n 308 proxy.clear()\r\n\r\nAttributeError: 'HTTP20Adapter' object has no attribute 'poolmanager'\r\n```\r\n\r\nPackages:\r\n```\r\nh2 (2.6.0.dev0)\r\nhpack (2.3.0)\r\nhyper (0.7.0)\r\nhyperframe (3.2.0)\r\nrequests (2.12.1)\r\n```","author":{"url":"https://github.com/allanlei","@type":"Person","name":"allanlei"},"datePublished":"2017-02-09T08:52:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/306/hyper/issues/306"}
| 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:7849d6b4-5e44-61cc-1079-ad05e06cc274 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C0D4:FE603:DF3541:122B87F:696B08A9 |
| html-safe-nonce | 9bbebce89a966fbdff6341772266b46130a3770333b40c03245a2ea09ce26da1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMEQ0OkZFNjAzOkRGMzU0MToxMjJCODdGOjY5NkIwOEE5IiwidmlzaXRvcl9pZCI6IjkwNDkyMDg3MTgxNzg4NDY4ODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | deacc525df244ef1f843b25c9b836c4b327e053f76d3b7f263f940f5893544eb |
| hovercard-subject-tag | issue:206440839 |
| 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/python-hyper/hyper/306/issue_layout |
| twitter:image | https://opengraph.githubassets.com/92fa329ffaf0690ea3361b2c37105d3b4aabb83ba96e5ff2f323473ed499d707/python-hyper/hyper/issues/306 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/92fa329ffaf0690ea3361b2c37105d3b4aabb83ba96e5ff2f323473ed499d707/python-hyper/hyper/issues/306 |
| og:image:alt | Using HTTP20Adapter with requests and closing the session (with context manager) results in attribute error. Usage: with requests.Session() as session: session.mount(current_app.config['APNS_SERVER... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | allanlei |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python-hyper/hyper git https://github.com/python-hyper/hyper.git |
| octolytics-dimension-user_id | 13035907 |
| octolytics-dimension-user_login | python-hyper |
| octolytics-dimension-repository_id | 16165969 |
| octolytics-dimension-repository_nwo | python-hyper/hyper |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16165969 |
| octolytics-dimension-repository_network_root_nwo | python-hyper/hyper |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width