Skip to content

Remove DeprecationWarnings in test_peg_generator #125811

@efimov-mikhail

Description

@efimov-mikhail

Feature or enhancement

Proposal:

Some DeprecationWarnings are present in test.test_peg_generator.test_pegen output:

-> % (make -j && ./python -m unittest -v test.test_peg_generator.test_pegen) 2>&1 | grep Deprecation
test_locations_in_alt_action_and_group (test.test_peg_generator.test_pegen.TestPegen.test_locations_in_alt_action_and_group) ... <string>:29: DeprecationWarning: Expression.__init__ got an unexpected keyword argument 'lineno'. Support for arbitrary keyword arguments is deprecated and will be removed in Python 3.15.
<string>:29: DeprecationWarning: Expression.__init__ got an unexpected keyword argument 'col_offset'. Support for arbitrary keyword arguments is deprecated and will be removed in Python 3.15.
<string>:29: DeprecationWarning: Expression.__init__ got an unexpected keyword argument 'end_lineno'. Support for arbitrary keyword arguments is deprecated and will be removed in Python 3.15.
<string>:29: DeprecationWarning: Expression.__init__ got an unexpected keyword argument 'end_col_offset'. Support for arbitrary keyword arguments is deprecated and will be removed in Python 3.15.
test_python_expr (test.test_peg_generator.test_pegen.TestPegen.test_python_expr) ... <string>:25: DeprecationWarning: Expression.__init__ got an unexpected keyword argument 'lineno'. Support for arbitrary keyword arguments is deprecated and will be removed in Python 3.15.
<string>:25: DeprecationWarning: Expression.__init__ got an unexpected keyword argument 'col_offset'. Support for arbitrary keyword arguments is deprecated and will be removed in Python 3.15.

Those warning can be easily removed.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions