GNU bug report logs -
#75464
Package thefuck is broken
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75464 in the body.
You can then email your comments to 75464 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#75464
; Package
guix
.
(Thu, 09 Jan 2025 15:53:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Andrew Stubbs <andrew.stubbs <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Thu, 09 Jan 2025 15:53:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
"guix shell thefuck" fails:
building /gnu/store/qkhrgs2wvxwzhv71kzp6fhxnf3gk8nsh-thefuck-3.32.drv...
\ 'check' phasebuilder for
`/gnu/store/qkhrgs2wvxwzhv71kzp6fhxnf3gk8nsh-thefuck-3.32.drv' failed with
exit code 1
build of /gnu/store/qkhrgs2wvxwzhv71kzp6fhxnf3gk8nsh-thefuck-3.32.drv failed
View build log at
'/var/log/guix/drvs/qk/hrgs2wvxwzhv71kzp6fhxnf3gk8nsh-thefuck-3.32.drv.gz'.
guix shell: error: build of
`/gnu/store/qkhrgs2wvxwzhv71kzp6fhxnf3gk8nsh-thefuck-3.32.drv' failed
This is straight after a "guix pull". I tested on Ubuntu 20.04, Ubuntu
22.04, and Ubuntu 24.11.
From the logfile:
=========================== short test summary info
============================
FAILED
tests/test_utils.py::TestGetValidHistoryWithoutCurrent::test_get_valid_history_without_current[le
cat-result0]
FAILED
tests/test_utils.py::TestGetValidHistoryWithoutCurrent::test_get_valid_history_without_current[diff
x-result1]
FAILED
tests/test_utils.py::TestGetValidHistoryWithoutCurrent::test_get_valid_history_without_current[fuck-result2]
FAILED
tests/test_utils.py::TestGetValidHistoryWithoutCurrent::test_get_valid_history_without_current[cafe
\xf4-result3]
=================================== FAILURES
===================================
_
TestGetValidHistoryWithoutCurrent.test_get_valid_history_without_current[le
cat-result0] _
self = <tests.test_utils.TestGetValidHistoryWithoutCurrent object at
0x7ffff50aa290>
script = 'le cat', result = ['ls cat', 'diff x', 'café ô']
@pytest.mark.parametrize('script, result', [
('le cat', ['ls cat', 'diff x', u'café ô']),
('diff x', ['ls cat', u'café ô']),
('fuck', ['ls cat', 'diff x', u'café ô']),
(u'cafe ô', ['ls cat', 'diff x', u'café ô']),
])
def test_get_valid_history_without_current(self, script, result):
command = Command(script, '')
> assert get_valid_history_without_current(command) == result
E AssertionError: assert ['ls cat', 'diff x'] == ['ls cat', 'diff x',
'café ô']
E
E Right contains one more item: 'café ô'
E
E Full diff:
E [
E 'ls cat',
E 'diff x',
E - 'café ô',
E ]
/tmp/guix-build-thefuck-3.32.drv-0/source/tests/test_utils.py:276:
AssertionError
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#75464
; Package
guix
.
(Fri, 10 Jan 2025 21:44:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 75464 <at> debbugs.gnu.org (full text, mbox):
Hi Andrew
On Thu, Jan 09, 2025 at 10:43 AM, Andrew Stubbs wrote:
[...]
> =========================== short test summary info ============================
> FAILED tests/test_utils.py::TestGetValidHistoryWithoutCurrent::test_get_valid_history_without_current[le cat-result0]
> FAILED tests/test_utils.py::TestGetValidHistoryWithoutCurrent::test_get_valid_history_without_current[diff x-result1]
> FAILED tests/test_utils.py::TestGetValidHistoryWithoutCurrent::test_get_valid_history_without_current[fuck-result2]
> FAILED tests/test_utils.py::TestGetValidHistoryWithoutCurrent::test_get_valid_history_without_current[cafe \xf4-result3]
>
> =================================== FAILURES ===================================
[...]
I noticed this as well recently, thanks for reporting. I think this is
the upstream issue: <https://github.com/nvbn/thefuck/issues/1438>.
Unfortunately there's been no activity there or on the project in
general (for a year). I guess we could disable just those tests and link
to the upstream issue, would you like to take a stab at a patch?
John
Information forwarded
to
sharlatanus <at> gmail.com, bug-guix <at> gnu.org
:
bug#75464
; Package
guix
.
(Fri, 24 Jan 2025 16:59:01 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
These tests are reported broken upstream, but nothing has been done about it.
See https://github.com/nvbn/thefuck/issues/1438
* gnu/packages/admin.scm (thefuck): Add patch.
* gnu/packages/patches/thefuck-remove-broken-tests.patch: New file.
Change-Id: Ib6bbda92b29cd2a26b9c08d79e309e2c78602b71
---
gnu/packages/admin.scm | 3 +-
.../patches/thefuck-remove-broken-tests.patch | 48 +++++++++++++++++++
2 files changed, 50 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/thefuck-remove-broken-tests.patch
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 89879bf486..6290ecc72d 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -3749,7 +3749,8 @@ (define-public thefuck
(file-name (git-file-name name version))
(sha256
(base32 "18ipa1bm6q1n5drbi8i65726hhqhl1g41390lfqrc11hkbvv443d"))
- (patches (search-patches "thefuck-test-environ.patch"))))
+ (patches (search-patches "thefuck-test-environ.patch"
+ "thefuck-remove-broken-tests.patch"))))
(build-system python-build-system)
(arguments
'(#:phases
diff --git a/gnu/packages/patches/thefuck-remove-broken-tests.patch b/gnu/packages/patches/thefuck-remove-broken-tests.patch
new file mode 100644
index 0000000000..1d494c060c
--- /dev/null
+++ b/gnu/packages/patches/thefuck-remove-broken-tests.patch
@@ -0,0 +1,48 @@
+diff -ruN a/tests/test_utils.py b/tests/test_utils.py
+--- a/tests/test_utils.py 1970-01-01 00:00:01.000000000 +0000
++++ b/tests/test_utils.py 2025-01-22 12:21:07.045281481 +0000
+@@ -233,44 +233,3 @@
+ assert fn() == 'test'
+ assert shelve == {key: {'etag': '0', 'value': 'test'}}
+
+-
+-class TestGetValidHistoryWithoutCurrent(object):
+- @pytest.fixture(autouse=True)
+- def fail_on_warning(self):
+- warnings.simplefilter('error')
+- yield
+- warnings.resetwarnings()
+-
+- @pytest.fixture(autouse=True)
+- def history(self, mocker):
+- mock = mocker.patch('thefuck.shells.shell.get_history')
+- # Passing as an argument causes `UnicodeDecodeError`
+- # with newer py.test and python 2.7
+- mock.return_value = ['le cat', 'fuck', 'ls cat',
+- 'diff x', 'nocommand x', u'café ô']
+- return mock
+-
+- @pytest.fixture(autouse=True)
+- def alias(self, mocker):
+- return mocker.patch('thefuck.utils.get_alias',
+- return_value='fuck')
+-
+- @pytest.fixture(autouse=True)
+- def bins(self, mocker):
+- callables = list()
+- for name in ['diff', 'ls', 'café']:
+- bin_mock = mocker.Mock(name=name)
+- bin_mock.configure_mock(name=name, is_dir=lambda: False)
+- callables.append(bin_mock)
+- path_mock = mocker.Mock(iterdir=mocker.Mock(return_value=callables))
+- return mocker.patch('thefuck.utils.Path', return_value=path_mock)
+-
+- @pytest.mark.parametrize('script, result', [
+- ('le cat', ['ls cat', 'diff x', u'café ô']),
+- ('diff x', ['ls cat', u'café ô']),
+- ('fuck', ['ls cat', 'diff x', u'café ô']),
+- (u'cafe ô', ['ls cat', 'diff x', u'café ô']),
+- ])
+- def test_get_valid_history_without_current(self, script, result):
+- command = Command(script, '')
+- assert get_valid_history_without_current(command) == result
base-commit: e3066fe7dab3d4fcd22884ce55555ac1f16e583f
--
2.47.1
Information forwarded
to
bug-guix <at> gnu.org
:
bug#75464
; Package
guix
.
(Tue, 28 Jan 2025 17:24:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 75464 <at> debbugs.gnu.org (full text, mbox):
I sent a patch to guix-patches. It has shown up in the bug tracker, but
it's not in the mailing list archives ... maybe it got filtered (language?).
Will the maintainers have received it, or no?
Information forwarded
to
bug-guix <at> gnu.org
:
bug#75464
; Package
guix
.
(Tue, 28 Jan 2025 20:15:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 75464 <at> debbugs.gnu.org (full text, mbox):
On Tue, Jan 28, 2025 at 05:23:23PM +0000, Andrew Stubbs wrote:
> I sent a patch to guix-patches. It has shown up in the bug tracker, but it's
> not in the mailing list archives ... maybe it got filtered (language?).
Weird.
> Will the maintainers have received it, or no?
I did receive an email with this subject:
Subject: bug#75464: [PATCH] Remove broken tests from "thefuck"
Is that the one?
Information forwarded
to
bug-guix <at> gnu.org
:
bug#75464
; Package
guix
.
(Tue, 28 Jan 2025 20:34:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 75464 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Yes, that's the one. It's probably not lost then. :-)
Thank you.
On Tue, 28 Jan 2025, 20:14 Leo Famulari, <leo <at> famulari.name> wrote:
> On Tue, Jan 28, 2025 at 05:23:23PM +0000, Andrew Stubbs wrote:
> > I sent a patch to guix-patches. It has shown up in the bug tracker, but
> it's
> > not in the mailing list archives ... maybe it got filtered (language?).
>
> Weird.
>
> > Will the maintainers have received it, or no?
>
> I did receive an email with this subject:
>
> Subject: bug#75464: [PATCH] Remove broken tests from "thefuck"
>
> Is that the one?
>
[Message part 2 (text/html, inline)]
Reply sent
to
Leo Famulari <leo <at> famulari.name>
:
You have taken responsibility.
(Thu, 30 Jan 2025 05:48:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Andrew Stubbs <andrew.stubbs <at> gmail.com>
:
bug acknowledged by developer.
(Thu, 30 Jan 2025 05:48:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 75464-done <at> debbugs.gnu.org (full text, mbox):
On Fri, Jan 24, 2025 at 03:34:12PM +0000, Andrew Stubbs wrote:
> These tests are reported broken upstream, but nothing has been done about it.
Thanks for filing this bug report and making a patch to fix it!
I pushed your patch as commit a20df73c7d69356c0800dcc082c1a71e987acf13
with the following changes:
Most importantly, I registered the patch in 'gnu/local.mk'. Without
this, the patch file will not be included in the distribution when Guix
is built.
I made the commit message conform to the GNU ChangeLog format (at least
how we use it in Guix), and I made the commit message a little more
informative, including a link to this bug report.
I also added a comment to the patch file itself to give useful context.
This helps a lot in the future when trying to understand the context of
the patch files.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#75464
; Package
guix
.
(Thu, 30 Jan 2025 15:16:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 75464 <at> debbugs.gnu.org (full text, mbox):
Thank you, Leo.
I can confirm that thefuck installs again, after "guix pull".
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 28 Feb 2025 12:24:18 GMT)
Full text and
rfc822 format available.
This bug report was last modified 108 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.