Skip to content

Drop support for Python 2 #8272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ per-file-ignores =
# F811 redefinition of unused '...'
stdlib/typing.pyi: E301, E302, E305, E501, E701, E741, F401, F403, F405, F811, F822, Y034, Y037

exclude = .venv*,.git,*_pb2.pyi,stdlib/@python2/*
exclude = .venv*,.git,*_pb2.pyi
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
strategy:
matrix:
platform: ["linux", "win32", "darwin"]
python-version: ["2.7", "3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
fail-fast: false
steps:
- uses: actions/checkout@v3
Expand Down
5 changes: 1 addition & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,11 @@ flake8 .
### Standard library stubs

The `stdlib` directory contains stubs for modules in the
Python 3 standard library — which
Python standard library — which
includes pure Python modules, dynamically loaded extension modules,
hard-linked extension modules, and the builtins. The `VERSIONS` file lists
the versions of Python where the module is available.

Stubs for Python 2 are available in the `stdlib/@python2` subdirectory.
Modules that are only available for Python 2 are not listed in `VERSIONS`.

### Third-party library stubs

We accept stubs for third-party packages into typeshed as long as:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ contributors can be found in [CONTRIBUTING.md](CONTRIBUTING.md). **Please read
it before submitting pull requests; do not report issues with annotations to
the project the stubs are for, but instead report them here to typeshed.**

Typeshed supports Python versions 2.7 and 3.7 and up.
Typeshed supports Python versions 3.7 and up.

## Using

Expand Down
3 changes: 0 additions & 3 deletions pyrightconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"stubs",
"test_cases"
],
"exclude": [
"**/@python2"
],
"typeCheckingMode": "basic",
"strictListInference": true,
"strictDictionaryInference": true,
Expand Down
1 change: 0 additions & 1 deletion pyrightconfig.stricter.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"test_cases"
],
"exclude": [
"**/@python2",
"stdlib/distutils/command",
"stdlib/lib2to3/refactor.pyi",
"stdlib/multiprocessing/reduction.pyi",
Expand Down
41 changes: 0 additions & 41 deletions stdlib/@python2/BaseHTTPServer.pyi

This file was deleted.

5 changes: 0 additions & 5 deletions stdlib/@python2/CGIHTTPServer.pyi

This file was deleted.

95 changes: 0 additions & 95 deletions stdlib/@python2/ConfigParser.pyi

This file was deleted.

40 changes: 0 additions & 40 deletions stdlib/@python2/Cookie.pyi

This file was deleted.

28 changes: 0 additions & 28 deletions stdlib/@python2/HTMLParser.pyi

This file was deleted.

29 changes: 0 additions & 29 deletions stdlib/@python2/Queue.pyi

This file was deleted.

14 changes: 0 additions & 14 deletions stdlib/@python2/SimpleHTTPServer.pyi

This file was deleted.

Loading