From b15483f68369aa56de60d64a1d27e81f61cb8385 Mon Sep 17 00:00:00 2001 From: Semyon Moroz Date: Fri, 16 May 2025 11:05:44 +0000 Subject: [PATCH] Bump icalendar to 6.3.* (#14078) --- stubs/icalendar/METADATA.toml | 2 +- stubs/icalendar/icalendar/__init__.pyi | 4 +++ stubs/icalendar/icalendar/attr.pyi | 14 +++++----- stubs/icalendar/icalendar/cal.pyi | 36 ++++++++++++++++++++++++++ stubs/icalendar/icalendar/error.pyi | 4 +++ stubs/icalendar/icalendar/prop.pyi | 2 ++ stubs/icalendar/icalendar/tools.pyi | 4 ++- 7 files changed, 58 insertions(+), 8 deletions(-) diff --git a/stubs/icalendar/METADATA.toml b/stubs/icalendar/METADATA.toml index 4dca3baa6..2bec6517e 100644 --- a/stubs/icalendar/METADATA.toml +++ b/stubs/icalendar/METADATA.toml @@ -1,4 +1,4 @@ -version = "6.2.*" +version = "6.3.*" upstream_repository = "https://github.com/collective/icalendar" requires = ["types-python-dateutil", "types-pytz"] diff --git a/stubs/icalendar/icalendar/__init__.pyi b/stubs/icalendar/icalendar/__init__.pyi index e793464c5..a95a2c94b 100644 --- a/stubs/icalendar/icalendar/__init__.pyi +++ b/stubs/icalendar/icalendar/__init__.pyi @@ -25,6 +25,7 @@ from .enums import ( from .error import ( ComponentEndMissing as ComponentEndMissing, ComponentStartMissing as ComponentStartMissing, + FeatureWillBeRemovedInFutureVersion as FeatureWillBeRemovedInFutureVersion, IncompleteAlarmInformation as IncompleteAlarmInformation, IncompleteComponent as IncompleteComponent, InvalidCalendar as InvalidCalendar, @@ -38,6 +39,7 @@ from .prop import ( vCalAddress as vCalAddress, vDate as vDate, vDatetime as vDatetime, + vDDDLists as vDDDLists, vDDDTypes as vDDDTypes, vDuration as vDuration, vFloat as vFloat, @@ -72,6 +74,7 @@ __all__ = [ "vCalAddress", "vDatetime", "vDate", + "vDDDLists", "vDDDTypes", "vDuration", "vFloat", @@ -114,6 +117,7 @@ __all__ = [ "vSkip", "RELTYPE", "ROLE", + "FeatureWillBeRemovedInFutureVersion", ] __version__ = version_mod.__version__ diff --git a/stubs/icalendar/icalendar/attr.pyi b/stubs/icalendar/icalendar/attr.pyi index 963a54752..c34df7522 100644 --- a/stubs/icalendar/icalendar/attr.pyi +++ b/stubs/icalendar/icalendar/attr.pyi @@ -10,15 +10,17 @@ def single_string_property(name: str, docs: str, other_name: str | None = None) color_property: property sequence_property: property categories_property: property +uid_property: property __all__ = [ - "single_utc_property", - "color_property", - "multi_language_text_property", - "single_int_property", - "sequence_property", "categories_property", - "rdates_property", + "color_property", "exdates_property", + "multi_language_text_property", + "rdates_property", "rrules_property", + "sequence_property", + "single_int_property", + "single_utc_property", + "uid_property", ] diff --git a/stubs/icalendar/icalendar/cal.pyi b/stubs/icalendar/icalendar/cal.pyi index 23b4942e0..db452d1f5 100644 --- a/stubs/icalendar/icalendar/cal.pyi +++ b/stubs/icalendar/icalendar/cal.pyi @@ -166,6 +166,12 @@ class Event(Component): def exdates(self) -> list[datetime.date | datetime.datetime]: ... @property def rrules(self) -> list[vRecur]: ... + @property + def uid(self) -> str: ... + @uid.setter + def uid(self, value: str) -> None: ... + @uid.deleter + def uid(self) -> None: ... class Todo(Component): name: ClassVar[Literal["VTODO"]] @@ -237,6 +243,12 @@ class Todo(Component): def exdates(self) -> list[datetime.date | datetime.datetime]: ... @property def rrules(self) -> list[vRecur]: ... + @property + def uid(self) -> str: ... + @uid.setter + def uid(self, value: str) -> None: ... + @uid.deleter + def uid(self) -> None: ... class Journal(Component): name: ClassVar[Literal["VJOURNAL"]] @@ -279,9 +291,21 @@ class Journal(Component): def exdates(self) -> list[datetime.date | datetime.datetime]: ... @property def rrules(self) -> list[vRecur]: ... + @property + def uid(self) -> str: ... + @uid.setter + def uid(self, value: str) -> None: ... + @uid.deleter + def uid(self) -> None: ... class FreeBusy(Component): name: ClassVar[Literal["VFREEBUSY"]] + @property + def uid(self) -> str: ... + @uid.setter + def uid(self, value: str) -> None: ... + @uid.deleter + def uid(self) -> None: ... class Timezone(Component): subcomponents: list[TimezoneStandard | TimezoneDaylight] @@ -399,6 +423,12 @@ class Alarm(Component): @property def triggers(self) -> Alarm.Triggers: ... + @property + def uid(self) -> str: ... + @uid.setter + def uid(self, value: str) -> None: ... + @uid.deleter + def uid(self) -> None: ... class Calendar(Component): name: ClassVar[Literal["VCALENDAR"]] @@ -439,6 +469,12 @@ class Calendar(Component): def categories(self, cats: list[str]) -> None: ... @categories.deleter def categories(self) -> None: ... + @property + def uid(self) -> str: ... + @uid.setter + def uid(self, value: str) -> None: ... + @uid.deleter + def uid(self) -> None: ... types_factory: Final[TypesFactory] component_factory: Final[ComponentFactory] diff --git a/stubs/icalendar/icalendar/error.pyi b/stubs/icalendar/icalendar/error.pyi index 042db5aa1..ef195bd38 100644 --- a/stubs/icalendar/icalendar/error.pyi +++ b/stubs/icalendar/icalendar/error.pyi @@ -4,6 +4,8 @@ class IncompleteAlarmInformation(ValueError): ... class LocalTimezoneMissing(IncompleteAlarmInformation): ... class ComponentEndMissing(IncompleteAlarmInformation): ... class ComponentStartMissing(IncompleteAlarmInformation): ... +class FeatureWillBeRemovedInFutureVersion(DeprecationWarning): ... +class WillBeRemovedInVersion7(FeatureWillBeRemovedInFutureVersion): ... __all__ = [ "InvalidCalendar", @@ -12,4 +14,6 @@ __all__ = [ "LocalTimezoneMissing", "ComponentEndMissing", "ComponentStartMissing", + "FeatureWillBeRemovedInFutureVersion", + "WillBeRemovedInVersion7", ] diff --git a/stubs/icalendar/icalendar/prop.pyi b/stubs/icalendar/icalendar/prop.pyi index 366d10ef3..7ac00bcd7 100644 --- a/stubs/icalendar/icalendar/prop.pyi +++ b/stubs/icalendar/icalendar/prop.pyi @@ -143,6 +143,8 @@ class vCategory: TZID: property class TimeBase: + params: Parameters + ignore_for_equality: set[str] def __eq__(self, other: object) -> bool: ... def __hash__(self) -> int: ... RANGE: property diff --git a/stubs/icalendar/icalendar/tools.pyi b/stubs/icalendar/icalendar/tools.pyi index d58219227..d63d649f8 100644 --- a/stubs/icalendar/icalendar/tools.pyi +++ b/stubs/icalendar/icalendar/tools.pyi @@ -1,6 +1,6 @@ import datetime from typing import Final -from typing_extensions import TypeGuard, TypeIs +from typing_extensions import TypeGuard, TypeIs, deprecated from pytz.tzinfo import BaseTzInfo @@ -11,8 +11,10 @@ __all__ = ["UIDGenerator", "is_date", "is_datetime", "to_datetime", "is_pytz", " class UIDGenerator: chars: Final[list[str]] @staticmethod + @deprecated("Use the Python standard library's :func:`uuid.uuid4` instead.") def rnd_string(length: int = 16) -> str: ... @staticmethod + @deprecated("Use the Python standard library's :func:`uuid.uuid5` instead.") def uid(host_name: str = "example.com", unique: str = "") -> vText: ... def is_date(dt: datetime.date) -> bool: ... # and not datetime.date