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

Use identity checks for all WSMsgType type compares #8501

Merged
merged 2 commits into from
Jul 14, 2024
Merged

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Jul 14, 2024

What do these changes do?

Some of the checks used is and some used equality. Since enums are singletons they should all use is as its faster and more efficient

Are there changes in behavior for the user?

no

Is it a substantial burden for the maintainers to support this?

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_or_pr_num>.<type>.rst (e.g. 588.bugfix.rst)

    • if you don't have an issue number, change it to the pull request
      number after creating the PR

      • .bugfix: A bug fix for something the maintainers deemed an
        improper undesired behavior that got corrected to match
        pre-agreed expectations.
      • .feature: A new behavior, public APIs. That sort of stuff.
      • .deprecation: A declaration of future API removals and breaking
        changes in behavior.
      • .breaking: When something public is removed in a breaking way.
        Could be deprecated in an earlier release.
      • .doc: Notable updates to the documentation structure or build
        process.
      • .packaging: Notes for downstreams about unobvious side effects
        and tooling. Changes in the test invocation considerations and
        runtime assumptions.
      • .contrib: Stuff that affects the contributor experience. e.g.
        Running tests, building the docs, setting up the development
        environment.
      • .misc: Changes that are hard to assign to any of the above
        categories.
    • Make sure to use full sentences with correct case and punctuation,
      for example:

      Fixed issue with non-ascii contents in doctest text files
      -- by :user:`contributor-gh-handle`.

      Use the past tense or the present tense a non-imperative mood,
      referring to what's changed compared to the last released version
      of this project.

Some of the checks used is and some used equality. Since enums are
singletons they should all use is as its faster and more efficient
Copy link

codecov bot commented Jul 14, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.

Project coverage is 97.61%. Comparing base (c086795) to head (01ad551).
Report is 918 commits behind head on master.

Files with missing lines Patch % Lines
aiohttp/web_ws.py 71.42% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8501   +/-   ##
=======================================
  Coverage   97.61%   97.61%           
=======================================
  Files         107      107           
  Lines       33104    33104           
  Branches     3892     3892           
=======================================
  Hits        32314    32314           
  Misses        571      571           
  Partials      219      219           
Flag Coverage Δ
CI-GHA 97.52% <85.71%> (ø)
OS-Linux 97.19% <85.71%> (ø)
OS-Windows 95.64% <ø> (ø)
OS-macOS 96.85% <85.71%> (ø)
Py-3.10.11 97.00% <85.71%> (ø)
Py-3.10.14 96.95% <85.71%> (ø)
Py-3.11.9 97.17% <85.71%> (ø)
Py-3.12.4 97.30% <85.71%> (ø)
Py-3.8.10 95.41% <ø> (ø)
Py-3.8.18 96.84% <85.71%> (ø)
Py-3.9.13 96.98% <85.71%> (ø)
Py-3.9.19 96.94% <85.71%> (ø)
Py-pypy7.3.16 96.51% <85.71%> (ø)
VM-macos 96.85% <85.71%> (ø)
VM-ubuntu 97.19% <85.71%> (ø)
VM-windows 95.64% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Jul 14, 2024
@bdraco
Copy link
Member Author

bdraco commented Jul 14, 2024

Thanks

@bdraco bdraco marked this pull request as ready for review July 14, 2024 17:01
@bdraco bdraco requested review from webknjaz and asvetlov as code owners July 14, 2024 17:01
@bdraco bdraco merged commit f457488 into master Jul 14, 2024
37 of 39 checks passed
@bdraco bdraco deleted the is_WSMsgType branch July 14, 2024 17:01
Copy link
Contributor

patchback bot commented Jul 14, 2024

Backport to 3.10: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.10/f4574887f394c921b262de00b3cfc2411f8f8aa8/pr-8501

Backported as #8502

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jul 14, 2024
bdraco pushed a commit that referenced this pull request Jul 14, 2024
…ype type compares (#8502)

Co-authored-by: J. Nick Koston <nick@koston.org>

This is a backport of PR #8501 as merged into master (f457488).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

2 participants