summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2026-08-11 03:26:54 +0100
committerAndreas Enge <andreas@enge.fr>2026-08-24 15:31:56 +0200
commitd05a98a9e7a962c096f74396333cbe01584206ad (patch)
tree289e422a5447a6df9227af0bb17e7055ac537d53 /gnu
parentefd326aa63879f67640161fb425ac269e28c729f (diff)
gnu: Remove python-pypytools.
* gnu/packages/python-xyz.scm (python-pypytools): Delete variable. * gnu/packages/patches/python-pypytools-python-3-fixes.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Deregister patch. Relates-to: guix/guix#7475 Signed-off-by: Andreas Enge <andreas@enge.fr>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/patches/python-pypytools-python-3-fixes.patch138
-rw-r--r--gnu/packages/python-xyz.scm39
3 files changed, 0 insertions, 178 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index ed9d244e7a2..9ead246abae 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2167,7 +2167,6 @@ dist_patch_DATA = \
2167 %D%/packages/patches/python-pydemumble-system-nanobind.patch \ 2167 %D%/packages/patches/python-pydemumble-system-nanobind.patch \
2168 %D%/packages/patches/python-pydocstyle-add-support-for-pep701.patch \ 2168 %D%/packages/patches/python-pydocstyle-add-support-for-pep701.patch \
2169 %D%/packages/patches/python-pynvim-fix-test-command-error.patch \ 2169 %D%/packages/patches/python-pynvim-fix-test-command-error.patch \
2170 %D%/packages/patches/python-pypytools-python-3-fixes.patch \
2171 %D%/packages/patches/python-sip-include-dirs.patch \ 2170 %D%/packages/patches/python-sip-include-dirs.patch \
2172 %D%/packages/patches/python-scikit-build-setuptools-compat.patch \ 2171 %D%/packages/patches/python-scikit-build-setuptools-compat.patch \
2173 %D%/packages/patches/python-scikit-image-fix-python-pillow.patch \ 2172 %D%/packages/patches/python-scikit-image-fix-python-pillow.patch \
diff --git a/gnu/packages/patches/python-pypytools-python-3-fixes.patch b/gnu/packages/patches/python-pypytools-python-3-fixes.patch
deleted file mode 100644
index 0adf796c580..00000000000
--- a/gnu/packages/patches/python-pypytools-python-3-fixes.patch
+++ /dev/null
@@ -1,138 +0,0 @@
1From f86a34bcd8ca64404808e5205f0fa0181bc85fbc Mon Sep 17 00:00:00 2001
2From: Duncan Bellamy <dunk@denkimushi.com>
3Date: Tue, 4 Jan 2022 19:59:58 +0000
4Subject: [PATCH] update to python 3.8+
5
6* add xfail for tests that fail in ubuntu and alpine
7---
8 pypytools/pypylog/model.py | 14 +++++++++-----
9 pypytools/pypylog/parse.py | 5 +++++
10 pypytools/pypylog/testing/test_parse.py | 18 +++++++++++++++---
11 pypytools/util.py | 6 ++++++
12 4 files changed, 35 insertions(+), 8 deletions(-)
13
14diff --git a/pypytools/pypylog/model.py b/pypytools/pypylog/model.py
15index 9d97b21..14384b0 100644
16--- a/pypytools/pypylog/model.py
17+++ b/pypytools/pypylog/model.py
18@@ -1,8 +1,12 @@
19-import itertools
20 from collections import defaultdict
21 import attr
22 import numpy as np
23
24+try:
25+ from itertools import izip as zip
26+except ImportError: # will be 3.x series
27+ pass
28+
29 @attr.s
30 class Event(object):
31 tsid = attr.ib() # unique identifier for an event
32@@ -46,15 +50,15 @@ def add_event(self, ev):
33
34 def print_summary(self):
35 fmt = '%-28s %6s %8s'
36- print fmt % ('section', 'n', 'delta')
37- print '-'*44
38+ print(fmt % ('section', 'n', 'delta'))
39+ print('-'*44)
40 for name, events in sorted(self.sections.iteritems()):
41 total = 0
42 for ev in events:
43 delta = ev.end - ev.start
44 assert delta >= 0
45 total += delta
46- print fmt % (name, len(events), format(delta, '.4f'))
47+ print(fmt % (name, len(events), format(delta, '.4f')))
48
49 class Series(object):
50
51@@ -79,7 +83,7 @@ def __len__(self):
52 return len(self.X)
53
54 def __iter__(self):
55- for x, y in itertools.izip(self.X, self.Y):
56+ for x, y in zip(self.X, self.Y):
57 yield x, y
58
59 def __getitem__(self, i):
60diff --git a/pypytools/pypylog/parse.py b/pypytools/pypylog/parse.py
61index c252904..43b3b20 100644
62--- a/pypytools/pypylog/parse.py
63+++ b/pypytools/pypylog/parse.py
64@@ -35,6 +35,11 @@ def parse_file(f):
65 #
66 if log is None:
67 log = model.PyPyLog()
68+ try:
69+ # Python 2: "basestring" is built-in
70+ basestring
71+ except NameError:
72+ basestring = str
73 if isinstance(fname, basestring):
74 with open(fname) as f:
75 return parse_file(f)
76diff --git a/pypytools/pypylog/testing/test_parse.py b/pypytools/pypylog/testing/test_parse.py
77index 20416bc..d071971 100644
78--- a/pypytools/pypylog/testing/test_parse.py
79+++ b/pypytools/pypylog/testing/test_parse.py
80@@ -1,6 +1,13 @@
81 import pytest
82 import textwrap
83-from cStringIO import StringIO
84+
85+from pypytools.util import PY3
86+
87+if PY3:
88+ from io import StringIO
89+else:
90+ from cStringIO import StringIO
91+
92 from pypytools.pypylog import parse
93 from pypytools.pypylog import model
94 from pypytools.pypylog.model import Event, GcMinor, GcCollectStep
95@@ -33,7 +40,11 @@ def test_mismatch(self):
96 [456] foo}
97 [0ab] bar}
98 """
99- pytest.raises(parse.ParseError, "self.parse(log)")
100+ with pytest.raises(
101+ parse.ParseError,
102+ match=r'^End section does not match start: expected bar, got foo$',
103+ ):
104+ self.parse(log)
105
106 def test_nested(self):
107 log = self.parse("""
108@@ -124,4 +135,5 @@ def test_parse_frequency():
109 assert pf('40 KHz') == 40e3
110 assert pf('40 MHz') == 40e6
111 assert pf('40 GHz') == 40e9
112- pytest.raises(ValueError, "pf('')")
113+ with pytest.raises(ValueError, match=r'^$'):
114+ pf('')
115diff --git a/pypytools/util.py b/pypytools/util.py
116index a0cd85b..102452d 100644
117--- a/pypytools/util.py
118+++ b/pypytools/util.py
119@@ -2,6 +2,7 @@
120 from sys import version_info
121
122 PY3 = version_info.major == 3
123+PY3M = version_info.minor
124
125 def clonefunc(f):
126 """Deep clone the given function to create a new one.
127@@ -22,6 +23,11 @@ def clonefunc(f):
128 co.co_firstlineno, co.co_lnotab, co.co_freevars, co.co_cellvars]
129 if PY3:
130 args.insert(1, co.co_kwonlyargcount)
131+ if PY3 and PY3M >= 8:
132+ args.insert(1, co.co_posonlyargcount)
133+ if PY3 and PY3M >= 11:
134+ args.insert(12, co.co_qualname)
135+ args.insert(15, co.co_exceptiontable)
136 co2 = types.CodeType(*args)
137 #
138 # then, we clone the function itself, using the new co2
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3d522b72820..68b8e733d0b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -15958,45 +15958,6 @@ Python.")
15958sophisticated version manipulation.") 15958sophisticated version manipulation.")
15959 (license license:expat))) 15959 (license license:expat)))
15960 15960
15961(define-public python-pypytools
15962 (package
15963 (name "python-pypytools")
15964 (version "0.6.2")
15965 (source
15966 (origin
15967 (method git-fetch)
15968 (uri (git-reference
15969 (url "https://github.com/antocuni/pypytools/")
15970 (commit version)))
15971 (file-name (git-file-name name version))
15972 (sha256
15973 (base32 "1nmq4gsw3hcayj2d96n8n166h0wnmp7n28fqswcn562hx57mlh05"))
15974 (patches (search-patches "python-pypytools-python-3-fixes.patch"))))
15975 (build-system pyproject-build-system)
15976 (arguments
15977 (list
15978 ;; These tests are using deprecated py.code module.
15979 #:test-flags
15980 #~(list
15981 "--deselect=pypytools/testing/test_codegen.py::test_def__default_args"
15982 "--deselect=pypytools/testing/test_codegen.py::test_def_"
15983 "--deselect=pypytools/testing/test_codegen.py::test_compile"
15984 "--ignore=pypytools/testing/test_unroll.py"
15985 ;; clone_func returns an object of the wrong type.
15986 "--deselect=pypytools/testing/test_util.py::test_clonefunc")))
15987 (native-inputs
15988 (list python-freezegun
15989 python-numpy
15990 python-pytest
15991 python-setuptools))
15992 (propagated-inputs (list python-py))
15993 (home-page "https://github.com/antocuni/pypytools/")
15994 (synopsis "Tools to use PyPy-specific features, with CPython fallbacks")
15995 (description
15996 "This package provides a collection of useful tools to use PyPy-specific
15997features, with CPython fallbacks.")
15998 (license license:x11)))
15999
16000(define-public python-simplegeneric 15961(define-public python-simplegeneric
16001 (package 15962 (package
16002 (name "python-simplegeneric") 15963 (name "python-simplegeneric")