sympy.test('test_frame')` and get:sympy/physics/vector/tests/test_frame.py[4] .EE. [FAIL]
_____________________________________________________________________________________
_______________ sympy/physics/vector/tests/test_frame.py:test_ang_vel _______________
File "/users/kate/devstuff/sympy/sympy/physics/vector/tests/test_frame.py", line 65, in test_ang_vel
...
>>> from sympy.physics.vector.tests.test_frame import test_ang_vel
>>> test_ang_vel()To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6KumJ4p63gGcUdwVsJQgr6Z8CD_g%2BnYAz%2BzipKepASdYw%40mail.gmail.com.
In [7]: test('test_frame.py')
================================ test process starts ================================
executable: /Users/kate/.virtualenvs/symp/bin/python (3.5.0-final-0) [CPython]
architecture: 64-bit
cache: yes
ground types: python
random seed: 41896037
hash randomization: on (PYTHONHASHSEED=938978246)
sympy/physics/vector/tests/test_frame.py[4] .EE. [FAIL]
_____________________________________________________________________________________
_______________ sympy/physics/vector/tests/test_frame.py:test_ang_vel _______________
File "/users/kate/devstuff/sympy/sympy/physics/vector/tests/test_frame.py", line 65, in test_ang_vel
A = N.orientnew('A', 'Axis', [q1, N.z])
File "/Users/kate/devstuff/sympy/sympy/physics/vector/frame.py", line 640, in orientnew
newframe.orient(self, rot_type, amounts, rot_order)
File "/Users/kate/devstuff/sympy/sympy/physics/vector/frame.py", line 523, in orient
[-axis[1], axis[0], 0]]) * sin(theta) + axis * axis.T)
File "/Users/kate/devstuff/sympy/sympy/core/cache.py", line 93, in wrapper
retval = cfunc(*args, **kwargs)
File "/Users/kate/devstuff/sympy/sympy/core/function.py", line 376, in __new__
result = super(Function, cls).__new__(cls, *args, **options)
File "/Users/kate/devstuff/sympy/sympy/core/cache.py", line 93, in wrapper
retval = cfunc(*args, **kwargs)
File "/Users/kate/devstuff/sympy/sympy/core/function.py", line 200, in __new__
evaluated = cls.eval(*args)
File "/Users/kate/devstuff/sympy/sympy/functions/elementary/trigonometric.py", line 469, in eval
if arg.could_extract_minus_sign():
File "/Users/kate/devstuff/sympy/sympy/core/expr.py", line 2088, in could_extract_minus_sign
negative_self = -self
File "/Users/kate/devstuff/sympy/sympy/core/expr.py", line 112, in __neg__
return Mul(S.NegativeOne, self)
File "/Users/kate/devstuff/sympy/sympy/core/cache.py", line 93, in wrapper
retval = cfunc(*args, **kwargs)
KeyError: (<class 'sympy.core.add.Add'>, A_z, -A_z, <class 'sympy.core.assumptions.ManagedProperties'>, <class 'sympy.physics.vector.frame.CoordinateSym'>, <class 'sympy.core.mul.Mul'>)
_____________________________________________________________________________________
_________________ sympy/physics/vector/tests/test_frame.py:test_dcm _________________
File "/users/kate/devstuff/sympy/sympy/physics/vector/tests/test_frame.py", line 130, in test_dcm
A = N.orientnew('A', 'Axis', [q1, N.z])
File "/Users/kate/devstuff/sympy/sympy/physics/vector/frame.py", line 640, in orientnew
newframe.orient(self, rot_type, amounts, rot_order)
File "/Users/kate/devstuff/sympy/sympy/physics/vector/frame.py", line 523, in orient
[-axis[1], axis[0], 0]]) * sin(theta) + axis * axis.T)
File "/Users/kate/devstuff/sympy/sympy/core/cache.py", line 93, in wrapper
retval = cfunc(*args, **kwargs)
File "/Users/kate/devstuff/sympy/sympy/core/function.py", line 376, in __new__
result = super(Function, cls).__new__(cls, *args, **options)
File "/Users/kate/devstuff/sympy/sympy/core/cache.py", line 93, in wrapper
retval = cfunc(*args, **kwargs)
File "/Users/kate/devstuff/sympy/sympy/core/function.py", line 200, in __new__
evaluated = cls.eval(*args)
File "/Users/kate/devstuff/sympy/sympy/functions/elementary/trigonometric.py", line 469, in eval
if arg.could_extract_minus_sign():
File "/Users/kate/devstuff/sympy/sympy/core/expr.py", line 2088, in could_extract_minus_sign
negative_self = -self
File "/Users/kate/devstuff/sympy/sympy/core/expr.py", line 112, in __neg__
return Mul(S.NegativeOne, self)
File "/Users/kate/devstuff/sympy/sympy/core/cache.py", line 93, in wrapper
retval = cfunc(*args, **kwargs)
KeyError: (<class 'sympy.core.mul.Mul'>, A_x, 1, <class 'sympy.core.assumptions.ManagedProperties'>, <class 'sympy.physics.vector.frame.CoordinateSym'>, <class 'sympy.core.numbers.One'>)
============== tests finished: 2 passed, 2 exceptions, in 2.28 seconds ==============
DO *NOT* COMMIT!
Out[7]: False
Oh, sure. Didn't mean to imply that it doesn't, I'm just happy that I can start my next project using sympy and python 3.5.Although, I am confused-- how can it be a bug in fastcache if it only shows up when fastcache isn't installed?
$ SYMPY_CACHE_SIZE=none /usr/local/python-3.5.0/bin/python3
Python 3.5.0 (default, Sep 23 2015, 14:54:30)
[GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from sympy import test
>>> test("test_frame")
============================= test process starts ==============================
executable: /usr/local/python-3.5.0/bin/python3 (3.5.0-final-0) [CPython]
architecture: 64-bit
cache: yes
ground types: python
random seed: 3721264
hash randomization: on (PYTHONHASHSEED=117906637)
sympy/physics/vector/tests/test_frame.py[4] .... [OK]
================== tests finished: 4 passed, in 3.21 seconds ===================
True--
You received this message because you are subscribed to a topic in the Google Groups "sympy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sympy/AnwYTJGRBB4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6JHSqqkBSiyN8pcTAATk8hRKMOK0WOf-PGCy%3DkX-RgNuw%40mail.gmail.com.
I don't have any previous experience with caching (and I don't have tons of time to spend on this), so I'm of no help with debugging lru_cache, but this change fixes all the broken cache-related tests. Are there any problems caused by catching KeyError here?
--
You received this message because you are subscribed to a topic in the Google Groups "sympy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sympy/AnwYTJGRBB4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/f7eb4e48-048b-4d74-b0c3-78a9c6ef91ee%40googlegroups.com.
The big concern is that we shouldn't ever trigger a KeyError. I suspect the new lru_cache in 3.5 was not supposed to change this behavior but was simply supposed to be more performant than the 3.4 version
On Thu, Oct 1, 2015 at 8:45 PM, Kate MacInnis <macin...@gmail.com> wrote:
I don't have any previous experience with caching (and I don't have tons of time to spend on this), so I'm of no help with debugging lru_cache, but this change fixes all the broken cache-related tests. Are there any problems caused by catching KeyError here?
--
You received this message because you are subscribed to a topic in the Google Groups "sympy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sympy/AnwYTJGRBB4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sympy+unsubscribe@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.