diff --git a/icalevents/icalparser.py b/icalevents/icalparser.py index 3cb2cf9..3f29427 100644 --- a/icalevents/icalparser.py +++ b/icalevents/icalparser.py @@ -15,10 +15,14 @@ from icalendar.prop import vDDDLists, vText from uuid import uuid4 -from icalendar.windows_to_olson import WINDOWS_TO_OLSON +from icalendar import use_pytz +from icalendar.timezone.windows_to_olson import WINDOWS_TO_OLSON from pytz import timezone +use_pytz() + + def now(): """ Get current time. diff --git a/poetry.lock b/poetry.lock index de5f287..f8e03bd 100644 --- a/poetry.lock +++ b/poetry.lock @@ -179,18 +179,21 @@ pyparsing = {version = ">=2.4.2,<3.0.0 || >3.0.0,<3.0.1 || >3.0.1,<3.0.2 || >3.0 [[package]] name = "icalendar" -version = "5.0.13" +version = "6.0.0" description = "iCalendar parser/generator" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "icalendar-5.0.13-py3-none-any.whl", hash = "sha256:5ded5415e2e1edef5ab230024a75878a7a81d518a3b1ae4f34bf20b173c84dc2"}, - {file = "icalendar-5.0.13.tar.gz", hash = "sha256:92799fde8cce0b61daa8383593836d1e19136e504fa1671f471f98be9b029706"}, + {file = "icalendar-6.0.0-py3-none-any.whl", hash = "sha256:567e718551d800362db04ca09777295336e1803f6fc6bc0a7a5e258917fa8ed0"}, + {file = "icalendar-6.0.0.tar.gz", hash = "sha256:7ddf60d343f3c1f716de9b62f6e80ffd95d03cab62464894a0539feab7b5c76e"}, ] [package.dependencies] python-dateutil = "*" -pytz = "*" +tzdata = "*" + +[package.extras] +test = ["coverage", "hypothesis", "pytest", "pytz"] [[package]] name = "iniconfig" @@ -394,7 +397,18 @@ files = [ {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] +[[package]] +name = "tzdata" +version = "2024.2" +description = "Provider of IANA time zone data" +optional = false +python-versions = ">=2" +files = [ + {file = "tzdata-2024.2-py2.py3-none-any.whl", hash = "sha256:a48093786cdcde33cad18c2555e8532f34422074448fbc874186f0abd79565cd"}, + {file = "tzdata-2024.2.tar.gz", hash = "sha256:7d85cc416e9382e69095b7bdf4afd9e3880418a2413feec7069d533d6b4e31cc"}, +] + [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "68594b7cc9f3e251efac690fcee26e2c4b2256a38a9d76d121d6831d93b32493" +content-hash = "3fdb4deb42940f9f19ac71a0d915b2445b66fda8e4b44c232c15cf0b5838f867" diff --git a/pyproject.toml b/pyproject.toml index ac149ee..997f225 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ readme = "README.md" [tool.poetry.dependencies] python = "^3.9" -icalendar = "5.0.13" +icalendar = "^6.0.0" python-dateutil = "^2.9.0" pytz = "^2024.1" httplib2 = "^0.22.0"