0.7.2 shows unnecessary deprecation warnings
jakub-bacic opened this issue · comments
Jakub Bacic commented
The following example shows deprecation warning:
FutureWarning: Behaviour of str(Component) will change in version 0.9 to only return a short description, NOT the ics representation. Use the explicit Component.serialize() to get the ics representation.
even though, it doesn't explicitly use str
on any Component object:
import datetime
from ics import Calendar, DisplayAlarm, Event
cal = Calendar()
event = Event(alarms=[DisplayAlarm(trigger=datetime.datetime.now())])
cal.events.add(event)
# that line will show deprecation warning
cal.serialize()
Niko Fink commented
There's always that one place you miss...
Jakub Bacic commented
@N-Coder
Do you think we can release a patch version with this change now? I'd like to update the dependency in our project so we can get rid of these warnings in production code.