GNU bug report logs - #50074
[PATCH core-updates-frozen] gnu: bpython: Fix test failure.

Previous Next

Package: guix-patches;

Reported by: Noah Evans <noah <at> nevans.me>

Date: Mon, 16 Aug 2021 04:17:02 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50074 in the body.
You can then email your comments to 50074 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#50074; Package guix-patches. (Mon, 16 Aug 2021 04:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Noah Evans <noah <at> nevans.me>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 16 Aug 2021 04:17:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Noah Evans <noah <at> nevans.me>
To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>
Subject: [PATCH core-updates-frozen] gnu: bpython: Fix test failure.
Date: Mon, 16 Aug 2021 02:41:20 +0000
[Message part 1 (text/plain, inline)]
Updating jedi causes a bpython test to fail. I attached a patch backporting the required bpython changes. Alternatively, bpython's version could be bumped, or jedi could be removed from its dependencies.

From d2611d5a1afe83ad16a8d0b1810c340a765d6284 Mon Sep 17 00:00:00 2001
From: Noah Evans <noah <at> nevans.me>
Date: Sun, 15 Aug 2021 22:20:00 -0400
Subject: [[PATCH core-updates-frozen]] gnu: bpython: Fix test failure.

---
.../patches/bpython-jedi-update.patch | 32 +++++++++++++++++++
gnu/packages/python-xyz.scm | 3 +-
2 files changed, 34 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/bpython-jedi-update.patch

diff --git a/gnu/packages/patches/bpython-jedi-update.patch b/gnu/packages/patches/bpython-jedi-update.patch
new file mode 100644
index 0000000000..dee648d83e
--- /dev/null
+++ b/gnu/packages/patches/bpython-jedi-update.patch
@@ -0,0 +1,32 @@
+Taken from this commit on bpython: https://github.com/bpython/bpython/commit/1cfba80da898c54334521318e232f0d31cac7051
+
+diff --git a/bpython/autocomplete.py b/bpython/autocomplete.py
+index b0508bc9..a06776f6 100644
+--- a/bpython/autocomplete.py
++++ b/bpython/autocomplete.py
+@@ -520,9 +520,9 @@ def matches(self, cursor_offset, line, **kwargs):
+
+ try:
+ script = jedi.Script(
+- history, len(history.splitlines()), cursor_offset, "fake.py"
++ history, path="fake.py"
+ )
+- completions = script.completions()
++ completions = script.complete(len(history.splitlines()), cursor_offset)
+ except (jedi.NotFoundError, IndexError, KeyError):
+ # IndexError for #483
+ # KeyError for #544
+diff --git a/bpython/test/test_autocomplete.py b/bpython/test/test_autocomplete.py
+index 65beb011..28243577 100644
+--- a/bpython/test/test_autocomplete.py
++++ b/bpython/test/test_autocomplete.py
+@@ -367,7 +367,7 @@ def matches_from_completions(
+ ):
+ with mock.patch("bpython.autocomplete.jedi.Script") as Script:
+ script = Script.return_value
+- script.completions.return_value = completions
++ script.complete.return_value = completions
+ com = autocomplete.MultilineJediCompletion()
+ return com.matches(
+ cursor, line, current_block=block, history=history
+
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c8b3777f8f..2a86d2bb3c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20015,7 +20015,8 @@ Included are implementations of:
(method url-fetch)
(uri (pypi-uri "bpython" version))
(sha256
- (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
+ (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))
+ (patches (search-patches "bpython-jedi-update.patch"))))
(build-system python-build-system)
(arguments
`(#:phases
--
2.32.0
[Message part 2 (text/html, inline)]

Reply sent to Mathieu Othacehe <othacehe <at> gnu.org>:
You have taken responsibility. (Mon, 16 Aug 2021 07:08:01 GMT) Full text and rfc822 format available.

Notification sent to Noah Evans <noah <at> nevans.me>:
bug acknowledged by developer. (Mon, 16 Aug 2021 07:08:01 GMT) Full text and rfc822 format available.

Message #10 received at 50074-done <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Noah Evans <noah <at> nevans.me>
Cc: 50074-done <at> debbugs.gnu.org
Subject: Re: [bug#50074] [PATCH core-updates-frozen] gnu: bpython: Fix test
 failure.
Date: Mon, 16 Aug 2021 09:07:13 +0200
Hello Noah,

> Updating jedi causes a bpython test to fail. I attached a patch
> backporting the required bpython changes. Alternatively, bpython's
> version could be bumped, or jedi could be removed from its
> dependencies.

Thanks for the patch! I preferred to update bpython to the 0.21 release
that includes the required patch with
591a3f5714231b0820d5814299d90dc92af6e585.

Mathieu




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 13 Sep 2021 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 337 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.