From 0cec7d4933b5b00f50d39aa5917f63c9c7b9408f Mon Sep 17 00:00:00 2001 From: nullmatawasoradesu <119107850+wakaree@users.noreply.github.com> Date: Sun, 13 Aug 2023 22:41:56 +0300 Subject: [PATCH] Migration FAQ supplement (Finite State Machine) (#1264) * Updated Migration FAQ > Finite State Machine * Fixed typos, added changelog * Fixed typo x2 --- CHANGES/1264.doc.rst | 1 + docs/migration_2_to_3.rst | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 CHANGES/1264.doc.rst diff --git a/CHANGES/1264.doc.rst b/CHANGES/1264.doc.rst new file mode 100644 index 00000000..1564244f --- /dev/null +++ b/CHANGES/1264.doc.rst @@ -0,0 +1 @@ +Supplemented "Finite State Machine" section in Migration FAQ diff --git a/docs/migration_2_to_3.rst b/docs/migration_2_to_3.rst index 483f4f8d..8a42fa5e 100644 --- a/docs/migration_2_to_3.rst +++ b/docs/migration_2_to_3.rst @@ -112,6 +112,13 @@ Finite State machine - State filter will no more added to all handlers, you will need to specify state if you want - Added possibility to change FSM strategy, for example if you want to control state for each user in chat topics instead of user in chat you can specify it in the Dispatcher. +- Now :class:`aiogram.fsm.state.State` and :class:`aiogram.fsm.state.StateGroup` don't have helper + methods like :code:`.set()`, :code:`.next()`, etc. + + Instead of this you should set states by passing them directly to + :class:`aiogram.fsm.context.FSMContext` (:ref:`Read more ยป `) +- State proxy is deprecated, you should update the state data by calling + :code:`state.set_data(...)` and :code:`state.get_data()` respectively. Sending Files