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

Don't pass loop explicitly in docs and examples #693

Merged
merged 1 commit into from
Dec 7, 2020

Conversation

ods
Copy link
Collaborator

@ods ods commented Dec 4, 2020

Changes

  • Remove docs and examples for Python 3.5
  • Replace @asyncio.coroutine and yield from with async def and await
  • Update docs and examples to not pass loop to AIOKafkaConsumer/AIOKafkaProducer, use asyncio.run()

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> (e.g. 588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the PR
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: Fix issue with non-ascii contents in doctest text files.

@codecov
Copy link

codecov bot commented Dec 4, 2020

Codecov Report

Merging #693 (46abcf5) into master (07e9bd3) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #693      +/-   ##
==========================================
- Coverage   97.95%   97.92%   -0.04%     
==========================================
  Files          29       29              
  Lines        5193     5193              
==========================================
- Hits         5087     5085       -2     
- Misses        106      108       +2     
Flag Coverage Δ
cext 87.63% <100.00%> (ø)
integration 97.88% <100.00%> (-0.04%) ⬇️
purepy 97.43% <100.00%> (-0.04%) ⬇️
unit 51.45% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiokafka/client.py 98.13% <100.00%> (ø)
aiokafka/consumer/consumer.py 97.90% <100.00%> (ø)
aiokafka/producer/producer.py 98.50% <100.00%> (ø)
aiokafka/consumer/fetcher.py 96.86% <0.00%> (-0.32%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 07e9bd3...46abcf5. Read the comment docs.

Copy link
Member

@tvoinarovskyi tvoinarovskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

loop.close()
if not task.cancelled():
task.result()
asyncio.run(Benchmark(args).bench_simple())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you try running the benchmark? I think I had a very specific reason for writing the code that way, but it may be related to issues on earlier versions of Python.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just have run them and I see no difference. Probably it was the reason with old versions of asyncio.

loop.close()
if not task.cancelled():
task.result()
asyncio.run(Benchmark(args).bench_simple())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

@ods ods merged commit 4fbea5c into aio-libs:master Dec 7, 2020
@ods ods deleted the docs_examples_loop branch December 7, 2020 07:35
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