Skip to content

Commit d4744cf

Browse files
authored
feat: add support for python 3.11 (TencentBlueKing#185)
1 parent 16fc2d5 commit d4744cf

9 files changed

Lines changed: 842 additions & 771 deletions

File tree

.github/workflows/blue-krill.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,32 @@ jobs:
2121
- name: Set up Python
2222
uses: actions/setup-python@v2
2323
with:
24-
python-version: 3.8
24+
python-version: 3.11
2525
- name: Format with isort
26+
working-directory: sdks/blue-krill
2627
run: |
2728
pip install isort==5.12.0
28-
isort sdks/ --settings-path=sdks/blue-krill/pyproject.toml
29+
isort . --settings-path=pyproject.toml
2930
- name: Format with black
31+
working-directory: sdks/blue-krill
3032
run: |
3133
pip install black==23.7.0 click==8.1.6
32-
black sdks/ --config=sdks/blue-krill/pyproject.toml
34+
black . --config=pyproject.toml
3335
- name: Lint with flake8
36+
working-directory: sdks/blue-krill
3437
run: |
3538
pip install flake8==4.0.1 pyproject-flake8==0.0.1a5
36-
pflake8 sdks/ --config=sdks/blue-krill/pyproject.toml
39+
pflake8 . --config=pyproject.toml
3740
- name: Lint with mypy
41+
working-directory: sdks/blue-krill
3842
run: |
3943
pip install mypy==0.910 types-requests==2.31.0.2 types-setuptools==57.4.18 types-dataclasses==0.1.7 types-redis==3.5.18 types-PyMySQL==1.1.0.1 types-six==0.1.9 types-toml==0.1.5
40-
mypy sdks/blue-krill --config-file=sdks/blue-krill/pyproject.toml
44+
mypy . --config-file=pyproject.toml
4145
test:
4246
strategy:
4347
fail-fast: false
4448
matrix:
45-
python-version: ["3.8", "3.9", "3.10"]
49+
python-version: ["3.8", "3.9", "3.10", "3.11"]
4650
os: [ubuntu-latest, macos-latest]
4751
runs-on: ${{ matrix.os }}
4852
steps:

sdks/blue-krill/CHANGE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Change logs
22

3+
### 2.0.5
4+
5+
- Feature: support python 3.11
6+
37
### 2.0.4
48

59
- Fix:支持不配置加密算法类型,使用默认类型 Fernet

sdks/blue-krill/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ The encrypted new value is: gAAAAABfKUui5_YUVxoYEYQG61RSRX1Ll3s1dgkZ5nUEJbCxakWH
7878
```raw
7979
├── editionctl.toml
8080
├── editions
81-
   ├── ee
82-
   │   └── ee.py
83-
   └── te
84-
   └── te.py
81+
├── ee
82+
└── ee.py
83+
└── te
84+
└── te.py
8585
└── main
8686
└── main.py
8787
```
@@ -294,8 +294,8 @@ REST_FRAMEWORK = {
294294

295295
```json
296296
{
297-
"code": 'CREATE_ERROR',
298-
"detail": '创建失败'
297+
"code": "CREATE_ERROR",
298+
"detail": "创建失败"
299299
}
300300
```
301301

sdks/blue-krill/blue_krill/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
99
* specific language governing permissions and limitations under the License.
1010
"""
11-
__version__ = "2.0.4"
11+
__version__ = "2.0.5"

sdks/blue-krill/blue_krill/models/better_loaddata/management/commands/better_loaddata.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# -*- coding: utf-8 -*-
2-
"""
3-
* TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-蓝鲸 PaaS 平台(BlueKing-PaaS) available.
4-
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
5-
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at http://opensource.org/licenses/MIT
7-
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
8-
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
9-
* specific language governing permissions and limitations under the License.
10-
"""
2+
# TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-蓝鲸 PaaS 平台(BlueKing-PaaS) available.
3+
# Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
4+
# Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at http://opensource.org/licenses/MIT
6+
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
7+
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
8+
# specific language governing permissions and limitations under the License.
9+
1110
"""
1211
This command is similar to Django's built-in "loaddata" command with one difference, it expands
1312
environment variables in the fixture data.
1413
1514
WARNING: This command is deprecated and might be removed in the future, please don't use it.
1615
"""
16+
1717
import os
1818
from contextlib import contextmanager
1919

0 commit comments

Comments
 (0)