From 16a43edc2e2f6451aef3af46dd215d185426c7ee Mon Sep 17 00:00:00 2001 From: Alex Hall Date: Thu, 27 Oct 2022 17:38:41 +0200 Subject: [PATCH] (core) Upgrade friendly-traceback and its dependencies Summary: Upgrading the friendly-traceback package to include a fix that I specifically requested in https://github.com/friendly-traceback/friendly-traceback/issues/144 as a solution for the problem mentioned in https://grist.quip.com/HoSmAlvFax0j#MbTADAEcJb7 . Specifically, this shows a friendly explanation when using `len()` with a generator expression. Also upgraded the dependencies `executing` and `stack_data` (which are mine) while I'm at it, although I don't expect this to really change anything. Test Plan: Existing tests. There was one test failure because of a new explanation about generic `Exception`s which I've suppressed. Tested manually that the new explanation appears: {F64605} Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D3687 --- sandbox/grist/friendly_errors.py | 4 ++++ sandbox/requirements3.txt | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sandbox/grist/friendly_errors.py b/sandbox/grist/friendly_errors.py index a736b6ab..b6ab3781 100644 --- a/sandbox/grist/friendly_errors.py +++ b/sandbox/grist/friendly_errors.py @@ -24,6 +24,10 @@ def friendly_message(exc): # with a suggestion to report the case on GitHub. return "" + if "All built-in exceptions defined by Python are derived from `Exception`" in generic: + # Unhelpful explanation for a generic `Exception` + return "" + # Add a blank line between the standard message and the friendly message result = "\n\n" + generic diff --git a/sandbox/requirements3.txt b/sandbox/requirements3.txt index dcf6ded3..6fec0ea4 100644 --- a/sandbox/requirements3.txt +++ b/sandbox/requirements3.txt @@ -1,9 +1,9 @@ ### python 3 requirements, see requirements.txt for python 2 # friendly-traceback and its dependencies, for python 3 only -friendly-traceback==0.5.46 -stack-data==0.3.0 -executing==0.8.3 +friendly-traceback==0.7.48 +stack-data==0.5.1 +executing==1.1.1 pure-eval==0.2.2 # openpyxl and its dependencies, for imports, which are python 3 only