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

[PR #4912/9a599e92 backport][3.7] Fix the tracing module's type hints #5038

Conversation

patchback[bot]
Copy link
Contributor

@patchback patchback bot commented Oct 15, 2020

This is a backport of PR #4912 as merged into master (9a599e9).

What do these changes do?

_SignalArgs is (was) a supertype of its
arguments and with Callable being contravariant
in its arguments, the only way this would've
passed a type check is if the callback were to
(purport to) accept every single one of the
parameter types in a union,
exactly as specified - or object.
Either way, the parameter types were not
associated with their corresponding signals
so it would have been possible to append
a callback with a TraceDnsCacheMissParams
parameter to an on_request_start signal.

Are there changes in behavior for the user?

No.

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> for example (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."

@patchback patchback bot requested a review from asvetlov as a code owner October 15, 2020 07:41
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Oct 15, 2020
@codecov-io
Copy link

codecov-io commented Oct 15, 2020

Codecov Report

Merging #5038 into 3.7 will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              3.7    #5038      +/-   ##
==========================================
- Coverage   97.73%   97.73%   -0.01%     
==========================================
  Files          44       44              
  Lines        8953     8952       -1     
  Branches     1407     1407              
==========================================
- Hits         8750     8749       -1     
  Misses         87       87              
  Partials      116      116              
Flag Coverage Δ
#unit 97.73% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
aiohttp/tracing.py 100.00% <100.00%> (ø)

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 501b991...5e334cf. Read the comment docs.

@asvetlov asvetlov merged commit 74519b0 into 3.7 Oct 15, 2020
@asvetlov asvetlov deleted the patchback/backports/3.7/9a599e925febfff54f85f19d6b9854bfb105e71a/pr-4912 branch October 15, 2020 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosquash bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants