diff -Nru bpython-0.21/debian/changelog bpython-0.21/debian/changelog --- bpython-0.21/debian/changelog 2021-02-03 23:43:27.000000000 +0000 +++ bpython-0.21/debian/changelog 2021-08-26 07:57:00.000000000 +0000 @@ -1,3 +1,10 @@ +bpython (0.21-3ubuntu1) impish; urgency=medium + + * d/p/0001-Handle-OSError-from-stat.patch: cherry-picked from upstream + to fix crash. LP: #1941709 + + -- Simon Chopin Thu, 26 Aug 2021 09:57:00 +0200 + bpython (0.21-3) unstable; urgency=medium * debian/: Revert "Revert to wcwidth until cwcwidth is available" diff -Nru bpython-0.21/debian/control bpython-0.21/debian/control --- bpython-0.21/debian/control 2021-02-03 23:43:27.000000000 +0000 +++ bpython-0.21/debian/control 2021-08-26 07:57:00.000000000 +0000 @@ -1,7 +1,8 @@ Source: bpython Section: python Priority: optional -Maintainer: Sebastian Ramacher +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Sebastian Ramacher Build-Depends: debhelper-compat (= 13), dh-python, diff -Nru bpython-0.21/debian/patches/0001-Handle-OSError-from-stat.patch bpython-0.21/debian/patches/0001-Handle-OSError-from-stat.patch --- bpython-0.21/debian/patches/0001-Handle-OSError-from-stat.patch 1970-01-01 00:00:00.000000000 +0000 +++ bpython-0.21/debian/patches/0001-Handle-OSError-from-stat.patch 2021-08-26 07:57:00.000000000 +0000 @@ -0,0 +1,24 @@ +From 7f325dfd45ee60765f4346054fd23de29da31044 Mon Sep 17 00:00:00 2001 +From: Sebastian Ramacher +Date: Sun, 1 Aug 2021 17:13:23 +0200 +Origin: https://github.com/bpython/bpython/commit/7f325dfd45ee60765f4346054fd23de29da31044 +Subject: [PATCH] Handle OSError from stat (fixes #902) + +--- + bpython/importcompletion.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/bpython/importcompletion.py ++++ b/bpython/importcompletion.py +@@ -196,7 +196,10 @@ + else: + if is_package: + path_real = Path(pathname).resolve() +- stat = path_real.stat() ++ try: ++ stat = path_real.stat() ++ except OSError: ++ continue + if (stat.st_dev, stat.st_ino) not in self.paths: + self.paths.add((stat.st_dev, stat.st_ino)) + for subname in self.find_modules(path_real): diff -Nru bpython-0.21/debian/patches/series bpython-0.21/debian/patches/series --- bpython-0.21/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ bpython-0.21/debian/patches/series 2021-08-26 07:57:00.000000000 +0000 @@ -0,0 +1 @@ +0001-Handle-OSError-from-stat.patch