1
0
mirror of https://github.com/b4tman/sync_ics2gcal synced 2026-07-27 04:02:54 +03:00

4 Commits

Author SHA1 Message Date
b4tman 55f1feae3b add python 3.14 2026-03-01 12:03:37 +03:00
b4tman a5967b1043 ical: fix Optional[Calendar] to Calendar cast 2026-03-01 11:54:52 +03:00
b4tman caa7b388a1 remove ical str prop decoding for icalendar v7.0.2 2026-03-01 11:54:52 +03:00
dependabot[bot] 0676540e76 Bump the pypi-updates group with 3 updates
Bumps the pypi-updates group with 3 updates: [google-api-python-client](https://github.com/googleapis/google-api-python-client), [icalendar](https://github.com/collective/icalendar) and [sphinx](https://github.com/sphinx-doc/sphinx).


Updates `google-api-python-client` from 2.188.0 to 2.190.0
- [Release notes](https://github.com/googleapis/google-api-python-client/releases)
- [Commits](https://github.com/googleapis/google-api-python-client/compare/v2.188.0...v2.190.0)

Updates `icalendar` from 6.3.2 to 7.0.2
- [Release notes](https://github.com/collective/icalendar/releases)
- [Changelog](https://github.com/collective/icalendar/blob/main/CHANGES.rst)
- [Commits](https://github.com/collective/icalendar/compare/v6.3.2...v7.0.2)

Updates `sphinx` from 8.2.3 to 9.0.4
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/v9.0.4/CHANGES.rst)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v8.2.3...v9.0.4)

---
updated-dependencies:
- dependency-name: google-api-python-client
  dependency-version: 2.190.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pypi-updates
- dependency-name: icalendar
  dependency-version: 7.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: pypi-updates
- dependency-name: sphinx
  dependency-version: 9.0.4
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: pypi-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-01 11:54:52 +03:00
4 changed files with 71 additions and 44 deletions
+2 -2
View File
@@ -15,9 +15,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
max-parallel: 3
max-parallel: 4
matrix:
python-version: ['3.11', '3.12', '3.13']
python-version: ['3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v4
Generated
+58 -35
View File
@@ -467,14 +467,14 @@ grpcio-gcp = ["grpcio-gcp (>=0.2.2,<1.0.0)"]
[[package]]
name = "google-api-python-client"
version = "2.188.0"
version = "2.190.0"
description = "Google API Client Library for Python"
optional = false
python-versions = ">=3.7"
groups = ["main"]
files = [
{file = "google_api_python_client-2.188.0-py3-none-any.whl", hash = "sha256:3cad1b68f9d48b82b93d77927e8370a6f43f33d97848242601f14a93a1c70ef5"},
{file = "google_api_python_client-2.188.0.tar.gz", hash = "sha256:5c469db6614f071009e3e5bb8b6aeeccae3beb3647fa9c6cd97f0d551edde0b6"},
{file = "google_api_python_client-2.190.0-py3-none-any.whl", hash = "sha256:d9b5266758f96c39b8c21d9bbfeb4e58c14dbfba3c931f7c5a8d7fdcd292dd57"},
{file = "google_api_python_client-2.190.0.tar.gz", hash = "sha256:5357f34552e3724d80d2604c8fa146766e0a9d6bb0afada886fafed9feafeef6"},
]
[package.dependencies]
@@ -563,22 +563,20 @@ 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 = "6.3.2"
description = "iCalendar parser/generator"
version = "7.0.2"
description = "RFC 5545 compatible parser and generator of iCalendar files"
optional = false
python-versions = ">=3.8"
python-versions = ">=3.10"
groups = ["main"]
files = [
{file = "icalendar-6.3.2-py3-none-any.whl", hash = "sha256:d400e9c9bb8c025e5a3c77c236941bb690494be52528a0b43cc7e8b7c9505064"},
{file = "icalendar-6.3.2.tar.gz", hash = "sha256:e0c10ecbfcebe958d33af7d491f6e6b7580d11d475f2eeb29532d0424f9110a1"},
{file = "icalendar-7.0.2-py3-none-any.whl", hash = "sha256:ad31a5825b39522a30b073c6ced3ffcdf6c02cbb7dab69ba2e4de32ddbf77cc9"},
{file = "icalendar-7.0.2.tar.gz", hash = "sha256:de844ff5cde32f539bea7644e36d8494032a926b933bedb92621f2f239760806"},
]
[package.dependencies]
python-dateutil = "*"
tzdata = "*"
[package.extras]
test = ["coverage", "hypothesis", "pytest", "pytz"]
typing-extensions = {version = ">=4.10,<5.0", markers = "python_version < \"3.13\""}
tzdata = ">=2025.3"
[[package]]
name = "idna"
@@ -1484,21 +1482,17 @@ socks = ["PySocks (>=1.5.6,!=1.5.7)"]
use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"]
[[package]]
name = "roman-numerals-py"
version = "3.1.0"
name = "roman-numerals"
version = "4.1.0"
description = "Manipulate well-formed Roman numerals"
optional = false
python-versions = ">=3.9"
python-versions = ">=3.10"
groups = ["docs"]
files = [
{file = "roman_numerals_py-3.1.0-py3-none-any.whl", hash = "sha256:9da2ad2fb670bcf24e81070ceb3be72f6c11c440d73bd579fbeca1e9f330954c"},
{file = "roman_numerals_py-3.1.0.tar.gz", hash = "sha256:be4bf804f083a4ce001b5eb7e3c0862479d10f94c936f6c4e5f250aa5ff5bd2d"},
{file = "roman_numerals-4.1.0-py3-none-any.whl", hash = "sha256:647ba99caddc2cc1e55a51e4360689115551bf4476d90e8162cf8c345fe233c7"},
{file = "roman_numerals-4.1.0.tar.gz", hash = "sha256:1af8b147eb1405d5839e78aeb93131690495fe9da5c91856cb33ad55a7f1e5b2"},
]
[package.extras]
lint = ["mypy (==1.15.0)", "pyright (==1.1.394)", "ruff (==0.9.7)"]
test = ["pytest (>=8)"]
[[package]]
name = "rsa"
version = "4.9.1"
@@ -1540,27 +1534,28 @@ files = [
[[package]]
name = "sphinx"
version = "8.2.3"
version = "9.0.4"
description = "Python documentation generator"
optional = false
python-versions = ">=3.11"
groups = ["docs"]
markers = "python_version < \"3.13\""
files = [
{file = "sphinx-8.2.3-py3-none-any.whl", hash = "sha256:4405915165f13521d875a8c29c8970800a0141c14cc5416a38feca4ea5d9b9c3"},
{file = "sphinx-8.2.3.tar.gz", hash = "sha256:398ad29dee7f63a75888314e9424d40f52ce5a6a87ae88e7071e80af296ec348"},
{file = "sphinx-9.0.4-py3-none-any.whl", hash = "sha256:5bebc595a5e943ea248b99c13814c1c5e10b3ece718976824ffa7959ff95fffb"},
{file = "sphinx-9.0.4.tar.gz", hash = "sha256:594ef59d042972abbc581d8baa577404abe4e6c3b04ef61bd7fc2acbd51f3fa3"},
]
[package.dependencies]
alabaster = ">=0.7.14"
babel = ">=2.13"
colorama = {version = ">=0.4.6", markers = "sys_platform == \"win32\""}
docutils = ">=0.20,<0.22"
docutils = ">=0.20,<0.23"
imagesize = ">=1.3"
Jinja2 = ">=3.1"
packaging = ">=23.0"
Pygments = ">=2.17"
requests = ">=2.30.0"
roman-numerals-py = ">=1.0.0"
roman-numerals = ">=1.0.0"
snowballstemmer = ">=2.2"
sphinxcontrib-applehelp = ">=1.0.7"
sphinxcontrib-devhelp = ">=1.0.6"
@@ -1569,10 +1564,37 @@ sphinxcontrib-jsmath = ">=1.0.1"
sphinxcontrib-qthelp = ">=1.0.6"
sphinxcontrib-serializinghtml = ">=1.1.9"
[package.extras]
docs = ["sphinxcontrib-websupport"]
lint = ["betterproto (==2.0.0b6)", "mypy (==1.15.0)", "pypi-attestations (==0.0.21)", "pyright (==1.1.395)", "pytest (>=8.0)", "ruff (==0.9.9)", "sphinx-lint (>=0.9)", "types-Pillow (==10.2.0.20240822)", "types-Pygments (==2.19.0.20250219)", "types-colorama (==0.4.15.20240311)", "types-defusedxml (==0.7.0.20240218)", "types-docutils (==0.21.0.20241128)", "types-requests (==2.32.0.20241016)", "types-urllib3 (==1.26.25.14)"]
test = ["cython (>=3.0)", "defusedxml (>=0.7.1)", "pytest (>=8.0)", "pytest-xdist[psutil] (>=3.4)", "setuptools (>=70.0)", "typing_extensions (>=4.9)"]
[[package]]
name = "sphinx"
version = "9.1.0"
description = "Python documentation generator"
optional = false
python-versions = ">=3.12"
groups = ["docs"]
markers = "python_version >= \"3.13\""
files = [
{file = "sphinx-9.1.0-py3-none-any.whl", hash = "sha256:c84fdd4e782504495fe4f2c0b3413d6c2bf388589bb352d439b2a3bb99991978"},
{file = "sphinx-9.1.0.tar.gz", hash = "sha256:7741722357dd75f8190766926071fed3bdc211c74dd2d7d4df5404da95930ddb"},
]
[package.dependencies]
alabaster = ">=0.7.14"
babel = ">=2.13"
colorama = {version = ">=0.4.6", markers = "sys_platform == \"win32\""}
docutils = ">=0.21,<0.23"
imagesize = ">=1.3"
Jinja2 = ">=3.1"
packaging = ">=23.0"
Pygments = ">=2.17"
requests = ">=2.30.0"
roman-numerals = ">=1.0.0"
snowballstemmer = ">=2.2"
sphinxcontrib-applehelp = ">=1.0.7"
sphinxcontrib-devhelp = ">=1.0.6"
sphinxcontrib-htmlhelp = ">=2.0.6"
sphinxcontrib-jsmath = ">=1.0.1"
sphinxcontrib-qthelp = ">=1.0.6"
sphinxcontrib-serializinghtml = ">=1.1.9"
[[package]]
name = "sphinx-copybutton"
@@ -1811,22 +1833,23 @@ version = "4.14.0"
description = "Backported and Experimental Type Hints for Python 3.9+"
optional = false
python-versions = ">=3.9"
groups = ["dev"]
groups = ["main", "dev"]
files = [
{file = "typing_extensions-4.14.0-py3-none-any.whl", hash = "sha256:a1514509136dd0b477638fc68d6a91497af5076466ad0fa6c338e44e359944af"},
{file = "typing_extensions-4.14.0.tar.gz", hash = "sha256:8676b788e32f02ab42d9e7c61324048ae4c6d844a399eebace3d4979d75ceef4"},
]
markers = {main = "python_version < \"3.13\""}
[[package]]
name = "tzdata"
version = "2025.2"
version = "2025.3"
description = "Provider of IANA time zone data"
optional = false
python-versions = ">=2"
groups = ["main"]
files = [
{file = "tzdata-2025.2-py2.py3-none-any.whl", hash = "sha256:1a403fada01ff9221ca8044d701868fa132215d84beb92242d9acd2147f667a8"},
{file = "tzdata-2025.2.tar.gz", hash = "sha256:b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9"},
{file = "tzdata-2025.3-py2.py3-none-any.whl", hash = "sha256:06a47e5700f3081aab02b2e513160914ff0694bce9947d6b76ebd6bf57cfc5d1"},
{file = "tzdata-2025.3.tar.gz", hash = "sha256:de39c2ca5dc7b0344f2eba86f49d614019d29f060fc4ebc8a417896a620b56a7"},
]
[[package]]
@@ -1862,4 +1885,4 @@ zstd = ["backports-zstd (>=1.0.0) ; python_version < \"3.14\""]
[metadata]
lock-version = "2.1"
python-versions = "^3.11"
content-hash = "fa9779d405851945942c861bced39623017febcc43d3486585568fccd98ac97a"
content-hash = "7884f9abe827dd58f8fb021c961daa8eb5ccc0ebaedfec7510164a785c6be505"
+5 -4
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "sync_ics2gcal"
version = "0.1.5"
version = "0.1.6"
description = "Sync ics file with Google calendar"
authors = ["Dmitry Belyaev <b4tm4n@mail.ru>"]
license = "MIT"
@@ -14,13 +14,14 @@ classifiers = [
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
]
[tool.poetry.dependencies]
python = "^3.11"
google-auth = "2.48.0"
google-api-python-client = "2.188.0"
icalendar = "6.3.2"
google-api-python-client = "2.190.0"
icalendar = "7.0.2"
pytz = "2025.2"
PyYAML = "6.0.3"
fire = "0.7.1"
@@ -42,7 +43,7 @@ types-PyYAML = "^6.0.12.20250516"
lxml = ">=5.4.0,<7.0.0"
[tool.poetry.group.docs.dependencies]
sphinx = ">=8.2,<9.0"
sphinx = ">=8.2,<10.0"
myst-parser = ">=4,<6"
sphinx-rtd-theme = ">=3.0.2,<4.0.0"
sphinx-copybutton = "^0.5.2"
+6 -3
View File
@@ -1,6 +1,6 @@
import datetime
import logging
from typing import Union, Dict, Callable, Optional, Mapping, TypedDict
from typing import Union, Dict, Callable, Optional, Mapping, TypedDict, cast
from icalendar import Calendar, Event
from pytz import utc
@@ -75,7 +75,7 @@ class EventConverter(Event): # type: ignore
string value
"""
return str(self.decoded(prop).decode(encoding="utf-8"))
return str(self.decoded(prop))
def _datetime_str_prop(self, prop: str) -> str:
"""utc datetime as string from property
@@ -192,7 +192,10 @@ class CalendarConverter:
def events_to_gcal(self) -> EventList:
"""Convert events to google calendar resources"""
calendar: Calendar = self.calendar
if self.calendar is None:
raise ValueError("calendar not set")
calendar: Calendar = cast(Calendar, self.calendar)
ics_events = calendar.walk(name="VEVENT")
self.logger.info("%d events read", len(ics_events))