Skip to content

Commit 7198c63

Browse files
authored
Add .gitignore, .editorconfig, CONTRIBUTING.md (#43)
See https://github.com/python/typing/commits/master/CONTRIBUTING.md for a full history of that file.
1 parent abe4390 commit 7198c63

File tree

3 files changed

+84
-0
lines changed

3 files changed

+84
-0
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*.{py,pyi,rst,md,yml,yaml,toml,json}]
4+
trim_trailing_whitespace = true
5+
insert_final_newline = true
6+
indent_style = space
7+
8+
[*.{py,pyi,toml,json}]
9+
indent_size = 4
10+
11+
[*.{yml,yaml}]
12+
indent_size = 2

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
MANIFEST
2+
3+
__pycache__/
4+
build/
5+
dist/
6+
tmp/
7+
venv*/
8+
9+
.cache/
10+
.idea/
11+
.tox/
12+
.venv*/
13+
.vscode/
14+
15+
*.swp
16+
*.pyc
17+
*.egg-info/

CONTRIBUTING.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
Code in this repository should follow CPython's style guidelines and
2+
contributors need to sign the PSF Contributor Agreement.
3+
4+
# typing\_extensions
5+
6+
The `typing_extensions` module provides a way to access new features from the standard
7+
library `typing` module in older versions of Python. For example, Python 3.10 adds
8+
`typing.TypeGuard`, but users of older versions of Python can use `typing_extensions` to
9+
use `TypeGuard` in their code even if they are unable to upgrade to Python 3.10.
10+
11+
If you contribute the runtime implementation of a new `typing` feature to CPython, you
12+
are encouraged to also implement the feature in `typing_extensions`. Because the runtime
13+
implementation of much of the infrastructure in the `typing` module has changed over
14+
time, this may require different code for some older Python versions.
15+
16+
`typing_extensions` may also include experimental features that are not yet part of the
17+
standard library, so that users can experiment with them before they are added to the
18+
standard library. Such features should ideally already be specified in a PEP or draft
19+
PEP.
20+
21+
`typing_extensions` supports Python versions 3.7 and up.
22+
23+
# Versioning scheme
24+
25+
Starting with version 4.0.0, `typing_extensions` uses
26+
[Semantic Versioning](https://semver.org/). The major version is incremented for all
27+
backwards-incompatible changes.
28+
29+
# Workflow for PyPI releases
30+
31+
- Ensure that GitHub Actions reports no errors.
32+
33+
- Update the version number in `typing_extensions/pyproject.toml` and in
34+
`typing_extensions/CHANGELOG.md`.
35+
36+
- Make sure your environment is up to date
37+
38+
- `git checkout master`
39+
- `git pull`
40+
- `python -m pip install --upgrade build twine`
41+
42+
- Build the source and wheel distributions:
43+
44+
- `cd typing_extensions`
45+
- `rm -rf dist/`
46+
- `python -m build .`
47+
48+
- Install the built distributions locally and test (if you were using `tox`, you already
49+
tested the source distribution).
50+
51+
- Run `twine upload dist/*`.
52+
53+
- Tag the release. The tag should be just the version number, e.g. `4.1.1`.
54+
55+
- `git push --tags`

0 commit comments

Comments
 (0)