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

Update rpc.py #369

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aio_pika/patterns/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ async def initialize(self, auto_delete=True, durable=False, **kwargs):
self.on_message_returned, weak=False,
)

def on_close(self, exc=None):
def on_close(self, exc=None, _=None):
Copy link
Owner

Choose a reason for hiding this comment

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

Could you please add some details why python 3.9 adding an argument here?

Copy link

@ivunchata ivunchata Sep 20, 2021

Choose a reason for hiding this comment

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

I believe this is not due to python 3.9, rather it is a regression from 1625f37e4056c355e9b20962f39f8ba6e66e953a.
I have tried with python 3.6 onward and the attached Dockerfile reproduces the issue that is solved by this PR.
Dockerfile.zip
The issue does not exist in aio-pika 6.6.1

log.debug("Closing RPC futures because %r", exc)
for future in self.futures.values():
if future.done():
Expand Down