diff --git a/.gitignore b/.gitignore index 2dd49ca0b549c52ab9bafe7bebeb31f9b041ed54..7b91e10c6ffd24baba85f0da40f4bc8cde4ef1ab 100644 --- a/.gitignore +++ b/.gitignore @@ -137,15 +137,9 @@ dmypy.json # Cython debug symbols cython_debug/ -# Requests-cache -redmine_cache.sqlite - ##################################################### # CUSTOM -# requests cache -instagram_cache.sqlite - # direnv .envrc diff --git a/.isort.cfg b/.isort.cfg index 9b65c58f973c9775015aa58dba6436e4fe8326e0..59e40fe752e18ce472c1e83eeddf5752e2f0ea16 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -3,4 +3,4 @@ line_length = 88 multi_line_output = 3 include_trailing_comma = true -known_third_party = PyPDF2,arrow,bleach,bs4,captcha,celery,dateutil,django,environ,faker,fastjsonschema,icalevnt,markdown,modelcluster,pirates,pytest,pytz,requests,sentry_sdk,taggit,wagtail,wagtailmetadata,weasyprint,yaml +known_third_party = PyPDF2,arrow,bleach,bs4,captcha,celery,dateutil,django,environ,faker,fastjsonschema,icalevents,icalevnt,markdown,modelcluster,pirates,pytest,pytz,requests,sentry_sdk,taggit,wagtail,wagtailmetadata,weasyprint,yaml diff --git a/calendar_utils/migrations/0004_auto_20220505_1228.py b/calendar_utils/migrations/0004_auto_20220505_1228.py index 4d4bff6a2bf53efb2b2c318f20b96b90b878ab32..62f0bfa4fdd74cc5b80b039913835228bdc47e36 100644 --- a/calendar_utils/migrations/0004_auto_20220505_1228.py +++ b/calendar_utils/migrations/0004_auto_20220505_1228.py @@ -3,7 +3,7 @@ from datetime import date, timedelta import arrow from django.db import migrations -from icalevnt import icalevents +from icalevents import icalevents from calendar_utils.parser import process_event_list diff --git a/calendar_utils/models.py b/calendar_utils/models.py index 335161250f7c8c763a9fb89a11f700035984b25a..939e7c02d2a9c7ea24019a8ca838b71588e60946 100644 --- a/calendar_utils/models.py +++ b/calendar_utils/models.py @@ -4,7 +4,7 @@ from datetime import date, timedelta import arrow from django.core.serializers.json import DjangoJSONEncoder from django.db import models -from icalevnt import icalevents +from icalevents import icalevents from .parser import process_event_list diff --git a/calendar_utils/parser.py b/calendar_utils/parser.py index 504cc20c8f78d64e9d98a8c5b3a5d891f040a9b0..1cefdbd6318438a4a03df51cc6004f3ef9e80f7c 100644 --- a/calendar_utils/parser.py +++ b/calendar_utils/parser.py @@ -7,7 +7,7 @@ import bleach from django.conf import settings if TYPE_CHECKING: - from icalevnt.icalparser import Event + from icalevents.icalparser import Event EVENT_KEYS = ("start", "end", "all_day", "summary", "description", "location") diff --git a/district/migrations/0109_districtpersonpage_ical_calendar_url.py b/district/migrations/0109_districtpersonpage_ical_calendar_url.py index fc0786915f38f6722dfc84947c6e10c6116d21fc..f52cd41dcfe883fce77bcf47a19554b723f2ae22 100644 --- a/district/migrations/0109_districtpersonpage_ical_calendar_url.py +++ b/district/migrations/0109_districtpersonpage_ical_calendar_url.py @@ -4,15 +4,20 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('district', '0108_alter_districtcenterpage_content_and_more'), + ("district", "0108_alter_districtcenterpage_content_and_more"), ] operations = [ migrations.AddField( - model_name='districtpersonpage', - name='ical_calendar_url', - field=models.URLField(blank=True, help_text='Podporuje Mrak, Google Kalendář a další. Návod na synchronizaci najdeš na pi2.cz/kalendare', max_length=256, null=True, verbose_name='iCal adresa kalendáře'), + model_name="districtpersonpage", + name="ical_calendar_url", + field=models.URLField( + blank=True, + help_text="Podporuje Mrak, Google Kalendář a další. Návod na synchronizaci najdeš na pi2.cz/kalendare", + max_length=256, + null=True, + verbose_name="iCal adresa kalendáře", + ), ), ] diff --git a/instagram_cache.sqlite b/instagram_cache.sqlite new file mode 100644 index 0000000000000000000000000000000000000000..4e694d764762f43e9f4f42074da89586c87d8a50 Binary files /dev/null and b/instagram_cache.sqlite differ diff --git a/requirements/base.in b/requirements/base.in index d42e722b5768c98aedf409f64cf75e416786aefa..0ccf7f6ba0f300761b9bb27feb3e902570b9c4a7 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -12,7 +12,7 @@ pirates<=0.7 whitenoise opencv-python requests -icalevnt +icalevents ics arrow sentry-sdk diff --git a/requirements/base.txt b/requirements/base.txt index 9c49218f591d4a40c643d5eb9cef52b4f0475cac..a8f9c8a7761b73828256c642c43a0a8098763c42 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.10 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # pip-compile base.in @@ -68,8 +68,8 @@ cryptography==40.0.1 # pyopenssl cssselect2==0.7.0 # via weasyprint -datetime==4.3 - # via icalevnt +datetime==4.9 + # via icalevents decorator==5.1.1 # via ipython django==4.1.8 @@ -117,8 +117,6 @@ draftjs-exporter==2.1.7 # via wagtail et-xmlfile==1.1.0 # via openpyxl -exceptiongroup==1.1.1 - # via cattrs executing==1.2.0 # via stack-data fastjsonschema==2.16.3 @@ -129,11 +127,11 @@ html5lib==1.1 # via # wagtail # weasyprint -httplib2==0.20.1 - # via icalevnt -icalendar==4.0.8 - # via icalevnt -icalevnt==0.1.26 +httplib2==0.20.4 + # via icalevents +icalendar==4.0.9 + # via icalevents +icalevents==0.1.27 # via -r base.in ics==0.7.2 # via -r base.in @@ -198,7 +196,7 @@ pygments==2.15.0 # via ipython pyopenssl==23.1.1 # via josepy -pyparsing==2.4.7 +pyparsing==3.0.9 # via httplib2 pypdf2==3.0.1 # via -r base.in @@ -208,7 +206,7 @@ python-dateutil==2.8.2 # via # arrow # icalendar - # icalevnt + # icalevents # ics pytz==2021.3 # via @@ -217,7 +215,7 @@ pytz==2021.3 # django-modelcluster # djangorestframework # icalendar - # icalevnt + # icalevents # l18n pyyaml==6.0 # via -r base.in diff --git a/requirements/dev.txt b/requirements/dev.txt index 827deebf62a58817800d6f2cd00eb4d2c7e0a599..d27107e71711573cc795a9c93681722e672fa071 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -28,7 +28,7 @@ inflection==0.5.1 # via pytest-factoryboy iniconfig==2.0.0 # via pytest -packaging==23.0 +packaging==23.1 # via # pytest # pytest-sugar diff --git a/shared/models.py b/shared/models.py index 0de214ec1f5fecbdc152b74c4b1ae837f32cf3b6..b2ca1fc19d8075422544574c71e61e6640021421 100644 --- a/shared/models.py +++ b/shared/models.py @@ -1,8 +1,8 @@ import json import logging +from datetime import date, timedelta import requests -from datetime import date, timedelta from django.core.cache import cache from django.db import models from django.utils import timezone diff --git a/tests/calendar_utils/conftest.py b/tests/calendar_utils/conftest.py index d8e3018a72a2949ff9f61c5d96ae7556c62c4d89..1aea614630b9fab206a7f52970cf82a8854075d0 100644 --- a/tests/calendar_utils/conftest.py +++ b/tests/calendar_utils/conftest.py @@ -3,7 +3,7 @@ from datetime import datetime from pathlib import Path import pytest -from icalevnt.icalparser import Event +from icalevents.icalparser import Event @pytest.fixture(scope="session") diff --git a/tests/calendar_utils/test_parser.py b/tests/calendar_utils/test_parser.py index 8c1f141468d89de38cfc16bb33108e1dff382cc4..c34fdbedc6d37ef6b367f89ebb3cb1d05af47ccb 100644 --- a/tests/calendar_utils/test_parser.py +++ b/tests/calendar_utils/test_parser.py @@ -1,9 +1,7 @@ from datetime import datetime -from zoneinfo import ZoneInfo -import arrow import pytest -from icalevnt.icalparser import Event +from icalevents.icalparser import Event from calendar_utils.parser import ( process_event_list, @@ -20,7 +18,7 @@ def test_split_events(sample_response, sample_future_events, sample_past_events) @pytest.mark.freeze_time("2022-05-13") -def test_split_events(sample_events, sample_future_events, sample_past_events): +def test_split_dist_list(sample_events, sample_future_events, sample_past_events): past_events, future_events = split_event_dict_list(sample_events) assert sample_past_events == past_events assert sample_future_events == future_events