Commit graph

93 commits

Author SHA1 Message Date
Andrew
4caf56814e
Support of Py3.14 (#1730)
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.14) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.14) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.14) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.11) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.11) (push) Has been cancelled
* Py3.14 support
Bump .pre-commit-config.yaml
Bump `mongo` feature deps
Bump `proxy` feature dep
Bump `test` feature deps
Bump `dev` feature deps

Set `aiohttp` max version `<3.14`

Fix `test_isolation.py` tests
Fix `test_storages.py` tests

Add Py version limit `<3.15` (breaking changes possible)
Add new `uvloop` starter to `Dispatcher.run_polling`

Remove old `uvloop` `set_event_loop_policy`
Remove `pytest-lazy-fixture`

* Make `test` and `dev` features deps strong fixed

* Add 1730.feature.rst

* Remove unneeded `None` from `Dispatcher.run_polling`

* Fix `macos-latest-pypy3.11` test `test_aiohtt_server.py`

* Update `tests.yml`

* Update `tests.yml`
2025-10-11 00:16:50 +03:00
Andrew
df7b16d5b3
EOL of Py3.9 (#1726)
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.11) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.11) (push) Has been cancelled
* Drop py3.9 and pypy3.9

Add pypy3.11 (testing) into `tests.yml`

Remove py3.9 from matrix in `tests.yml`

Refactor not auto-gen code to be compatible with py3.10+, droping ugly 3.9 annotation.

Replace some `from typing` imports to `from collections.abc`, due to deprecation

Add `from __future__ import annotations` and `if TYPE_CHECKING:` where possible

Add some `noqa` to calm down Ruff in some places, if Ruff will be used as default linting+formatting tool in future

Replace some relative imports to absolute

Sort `__all__` tuples in `__init__.py` and some other `.py` files

Sort `__slots__` tuples in classes

Split raises into `msg` and `raise` (`EM101`, `EM102`) to not duplicate error message in the traceback

Add `Self` from `typing_extenstion` where possible

Resolve typing problem in `aiogram/filters/command.py:18`

Concatenate nested `if` statements

Convert `HandlerContainer` into a dataclass in `aiogram/fsm/scene.py`

Bump tests docker-compose.yml `redis:6-alpine` -> `redis:8-alpine`

Bump tests docker-compose.yml `mongo:7.0.6` -> `mongo:8.0.14`

Bump pre-commit-config `black==24.4.2` -> `black==25.9.0`

Bump pre-commit-config `ruff==0.5.1` -> `ruff==0.13.3`

Update Makefile lint for ruff to show fixes

Add `make outdated` into Makefile

Use `pathlib` instead of `os.path`

Bump `redis[hiredis]>=5.0.1,<5.3.0` -> `redis[hiredis]>=6.2.0,<7`

Bump `cryptography>=43.0.0` -> `cryptography>=46.0.0` due to security reasons

Bump `pytz~=2023.3` -> `pytz~=2025.2`

Bump `pycryptodomex~=3.19.0` -> `pycryptodomex~=3.23.0` due to security reasons

Bump linting and formatting tools

* Add `1726.removal.rst`

* Update aiogram/utils/dataclass.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update aiogram/filters/callback_data.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update 1726.removal.rst

* Remove `outdated` from Makefile

* Add `__slots__` to `HandlerContainer`

* Remove unused imports

