Message414705
| Author | Steven Silvester |
|---|---|
| Recipients | AlexWaygood, FHTMitchell, JelleZijlstra, Steven Silvester, dlukes, eric.smith, graingert, gvanrossum, kj, levkivskyi, python-dev, rhettinger, serhiy.storchaka, sobolevn |
| Date | 2022-03-07.22:41:40 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1646692900.34.0.14753672376.issue43923@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
The use case that prompted https://github.com/python/cpython/pull/31679 is that we are adding typings to `PyMongo`. We are late to using typings, because we only recently dropped Python 2.7 support. We have an existing options class that subclasses `NamedTuple`. We would like to make that class `Generic`, but are currently blocked. Our current workaround is to create a separate stub file that uses `class CodecOptions(Tuple, Generic[T])` and explicitly re-declares the `NamedTuple` API. Switching to `dataclass` would be disruptive, since we still support Python 3.6 and only rely on the standard library. We would also require a major version update since it would be an API change. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-03-07 22:41:40 | Steven Silvester | set | recipients: + Steven Silvester, gvanrossum, rhettinger, eric.smith, python-dev, serhiy.storchaka, graingert, levkivskyi, dlukes, JelleZijlstra, FHTMitchell, sobolevn, kj, AlexWaygood |
| 2022-03-07 22:41:40 | Steven Silvester | set | messageid: <1646692900.34.0.14753672376.issue43923@roundup.psfhosted.org> |
| 2022-03-07 22:41:40 | Steven Silvester | link | issue43923 messages |
| 2022-03-07 22:41:40 | Steven Silvester | create | |