Skip to content

Commit e5b03e4

Browse files
committed
Remove debug output
1 parent 66385ff commit e5b03e4

File tree

4 files changed

+3
-20
lines changed

4 files changed

+3
-20
lines changed

.github/workflows/buildwheel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025, macos-13, macos-14]
13+
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2022, macos-13, macos-14]
1414

1515
steps:
1616
- uses: actions/checkout@v4

bin/build_variables.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ MPIRVER=3.0.0 # MPIR build no longer works (not clear where to download from)
2121
# These are the actual dependencies used (at least by default):
2222
GMPVER=6.3.0
2323
MPFRVER=4.2.2
24-
FLINTVER='3.3.0'
24+
FLINTVER='3.3.1'

src/flint/test/test_all.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -94,29 +94,19 @@ def test_showgood():
9494

9595

9696
def test_fmpz():
97-
print(1, flush=True)
9897
assert flint.fmpz() == flint.fmpz(0)
99-
print(2, flush=True)
10098
L = [0, 1, 2, 3, 2**31-1, 2**31, 2**63-1, 2**63, 2**64-1, 2**64]
10199
L += [-x for x in L]
102100
for i in L:
103-
print(3, i, flush=True)
104101
f = flint.fmpz(i)
105-
print(3.1, i, flush=True)
106102
assert int(f) == i
107-
print(3.2, i, flush=True)
108103
assert flint.fmpz(f) == f
109-
print(3.3, i, flush=True)
110104
assert flint.fmpz(str(i)) == f
111-
print(3.4, i, flush=True)
112-
print(4, flush=True)
113105
assert raises(lambda: flint.fmpz(1,2), TypeError) # type: ignore
114106
assert raises(lambda: flint.fmpz("qwe"), ValueError)
115107
assert raises(lambda: flint.fmpz([]), TypeError) # type: ignore
116-
print(5, flush=True)
117108
for s in L:
118109
for t in L:
119-
print(6, s, t, flush=True)
120110
for ltype in (flint.fmpz, int):
121111
for rtype in (flint.fmpz, int):
122112

@@ -152,7 +142,6 @@ def test_fmpz():
152142
assert raises(lambda: ltype(s) << rtype(t), ValueError)
153143
assert raises(lambda: ltype(s) >> rtype(t), ValueError)
154144

155-
print(7, flush=True)
156145
assert 2 ** flint.fmpz(2) == 4
157146
assert type(2 ** flint.fmpz(2)) == flint.fmpz
158147
assert raises(lambda: () ** flint.fmpz(1), TypeError) # type: ignore
@@ -161,15 +150,13 @@ def test_fmpz():
161150

162151
mega = flint.fmpz(2) ** 8000000
163152
assert raises(lambda: mega ** mega, OverflowError)
164-
print(8, flush=True)
165153

166154
pow_mod_examples = [
167155
(2, 2, 3, 1),
168156
(2, -1, 5, 3),
169157
(2, 0, 5, 1),
170158
(2, 5, 1000, 32),
171159
]
172-
print(9, flush=True)
173160
for a, b, c, ab_mod_c in pow_mod_examples:
174161
assert pow(a, b, c) == ab_mod_c
175162
assert pow(flint.fmpz(a), b, c) == ab_mod_c
@@ -192,7 +179,6 @@ def test_fmpz():
192179
assert raises(lambda: pow(flint.fmpz(2), "asd", 2), TypeError) # type: ignore
193180
assert raises(lambda: pow(flint.fmpz(2), 2, "asd"), TypeError) # type: ignore
194181

195-
print(10, flush=True)
196182
f = flint.fmpz(2)
197183
assert f.numerator == f
198184
assert type(f.numerator) is flint.fmpz
@@ -244,7 +230,6 @@ def test_fmpz():
244230
f3 = flint.fmpz(3)
245231
f8 = flint.fmpz(8)
246232

247-
print(11, flush=True)
248233
assert f2 << 2 == 8
249234
assert f2 << f2 == 8
250235
assert 2 << f2 == 8
@@ -284,7 +269,6 @@ def test_fmpz():
284269
d = {flint.fmpz(2): 3}
285270
d[flint.fmpz(2)] = -1
286271

287-
print(12, flush=True)
288272
assert d == {flint.fmpz(2): -1}
289273
ctx.pretty = False
290274
assert repr(flint.fmpz(0)) == "fmpz(0)"
@@ -296,7 +280,6 @@ def test_fmpz():
296280
big = flint.fmpz(bigstr)
297281
assert big.str() == bigstr
298282
assert big.str(condense=10) == '1111111111{...80 digits...}1111111111'
299-
print(13, flush=True)
300283

301284
def test_fmpz_factor():
302285
assert flint.fmpz(6).gcd(flint.fmpz(9)) == 3

src/flint/types/fmpz.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cdef fmpz_get_intlong(fmpz_t x):
2222
cdef char * s
2323
if COEFF_IS_MPZ(x[0]):
2424
s = fmpz_get_str(NULL, 16, x)
25-
v = int(bytes(s).decode('ascii'), 16)
25+
v = int(str_from_chars(s), 16)
2626
flint_free(s)
2727
return v
2828
else:

0 commit comments

Comments
 (0)