Commit 1dbd03d
Fix IMAP4WithTimeout compatibility with Python 3.14
Python 3.14 changed imaplib.IMAP4.file from a plain instance attribute
to a read-only property (see cpython commit introducing the change). The
open() override in IMAP4WithTimeout assigned to self.file directly, which
now raises:
AttributeError: property 'file' of 'IMAP4WithTimeout' object has no setter
The fix mirrors what was already done for IMAP4_TLS in commit 64250b0:
remove the open() override entirely and instead pass the timeout through
to the parent __init__, which calls open() itself using self._file
internally. The _create_socket override is kept as-is so the stored
self._timeout fallback still applies for any call path that omits an
explicit timeout.
Fixes #6381 parent 248f09a commit 1dbd03d
1 file changed
Lines changed: 1 addition & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 13 | + | |
23 | 14 | | |
24 | 15 | | |
25 | 16 | | |
| |||
0 commit comments