Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
JrooTJunior committed Jun 18, 2021
1 parent 5790c43 commit 5780d18
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 37 deletions.
2 changes: 1 addition & 1 deletion aiogram/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
"md",
)

__version__ = "3.0.0-alpha.8"
__version__ = "3.0.0a10"
__api_version__ = "5.2"
5 changes: 1 addition & 4 deletions aiogram/types/downloadable.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
14 changes: 7 additions & 7 deletions poetry.lock

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

24 changes: 12 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <jroot.junior@gmail.com>"]
license = "MIT"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"]
Expand Down
15 changes: 2 additions & 13 deletions scripts/bump_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

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)")
Expand Down Expand Up @@ -62,31 +62,20 @@ 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()

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)

Expand Down

0 comments on commit 5780d18

Please sign in to comment.