* Add `@dataclass` with `slots=True` to `HandlerContainer`

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-06 19:19:23 +03:00
sheldy
6aa6e008c2
Support validating init data using only bot id. (#1715)
* Support validating init data using only bot id.

* Add changes file.

* Add tests.

* Install `signature` dependencies in CI.
2025-08-17 19:15:23 +03:00
Alex Root Junior
51beb48257
Enabled tests on Python 3.13, disabled on Python 3.8 (#1589)
* Try to enable tests on Python 3.13

* Remove support for Python 3.8 and PyPy 3.8

Dropped Python 3.8 and PyPy 3.8 from the CI workflow and updated the minimum required Python version to 3.9 in pyproject.toml. Also updated dependencies and tools to align with the new minimum Python version.

* Added changelog

* Reformat code

* Bump mypy python version
2024-10-19 14:55:38 +03:00
JRoot Junior
6cebbe29ac
Resolve error created by the dependabot. 2024-09-08 14:15:30 +03:00
dependabot[bot]
fb1e5cad59
Bump actions/download-artifact from 1 to 4.1.7 in /.github/workflows (#1571)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 1 to 4.1.7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v1...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-04 01:52:12 +03:00
Alex Root Junior
c3a08664d3
Added full support of Bot API 7.9 (#1560)
* Added full support of Bot API 7.9

* Added changelog

* Try to fix towncrier

* Fixed towncrier check
2024-08-16 00:44:40 +03:00
Oleg A
7760ab1d0d
Bump dev dependencies (#1512)
* Bump dev dependencies

* Pre-commit py3.8 support

* Pre-commit py3.8 support (v3.5+)

* Mute mypy python version bug
2024-06-14 20:11:08 +03:00
Rishat-F
1ef7655fd7
Added MongoStorage for FSM (#1434)
* Mongo storage included to storages test

* Added few additional checks in storages test

* Added MongoStorage for FSM

* Added changes description

* Fixed error message syntax

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>

* Resolved mypy check error

* IF/ELSE statement simplified

* Fix ruff linter error: RET505 Unnecessary `elif` after `return` statement

* Fix ruff linter error: E501 Line too long (100 > 99)

* Added mongo storage testing in CI

* Refactoring while review

* Refactoring while review

* Storing FSM state and data together in MongoDB-storage

* Fix CI - MongoDB container action is only supported on Linux

* Refactoring while review

* Enable Macos in pypy-tests section of CI

* Refactoring while review

* Makefile updated

* redis and mongo storages tests do not run in pypy-tests job of CI

* Fix docstring of DefaultKeyBuilder

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2024-05-07 22:42:31 +03:00
Oleg A
5f157beb26
Bump actions versions (#1459)
* chore: bump actions versions

* chore: add pypy310
2024-04-17 14:09:19 +03:00
JRoot Junior
ebade3d51f
Merge test+pypy tests but with separated jobs 2023-11-18 21:45:22 +02:00
JRoot Junior
7b0a6d2050
Separate PyPy tests and disable Windows PyPy tests 2023-11-18 21:43:16 +02:00
JRoot Junior
82f9365180
Try to disable PyPy tests on Windows 2023-11-18 21:35:30 +02:00
Nachtalb
c1bafea3e8
Upgrade to py12 (#1354)
* Upgrade to py12 compatible aiohttp beta version

* Fix uvloop deprecation warning causing pytest not to run

* Fix test due to asyncio task scheduling race condition

* Fix test_state_in_unknown_class for Python 3.12+ due to PEP 678 changes

* Add Python 3.12 support in GitHub Actions and project configurations

* Add changelog entry

---------

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2023-11-18 21:24:19 +02:00
Alex Root Junior
1cf6ce251b
Fixed ruff command 2023-10-21 21:48:22 +03:00
Alex Root Junior
cf3044687a
Update changelog instructions in PR workflow
Updated the instructions for adding changelog entries in the pull_request_changelog.yml workflow file. The changes provide more specific instructions on how to name and write the changelog entry file. This was done to provide clearer instructions to contributors updating the changelog.
2023-10-08 19:22:58 +03:00
Oleg A
eacea996d4
Handle expected warnings & raise unexpected warnings (#1315)
* chore: replace fixture loop with event_loop

* chore: mark expected warnings

* chore: raise unexpected warnings

* chore: rm unused record

* fix: rm parenthesized context manager

* chore: warnings shall not pass

* chore: replace fixture loop with event_loop

* chore: mark expected warnings

* chore: raise unexpected warnings

* chore: rm unused record

* fix: rm parenthesized context manager

* chore: warnings shall not pass

* Revert "chore: raise unexpected warnings"

This reverts commit 4c91df243d.

* chore: warnings shall not pass v2

* fix: graceful aiohttp session close

* chore: minor typo

* chore: mark expected warnings

* fix: temporary mute ResourceWarning

#1320

* fix: close pool with redis

* chore: code reformat and lint

* chore: simplify tests with fixture

* chore: make aresponses clear

* chore: divide asserts with blank line

* chore: rm duplicated assertions

* chore: rm unnecessary extra

* chore: bump test dependencies

* chore: bump test dependencies (fix)
2023-10-01 15:28:54 +03:00
Oleg A
ac62184443
fix: new towncrier docs link (#1306) 2023-09-19 17:43:10 +03:00
Alex Root Junior
68c0516f69
Small update in issues templates 2023-08-08 00:05:39 +03:00
Alex Root Junior
7adc39bd82
Backport issue templates 2023-08-07 23:59:17 +03:00
Alex Root Junior
27f48c60de
Disable hatch bump 2023-07-17 23:07:21 +03:00
Alex Root Junior
71e7e62e36
Update publish pipeline 2023-07-17 22:57:31 +03:00
Alex Root Junior
68a6c2c192
Removed patreon, because it supports russian terrorists 2023-05-07 20:03:07 +03:00
Alex Root Junior
8a9cabb3df
Update codecov action 2023-02-04 19:57:48 +02:00
Alex Root Junior
f4ce4431f9
Migrate to hatchling (#1095)
* Migrate to hatchling instead of poetry, ruff instead of flake8

* Migrate to hatchling instead of poetry, ruff instead of flake8

* Update tests suite

* venv?

* -m venv?

* Change dependencies

* Remove venv

* Change mypy config

* Added changelog

* Mark uvloop incompatible with pypy

* Update release script

* Use internal caching for dependencies

* Re-disable cov branches

* Added contributing guide
2023-01-12 02:49:58 +02:00
Alex Root Junior
6db3778c6f
Tests on Python 3.11 (#1044)
* Try to use Python 3.11

* Remove `asynctest` dependency

* Fixed aiofiles tests

* Added changelog
2022-10-26 22:21:04 +03:00
Alex Root Junior
49372d14fd
Forget about virtualenv in pipeline 2022-10-02 19:38:26 +03:00
Alex Root Junior
1fa7fae6b3
Fixed deployment pipeline (Python version) 2022-10-02 19:33:17 +03:00
Alex Root Junior
44ae565149
Change changelog categories, update dependencies 2022-10-02 18:24:26 +03:00
Alex Root Junior
f4251382e8
Remove filters factory, introduce docs translation (#978)
* Rewrite filters

* Update README.rst

* Fixed tests

* Small optimization of the Text filter (TY to @bomzheg)

* Remove dataclass slots argument in due to the only Python 3.10 has an slots argument

* Fixed mypy

* Update tests

* Disable Python 3.11

* Fixed #1013: Empty mention should be None instead of empty string.

* Added #990 to the changelog

* Added #942 to the changelog

* Fixed coverage

* Update poetry and dependencies

* Fixed mypy

* Remove deprecated code

* Added more tests, update pyproject.toml

* Partial update docs

* Added initial Docs translation files

* Added more changes

* Added log message when connection is established in polling process

* Fixed action

* Disable lint for PyPy

* Added changelog for docs translation
2022-10-02 00:04:31 +03:00
Evgen Fil
40c29a0494
PyPy support (#985)
* Run tests on PyPy (#984)

Remove unnecessary `jobs.build.strategy.max_parallel` attribute

* Workaround `symlink() is not implemented for PyPy on Windows`

* Quote conditions in tests workflow file

* Fix quoting in Poetry installation script

* Adjust timeout when testing on pypy

Running the tests with coverage pytest plugin makes some tests run slower than expected

* Try to fix uvloop build errors on macos-latest

* Try to fix uvloop build errors on macos-latest (2)

* Adjust timeout when testing on pypy (2)

* Increase timeout even more

* Try to fix uvloop build errors on macos-latest (3)

* Update tests.yml, revert changes in test files

Add and improve step names
Merge "Lint code" and "Check code-style" steps
Don't install uvloop on macos when running on pypy
Don't run tests with coverage on pypy
Remove test timeout adjustments

* Fix condition

* Update README, add changelog

* Put environment info (`IS_PYPY`, `IS_WINDOWS`) into environment variables

* Fix conditions
2022-08-30 01:23:43 +03:00
Alex Root Junior
c1341ba2df
Added support of Bot API 6.2 (#975)
* Added support of Bot API 6.2
* Added changelog
* Update tests
* Update API version
* Update dependencies, pre-commit config
* Added pytest config
2022-08-14 16:32:29 +03:00
Evgen Fil
416460e013
Skip running tests when there are no code or test changes (#948)
* Skip running tests when there are no code or test changes

* Allow config file changes to trigger tests
2022-06-26 19:16:17 +03:00
Evgen Fil
2cb0fd1c4b
Improve changelog check action (#949)
Make check faster when `skip news` label is present
Add `name:` root field
2022-06-26 16:22:32 +03:00
Evgen Fil
2c6d8ed5cb
Automatically put 3.x label on new pull requests to dev-3.x (#940) 2022-06-25 22:31:19 +03:00
Alex Root Junior
e8432d38f5
Add comment when PR is labeled 2022-04-11 04:06:39 +03:00
Alex Root Junior
7ae588d4b8
Delete comment when pull request is labeled 2022-04-11 03:59:09 +03:00
Alex Root Junior
1e5d231869
Update changelog action, try to fix PR from external repositories 2022-04-11 03:31:37 +03:00
Alex Root Junior
b8aa03bc38
Added changelog changed validator (#873)
* Added changelog changed validator
2022-03-27 01:36:05 +02:00
Alex Root Junior
7405db2ad3
Enable Python 3.10 for tests (#719)
* Try to test on Python 3.10

* Prevent to YAML type cast

* Bump poetry

* Removed async_lru

* Disable fail-fast on tests

* Fixed typing

* Added patch-notes
2021-10-06 22:49:14 +03:00
Alex Root Junior
e4046095d7
Dev 3.x i18n & improvements (#696)
* Added base code and make code improvements
* Auto-exclude coverage for `if TYPE_CHECKING:`
* Fixed current coverage
* Cover I18n module
* Update pipeline
* Fixed annotations
* Added docs
* Move exceptions
* Added tests for KeyboardBuilder and initial docs
* Remove help generator (removed from sources tree, requires rewrite)
* Added patch-notes #698, #699, #700, #701, #702, #703
2021-09-22 00:52:38 +03:00
Christian Clauss
5bd1162f57
tests.yml: Upgrade to actions/setup-python@v2 (#686) 2021-09-10 00:27:07 +03:00
Alex Root Junior
40cb222314 Bump version 2021-09-10 00:02:53 +03:00
Alex Root Junior
e356ede5de
Updated pre-commit hook (#681)
* Updated pre-commit config and reformat code

* Added changelog
2021-09-07 00:32:43 +03:00
Alex Root Junior
16cf6419d3 Rename deployment script 2021-08-01 01:19:03 +03:00
Alex Root Junior
e5a7c69e17 Bump version 2021-08-01 01:09:43 +03:00
Alex Root Junior
83d6ab48c5
Backport and improvements (#601)
* Backport RedisStorage, deep-linking
* Allow prereleases for aioredis
* Bump dependencies
* Correctly skip Redis tests on Windows
* Reformat tests code and bump Makefile
2021-06-15 01:45:31 +03:00
Alex Root Junior
6253b25158 Remove compatibility with Python 3.7 2021-05-25 01:00:36 +03:00
Alex Root Junior
442a813831 Added cache version 2021-05-13 22:15:26 +03:00
Alex Root Junior
becbcecaf1 Increase max parallel jobs 2021-05-13 00:15:18 +03:00