Opened 4 years ago
Closed 4 years ago
#24752 closed defect (worksforme)
py3: unhandled exception in pynac
Reported by: | embray | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | python3 | Keywords: | pynac |
Cc: | rws | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | Fixed upstream, in a later stable release. | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
There are several bugs like:
sage: arccoth(float(1.1)) --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) AttributeError: type object 'float' has no attribute 'precision' The above exception was the direct cause of the following exception: SystemError Traceback (most recent call last) <ipython-input-1-96f50dbce315> in <module>() ----> 1 arccoth(float(RealNumber('1.1'))) /home/embray/src/sagemath/sage-python3/local/lib/python3.6/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (build/cythonized/sage/symbolic/function.cpp:11828)() 993 res = self._evalf_try_(*args) 994 if res is None: --> 995 res = super(BuiltinFunction, self).__call__( 996 *args, coerce=coerce, hold=hold) 997 /home/embray/src/sagemath/sage-python3/local/lib/python3.6/site-packages/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6847)() 487 res = g_function_evalv(self._serial, vec, hold) 488 elif self._nargs == 1: --> 489 res = g_function_eval1(self._serial, 490 (<Expression>args[0])._gobj, hold) 491 elif self._nargs == 2: SystemError: <built-in function __import__> returned a result with an error set
This is due to an unhandled exception elsewhere in numeric.cpp
. This is a problem on Python 2 as well, but by luck the exception is cleared later before it becomes a problem (whereas Python 3 is more aggressive in checking for unhandled exceptions when going into a function call).
Upstream PR: https://github.com/pynac/pynac/pull/307
Change History (16)
comment:1 Changed 4 years ago by
- Cc rws added
- Report Upstream changed from N/A to Reported upstream. No feedback yet.
comment:2 Changed 4 years ago by
- Report Upstream changed from Reported upstream. No feedback yet. to Fixed upstream, but not in a stable release.
I know, but it's still worth noting that this issue can be changed after the next pynac upgrade.
comment:3 Changed 4 years ago by
- Dependencies set to #24745
comment:4 Changed 4 years ago by
I believe the pynac update in #24745 will resolve several other Python 3 issues I've already fixed, but I guess not this one?
comment:5 Changed 4 years ago by
Yes, that one is completely different.
Usually we use bug report tickets that are fixed in Pynac for adding doctests but, since it came from a doctest, it's practically a duplicate of a yet-to-be-opened Pynac upgrade ticket. Alternatively, you could add your PR as patch here. The Pynac upgrade will then just remove it.
comment:6 Changed 4 years ago by
- Milestone changed from sage-8.2 to sage-8.3
comment:7 Changed 4 years ago by
- Dependencies #24745 deleted
- Report Upstream changed from Fixed upstream, but not in a stable release. to Fixed upstream, in a later stable release.
comment:8 Changed 4 years ago by
- Milestone changed from sage-8.3 to sage-duplicate/invalid/wontfix
- Status changed from new to needs_review
this should be closed now, please
comment:9 Changed 4 years ago by
- Status changed from needs_review to positive_review
comment:10 Changed 4 years ago by
- Resolution set to worksforme
- Status changed from positive_review to closed
comment:11 Changed 4 years ago by
- Resolution worksforme deleted
- Status changed from closed to new
comment:12 Changed 4 years ago by
- Status changed from new to needs_info
Has there been another update to the minimal pynac version in Sage? Because if not then I'm not sure we can call this fixed (and if so please note the relevant ticket).
comment:13 Changed 4 years ago by
Trac #24838 ?
comment:14 Changed 4 years ago by
ping ?
comment:15 Changed 4 years ago by
- Status changed from needs_info to positive_review
Yes, the PR listed in the description was merged with #24838.
comment:16 Changed 4 years ago by
- Resolution set to worksforme
- Status changed from positive_review to closed
Great, thanks.
Typically, pynac releases quickly after a bug-fix so we should wait for that.