Remove long deprecated AllPalletsWithoutSystemReversed (#2509)

Remove deprecated `AllPalletsXY` types.

They have been deprecated for nearly 1.5 years now, I think its fine to
remove them.
If anyone feels like we should first put a date on the deprecation as
stated in the deprecation guideline, feel free to speak up. To me it
looks like this has been forgotten and can be directly removed.
This commit is contained in:
Sebastian Kunert
2023-11-28 23:13:36 +01:00
committed by GitHub
parent aada961da9
commit 820179348c
3 changed files with 2 additions and 175 deletions
@@ -1271,52 +1271,6 @@ fn pallet_hooks_expand() {
})
}
#[test]
fn all_pallets_type_reversed_order_is_correct() {
TestExternalities::default().execute_with(|| {
frame_system::Pallet::<Runtime>::set_block_number(1);
#[allow(deprecated)]
{
assert_eq!(
AllPalletsWithoutSystemReversed::on_initialize(1),
Weight::from_parts(10, 0)
);
AllPalletsWithoutSystemReversed::on_finalize(1);
assert_eq!(
AllPalletsWithoutSystemReversed::on_runtime_upgrade(),
Weight::from_parts(30, 0)
);
}
assert_eq!(
frame_system::Pallet::<Runtime>::events()[0].event,
RuntimeEvent::Example2(pallet2::Event::Something(11)),
);
assert_eq!(
frame_system::Pallet::<Runtime>::events()[1].event,
RuntimeEvent::Example(pallet::Event::Something(10)),
);
assert_eq!(
frame_system::Pallet::<Runtime>::events()[2].event,
RuntimeEvent::Example2(pallet2::Event::Something(21)),
);
assert_eq!(
frame_system::Pallet::<Runtime>::events()[3].event,
RuntimeEvent::Example(pallet::Event::Something(20)),
);
assert_eq!(
frame_system::Pallet::<Runtime>::events()[4].event,
RuntimeEvent::Example2(pallet2::Event::Something(31)),
);
assert_eq!(
frame_system::Pallet::<Runtime>::events()[5].event,
RuntimeEvent::Example(pallet::Event::Something(30)),
);
})
}
#[test]
fn pallet_on_genesis() {
TestExternalities::default().execute_with(|| {
@@ -2186,31 +2140,6 @@ fn test_storage_info() {
);
}
#[test]
fn assert_type_all_pallets_reversed_with_system_first_is_correct() {
// Just ensure the 2 types are same.
#[allow(deprecated)]
fn _a(_t: AllPalletsReversedWithSystemFirst) {}
#[cfg(all(not(feature = "frame-feature-testing"), not(feature = "frame-feature-testing-2")))]
fn _b(t: (System, Example4, Example2, Example)) {
_a(t)
}
#[cfg(all(feature = "frame-feature-testing", not(feature = "frame-feature-testing-2")))]
fn _b(t: (System, Example4, Example3, Example2, Example)) {
_a(t)
}
#[cfg(all(not(feature = "frame-feature-testing"), feature = "frame-feature-testing-2"))]
fn _b(t: (System, Example5, Example4, Example2, Example)) {
_a(t)
}
#[cfg(all(feature = "frame-feature-testing", feature = "frame-feature-testing-2"))]
fn _b(t: (System, Example5, Example4, Example3, Example2, Example)) {
_a(t)
}
}
#[test]
fn assert_type_all_pallets_with_system_is_correct() {
// Just ensure the 2 types are same.
@@ -2255,52 +2184,6 @@ fn assert_type_all_pallets_without_system_is_correct() {
}
}
#[test]
fn assert_type_all_pallets_with_system_reversed_is_correct() {
// Just ensure the 2 types are same.
#[allow(deprecated)]
fn _a(_t: AllPalletsWithSystemReversed) {}
#[cfg(all(not(feature = "frame-feature-testing"), not(feature = "frame-feature-testing-2")))]
fn _b(t: (Example4, Example2, Example, System)) {
_a(t)
}
#[cfg(all(feature = "frame-feature-testing", not(feature = "frame-feature-testing-2")))]
fn _b(t: (Example4, Example3, Example2, Example, System)) {
_a(t)
}
#[cfg(all(not(feature = "frame-feature-testing"), feature = "frame-feature-testing-2"))]
fn _b(t: (Example5, Example4, Example2, Example, System)) {
_a(t)
}
#[cfg(all(feature = "frame-feature-testing", feature = "frame-feature-testing-2"))]
fn _b(t: (Example5, Example4, Example3, Example2, Example, System)) {
_a(t)
}
}
#[test]
fn assert_type_all_pallets_without_system_reversed_is_correct() {
// Just ensure the 2 types are same.
#[allow(deprecated)]
fn _a(_t: AllPalletsWithoutSystemReversed) {}
#[cfg(all(not(feature = "frame-feature-testing"), not(feature = "frame-feature-testing-2")))]
fn _b(t: (Example4, Example2, Example)) {
_a(t)
}
#[cfg(all(feature = "frame-feature-testing", not(feature = "frame-feature-testing-2")))]
fn _b(t: (Example4, Example3, Example2, Example)) {
_a(t)
}
#[cfg(all(not(feature = "frame-feature-testing"), feature = "frame-feature-testing-2"))]
fn _b(t: (Example5, Example4, Example2, Example)) {
_a(t)
}
#[cfg(all(feature = "frame-feature-testing", feature = "frame-feature-testing-2"))]
fn _b(t: (Example5, Example4, Example3, Example2, Example)) {
_a(t)
}
}
#[test]
fn test_storage_alias() {
use frame_support::Twox64Concat;