Skip to content

Commit ae9180a

Browse files
authored
Merge pull request #263 from whtsky/develop
Release 1.2.0
2 parents a9d0376 + 459d34c commit ae9180a

File tree

100 files changed

+2024
-4181
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+2024
-4181
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*]
4+
indent_size = 4
5+
indent_style = space
6+
end_of_line = lf
7+
insert_final_newline = true
8+
9+
[{.travis.yml,appveyor.yml,*.ini}]
10+
indent_size = 2

.flake8

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
[flake8]
22
max-line-length = 100
3+
ignore = E722
34
max-complexity = 12
45
exclude =
56
.git,
67
__pycache__,
78
docs,
89
travis,
9-
venv
10+
venv,
11+
tests/fake_sae.py

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,3 @@ pip-selfcheck.json
6363
venv
6464

6565
*.sqlite3
66-
/.vscode

.travis.yml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,20 @@
11
os: osx
22
language: generic
33
osx_image: xcode8.2
4-
env:
5-
- PYTHON_VERSION=2 PYTHON_INSTALL_METHOD=system
64
matrix:
75
include:
86
- env:
9-
- PYTHON_MAJOR=py3
10-
- PYTHON_VERSION="3.6.0 3.5.2 3.4.5"
11-
- PYTHON_INSTALL_METHOD=tox
7+
- PYTHON_MAJOR="py34|py35"
8+
- PYTHON_VERSION="3.5.2 3.4.5"
9+
- env:
10+
- PYTHON_MAJOR="py36"
11+
- PYTHON_VERSION="3.6.2"
1212
- env:
1313
- PYTHON_MAJOR=py2
1414
- PYTHON_VERSION="2.7.12"
15-
- PYTHON_INSTALL_METHOD=tox
1615
- env:
1716
- PYTHON_MAJOR=pypy
1817
- PYTHON_VERSION="pypy-5.0.0"
19-
- PYTHON_INSTALL_METHOD=tox
20-
- env:
21-
- PYTHON_VERSION=2.7
22-
- PYTHON_INSTALL_METHOD=macpython
23-
- env:
24-
- PYTHON_VERSION=3.4
25-
- PYTHON_INSTALL_METHOD=macpython
26-
- env:
27-
- PYTHON_VERSION=3.5
28-
- PYTHON_INSTALL_METHOD=macpython
29-
- osx_image: xcode8
30-
- osx_image: xcode6.4
3118
cache:
3219
directories:
3320
- $HOME/.pyenv

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"python.linting.flake8Enabled": true
3+
}

appveyor.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ cache:
44
- '%LOCALAPPDATA%\pip\Cache'
55
services:
66
- mongodb
7+
- mysql
78
init:
89
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
910
- ps: "ls C:/Python*"
@@ -12,6 +13,12 @@ install:
1213
- choco install redis-64
1314
- redis-server --service-install
1415
- redis-server --service-start
16+
- set DATABASE_MYSQL_USERNAME=root
17+
- set DATABASE_MYSQL_PASSWORD=Password12!
18+
before_test:
19+
- ps: $env:MYSQL_PWD="Password12!"
20+
- ps: $cmd = '"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -e "create database werobot;" --user=root'
21+
- ps: iex "& $cmd"
1522
test_script:
1623
- C:\Python35\python -m tox -c tox-win.ini
1724
on_success:

dev-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
-r tox-requirements.txt
2-
flake8==2.6.2
2+
flake8==3.5.0
33
tox
44
django

docs/_themes/flask/static/flasky.css_t

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,10 @@ table.field-list th {
311311
padding: 0 0.8em 0 0;
312312
}
313313

314+
table.field-list th.field-name {
315+
width: 3rem;
316+
}
317+
314318
table.field-list td {
315319
padding: 0;
316320
}

docs/api.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
API
2+
==========
3+
4+
.. module:: werobot
5+
6+
应用对象
7+
------------
8+
9+
.. module:: werobot.robot
10+
.. autoclass:: BaseRoBot
11+
:members:
12+
.. autoclass:: WeRoBot
13+
:members:
14+
15+
配置对象
16+
------------
17+
18+
.. module:: werobot.config
19+
.. autoclass:: Config
20+
:members:
21+
22+
Session 对象
23+
------------
24+
.. module:: werobot.session.sqlitestorage
25+
.. autoclass:: SQLiteStorage
26+
27+
.. module:: werobot.session.filestorage
28+
.. autoclass:: FileStorage
29+
30+
.. module:: werobot.session.mongodbstorage
31+
.. autoclass:: MongoDBStorage
32+
33+
.. module:: werobot.session.redisstorage
34+
.. autoclass:: RedisStorage
35+
36+
.. module:: werobot.session.saekvstorage
37+
.. autoclass:: SaeKVDBStorage
38+
39+
.. module:: werobot.session.mysqlstorage
40+
.. autoclass:: MySQLStorage
41+
42+
log
43+
------------
44+
.. module:: werobot.logger
45+
.. autofunction:: enable_pretty_logging

docs/changelog.rst

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

4+
Version 1.2.0
5+
----------------
6+
+ 增加 :class:`werobot.session.mysqlstorage.MySQLStorage`
7+
+ 增加 :class:`werobot.messages.events.ScanCodePushEvent`
8+
+ 增加 :class:`werobot.messages.events.ScanCodeWaitMsgEvent`
9+
+ 增加 :func:`werobot.robot.BaseRoBot.add_filter`
10+
+ :func:`werobot.utils.generate_token` 在 Python 3.6+ 下优先使用 ``secrets.choice`` 来随机生成 token
11+
+ 修复 :func:`werobot.client.Client.get_media_list` 的调用参数错误 (`#208 <https://github.com/whtsky/WeRoBot/issues/208>`_)
12+
+ 修复了某些情况下 Client 中文编码不正确的问题 (`#250 <https://github.com/whtsky/WeRoBot/issues/250>`_)
13+
+ Handler 中的 Exception 现在会以 Error level 记录到 logger 中
14+
+ 在文档中增加了独立的 :doc:`api` 部分
15+
+ 添加了 ``video`` 和 ``shortvideo`` 的修饰器
16+
+ 增加了 :class:`werobot.session.saekvstorage.SaeKVDBStorage` 的测试
17+
+ 增加了对 Django 2.0 的测试
18+
+ 抛弃对 Django < 1.8 、 Django 1.9 、 Django 1.10 的支持
19+
420
Version 1.1.1
521
----------------
622

0 commit comments

Comments
 (0)