From 54a3ade4011c8cc9f6c0e9d04d20ab10117475bf Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Wed, 21 Jun 2023 08:18:32 -0700 Subject: [PATCH 1/2] README improvements - The mention of testing in the README (which is what appears on PyPI) felt out of place. Replace it with a more general link to CONTRIBUTING. - Mention why typing-extensions is special. - Add discussion of stub files to CONTRIBUTING. --- CONTRIBUTING.md | 8 ++++++++ README.md | 10 +++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 87aaccea..b1c14f26 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,6 +26,14 @@ Starting with version 4.0.0, `typing_extensions` uses [Semantic Versioning](https://semver.org/). See the documentation for more detail. +# Type stubs + +A stub file for `typing_extensions` is maintained +[in typeshed](https://github.com/python/typeshed/blob/main/stdlib/typing_extensions.pyi). +Because of the special status that `typing_extensions` holds in the ecosystem, +the stubs are placed in the standard library in typeshed and distributed as +part of the stubs bundled with individual type checkers. + # Running tests Testing `typing_extensions` can be tricky because many development tools depend on diff --git a/README.md b/README.md index ddc11882..efd3a824 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,10 @@ The `typing_extensions` module serves two related purposes: - Enable experimentation with new type system PEPs before they are accepted and added to the `typing` module. +`typing_extensions` is treated specially by static type checkers such as +mypy and pyright. Objects defined in `typing_extensions` are treated the same +way as equivalent forms in `typing`. + `typing_extensions` uses [Semantic Versioning](https://semver.org/). The major version will be incremented only for backwards-incompatible changes. @@ -29,7 +33,7 @@ where `x.y` is the first version that includes all features you need. See [the documentation](https://typing-extensions.readthedocs.io/en/latest/#) for a complete listing of module contents. -## Running tests +## Contributing -To run tests, navigate into the `src/` directory and run -`test_typing_extensions.py`. +See [CONTRIBUTING.md](https://github.com/python/typing_extensions/blob/main/CONTRIBUTING.md) +for how to contribute to `typing_extensions`. From a67ca946dce439b35a662b942e386c0a475a9c2e Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Wed, 21 Jun 2023 08:23:04 -0700 Subject: [PATCH 2/2] Update CONTRIBUTING.md Co-authored-by: Alex Waygood --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b1c14f26..9d07313e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,7 +30,7 @@ for more detail. A stub file for `typing_extensions` is maintained [in typeshed](https://github.com/python/typeshed/blob/main/stdlib/typing_extensions.pyi). -Because of the special status that `typing_extensions` holds in the ecosystem, +Because of the special status that `typing_extensions` holds in the typing ecosystem, the stubs are placed in the standard library in typeshed and distributed as part of the stubs bundled with individual type checkers.