Skip to content

Commit 130eed1

Browse files
authored
Merge pull request #539 from offu/drop_py2
refactor: drop support for Python 2, drop requirement for six package
2 parents 184286b + fcd29d6 commit 130eed1

24 files changed

+140
-798
lines changed

.circleci/config.yml

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,5 @@
11
version: 2
22
jobs:
3-
python2.7:
4-
docker:
5-
- image: python:2
6-
working_directory: ~/werobot
7-
steps:
8-
- checkout
9-
- run: cat requirements.txt dev-requirements.txt tox-requirements.txt > dependency.txt
10-
- restore_cache:
11-
key: v1-python2-{{ checksum "dependency.txt" }}
12-
- run:
13-
command: |
14-
cat dev-requirements.txt | grep tox== | xargs pip install codecov
15-
tox -l | grep py2 | tr '\n' ',' | xargs tox -e && codecov
16-
- save_cache:
17-
key: v1-python2-{{ checksum "dependency.txt" }}
18-
paths:
19-
- .tox
203
python3.5:
214
docker:
225
- image: python:3.5
@@ -85,23 +68,6 @@ jobs:
8568
key: v1-python3.8-{{ checksum "dependency.txt" }}
8669
paths:
8770
- .tox
88-
pypy:
89-
docker:
90-
- image: pypy:2
91-
working_directory: ~/werobot
92-
steps:
93-
- checkout
94-
- run: cat requirements.txt dev-requirements.txt tox-requirements.txt > dependency.txt
95-
- restore_cache:
96-
key: v1-pypy-{{ checksum "dependency.txt" }}
97-
- run:
98-
command: |
99-
cat dev-requirements.txt | grep tox== | xargs pip install codecov
100-
tox -l | grep pypy | tr '\n' ',' | xargs tox -e && codecov
101-
- save_cache:
102-
key: v1-pypy-{{ checksum "dependency.txt" }}
103-
paths:
104-
- .tox
10571
docs:
10672
docker:
10773
- image: python:3.7
@@ -133,11 +99,9 @@ workflows:
13399
version: 2
134100
test:
135101
jobs:
136-
- python2.7
137102
- python3.5
138103
- python3.6
139104
- python3.7
140105
- python3.8
141-
- pypy
142106
- docs
143107
- lint

.travis.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ matrix:
99
- env:
1010
- PYTHON_MAJOR="py36|py37"
1111
- PYTHON_VERSION="3.6.5 3.7.0"
12-
- env:
13-
- PYTHON_MAJOR=py2
14-
- PYTHON_VERSION="2.7.14"
15-
- env:
16-
- PYTHON_MAJOR=pypy
17-
- PYTHON_VERSION="pypy2.7-7.2.0"
1812
cache:
1913
directories:
2014
- $HOME/.pyenv

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ install:
99
- C:\Python35\python -m pip install --force-reinstall tox
1010
- set PYTHONIOENCODING=utf-8
1111
test_script:
12-
- C:\Python35\python -m tox -c tox-win.ini
12+
- C:\Python35\python -m tox -c tox.ini
1313
on_success:
1414
- set PATH=C:\\Python35;C:\\Python35\\Scripts;%PATH%
1515
- pip install codecov coverage

docs/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Changelog
22
=============
33

4+
Version 1.11.0
5+
----------------
6+
+ 停止了对 Python2 与 PyPy 的支持。 ( `#539 <https://github.com/offu/WeRoBot/pull/539>`_ )
7+
+ 停止了对 SAE 相关代码的测试。 ( `#539 <https://github.com/offu/WeRoBot/pull/539>`_ )
8+
49
Version 1.10.1
510
----------------
611
+ 修复 :ref:`群发接口` 的 docstring 样式。

docs/deploy.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,9 @@ server 支持以下几种:
130130
在SAE上部署
131131
-----------------
132132

133+
.. attention:: 从 :ref:`Version 1.11.0` 开始,WeRoBot 停止测试 SAE 相关部分的代码。
133134

134-
新浪云上的 Python 应用的入口为 index.wsgi:application ,也就是 index.wsgi 这个文件中名为 application 的 callable object。
135+
新浪云上的 Python 应用的入口为 index.wsgi:application ,也就是 index.wsgi 这个文件中名为 application 的 callable object。
135136

136137

137138
所以,假设你在 `robot.py` 中使用了 WeRoBot ::

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
bottle
22
requests
3-
six
4-
xmltodict
3+
xmltodict

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,12 @@ def run_tests(self):
5050
'Operating System :: POSIX',
5151
'Operating System :: POSIX :: Linux',
5252
'Programming Language :: Python',
53-
'Programming Language :: Python :: 2.7',
5453
'Programming Language :: Python :: 3.4',
5554
'Programming Language :: Python :: 3.5',
5655
'Programming Language :: Python :: 3.6',
5756
'Programming Language :: Python :: 3.7',
57+
'Programming Language :: Python :: 3.8',
5858
'Programming Language :: Python :: Implementation :: CPython',
59-
'Programming Language :: Python :: Implementation :: PyPy',
6059
'Intended Audience :: Developers',
6160
'Topic :: Software Development :: Libraries',
6261
'Topic :: Software Development :: Libraries :: Python Modules',

0 commit comments

Comments
 (0)