ics-py / ics-py

Pythonic and easy iCalendar library (rfc5545)

Home Page:http://icspy.readthedocs.org/en/stable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

0.7.2 shows unnecessary deprecation warnings

jakub-bacic opened this issue · comments

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()

There's always that one place you miss... 🙈 Thanks for fixing this! Its probably best to wait a little longer and see whether any further things come up and only then do a further release. Until then you can easily either suppress the warning or install 0.7 from the respective branch.

@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.