Replies: 1 comment
-
Thanks for rains this, @jmcneal. I saw this pop up during testing (for some reason not during regular runs) recently, but hadn't had a chance to look into it. Lines 307 to 311 in 4476b83 Doing a spot check of a couple of these, it appears that these are cases where an explicit int() conversion is requested on a 'wrapped' value: pyvsc/src/vsc/model/expr_literal_model.py Lines 39 to 42 in 4476b83 In these cases, I suspect the int() explicit conversion can either be removed entirely, or should only be done selectively. |
Beta Was this translation helpful? Give feedback.
-
I'm doing some very simple randomizations and I'm seeing DeprecationWarning: coming from several files in the VSC code.
Is there a better way to get these to go away without disabling all DeprecationWarnings?
I think I've got the latest code, I just DL'd it this week:
~projects/pyuvm/.venv/lib/python3.12/site-packages/pyvsc-0.9.3.10985030023.dist-info:
~/projects/pyuvm/.venv/lib/python3.12/site-packages/vsc/model/field_scalar_model.py:93: DeprecationWarning: int returned non-int (type ValueInt). The ability to return an instance of a strict subclass of int is deprecated, and may be removed in a future version of Python.
self.val.v = int(val)
~/projects/pyuvm/.venv/lib/python3.12/site-packages/vsc/model/variable_bound_in_propagator.py:31: DeprecationWarning: int returned non-int (type ValueInt). The ability to return an instance of a strict subclass of int is deprecated, and may be removed in a future version of Python.
in_r_l_t = list(map(lambda e:[int(e.lhs.val()),int(e.rhs.val())] if isinstance(e, ExprRangeModel)
~/projects/pyuvm/.venv/lib/python3.12/site-packages/vsc/model/expr_literal_model.py:42: DeprecationWarning: int returned non-int (type ValueInt). The ability to return an instance of a strict subclass of int is deprecated, and may be removed in a future version of Python.
return btor.Const(int(self.val()), ctx_width)
~/projects/pyuvm/.venv/lib/python3.12/site-packages/vsc/model/value_scalar.py:80: DeprecationWarning: int returned non-int (type ValueInt). The ability to return an instance of a strict subclass of int is deprecated, and may be removed in a future version of Python.
v = int(rhs)
~/projects/pyuvm/.venv/lib/python3.12/site-packages/vsc/model/expr_partselect_model.py:40: DeprecationWarning: int returned non-int (type ValueInt). The ability to return an instance of a strict subclass of int is deprecated, and may be removed in a future version of Python.
return btor.Slice(
Beta Was this translation helpful? Give feedback.
All reactions