Title: PEP 570: Python Positional-Only Parameters
Type: Stage: patch review
Components: Interpreter Core Versions: Python 3.8
Status: open Resolution:
Dependencies: Superseder:
Assigned To: pablogsal Nosy List: ericvw, pablogsal, serhiy.storchaka, vstinner
Priority: normal Keywords: patch

Created on 2019-04-06 01:06 by pablogsal, last changed 2019-04-24 17:20 by gvanrossum.

Pull Requests
URL Status Linked Edit
PR 12701 open pablogsal, 2019-04-06 01:06
PR 12942 open gvanrossum, 2019-04-24 17:20
Messages (4)
msg339521 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2019-04-06 01:06
This issue will serve to track development and PRs for the implementation of PEP 570: Python Positional-Only Parameters.
msg340141 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2019-04-13 01:22
I will separate the work in two Pull Request (maybe more). The implementation of the PEP will be done in PR12701 and the documentation and other additions will be done in future Pull Requests to keep things more manageable.
msg340246 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-04-15 09:25
PR 12701 makes breaking changes in the inspect module.

Currently we have two sets of APIs in the inspect module: old deprecated API that do not support keyword-only arguments, and new *full* API that supports them. Even many years since 3.0 the old API still has not been removed. Adding support for positional-only arguments needs changes of the same order as adding support of keyword-only arguments. It means deprecating the current API and introducing a new (*fuller*?) API. This is a slow process for many releases. We could also take opportunity to redesign APIs completely instead of just adding new parameters and fields.

I suggest to remove all breaking changes in the inspect module and defer them to the separate issue. This perhaps will need a discussion on Python-Dev, and maybe not one.
msg340247 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-04-15 09:32
It seems like deprecating or removing "old" inspect functions is an issue. An option would be to raise an error if these functions is used on a function which has at least one positional argument.
Date User Action Args
2019-04-24 17:20:01gvanrossumsetpull_requests: + pull_request12866
2019-04-15 09:32:00vstinnersetnosy: + vstinner
messages: + msg340247
2019-04-15 09:25:19serhiy.storchakasetmessages: + msg340246
2019-04-13 01:22:22pablogsalsetmessages: + msg340141
2019-04-06 04:41:43serhiy.storchakasetnosy: + serhiy.storchaka
2019-04-06 01:12:08ericvwsetnosy: + ericvw
2019-04-06 01:06:36pablogsalsetkeywords: + patch
stage: patch review
pull_requests: + pull_request12625
2019-04-06 01:06:03pablogsalcreate