CalendarCtrl EnableYearChange

Why is in wxPython 4.0.4 EnableYearChange() removed from wx.adv.CalendarCtrl and deprecated in wx.adv.GenericCalendarCtrl ? What is the alternative/replacement?

I don’t think it’s ever been in CalendarCtrl, unless I’m reading the git history incorrectly. It wasn’t there in Classic either.

The deprecation in GenericCalendarCtrl is automatically added due to it being marked as deprecated in the C++ docs. According to git, that deprecated tag was added 11 years ago, and I haven’t seen any mention of an alternative yet. What has changed for wxPython is we are now automatically deprecating things that are marked as deprecated in C++. Most of the time they are good ones, it looks like this one will just be noise. You may want to file a ticket at trac.wxwidgets.org to either remove the deprecated tag since it has been there so long without being removed, or at least find out what should be used instead.

···

On Sunday, January 20, 2019 at 11:39:10 AM UTC-8, Torsten wrote:

Why is in wxPython 4.0.4 EnableYearChange() removed from wx.adv.CalendarCtrl and deprecated in wx.adv.GenericCalendarCtrl ? What is the alternative/replacement?

Robin

I don’t think it’s ever been in CalendarCtrl, unless I’m reading the git history incorrectly. It wasn’t there in Classic either.

The deprecation in GenericCalendarCtrl is automatically added due to it being marked as deprecated in the C++ docs. According to git, that deprecated tag was added 11 years ago, and I haven’t seen any mention of an alternative yet. What has changed for wxPython is we are now automatically deprecating things that are marked as deprecated in C++. Most of the time they are good ones, it looks like this one will just be noise. You may want to file a ticket at trac.wxwidgets.org to either remove the deprecated tag since it has been there so long without being removed, or at least find out what should be used instead.

That’s interesting. I was updating an old code from 2.8.1 to 4.04 when i came across this. EnableYearChange(False) didn’t throw an error in 2.8.1 and was working halfway with CalendarCtrl. It didn’t let you change year to past, only future years.

I created a ticket #18334