Issue38008
Created on 2019-09-02 11:44 by divijrajkumar, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 15647 | merged | divijrajkumar, 2019-09-02 14:57 | |
| PR 16021 | merged | miss-islington, 2019-09-12 10:14 | |
| Messages (5) | |||
|---|---|---|---|
| msg350988 - (view) | Author: Divij Rajkumar (divijrajkumar) * | Date: 2019-09-02 11:47 | |
Reported this initially on github - https://github.com/python/typing/pull/650 The problem is in the typing code that checks if any of the parent classes for a Protocol are builtin protocols. The code today maintains a whitelist of builtin protocols that are okay to be subclassed, but expects them all to live within the 'collections.abc' module. This means 'typing.ContextManager' and 'typing.AsyncContextManager' cannot be subclassed, even though those protocols are listing in the whitelist. |
|||
| msg350989 - (view) | Author: Divij Rajkumar (divijrajkumar) * | Date: 2019-09-02 11:57 | |
I'd like to take a stab at putting up a patch for this but I've never contributed anything to Python before, so I'll have a read through the contribution docs and put up a PR. |
|||
| msg351000 - (view) | Author: Ivan Levkivskyi (levkivskyi) * | Date: 2019-09-02 13:39 | |
> I'd like to take a stab at putting up a patch for this Great, thanks! Go ahead and try it. |
|||
| msg352088 - (view) | Author: Ivan Levkivskyi (levkivskyi) * | Date: 2019-09-12 10:13 | |
New changeset 692a0dc91597b7fb350383b633dc4d044cbd360e by Ivan Levkivskyi (Divij Rajkumar) in branch 'master': bpo-38008: Move builtin protocol whitelist to mapping instead of list (GH-15647) https://github.com/python/cpython/commit/692a0dc91597b7fb350383b633dc4d044cbd360e |
|||
| msg352096 - (view) | Author: miss-islington (miss-islington) | Date: 2019-09-12 10:32 | |
New changeset 52baf90a74f3a4573f4266bb4ca8569534db42a9 by Miss Islington (bot) in branch '3.8': bpo-38008: Move builtin protocol whitelist to mapping instead of list (GH-15647) https://github.com/python/cpython/commit/52baf90a74f3a4573f4266bb4ca8569534db42a9 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:19 | admin | set | github: 82189 |
| 2019-09-12 11:59:49 | levkivskyi | set | status: open -> closed stage: patch review -> resolved resolution: fixed components: + Library (Lib) versions: - Python 2.7, Python 3.5, Python 3.6, Python 3.7 |
| 2019-09-12 10:32:40 | miss-islington | set | nosy:
+ miss-islington messages: + msg352096 |
| 2019-09-12 10:14:03 | miss-islington | set | pull_requests: + pull_request15644 |
| 2019-09-12 10:13:54 | levkivskyi | set | messages: + msg352088 |
| 2019-09-02 14:57:45 | divijrajkumar | set | keywords:
+ patch stage: patch review pull_requests: + pull_request15313 |
| 2019-09-02 13:39:28 | levkivskyi | set | nosy:
+ levkivskyi messages: + msg351000 |
| 2019-09-02 11:57:37 | divijrajkumar | set | messages: + msg350989 |
| 2019-09-02 11:47:29 | divijrajkumar | set | messages: + msg350988 |
| 2019-09-02 11:44:10 | divijrajkumar | create | |