Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove depreciation warnings from tests for python 3.7 features #130

Open
gordonwatts opened this issue Oct 7, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@gordonwatts
Copy link
Member

Currently there are a few depreciation warnings that it would be nice to get rid of if we didn't have to also support 3.7:

============================== warnings summary ===============================
func_adl/ast/function_simplifier.py:436
  /home/runner/work/func_adl/func_adl/func_adl/ast/function_simplifier.py:436: DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead
    def visit_Subscript_Tuple(self, v: ast.Tuple, s: Union[ast.Num, ast.Constant, ast.Index]):

func_adl/ast/function_simplifier.py:566
  /home/runner/work/func_adl/func_adl/func_adl/ast/function_simplifier.py:566: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
    def _get_value_from_index(arg: Union[ast.Num, ast.Constant, ast.Index, ast.Str]) -> Optional[int]:

tests/test_event_dataset.py::test_eds_recovery_no_root
tests/test_event_dataset.py::test_eds_recovery_no_root
  /home/runner/work/func_adl/func_adl/tests/test_event_dataset.py:69: DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead
    q = ObjectStream(ast.BinOp(ast.Num(1), ast.Add, ast.Num(2)))

tests/test_object_stream.py::test_simple_query
  /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/make_it_sync/func_wrapper.py:10: DeprecationWarning: There is no current event loop
    loop = asyncio.get_event_loop()

tests/test_util_ast.py: 4 warnings
tests/ast/test_function_simplifier.py: 7 warnings
  /home/runner/work/func_adl/func_adl/func_adl/util_ast.py:265: DeprecationWarning: ast.NameConstant is deprecated and will be removed in Python 3.14; use ast.Constant instead
    if not isinstance(rl.body, ast.NameConstant):

tests/ast/test_func_adl_ast_utils.py::test_node_transform_function_ast_with_object_args
  /home/runner/work/func_adl/func_adl/tests/ast/test_func_adl_ast_utils.py:66: DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead
    assert isinstance(e.args[0], ast.Num)

tests/ast/test_func_adl_ast_utils.py::test_node_transform_function_ast_with_object_args
  /home/runner/work/func_adl/func_adl/tests/ast/test_func_adl_ast_utils.py:67: DeprecationWarning: Attribute n is deprecated and will be removed in Python 3.14; use value instead
    assert e.args[0].n == 10

tests/ast/test_func_adl_ast_utils.py::test_node_visit_function_ast_with_object_args
  /home/runner/work/func_adl/func_adl/tests/ast/test_func_adl_ast_utils.py:172: DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead
    assert isinstance(e.args[0], ast.Num)

tests/ast/test_func_adl_ast_utils.py::test_node_visit_function_ast_with_object_args
  /home/runner/work/func_adl/func_adl/tests/ast/test_func_adl_ast_utils.py:173: DeprecationWarning: Attribute n is deprecated and will be removed in Python 3.14; use value instead
    assert e.args[0].n == 10

tests/ast/test_function_simplifier.py: 15 warnings
  /home/runner/work/func_adl/func_adl/func_adl/ast/function_simplifier.py:576: DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead
    if isinstance(a, ast.Num):

tests/ast/test_function_simplifier.py: 10 warnings
  /home/runner/work/func_adl/func_adl/func_adl/ast/function_simplifier.py:577: DeprecationWarning: Attribute n is deprecated and will be removed in Python 3.14; use value instead
    return cast(int, a.n)

tests/ast/test_function_simplifier.py::test_dict_select_reference
tests/ast/test_function_simplifier.py::test_dict_select_index
tests/ast/test_function_simplifier.py::test_dict_in_lambda
tests/ast/test_function_simplifier.py::test_dict_around_first
  /home/runner/work/func_adl/func_adl/func_adl/ast/function_simplifier.py:483: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
    assert isinstance(value, (ast.Str, ast.Constant, ast.Num))
@gordonwatts gordonwatts added the bug Something isn't working label Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant