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

Fix warnings #810

Merged
merged 6 commits into from
Dec 29, 2021
Merged

Fix warnings #810

merged 6 commits into from
Dec 29, 2021

Conversation

ods
Copy link
Collaborator

@ods ods commented Dec 29, 2021

Changes

Fixe various warnings (ResourceWarning, DeprecationWarning).

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.

@ods ods requested a review from tvoinarovskyi December 29, 2021 14:02
@codecov
Copy link

codecov bot commented Dec 29, 2021

Codecov Report

Merging #810 (451d045) into master (5370a4c) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #810      +/-   ##
==========================================
- Coverage   97.89%   97.87%   -0.02%     
==========================================
  Files          31       31              
  Lines        5358     5365       +7     
==========================================
+ Hits         5245     5251       +6     
- Misses        113      114       +1     
Flag Coverage Δ
cext 88.57% <100.00%> (+0.03%) ⬆️
integration 97.83% <100.00%> (-0.02%) ⬇️
purepy 97.40% <100.00%> (-0.02%) ⬇️
unit 52.02% <14.28%> (-0.07%) ⬇️

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

Impacted Files Coverage Δ
aiokafka/conn.py 93.66% <100.00%> (-0.17%) ⬇️
aiokafka/util.py 98.07% <100.00%> (+0.11%) ⬆️

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 5370a4c...451d045. Read the comment docs.

@lgtm-com
Copy link

lgtm-com bot commented Dec 29, 2021

This pull request fixes 4 alerts when merging 451d045 into dc53097 - view on LGTM.com

fixed alerts:

  • 2 for Module is imported with 'import' and 'import from'
  • 2 for Wrong number of arguments in a call

await self._do_sasl_handshake()
if self._security_protocol in ["SASL_SSL", "SASL_PLAINTEXT"]:
await self._do_sasl_handshake()
except: # noqa: E722
Copy link
Member

Choose a reason for hiding this comment

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

Please change this to except Exception, I would prefer not to have an implicit catch on BaseException if there is no need for it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We do need to catch BaseException. Actually I stepped into the problem with CancelledError, which nowadays doesn't inherit from Exception.

@ods ods merged commit afe8820 into aio-libs:master Dec 29, 2021
@ods ods deleted the fix_warnings branch December 29, 2021 18:49
multani added a commit to multani/aiokafka that referenced this pull request Dec 31, 2021
aio-libs#810 imports errors from
`setuptools` instead of `distutils`

This is available only starting from `setuptools` v59.0.0
(pypa/setuptools#2858) but RTD currently
defaults to v58.2.0
(https://docs.readthedocs.io/en/stable/builds.html#python)
multani added a commit to multani/aiokafka that referenced this pull request Dec 31, 2021
aio-libs#810 imports errors from
`setuptools` instead of `distutils`

This is available only starting from `setuptools` v59.0.0
(pypa/setuptools#2858) but RTD currently
defaults to v58.2.0
(https://docs.readthedocs.io/en/stable/builds.html#python)
multani added a commit to multani/aiokafka that referenced this pull request Dec 31, 2021
aio-libs#810 imports errors from
`setuptools` instead of `distutils`

This is available only starting from `setuptools` v59.0.0
(pypa/setuptools#2858) but RTD currently
defaults to v58.2.0
(https://docs.readthedocs.io/en/stable/builds.html#python)
multani added a commit to multani/aiokafka that referenced this pull request Dec 31, 2021
aio-libs#810 imports errors from
`setuptools` instead of `distutils`

This is available only starting from `setuptools` v59.0.0
(pypa/setuptools#2858) but RTD currently
defaults to v58.2.0
(https://docs.readthedocs.io/en/stable/builds.html#python)
multani added a commit to multani/aiokafka that referenced this pull request Dec 31, 2021
aio-libs#810 imports errors from
`setuptools` instead of `distutils`

This is available only starting from `setuptools` v59.0.0
(pypa/setuptools#2858) but RTD currently
defaults to v58.2.0
(https://docs.readthedocs.io/en/stable/builds.html#python)
multani added a commit to multani/aiokafka that referenced this pull request Dec 31, 2021
aio-libs#810 imports errors from
`setuptools` instead of `distutils`

This is available only starting from `setuptools` v59.0.0
(pypa/setuptools#2858) but RTD currently
defaults to v58.2.0
(https://docs.readthedocs.io/en/stable/builds.html#python)
ods pushed a commit that referenced this pull request Dec 31, 2021
* Fix doc building

#804 removed the
`aiokafka.protocol.produce` stubs imported from `kafka-python`, this
caused the documentation to fail to build.

* Fix RTD doc compilation

#810 imports errors from
`setuptools` instead of `distutils`

This is available only starting from `setuptools` v59.0.0
(pypa/setuptools#2858) but RTD currently
defaults to v58.2.0
(https://docs.readthedocs.io/en/stable/builds.html#python)
@ods ods mentioned this pull request Jun 2, 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