Skip to content
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

date_search method is replaced #236

Merged
merged 4 commits into from
Nov 29, 2022
Merged

Conversation

yeshwantthota
Copy link
Contributor

No description provided.

@yeshwantthota yeshwantthota changed the title date_search is method replaced date_search method is replaced Nov 29, 2022
tests/test_caldav.py Outdated Show resolved Hide resolved
@tobixen
Copy link
Member

tobixen commented Nov 29, 2022

One missing new-line. tox -e style should autocorrect that. And I should try and see if I can run the example test code. Except for that it's good to go.

@yeshwantthota
Copy link
Contributor Author

One missing new-line. tox -e style should autocorrect that. And I should try and see if I can run the example test code. Except for that it's good to go.

One missing new-line. tox -e style should autocorrect that. And I should try and see if I can run the example test code. Except for that it's good to go.

I have added a new line

@tobixen
Copy link
Member

tobixen commented Nov 29, 2022

Something broke when I was trying to run the basic_examples.py. I will check it up a bit later.

@tobixen
Copy link
Member

tobixen commented Nov 29, 2022

Yes, forgot to say. The compfilter attribute is replaced by event=True or todo=True (and I should probably supplement it with `journal=True as well). If you add this (I could of course do it, but better you do it so we can have a nice commit log) we should be good:

--- a/examples/basic_usage_examples.py
+++ b/examples/basic_usage_examples.py
@@ -157,12 +157,11 @@ assert "FREQ=YEARLY" in todos[0].data
 print("Here is some more icalendar data:")
 print(todos[0].data)

-## date_search also works on task lists, but one has to be explicit to get them
+## date_search also works on task lists
 todos_found = my_new_tasklist.search(
     start=datetime(2021, 1, 1),
     end=datetime(2024, 1, 1),
-    compfilter="VTODO",
-    event=True,
+    todo=True,
     expand=True,
 )
 if not todos_found:

@tobixen tobixen merged commit 1028f12 into python-caldav:master Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants