This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Error in compilig the AST for functions with optional positional-only arguments
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: pablogsal Nosy List: benjamin.peterson, brett.cannon, pablogsal, serhiy.storchaka, yselivanov
Priority: normal Keywords: patch

Created on 2019-05-31 11:31 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 13697 merged pablogsal, 2019-05-31 12:41
Messages (3)
msg344064 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-05-31 11:31
>>> import ast
>>> sample = 'def f(a=1, /): pass'
>>> compile(sample, '?', 'exec')
<code object <module> at 0x7f7cacdfd5c0, file "?", line 1>
>>> compile(ast.parse(sample, '?'), '?', 'exec')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: more positional defaults than args on arguments
msg344071 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2019-05-31 12:41
Thanks again, Serhiy :)
msg344074 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2019-05-31 13:09
New changeset 2f58a84104ef64f71deb71d264305bcd73e59c97 by Pablo Galindo in branch 'master':
bpo-37112: Allow compile to work on AST with positional only arguments with defaults (GH-13697)
https://github.com/python/cpython/commit/2f58a84104ef64f71deb71d264305bcd73e59c97
History
Date User Action Args
2022-04-11 14:59:16adminsetgithub: 81293
2019-05-31 13:10:05pablogsalsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-05-31 13:09:54pablogsalsetmessages: + msg344074
2019-05-31 13:00:46pablogsalsettitle: Error in compilig the AST for functions with optional positional arguments -> Error in compilig the AST for functions with optional positional-only arguments
2019-05-31 12:41:55pablogsalsetmessages: + msg344071
2019-05-31 12:41:29pablogsalsetkeywords: + patch
stage: patch review
pull_requests: + pull_request13582
2019-05-31 12:35:18pablogsalsetassignee: pablogsal
2019-05-31 11:31:31serhiy.storchakacreate