comparison mercurial/wireprototypes.py @ 51572:13c004b54cbe stable

wireprotoserver: ensure that output stream gets flushed on exception Previously flush was happening due to Python finalizer being run on `BufferedWriter`. With upgrade to Python 3.11 this started randomly failing. My guess is that the finalizer on the raw `FileIO` object may be running before the finalizer of `BufferedWriter` has a chance to run. At any rate, since we're not relying on finalizers in the happy case we should also not rely on them in case of exception.
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Thu, 04 Apr 2024 14:15:32 +0100
parents 18c8c18993f0
children 278af66e6595 5ad5f0853a0a
comparison
equal deleted inserted replaced
51571:74230abb2504 51572:13c004b54cbe