-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Regression in v2.2.3 for annual events #151
Comments
Can you provide the ics of the event? |
Thank you @fabien-michel! Here is the ics: https://calendar.google.com/calendar/ical/themarinas%40gmail.com/public/basic.ics With the following code
I get the following output on macOS:
However, running within the python:3.9.11 container yields the following:
Here is the Dockerfile I used:
|
Hi @fabien-michel thank you for your response. Just wanted to check if this is enough information for you to potentially reproduce? |
I would usually say that the ICS file should be attached to the issue as it could change over time.
This is a very interesting case. I thought that pure Python code would not differ between OS.
To solve this, your code is really useful to copy into a test. Then, we could run the tests under MacOS.
|
@niccokunzmann @fabien-michel Here is the ICS file: Github does not access .ics so I added the txt extension. |
@sanieldalib Could you check this? I copied your code and now, I get this output: ~/recurring-ical-events$ .tox/py39/bin/python test.py
Found 0 events
[] Code of test.py
|
@sanieldalib, I opened #153 for this but I think the calendar might have changed as the output is different ... |
@niccokunzmann Sorry, the ics was updated from my first posting to only include the troublesome event within the specified timestamps. Here is the output of your test on my macOS machine:
vs in docker (
|
Hm. I am under MacOS and I cannot reproduce this. niccokunzmann@Niccos-MacBook-Pro recurring-ical-events % tox -re py38
py38: remove tox env folder /Users/niccokunzmann/recurring-ical-events/.tox/py38
py38: install_deps> python -I -m pip install -r /Users/niccokunzmann/recurring-ical-events/requirements.txt -r /Users/niccokunzmann/recurring-ical-events/test-requirements.txt --pre
py38: commands[0]> pytest --basetemp=/Users/niccokunzmann/recurring-ical-events/.tox/py38/tmp
======================================================== test session starts ========================================================
platform darwin -- Python 3.8.2, pytest-8.3.2, pluggy-1.5.0
cachedir: .tox/py38/.pytest_cache
rootdir: /Users/niccokunzmann/recurring-ical-events
configfile: pyproject.toml
plugins: cov-5.0.0
collected 1272 items
test/test_after.py ....................................................................ss [ 5%]
test/test_at_function.py ............................................ [ 8%]
test/test_bad_rrule_format.py .... [ 9%]
test/test_convert_inputs.py ........................ [ 11%]
test/test_daylight_saving_time.py ........ [ 11%]
test/test_deleted_entries.py ........ [ 12%]
test/test_duration.py ................................................................ [ 17%]
test/test_end_before_start_event.py .... [ 17%]
test/test_event_values_and_edits.py ............................................. [ 21%]
test/test_examples.py ....................................................................................................... [ 29%]
............. [ 30%]
test/test_issue_101_select_components.py .................................................................... [ 35%]
test/test_issue_107_omitting_last_event.py .... [ 36%]
test/test_issue_113_period_in_rdate.py ........ [ 36%]
test/test_issue_117_until_before_dtstart.py .... [ 37%]
test/test_issue_128_only_first_event.py .......... [ 37%]
test/test_issue_148_ignored_exdate_in_higher_sequence.py ................................................................ [ 42%]
test/test_issue_15.py .... [ 43%]
test/test_issue_151_macos_linux_difference.py FFFF [ 43%]
test/test_issue_18_cancel_status.py ........................ [ 45%]
test/test_issue_20_exdate_ignored.py ........................................................................ [ 51%]
test/test_issue_27.py ........ [ 51%]
test/test_issue_28_timezone_with_z.py .... [ 51%]
test/test_issue_36_recurrence_id_format.py ............ [ 52%]
test/test_issue_4.py .................... [ 54%]
test/test_issue_44_day_event_reported_twice.py ............................ [ 56%]
test/test_issue_48_daylight.py ........................ [ 58%]
test/test_issue_48_dst.py ............ [ 59%]
test/test_issue_61.py .... [ 59%]
test/test_issue_62_moved_event.py ................................................ [ 63%]
test/test_issue_6_copy_subcomponents.py ........ [ 64%]
test/test_issue_7_datetime_and_date_start_stop.py .................... [ 65%]
test/test_issue_86_x_wr_timezone_but_no_tzid_in_dt.py .... [ 66%]
test/test_issue_97_simple_recurrent_todos_and_journals.py .................................... [ 68%]
test/test_keep_recurrence_attributes.py ............ [ 69%]
test/test_multiple_rrule.py .... [ 70%]
test/test_properties.py ........................ [ 72%]
test/test_rdate.py ................................................................ [ 77%]
test/test_readme.py . [ 77%]
test/test_recurrence_sequence_number.py .... [ 77%]
test/test_repeated_properties.py .... [ 77%]
test/test_repetitions_do_not_change.py .................... [ 79%]
test/test_simple_recurrent_events.py .................................... [ 82%]
test/test_single_events.py .................... [ 83%]
test/test_skip_bad_events.py ........ [ 84%]
test/test_time_arguments.py ........ [ 85%]
test/test_time_span_contains_event.py ............................................. [ 88%]
test/test_time_zones_differ.py .................................... [ 91%]
test/test_x_wr_timezone.py ......................................................... [ 95%]
test/test_zero_size_events.py .................................... [ 98%]
test/test_zoneinfo_issue_57.py ................ [100%]
============================================================= FAILURES ==============================================================
_________________________________________ test_count_events_from_issue[Calendars-use_pytz] __________________________________________
calendars = Calendars(use_pytz)
def test_count_events_from_issue(calendars):
"""The number of events seems to differ from OS to OS."""
start_time = datetime.fromtimestamp(1722564000, timezone.utc)
end_time = datetime.fromtimestamp(1722567600, timezone.utc)
events = calendars.issue_151_macos_linux_difference.between(start_time, end_time)
for event in events:
print(event["UID"], event["DTSTART"], event["SUMMARY"])
> assert len(events) == 4
E assert 0 == 4
E + where 0 = len([])
test/test_issue_151_macos_linux_difference.py:17: AssertionError
_______________________________________ test_count_events_from_issue[Calendars-use_zoneinfo] ________________________________________
calendars = Calendars(use_zoneinfo)
def test_count_events_from_issue(calendars):
"""The number of events seems to differ from OS to OS."""
start_time = datetime.fromtimestamp(1722564000, timezone.utc)
end_time = datetime.fromtimestamp(1722567600, timezone.utc)
events = calendars.issue_151_macos_linux_difference.between(start_time, end_time)
for event in events:
print(event["UID"], event["DTSTART"], event["SUMMARY"])
> assert len(events) == 4
E assert 0 == 4
E + where 0 = len([])
test/test_issue_151_macos_linux_difference.py:17: AssertionError
___________________________________ test_count_events_from_issue[ReversedCalendars-use_zoneinfo] ____________________________________
calendars = ReversedCalendars(use_zoneinfo)
def test_count_events_from_issue(calendars):
"""The number of events seems to differ from OS to OS."""
start_time = datetime.fromtimestamp(1722564000, timezone.utc)
end_time = datetime.fromtimestamp(1722567600, timezone.utc)
events = calendars.issue_151_macos_linux_difference.between(start_time, end_time)
for event in events:
print(event["UID"], event["DTSTART"], event["SUMMARY"])
> assert len(events) == 4
E assert 0 == 4
E + where 0 = len([])
test/test_issue_151_macos_linux_difference.py:17: AssertionError
_____________________________________ test_count_events_from_issue[ReversedCalendars-use_pytz] ______________________________________
calendars = ReversedCalendars(use_pytz)
def test_count_events_from_issue(calendars):
"""The number of events seems to differ from OS to OS."""
start_time = datetime.fromtimestamp(1722564000, timezone.utc)
end_time = datetime.fromtimestamp(1722567600, timezone.utc)
events = calendars.issue_151_macos_linux_difference.between(start_time, end_time)
for event in events:
print(event["UID"], event["DTSTART"], event["SUMMARY"])
> assert len(events) == 4
E assert 0 == 4
E + where 0 = len([])
test/test_issue_151_macos_linux_difference.py:17: AssertionError
====================================================== short test summary info ======================================================
FAILED test/test_issue_151_macos_linux_difference.py::test_count_events_from_issue[Calendars-use_pytz] - assert 0 == 4
FAILED test/test_issue_151_macos_linux_difference.py::test_count_events_from_issue[Calendars-use_zoneinfo] - assert 0 == 4
FAILED test/test_issue_151_macos_linux_difference.py::test_count_events_from_issue[ReversedCalendars-use_zoneinfo] - assert 0 == 4
FAILED test/test_issue_151_macos_linux_difference.py::test_count_events_from_issue[ReversedCalendars-use_pytz] - assert 0 == 4
============================================ 4 failed, 1266 passed, 2 skipped in 20.76s =============================================
py38: exit 1 (25.50 seconds) /Users/niccokunzmann/recurring-ical-events> pytest --basetemp=/Users/niccokunzmann/recurring-ical-events/.tox/py38/tmp pid=780
py38: FAIL code 1 (40.53=setup[15.03]+cmd[25.50] seconds)
evaluation failed :( (40.65 seconds)
niccokunzmann@Niccos-MacBook-Pro recurring-ical-events % This is in #153. |
Could you run this command in the environment? |
Also, could you follow the setup documentation and run the tests on your machine? I am wondering where and how this problem occurs. I cannot reproduce it at the moment. |
@niccokunzmann I dug into this some more. It appears that the issue is a regression between versions I initially thought this was an issue with the OS as my Docker image, was pulling the latest patch version, which my venv on macOS already had v2.2.2 installed. I apologize for the red herring here. |
No problem, this can happen. Would you say that the issue is still open and needs work on it? What as required to close it? |
1 similar comment
No problem, this can happen. Would you say that the issue is still open and needs work on it? What as required to close it? |
Yes. There is still a regression from |
This is fixed in v3.0.0. This took me 12 hours - 720$ - as an invitation if you or someone else sees the importance to contribute to my FOSS work :) |
I am running into an issue where the same code:
returns different events on macOS compared to a linux docker container (
python:3.9.11
). Specifically, it is an annually recurring event missing when running within the linux container (python:3.9.11
). I have confirmed that the difference is between OSes, as I get the difference in behavior on the same machine, python version, and package version - the only difference is macOS vs the docker image.I'll try to create a minimum reproduction of this and include it.
Is there anything you might be aware of that would be causing this issue?
We're using Polar.sh so you can upvote and help fund this issue. We receive the funding once the issue is completed & confirmed by you. Thank you in advance for helping prioritize & fund our work.
The text was updated successfully, but these errors were encountered: