import numpy as np
import pandas as pd

series = pd.Series(np.random.standard_normal(700))
series.ewm(span=10).aggregate(np.mean)
# 2.2.1: works but warns 'FutureWarning: The provided callable <function mean at 0x7f3e657cf7e0> is currently using ExponentialMovingWindow.mean. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string "mean" instead.'

# main: errors:
# AttributeError: 'ExponentialMovingWindow' object has no attribute 'apply'. Did you mean: '_apply'?

series.ewm(span=10).aggregate("mean") # works on both 2.2.1 and main

The warning on 2.2.1 clearly indicates that the behavior will change, but I'm not sure whether the intended future behavior is raising an error :)

xref https://github.com/pandas-dev/pandas-stubs/pull/904