Skip to content

Commit 46dc081

Browse files
committed
Remove support for Python 3.7 (fixes #940)
1 parent 29d6f87 commit 46dc081

File tree

15 files changed

+29
-61
lines changed

15 files changed

+29
-61
lines changed

.github/workflows/build.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,16 @@ on:
1010
jobs:
1111
build:
1212
runs-on: ubuntu-latest
13-
continue-on-error: ${{ matrix.python-version == 'pypy-3.7' }}
13+
continue-on-error: ${{ matrix.python-version == 'pypy-3.8' }}
1414
strategy:
1515
fail-fast: false
1616
matrix:
1717
python-version:
18-
- "3.7"
1918
- "3.8"
2019
- "3.9"
2120
- "3.10"
2221
- "3.11"
23-
- "pypy-3.7"
22+
- "pypy-3.8"
2423
steps:
2524
- uses: actions/checkout@v3
2625
with:

bpython/_typing_compat.py

Lines changed: 0 additions & 33 deletions
This file was deleted.

bpython/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@
6969
Collection,
7070
Dict,
7171
TYPE_CHECKING,
72+
Literal,
7273
)
7374

7475
if TYPE_CHECKING:
7576
from _curses import _CursesWindow
7677

77-
from ._typing_compat import Literal
7878
import unicodedata
7979
from dataclasses import dataclass
8080

bpython/curtsies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
Generator,
2929
List,
3030
Optional,
31+
Protocol,
3132
Sequence,
3233
Tuple,
3334
Union,
3435
)
35-
from ._typing_compat import Protocol
3636

3737
logger = logging.getLogger(__name__)
3838

bpython/curtsiesfrontend/_internal.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222

2323
import pydoc
2424
from types import TracebackType
25-
from typing import Optional, Type
26-
from .._typing_compat import Literal
25+
from typing import Optional, Type, Literal
2726

2827
from .. import _internal
2928

bpython/curtsiesfrontend/repl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
Iterable,
1818
Dict,
1919
List,
20+
Literal,
2021
Optional,
2122
Sequence,
2223
Tuple,
2324
Type,
2425
Union,
2526
)
26-
from .._typing_compat import Literal
2727

2828
import greenlet
2929
from curtsies import (

bpython/filelock.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
# THE SOFTWARE.
2222

23-
from typing import Optional, Type, IO
24-
from ._typing_compat import Literal
23+
from typing import Optional, Type, IO, Literal
2524
from types import TracebackType
2625

2726
has_fcntl = True

bpython/inspection.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,17 @@
2626
import pydoc
2727
import re
2828
from dataclasses import dataclass
29-
from typing import Any, Callable, Optional, Type, Dict, List, ContextManager
29+
from typing import (
30+
Any,
31+
Callable,
32+
Optional,
33+
Type,
34+
Dict,
35+
List,
36+
ContextManager,
37+
Literal,
38+
)
3039
from types import MemberDescriptorType, TracebackType
31-
from ._typing_compat import Literal
3240

3341
from pygments.token import Token
3442
from pygments.lexers import Python3Lexer

bpython/paste.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,14 @@
2222

2323
import errno
2424
import subprocess
25-
from typing import Optional, Tuple
25+
from typing import Optional, Tuple, Protocol
2626
from urllib.parse import urljoin, urlparse
2727

2828
import requests
2929
import unicodedata
3030

3131
from .config import getpreferredencoding
3232
from .translations import _
33-
from ._typing_compat import Protocol
3433

3534

3635
class PasteFailed(Exception):

bpython/repl.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@
4040
from pathlib import Path
4141
from types import ModuleType, TracebackType
4242
from typing import (
43+
Any,
44+
Callable,
45+
Dict,
4346
Iterable,
44-
cast,
4547
List,
46-
Tuple,
47-
Any,
48+
Literal,
4849
Optional,
50+
TYPE_CHECKING,
51+
Tuple,
4952
Type,
5053
Union,
51-
Callable,
52-
Dict,
53-
TYPE_CHECKING,
54+
cast,
5455
)
55-
from ._typing_compat import Literal
5656

5757
from pygments.lexers import Python3Lexer
5858
from pygments.token import Token, _TokenType

0 commit comments

Comments
 (0)