Hacker News new | ask | show | jobs
by slig 754 days ago
What's the process for adding these to the Python's stdlib? Is it even possible to adopt a whole library such as this one?
3 comments

Yes. Unittest.mock used to be a third-party library.

For an idea of the process followed, look up PEP417 (Python Enhancement Proposal.

Thank you!
It’s possible but tends not to be common for a multitude of reasons. The biggest issue is library updates become synced to version patch updates, which doesn’t provide a lot of flexibility. A package would have to be exceptionally stable to be a reasonable candidate.
It must be possible, because the 'dataclasses' library used to be third-party.
That’s not actually true. While dataclasses to most of its inspiration from attrs, there are many features of attrs that were deliberately not implemented in dataclasses, just so it could “fit” in the stdlib.

Or maybe you mean the backport of dataclasses to 3.6 that is available on PyPI? That actually came after dataclasses was added to 3.7.

Source: I wrote dataclasses.

> I wrote dataclasses.

Much appreciated!

Thank you for correcting me! I must be thinking of another library