Hi Colin, Many years ago in doing the Python 2→3 port for python-debian, you wrote a function to guard against giving file-like objects that were not file handles to apt_pkg [1]. The reason I've been looking at this today is that the current check incorrectly identifies NamedTemporaryFile as not being a real file, while apt_pkg is happy to accept such objects.
I *think* this can now be simplified as in the following commit, presumably due to changes to the supported versions of Python we care about: https://salsa.debian.org/python-debian-team/python-debian/merge_requests/8/diffs#89edc1b4f3188ea0d56566993279f0a9b5ad7c3a_298_298 I'd appreciate you checking my simplification, however, to make sure I've not missed some case from the original code. (Also other co-maintainers!) thanks, Stuart [1] https://salsa.debian.org/python-debian-team/python-debian/commit/43403ad82d16ca23a4f51af7e804cb2e201c58a4 -- Stuart Prescott http://www.nanonanonano.net/ stu...@nanonanonano.net Debian Developer http://www.debian.org/ stu...@debian.org GPG fingerprint 90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7