Opened 5 years ago
Closed 4 years ago
#24561 closed defect (duplicate)
py3: fix bugs in pynac with handling Python 3 ints
Reported by: | embray | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | python3 | Keywords: | pynac |
Cc: | chapoton, rws | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | Fixed upstream, in a later stable release. | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
Change History (9)
comment:1 Changed 5 years ago by
- Report Upstream changed from N/A to Reported upstream. No feedback yet.
comment:2 Changed 5 years ago by
- Report Upstream changed from Reported upstream. No feedback yet. to Reported upstream. Developers acknowledge bug.
comment:3 Changed 5 years ago by
- Report Upstream changed from Reported upstream. Developers acknowledge bug. to Fixed upstream, but not in a stable release.
comment:4 follow-up: ↓ 5 Changed 5 years ago by
comment:5 in reply to: ↑ 4 Changed 5 years ago by
Replying to embray:
There is another bug I just found that only cropped up once I rebased my Python 3 branch to include #24247.
The problem seems to lie in the assumption of all Python integer-like values will be successfully converted to a native int type (either
long
ormpz_t
). Otherwise methods likenumeric::is_small_power
don't work properly, and some other things break down too.
Actually numeric::is_small_power
is called only once (from log_eval
) and Python numeric
s are not down-converted at all. So, to be able to confirm the bug you better please give me the concrete example.
comment:6 Changed 5 years ago by
Maybe that's not exactly it, but there was something like that. Basically the issue is that Python 2 longs / Python 3 ints were staying as Python objects and not being converted to either a C long
or mpz_t
. I have a patch I just forgot to post it.
comment:7 Changed 5 years ago by
- Description modified (diff)
comment:8 Changed 4 years ago by
- Milestone changed from sage-8.2 to sage-duplicate/invalid/wontfix
- Report Upstream changed from Fixed upstream, but not in a stable release. to Fixed upstream, in a later stable release.
- Status changed from new to needs_review
#24668 updates pynac, so we can close this one maybe ?
comment:9 Changed 4 years ago by
- Resolution set to duplicate
- Status changed from needs_review to closed
There is another bug I just found that only cropped up once I rebased my Python 3 branch to include #24247.
The problem seems to lie in the assumption of all Python integer-like values will be successfully converted to a native int type (either
long
ormpz_t
). Otherwise methods likenumeric::is_small_power
don't work properly, and some other things break down too.