sammchardy / python-binance

Binance Exchange API python implementation for automated trading
https://python-binance.readthedocs.io/en/latest/
MIT License
5.98k stars 2.2k forks source link

Undocumented backwards incompatibility in version 1.0.16 #1182

Open eXceediDeaL opened 2 years ago

eXceediDeaL commented 2 years ago

Describe the bug

Hello, I found that the most recent version 1.0.16 of python-binance probably introduces a small breaking change, which is not recorded in release notes:

This change could cause inconsistent signature if a subclass of Client/AsyncClient overrides get_historical_klines_generator method.

Maybe recording this change in release notes helps to avoid user confusion during updating this version?

Kind regrads,

@eXceediDeaL

To Reproduce

class SubClient(Client):
  def get_historical_klines(self, symbol, interval, start_str, end_str=None, limit=500,
                            klines_type: HistoricalKlinesType = HistoricalKlinesType.SPOT):
    super().get_historical_klines(symbol, interval, start_str, end_str, limit, klines_type)

# the following call will fail because missing start_str parameter.
client: Client = SubClient(...)
client.get_historical_klines("BNBBTC", Client.KLINE_INTERVAL_1MINUTE)

Environment (please complete the following information):