click-log icon indicating copy to clipboard operation
click-log copied to clipboard

Breaking change in API

Open danielchatfield opened this issue 8 years ago • 4 comments

Hi, thanks for all your hard work on this.

This commit https://github.com/click-contrib/click-log/commit/e26170d8f40a4817a9178582d02248c1f082a32e introduced a breaking change to the API. Is there a way that I can change my code to:

  • behave the same way it used to
  • be tolerant of people with the old API and the new API

danielchatfield avatar Sep 04 '17 12:09 danielchatfield

You can replace get_level with logging.getLogger(...).getLevel (same with set_level). This part is backwards compatible.

The rest less so, please take a look at https://github.com/pimutils/vdirsyncer/commit/6954b26e0fdb5035f6344b994fcc1afb726a6c04

You could detect the version of click-log and apply the correct decorators depending on that.

untitaker avatar Sep 04 '17 12:09 untitaker

@untitaker Thanks for the quick response.

I think I'll have to do detect the version and then either provide logger or not depending on the version.

danielchatfield avatar Sep 04 '17 12:09 danielchatfield

Just curious, isn't it an option for you to set a minimum requirement on the click-log version?

On Mon, Sep 04, 2017 at 12:52:55PM +0000, Daniel Chatfield wrote:

@untitaker Thanks for the quick response.

I think I'll have to do detect the version and then either provide logger or not depending on the version.

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/click-contrib/click-log/issues/10#issuecomment-326956163

untitaker avatar Sep 04 '17 18:09 untitaker

@untitaker It's used in a bunch of internal tools that people usually update by just git pull so we try and avoid introducing new dependencies / changing required versions as much as possible.

danielchatfield avatar Sep 05 '17 09:09 danielchatfield