Skip to content

Commit

Permalink
http: fix dependency on finalization order
Browse files Browse the repository at this point in the history
  • Loading branch information
colesbury committed Apr 26, 2023
1 parent ff38d18 commit 86e7772
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/http/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ def close(self):

def flush(self):
super().flush()
if self.fp:
if self.fp and not self.fp.closed:
self.fp.flush()

def readable(self):
Expand Down

2 comments on commit 86e7772

@smontanaro
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm probably missing something. This commit is mentioned in cpython #108219 but hasn't been merged to main, nor has an issue been created. I'm hesitant to create one and submit the trivial PR, as I don't know the details of the protocol for this larger activity.

@colesbury
Copy link
Owner Author

Choose a reason for hiding this comment

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

It's not really relevant until other GC changes are ready.

Please sign in to comment.