Skip to content

Commit

Permalink
chore(deps): 升级 Python 至 3.11 版本 (#112)
Browse files Browse the repository at this point in the history
* chore(deps): 升级 Python 至 3.11 版本

同时将命令错误时的输出调整为 debug

* 测试环境调整为 python 3.11
  • Loading branch information
he0119 authored Feb 9, 2023
1 parent 92d3449 commit 2f67a56
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Python
uses: he0119/setup-python@main
with:
python-version: '3.10'
python-version: '3.11'

- name: Install prerequisites
run: poetry install
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10 as requirements-stage
FROM python:3.11 as requirements-stage

WORKDIR /tmp

Expand All @@ -12,7 +12,7 @@ ENV PATH="${PATH}:/root/.local/bin"

RUN poetry export -f requirements.txt --output requirements.txt --without-hashes

FROM python:3.10-slim-bullseye
FROM python:3.11-slim-bullseye

WORKDIR /app

Expand Down
37 changes: 2 additions & 35 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ homepage = "https://github.com/nonebot/nonebot2-publish-bot"
repository = "https://github.com/nonebot/nonebot2-publish-bot"

[tool.poetry.dependencies]
python = "^3.10"
python = "^3.11"
pydantic = "^1.8.2"
githubkit = "^0.9.4"
httpx = "^0.23.1"
Expand Down
6 changes: 3 additions & 3 deletions src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ def run_shell_command(command: list[str]):
r = subprocess.run(command, check=True, capture_output=True)
logging.debug(f"命令输出: \n{r.stdout.decode()}")
except subprocess.CalledProcessError as e:
logging.error("命令运行失败")
logging.error(f"命令输出: \n{e.stdout.decode()}")
logging.error(f"命令错误: \n{e.stderr.decode()}")
logging.debug("命令运行失败")
logging.debug(f"命令输出: \n{e.stdout.decode()}")
logging.debug(f"命令错误: \n{e.stderr.decode()}")
raise
return r

Expand Down

0 comments on commit 2f67a56

Please sign in to comment.