[issue24220] ast.Call signature changed

Carol Willing report at bugs.python.org
Mon May 18 06:44:30 CEST 2015


Carol Willing added the comment:

Matthias, Did you wish to mark this issue for additional Documentation and as a behavior change request (warning of signature change until 3.6) in addition to Devguide?

I've summarized below some info from researching Matthias' original message. I see three questions to answer:
a) Should `ast` shim the old signature and raise a warning until 3.6?
b) What additional items should be added to Documentation or Porting Guide?
c) What items should be added to Devguide?

**Background**
Implementation of PEP 448 (Additional Unpacking Generalizations) changed the ast.Call/_ast.Call signature by removing two arguments (args, kwargs).

Testing errors are seen in existing code that does not take into account the signature change.['1'][1]

**Workaround**
Matthias' possible workaround for existing projects to check for version 3.5 or higher and adapt to two less arguments.['2'][2]

**Devguide addition**
Thomas Kluyver's supplementary information about AST use.['3'][3] Perhaps mention this in the AST section of the devguide. I recognize that typically the devguide does not reference external docs but this seems like it would be useful to future developers.


    [1]: https://bitbucket.org/pytest-dev/pytest/issue/744/pytest-assert-rewriting-broken-with-python#
    [2]: https://bitbucket.org/pytest-dev/pytest/pull-request/296/astcall-signature-changed-on-35/diff
    [3]: https://greentreesnakes.readthedocs.org/en/latest/

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24220>
_______________________________________


More information about the Python-bugs-list mailing list