Conversation
…or them The three runnable code blocks in docs/source/async.rst were broken: 1. `async with aio.get_async_davclient() as client:` fails with "coroutine object does not support the asynchronous context manager protocol" because get_async_davclient is an async function and must be awaited before it can be used as a context manager. Fixed to `async with await aio.get_async_davclient() as client:`. Same bug was present in the Quick Start, the "Working with Calendars", and the "Parallel Operations" examples, and in the Migration section. 2. `cal.name` triggers a DeprecationWarning (use get_display_name() instead); replaced with `await cal.get_display_name()` in the two code blocks that used it. The three runnable code blocks are now covered by the existing Manuel- based test harness: added `test_async_ref = manueltest(...)` to tests/test_docs.py (also fixed the double-assignment bug that made test_async_tutorial silently shadow test_tutorial). Confirmed tests fail before fix and pass after. Fixes: #661 prompt: Why is the "quick start" in docs/source/async.rst failing? followup-prompt: We need the code blocks in the documentation to be exercised by test code whenever possible. We already have some tests covering the tutorial. See if it's possible to get the code blocks that was changed just now tested. Revert the docfixes to verify that the tests are working correctly. Docfixes plus tests should be in the same commit, and remember to add prompts to the commit message. followup-prompt: Add a reference to #661 in the commit message
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for #661, with proper isolation from other outstanding work