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

Add missing slots to _RequestContextManager and _WSRequestContextManager #5329

Merged

Conversation

Pliner
Copy link
Member

@Pliner Pliner commented Dec 9, 2020

It seems that slots were forgotten in children of _BaseRequestContextManager

PR adds slots to _RequestContextManager and _WSRequestContextManager

Here is a very short sample to show the diff:

import sys


class ASlot:
    __slots__ = ("a", "b")

    def __init__(self):
        self.a = 42
        self.b = 24


class BNoSlot(ASlot):
    pass


class BSlot(ASlot):
    __slots__ = ()

print(sys.getsizeof(ASlot())) # 48
print(sys.getsizeof(BNoSlot())) # 64
print(sys.getsizeof(BSlot())) # 48
  • 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."

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Dec 9, 2020
@codecov
Copy link

codecov bot commented Dec 9, 2020

Codecov Report

Merging #5329 (e3358c1) into master (cb4bae7) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5329   +/-   ##
=======================================
  Coverage   97.16%   97.16%           
=======================================
  Files          41       41           
  Lines        8739     8739           
  Branches     1402     1402           
=======================================
  Hits         8491     8491           
  Misses        129      129           
  Partials      119      119           
Flag Coverage Δ
unit 97.04% <ø> (ø)

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


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 cb4bae7...e3358c1. Read the comment docs.

@Pliner Pliner marked this pull request as ready for review December 9, 2020 19:35
Copy link
Member

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

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

Thanks!

@asvetlov asvetlov merged commit eb34a72 into aio-libs:master Dec 14, 2020
aio-libs-github-bot bot pushed a commit that referenced this pull request Dec 14, 2020
…anager` (#5329)

* Add missing slots to context managers

* Fix CONTRIBUTORS.txt

* Add notes to CHANGES

* Fix CONTRIBUTORS.txt
@aio-libs-github-bot
Copy link
Contributor

💚 Backport successful

The PR was backported to the following branches:

asvetlov pushed a commit that referenced this pull request Dec 14, 2020
…anager` (#5329) (#5342)

* Add missing slots to context managers

* Fix CONTRIBUTORS.txt

* Add notes to CHANGES

* Fix CONTRIBUTORS.txt

Co-authored-by: Yury Pliner <yury.pliner@gmail.com>
commonism pushed a commit to commonism/aiohttp that referenced this pull request Apr 27, 2021
…anager` (aio-libs#5329)

* Add missing slots to context managers

* Fix CONTRIBUTORS.txt

* Add notes to CHANGES

* Fix CONTRIBUTORS.txt
commonism pushed a commit to commonism/aiohttp that referenced this pull request Apr 27, 2021
…anager` (aio-libs#5329)

* Add missing slots to context managers

* Fix CONTRIBUTORS.txt

* Add notes to CHANGES

* Fix CONTRIBUTORS.txt
@Pliner Pliner deleted the add-missing-slots-to-context-managers branch July 20, 2021 08:09
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.

None yet

2 participants