Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf5d6da9

Browse files
committed
Drop support for Python 3.8
1 parent839145e commitf5d6da9

File tree

6 files changed

+48
-68
lines changed

6 files changed

+48
-68
lines changed

‎.github/workflows/build.yaml‎

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,53 +4,52 @@ on:
44
push:
55
pull_request:
66
schedule:
7-
# run at 7:00 on the first of every month
8-
-cron:'0 7 1 * *'
7+
# run at 7:00 on the first of every month
8+
-cron:"0 7 1 * *"
99

1010
jobs:
1111
build:
1212
runs-on:ubuntu-latest
13-
continue-on-error:${{ matrix.python-version == 'pypy-3.8' }}
13+
continue-on-error:${{ matrix.python-version == 'pypy-3.9' }}
1414
strategy:
1515
fail-fast:false
1616
matrix:
1717
python-version:
18-
-"3.8"
19-
-"3.9"
20-
-"3.10"
21-
-"3.11"
22-
-"3.12"
23-
-"3.13"
24-
-"pypy-3.8"
18+
-"3.9"
19+
-"3.10"
20+
-"3.11"
21+
-"3.12"
22+
-"3.13"
23+
-"pypy-3.9"
2524
steps:
26-
-uses:actions/checkout@v4
27-
with:
28-
fetch-depth:0
29-
-name:Set up Python ${{ matrix.python-version }}
30-
uses:actions/setup-python@v5
31-
with:
32-
python-version:${{ matrix.python-version }}
33-
-name:Install dependencies
34-
run:|
35-
python -m pip install --upgrade pip
36-
pip install -r requirements.txt
37-
pip install urwid twisted watchdog "jedi >=0.16" babel "sphinx >=1.5"
38-
pip install pytest pytest-cov numpy
39-
-name:Build with Python ${{ matrix.python-version }}
40-
run:|
41-
python setup.py build
42-
-name:Build documentation
43-
run:|
44-
python setup.py build_sphinx
45-
python setup.py build_sphinx_man
46-
-name:Test with pytest
47-
run:|
48-
pytest --cov=bpython --cov-report=xml -v
49-
-name:Upload coverage to Codecov
50-
uses:codecov/codecov-action@v5
51-
env:
52-
PYTHON_VERSION:${{ matrix.python-version }}
53-
with:
54-
file:./coverage.xml
55-
env_vars:PYTHON_VERSION
56-
if:${{ always() }}
25+
-uses:actions/checkout@v4
26+
with:
27+
fetch-depth:0
28+
-name:Set up Python ${{ matrix.python-version }}
29+
uses:actions/setup-python@v5
30+
with:
31+
python-version:${{ matrix.python-version }}
32+
-name:Install dependencies
33+
run:|
34+
python -m pip install --upgrade pip
35+
pip install -r requirements.txt
36+
pip install urwid twisted watchdog "jedi >=0.16" babel "sphinx >=1.5"
37+
pip install pytest pytest-cov numpy
38+
-name:Build with Python ${{ matrix.python-version }}
39+
run:|
40+
python setup.py build
41+
-name:Build documentation
42+
run:|
43+
python setup.py build_sphinx
44+
python setup.py build_sphinx_man
45+
-name:Test with pytest
46+
run:|
47+
pytest --cov=bpython --cov-report=xml -v
48+
-name:Upload coverage to Codecov
49+
uses:codecov/codecov-action@v5
50+
env:
51+
PYTHON_VERSION:${{ matrix.python-version }}
52+
with:
53+
file:./coverage.xml
54+
env_vars:PYTHON_VERSION
55+
if:${{ always() }}

‎bpython/simpleeval.py‎

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,9 @@
3333
from .importlineasline_properties
3434
from .inspectionimportgetattr_safe
3535

36-
_is_py38=sys.version_info[:2]>= (3,8)
37-
_is_py39=sys.version_info[:2]>= (3,9)
38-
3936
_string_type_nodes= (ast.Str,ast.Bytes)
4037
_numeric_types= (int,float,complex)
41-
_name_type_nodes= (ast.Name,)if_is_py38else (ast.Name,ast.NameConstant)
38+
_name_type_nodes= (ast.Name,)
4239

4340

4441
classEvaluationError(Exception):
@@ -91,10 +88,6 @@ def simple_eval(node_or_string, namespace=None):
9188
def_convert(node):
9289
ifisinstance(node,ast.Constant):
9390
returnnode.value
94-
elifnot_is_py38andisinstance(node,_string_type_nodes):
95-
returnnode.s
96-
elifnot_is_py38andisinstance(node,ast.Num):
97-
returnnode.n
9891
elifisinstance(node,ast.Tuple):
9992
returntuple(map(_convert,node.elts))
10093
elifisinstance(node,ast.List):
@@ -168,18 +161,8 @@ def _convert(node):
168161
returnleft-right
169162

170163
# this is a deviation from literal_eval: we allow indexing
171-
elif (
172-
not_is_py39
173-
andisinstance(node,ast.Subscript)
174-
andisinstance(node.slice,ast.Index)
175-
):
176-
obj=_convert(node.value)
177-
index=_convert(node.slice.value)
178-
returnsafe_getitem(obj,index)
179-
elif (
180-
_is_py39
181-
andisinstance(node,ast.Subscript)
182-
andisinstance(node.slice, (ast.Constant,ast.Name))
164+
elifisinstance(node,ast.Subscript)andisinstance(
165+
node.slice, (ast.Constant,ast.Name)
183166
):
184167
obj=_convert(node.value)
185168
index=_convert(node.slice)

‎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.8 and newer. The code is compatible with all
20+
bpython supports Python 3.9 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.8 - 3.11
48+
* Runs under Python 3.9 - 3.13
4949
* Save
5050
* Rewind
5151
* Pastebin

‎pyproject.toml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
[build-system]
2-
requires = [
3-
"setuptools >= 62.4.0",
4-
]
2+
requires = ["setuptools >= 62.4.0"]
53
build-backend ="setuptools.build_meta"
64

75
[tool.black]
86
line-length =80
9-
target_version = ["py38"]
7+
target_version = ["py39"]
108
include ='\.pyi?$'
119
exclude ='''
1210
/(

‎setup.cfg‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ classifiers =
1414
Programming Language :: Python :: 3
1515

1616
[options]
17-
python_requires = >=3.8
17+
python_requires = >=3.9
1818
packages =
1919
bpython
2020
bpython.curtsiesfrontend

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp