diff --git a/aiogram/__init__.py b/aiogram/__init__.py index 639e68c9..ca17b233 100644 --- a/aiogram/__init__.py +++ b/aiogram/__init__.py @@ -37,5 +37,5 @@ __all__ = ( "md", ) -__version__ = "3.0.0-alpha.8" +__version__ = "3.0.0a10" __api_version__ = "5.2" diff --git a/aiogram/types/downloadable.py b/aiogram/types/downloadable.py index 48525f65..be808293 100644 --- a/aiogram/types/downloadable.py +++ b/aiogram/types/downloadable.py @@ -1,7 +1,4 @@ -try: - from typing import Protocol -except ImportError: # pragma: no cover - from typing_extensions import Protocol # type: ignore +from typing import Protocol class Downloadable(Protocol): diff --git a/poetry.lock b/poetry.lock index cb05c237..4e6bcb7d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -298,18 +298,18 @@ pygments = ">=2.2.0" [[package]] name = "furo" -version = "2020.12.30b24" +version = "2021.6.18b36" description = "A clean customisable Sphinx documentation theme." category = "main" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" [package.dependencies] beautifulsoup4 = "*" -sphinx = ">=3.0,<4.0" +sphinx = ">=3.0,<5.0" [package.extras] -doc = ["myst-parser", "sphinx-copybutton", "sphinx-inline-tabs"] +doc = ["myst-parser", "sphinx-copybutton", "sphinx-inline-tabs", "docutils (!=0.17)"] test = ["pytest", "pytest-cov", "pytest-xdist"] [[package]] @@ -1201,7 +1201,7 @@ redis = ["aioredis"] [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "362a6caf937b1c457599cbf2cd5d000eab4cac529bd7fe8c257ae713ebc63331" +content-hash = "ef3571030ff35c2a05e01dca86e9347239e98ad0f45bed6f5d9a73121013f376" [metadata.files] aiofiles = [ @@ -1402,8 +1402,8 @@ flake8-html = [ {file = "flake8_html-0.4.1-py2.py3-none-any.whl", hash = "sha256:17324eb947e7006807e4184ee26953e67baf421b3cf9e646a38bfec34eec5a94"}, ] furo = [ - {file = "furo-2020.12.30b24-py3-none-any.whl", hash = "sha256:251dadee4dee96dddf2dc9b5243b88212e16923f53397bf12bc98574918bda41"}, - {file = "furo-2020.12.30b24.tar.gz", hash = "sha256:30171899c9c06d692a778e6daf6cb2e5cbb05efc6006e1692e5e776007dc8a8c"}, + {file = "furo-2021.6.18b36-py3-none-any.whl", hash = "sha256:a4c00634afeb5896a34d141a5dffb62f20c5eca7831b78269823a8cd8b09a5e4"}, + {file = "furo-2021.6.18b36.tar.gz", hash = "sha256:46a30bc597a9067088d39d730e7d9bf6c1a1d71967e4af062f796769f66b3bdb"}, ] identify = [ {file = "identify-2.2.10-py2.py3-none-any.whl", hash = "sha256:18d0c531ee3dbc112fa6181f34faa179de3f57ea57ae2899754f16a7e0ff6421"}, diff --git a/pyproject.toml b/pyproject.toml index 4befda3e..cac43cf8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "aiogram" -version = "3.0.0-alpha.9" +version = "3.0.0-alpha.10" description = "Modern and fully asynchronous framework for Telegram Bot API" authors = ["Alex Root Junior "] license = "MIT" @@ -39,15 +39,14 @@ aiofiles = "^0.6.0" async_lru = "^1.0.2" aiohttp-socks = { version = "^0.5.5", optional = true } aioredis = { version = "^2.0.0a1", allow-prereleases = true, optional = true } -typing-extensions = { version = "^3.7.4", python = "<3.8" } magic-filter = { version = "1.0.0a1", allow-prereleases = true } -sphinx = { version = "^3.1.0", optional = true } -sphinx-intl = { version = "^2.0.1", optional = true } -sphinx-autobuild = { version = "^2020.9.1", optional = true } -sphinx-copybutton = { version = "^0.3.1", optional = true } -furo = { version = "^2020.11.15-beta.17", optional = true } -sphinx-prompt = { version = "^1.3.0", optional = true } -Sphinx-Substitution-Extensions = { version = "^2020.9.30", optional = true } +# sphinx = { version = "^3.1.0", optional = true } +# sphinx-intl = { version = "^2.0.1", optional = true } +# sphinx-autobuild = { version = "^2020.9.1", optional = true } +# sphinx-copybutton = { version = "^0.3.1", optional = true } +# furo = { version = "^2021.6.18-beta.36", optional = true } +# sphinx-prompt = { version = "^1.3.0", optional = true } +# Sphinx-Substitution-Extensions = { version = "^2020.9.30", optional = true } [tool.poetry.dev-dependencies] aiohttp-socks = "^0.5" @@ -62,8 +61,9 @@ mypy = "^0.812" pytest = "^6.2.3" pytest-html = "^3.1.1" pytest-asyncio = "^0.15.1" -pytest-mypy = "^0.8.1" +pytest-lazy-fixture = "^0.6.3" pytest-mock = "^3.6.0" +pytest-mypy = "^0.8.1" pytest-cov = "^2.11.1" aresponses = "^2.1.4" asynctest = "^0.13.0" @@ -78,10 +78,10 @@ sphinx = "^3.1.0" sphinx-intl = "^2.0.1" sphinx-autobuild = "^2020.9.1" sphinx-copybutton = "^0.3.1" -furo = "^2020.11.15-beta.17" +furo = "^2021.6.18-beta.36" sphinx-prompt = "^1.3.0" Sphinx-Substitution-Extensions = "^2020.9.30" -pytest-lazy-fixture = "^0.6.3" + [tool.poetry.extras] fast = ["uvloop"] diff --git a/scripts/bump_versions.py b/scripts/bump_versions.py index 28072c9c..68547d12 100644 --- a/scripts/bump_versions.py +++ b/scripts/bump_versions.py @@ -3,7 +3,7 @@ from pathlib import Path import toml -BASE_PATTERN = r'({variable} = ")[a-z0-9.+]+(")' +BASE_PATTERN = r'({variable} = ").+(")' PACKAGE_VERSION = re.compile(BASE_PATTERN.format(variable="__version__")) API_VERSION = re.compile(BASE_PATTERN.format(variable="__api_version__")) API_VERSION_BADGE = re.compile(r"(API-)[\d.]+(-blue\.svg)") @@ -62,23 +62,13 @@ def write_readme(package_version: str, api_version: str) -> None: def write_docs_index(package_version: str, api_version: str) -> None: - path = Path.cwd() / "docs2" / "index.rst" + path = Path.cwd() / "docs" / "index.rst" content = path.read_text() content = replace_line(content, API_VERSION_BADGE, api_version) print(f"Write {path}") path.write_text(content) -def write_docs_meta(package_version: str, api_version: str) -> None: - api_meta = Path.cwd() / "docs" / "_api_version.md" - package_meta = Path.cwd() / "docs" / "_package_version.md" - - print(f"Write {api_meta}") - api_meta.write_text(api_version + "\n") - print(f"Write {package_meta}") - package_meta.write_text(package_version + "\n") - - def main(): package_version = get_package_version() api_version = get_telegram_api_version() @@ -86,7 +76,6 @@ def main(): print(f"Package version: {package_version}") print(f"Telegram Bot API version: {api_version}") write_package_meta(package_version=package_version, api_version=api_version) - write_docs_meta(package_version=package_version, api_version=api_version) write_readme(package_version=package_version, api_version=api_version) write_docs_index(package_version=package_version, api_version=api_version)