From 1644615462f56eca3169f61a67580def768b2a56 Mon Sep 17 00:00:00 2001 From: Ju4tCode <42488585+yanyongyu@users.noreply.github.com> Date: Thu, 24 Nov 2022 03:35:31 +0000 Subject: [PATCH] :bookmark: bump version 2.0.0rc2 --- nonebot/dependencies/utils.py | 4 ++-- nonebot/drivers/fastapi.py | 2 +- poetry.lock | 28 ++++++++++++++-------------- pyproject.toml | 15 ++++++++------- 4 files changed, 25 insertions(+), 24 deletions(-) diff --git a/nonebot/dependencies/utils.py b/nonebot/dependencies/utils.py index 7a9b1d5b..40b12451 100644 --- a/nonebot/dependencies/utils.py +++ b/nonebot/dependencies/utils.py @@ -4,11 +4,11 @@ FrontMatter: description: nonebot.dependencies.utils 模块 """ import inspect -from typing import Any, Dict, TypeVar, Callable +from typing import Any, Dict, TypeVar, Callable, ForwardRef from loguru import logger from pydantic.fields import ModelField -from pydantic.typing import ForwardRef, evaluate_forwardref +from pydantic.typing import evaluate_forwardref from nonebot.exception import TypeMisMatch diff --git a/nonebot/drivers/fastapi.py b/nonebot/drivers/fastapi.py index 258d3aa4..a9d6ef3b 100644 --- a/nonebot/drivers/fastapi.py +++ b/nonebot/drivers/fastapi.py @@ -262,7 +262,7 @@ class FastAPIWebSocket(BaseWebSocket): async def close( self, code: int = status.WS_1000_NORMAL_CLOSURE, reason: str = "" ) -> None: - await self.websocket.close(code) + await self.websocket.close(code, reason) @overrides(BaseWebSocket) async def receive(self) -> Union[str, bytes]: diff --git a/poetry.lock b/poetry.lock index 56da56f7..53271d3c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -556,11 +556,11 @@ setuptools = "*" [[package]] name = "nonebug" -version = "0.2.1" +version = "0.2.2" description = "nonebot2 test framework" category = "dev" optional = false -python-versions = "^3.7.3" +python-versions = "^3.8" develop = false [package.dependencies] @@ -574,7 +574,7 @@ typing-extensions = "^4.0.0" type = "git" url = "https://github.com/nonebot/nonebug.git" reference = "HEAD" -resolved_reference = "3cb2474a22bd1a633805dfa6edbe741e44ddc851" +resolved_reference = "bec7086e8117858b9ba2d826323c875a65732d0d" [[package]] name = "nonemoji" @@ -667,7 +667,7 @@ python-versions = ">=3.6.1" [[package]] name = "prompt-toolkit" -version = "3.0.32" +version = "3.0.33" description = "Library for building powerful interactive command lines in Python" category = "dev" optional = false @@ -875,7 +875,7 @@ idna2008 = ["idna"] [[package]] name = "setuptools" -version = "65.6.0" +version = "65.6.2" description = "Easily download, build, install, upgrade, and uninstall Python packages" category = "dev" optional = false @@ -951,11 +951,11 @@ python-versions = ">=3.7" [[package]] name = "urllib3" -version = "1.26.12" +version = "1.26.13" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" [package.extras] brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] @@ -1111,7 +1111,7 @@ websockets = ["websockets"] [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "a432dca7a04376731fe2df06159062830ef5624c28c4ed7ac36904db4cebb71b" +content-hash = "e82cd008ebde073b9f8d77d9a22e75f6004fcbaa58c5220e2f691eab955acd81" [metadata.files] aiodns = [ @@ -1859,8 +1859,8 @@ priority = [ {file = "priority-2.0.0.tar.gz", hash = "sha256:c965d54f1b8d0d0b19479db3924c7c36cf672dbf2aec92d43fbdaf4492ba18c0"}, ] prompt-toolkit = [ - {file = "prompt_toolkit-3.0.32-py3-none-any.whl", hash = "sha256:24becda58d49ceac4dc26232eb179ef2b21f133fecda7eed6018d341766ed76e"}, - {file = "prompt_toolkit-3.0.32.tar.gz", hash = "sha256:e7f2129cba4ff3b3656bbdda0e74ee00d2f874a8bcdb9dd16f5fec7b3e173cae"}, + {file = "prompt_toolkit-3.0.33-py3-none-any.whl", hash = "sha256:ced598b222f6f4029c0800cefaa6a17373fb580cd093223003475ce32805c35b"}, + {file = "prompt_toolkit-3.0.33.tar.gz", hash = "sha256:535c29c31216c77302877d5120aef6c94ff573748a5b5ca5b1b1f76f5e700c73"}, ] pycares = [ {file = "pycares-4.2.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:5dc6418e87729105d93162155793002b3fa95490e2f2df33afec08b0b0d44989"}, @@ -2038,8 +2038,8 @@ rfc3986 = [ {file = "rfc3986-1.5.0.tar.gz", hash = "sha256:270aaf10d87d0d4e095063c65bf3ddbc6ee3d0b226328ce21e036f946e421835"}, ] setuptools = [ - {file = "setuptools-65.6.0-py3-none-any.whl", hash = "sha256:6211d2f5eddad8757bd0484923ca7c0a6302ebc4ab32ea5e94357176e0ca0840"}, - {file = "setuptools-65.6.0.tar.gz", hash = "sha256:d1eebf881c6114e51df1664bc2c9133d022f78d12d5f4f665b9191f084e2862d"}, + {file = "setuptools-65.6.2-py3-none-any.whl", hash = "sha256:97a4a824325146ebc8dc29b0aa5f3b1eaa590a0f00cacbfdf81831670f07862d"}, + {file = "setuptools-65.6.2.tar.gz", hash = "sha256:41fa68ecac9e099122990d7437bc10683b966c32a591caa2824dffcffd5dea7a"}, ] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, @@ -2070,8 +2070,8 @@ typing-extensions = [ {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, ] urllib3 = [ - {file = "urllib3-1.26.12-py2.py3-none-any.whl", hash = "sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997"}, - {file = "urllib3-1.26.12.tar.gz", hash = "sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e"}, + {file = "urllib3-1.26.13-py2.py3-none-any.whl", hash = "sha256:47cc05d99aaa09c9e72ed5809b60e7ba354e64b59c9c173ac3018642d8bb41fc"}, + {file = "urllib3-1.26.13.tar.gz", hash = "sha256:c083dd0dce68dbfbe1129d5271cb90f9447dea7d52097c6e0126120c521ddea8"}, ] uvicorn = [ {file = "uvicorn-0.20.0-py3-none-any.whl", hash = "sha256:c3ed1598a5668208723f2bb49336f4509424ad198d6ab2615b7783db58d919fd"}, diff --git a/pyproject.toml b/pyproject.toml index 88091c50..4d0fd119 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "nonebot2" -version = "2.0.0-rc.1" +version = "2.0.0rc2" description = "An asynchronous python bot framework." authors = ["yanyongyu "] license = "MIT" @@ -26,15 +26,16 @@ python = "^3.8" yarl = "^1.7.2" loguru = "^0.6.0" pygtrie = "^2.4.1" -fastapi = "^0.87.0" +fastapi = ">=0.87.0,<1.0.0" tomlkit = ">=0.10.0,<1.0.0" typing-extensions = ">=3.10.0,<5.0.0" -Quart = { version = "^0.18.0", optional = true } -websockets = { version="^10.0", optional = true } pydantic = { version = "^1.10.0", extras = ["dotenv"] } -uvicorn = { version = "^0.20.0", extras = ["standard"] } +uvicorn = { version = ">=0.20.0,<1.0.0", extras = ["standard"] } + +websockets = { version="^10.0", optional = true } +Quart = { version = ">=0.18.0,<1.0.0", optional = true } aiohttp = { version = "^3.7.4", extras = ["speedups"], optional = true } -httpx = { version = ">=0.20.0, <1.0.0", extras = ["http2"], optional = true } +httpx = { version = ">=0.20.0,<1.0.0", extras = ["http2"], optional = true } [tool.poetry.group.dev.dependencies] isort = "^5.10.1" @@ -68,7 +69,7 @@ filterwarnings = [ [tool.black] line-length = 88 -target-version = ["py37", "py38", "py39", "py310"] +target-version = ["py38", "py39", "py310", "py311"] include = '\.pyi?$' extend-exclude = ''' '''