Title: Issue using Protocol as a base class with Python 3.5.2 · Issue #734 · python/typing · GitHub
Open Graph Title: Issue using Protocol as a base class with Python 3.5.2 · Issue #734 · python/typing
X Title: Issue using Protocol as a base class with Python 3.5.2 · Issue #734 · python/typing
Description: Python: 3.5.2 OS: macOS Mojave Seems that _generic_new implementation from typing_extensions module is outdated or incorrect. When typing_extensions relies on its own implementation of _generic_new I get the following error. Script to re...
Open Graph Description: Python: 3.5.2 OS: macOS Mojave Seems that _generic_new implementation from typing_extensions module is outdated or incorrect. When typing_extensions relies on its own implementation of _generic_new...
X Description: Python: 3.5.2 OS: macOS Mojave Seems that _generic_new implementation from typing_extensions module is outdated or incorrect. When typing_extensions relies on its own implementation of _generic_new...
Opengraph URL: https://github.com/python/typing/issues/734
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Issue using Protocol as a base class with Python 3.5.2","articleBody":"Python: 3.5.2\r\nOS: macOS Mojave\r\n\r\nSeems that `_generic_new` implementation from `typing_extensions` module is outdated or incorrect. When `typing_extensions` relies on its own implementation of `_generic_new` I get the following error.\r\n\r\nScript to reproduce:\r\n```\r\nimport abc\r\nfrom typing_extensions import Protocol, runtime_checkable\r\n\r\n\r\n@runtime_checkable\r\nclass Proto(Protocol):\r\n @abc.abstractmethod\r\n def foo(self):\r\n pass\r\n\r\n\r\nclass SomeClass(Proto):\r\n def __init__(self, some_arg):\r\n pass\r\n\r\n def foo(self):\r\n return 5\r\n\r\n\r\nx = SomeClass(3)\r\n```\r\n\r\nTraceback:\r\n```\r\nTraceback (most recent call last):\r\n File \"/Users/dikobraz/repro.py\", line 20, in \u003cmodule\u003e\r\n x = SomeClass(3)\r\n File \"/Users/dikobraz/env-py-3.5-tf-2/lib/python3.5/site-packages/typing_extensions.py\", line 1357, in __new__\r\n return _generic_new(cls.__next_in_mro__, cls, *args, **kwds)\r\n File \"/Users/dikobraz/env-py-3.5-tf-2/lib/python3.5/site-packages/typing_extensions.py\", line 87, in _generic_new\r\n return base_cls.__new__(cls, *args, **kwargs)\r\nTypeError: object() takes no parameters\r\n```\r\n\r\nIn debugger:\r\n\u003cimg width=\"1035\" alt=\"Screen Shot 2020-06-23 at 6 47 37 PM\" src=\"https://user-images.githubusercontent.com/2404864/85487864-381caa00-b582-11ea-94d1-15b79656ad7e.png\"\u003e","author":{"url":"https://github.com/Slonegg","@type":"Person","name":"Slonegg"},"datePublished":"2020-06-24T01:47:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/734/typing/issues/734"}
| 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:cbfbe701-7cd0-82f3-073c-06a7584b551b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A27E:A2022:23C880:32992D:6A4E682C |
| html-safe-nonce | cb5ea8b691f5a4a2cc99a616160257e2ce3ce461a63446bae417e238dd41dfa4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjdFOkEyMDIyOjIzQzg4MDozMjk5MkQ6NkE0RTY4MkMiLCJ2aXNpdG9yX2lkIjoiNDIwOTc4Nzc4ODM4MjMzMjk3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b46c622822abbb9a0a9cda4ae4db0b1c64c75198d71df0d9da7b2dbde8d06a32 |
| hovercard-subject-tag | issue:644256368 |
| 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/typing/734/issue_layout |
| twitter:image | https://opengraph.githubassets.com/57659a22d81e3d0fbddfd26abe5d645a7b752ccff5efa389a2489d723a3e86fa/python/typing/issues/734 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/57659a22d81e3d0fbddfd26abe5d645a7b752ccff5efa389a2489d723a3e86fa/python/typing/issues/734 |
| og:image:alt | Python: 3.5.2 OS: macOS Mojave Seems that _generic_new implementation from typing_extensions module is outdated or incorrect. When typing_extensions relies on its own implementation of _generic_new... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Slonegg |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typing git https://github.com/python/typing.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 24604008 |
| octolytics-dimension-repository_nwo | python/typing |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24604008 |
| octolytics-dimension-repository_network_root_nwo | python/typing |
| 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 | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width