Migration from previous versions#
Migration 2.0b21 -> 2.0b22#
Simplified naming of managed widgets:
ManagedTextInputAdapter
->ManagedTextInput
ManagedCalendarAdapter
->ManagedCalendar
ManagedCounterAdapter
->ManagedCounter
ManagedCheckboxAdapter
->ManagedCheckbox
ManagedMultiSelectAdapter
->ManagedMultiselect
ManagedRadioAdapter
->ManagedRadio
ManagedListGroupAdapter
->ManagedListGroup
Migration 2.0b18 -> 2.0b21#
en_error
callback in TextInput now receivesValueError
instance as 4th parameter in addition to previously used threeon_error
andon_success
in TextInput now receiveManagedTextInputAdapter
instead ofTextInput
as a 2d parameter
Migration 2.0b10 -> 2.0b18#
Registry
class removed.Each Dialog` is now a
Router
. You should dodp.include_router(dialog)
to attach it.setup_dialogs
is now a replacement ofregistry.setup_dp()
. Parameters are the same.render_preview
andrender_transitions
methods now expectDispatcher
,Router
orDialog
instance instead ofRegistry
aiogram-dialog-preview
now expectsDispatcher
,Router
orDialog
instance instead ofRegistry
Migration 2.0b10 -> 2.0b17#
Registry
is now created without dispatcher. After that you need to setup dispatcher usingsetup_dp
methodRegistry.register_start_handler
now requires router (or dispatcher)
Migration 1.x -> 2.0b10#
Main objects like
Dialog
,LaunchMode
andDialogManager
should be imported directly fromaiogram_dialog
package.Whenable
is moved towidgets.common
subpackageWhen finding widget by
id
you will get managed version of widget. This objects no more expectDialogManager
orChatEvent
arguments in their methodsFor
ListGroup
items callbacks you will getSubManager
which behavior slightly changed.SubManager
moved toaiogram_dialog
packageManagedDialog
protocol renamed toDialogProtocol
Dialog
no more contains.next
,.back
and.switch_to
methods. They are available inDialogManager
DialogManagerFactory
protocol simplifiedno more
ManagedDialogAdapterProto
. You will getDialog
instance insteadno more
data
inContext
. Renamed tostart_data
many time agodialog_data
andstart_data
added toDialogManager
,data
is renamed tomiddleware_data
Migration 0.11 -> 1.0#
reset_stack
was replaced withStartMode
. E.g.reset_stack=true
is nowmode=StartMode.RESET_STACK
dialog no more changes current aiogram state
- In manager
context
andcurrent_intent()
were replaced withcurrent_context()
call. dialog_data
is a dict to hold user datawidget_data
is a dict to hold data of widgetsstart_data
is a data provided whe dialog startstate
is current dialog state
- In manager
When subdialog finishes parent is restored with previous state, not which it was started
Changed signature of
on_process_result
callback. It now accepts start data used to start subdialogGroup.keep_rows
option removed. Setwidth=None
(default value) if you want to keep rows.