Skip to content

Commit 46dc081

Browse files
committed
Remove support for Python 3.7 (fixes bpython#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

doc/sphinx/source/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ the time of day.
1717
Getting your development environment set up
1818
-------------------------------------------
1919

20-
bpython supports Python 3.7 and newer. The code is compatible with all
20+
bpython supports Python 3.8 and newer. The code is compatible with all
2121
supported versions.
2222

2323
Using a virtual environment is probably a good idea. Create a virtual

doc/sphinx/source/releases.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ A checklist to perform some manual tests before a release:
4545

4646
Check that all of the following work before a release:
4747

48-
* Runs under Python 3.7 - 3.9
48+
* Runs under Python 3.8 - 3.11
4949
* Save
5050
* Rewind
5151
* Pastebin

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66

77
[tool.black]
88
line-length = 80
9-
target_version = ["py37"]
9+
target_version = ["py38"]
1010
include = '\.pyi?$'
1111
exclude = '''
1212
/(

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
Pygments
2-
backports.cached-property; python_version < "3.8"
32
curtsies >=0.4.0
43
cwcwidth
54
greenlet

setup.cfg

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ classifiers =
1313
Programming Language :: Python :: 3
1414

1515
[options]
16-
python_requires = >=3.7
16+
python_requires = >=3.8
1717
packages =
1818
bpython
1919
bpython.curtsiesfrontend
@@ -22,14 +22,12 @@ packages =
2222
bpython.translations
2323
bpdb
2424
install_requires =
25-
backports.cached-property; python_version < "3.8"
2625
curtsies >=0.4.0
2726
cwcwidth
2827
greenlet
2928
pygments
3029
pyxdg
3130
requests
32-
typing-extensions; python_version < "3.8"
3331

3432
[options.extras_require]
3533
clipboard = pyperclip

0 commit comments

Comments
 (0)