justinmclean opened a new issue, #48:
URL: https://github.com/apache/iggy-website/issues/48
The Python snippets on both SDK doc pages cannot run as written.
`docs/sdk/python/intro.mdx` uses `await` at module level in both the
producer and
consumer, with no `async def` and no `asyncio.run`. Saved as a `.py` file
that is
`SyntaxError: 'await' outside function`, so neither snippet runs at all.
`docs/sdk/python/examples.mdx` wraps them correctly, so the two pages
disagree
with each other.
Smaller issues in the same code:
- `intro.mdx` connects to `localhost:8090`, while the tested examples and the
server config use `127.0.0.1`. Where `localhost` resolves to `::1` first
this
fails.
- `ReceiveMessage` is imported in both consumer snippets and never used.
- `create_stream` and `create_topic` are called unconditionally, so a second
run
errors. `examples/python/getting-started` checks `get_stream` and
`get_topic`
first.
- The producer sends ten messages and prints nothing, so a successful run
looks
like it did nothing at all.
Related but distinct: #3750 covers the Python development environment, the
README
workflow and docker setup, rather than the published snippets.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]