You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
Łukasz, are you ok if we include this one in alpha4 as we were discussing in the PRs? If you are happy with that I will merge it so there is early testing and then we can keep working on the documentation and minor details for the next stage. If not, please, unmark it as a release blocker.
The implementation has been merged, so I will remove the "release blocker". We are still missing the documentation and the final changes to the inspect module.
New changeset b76302d by Carol Willing (Pablo Galindo) in branch 'master': bpo-36540: Documentation for PEP-570 - Python positional only arguments (bpo-13202) b76302d
New changeset 58d72ca by Saiyang Gou in branch 'master': bpo-36540: Improve doc of function definition regarding positional-only arguments (GH-25235) 58d72ca
New changeset 4554ab4 by Saiyang Gou in branch '3.8':
[3.8] bpo-36540: Improve doc of function definition regarding positional-only arguments (GH-25235) (GH-25260) 4554ab4
New changeset 3b1cf20 by Saiyang Gou in branch '3.9':
[3.9] bpo-36540: Improve doc of function definition regarding positional-only arguments (GH-25235) (GH-25259) 3b1cf20
Activity
pablogsal commentedon Apr 6, 2019
This issue will serve to track development and PRs for the implementation of PEP-570: Python Positional-Only Parameters.
pablogsal commentedon Apr 13, 2019
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.
serhiy-storchaka commentedon Apr 15, 2019
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.
vstinner commentedon Apr 15, 2019
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.
pablogsal commentedon Apr 29, 2019
Łukasz, are you ok if we include this one in alpha4 as we were discussing in the PRs? If you are happy with that I will merge it so there is early testing and then we can keep working on the documentation and minor details for the next stage. If not, please, unmark it as a release blocker.
pablogsal commentedon Apr 29, 2019
Opened https://bugs.python.org/issue36751 to track changes in the inspect module.
pablogsal commentedon Apr 29, 2019
New changeset 8c77b8c by Pablo Galindo in branch 'master':
bpo-36540: PEP-570 -- Implementation (GH-12701)
8c77b8c
pablogsal commentedon Apr 29, 2019
The implementation has been merged, so I will remove the "release blocker". We are still missing the documentation and the final changes to the inspect module.
ambv commentedon Apr 29, 2019
+1
willingc commentedon May 28, 2019
New changeset b76302d by Carol Willing (Pablo Galindo) in branch 'master':
bpo-36540: Documentation for PEP-570 - Python positional only arguments (bpo-13202)
b76302d
pablogsal commentedon May 28, 2019
Closing this. Will reopen if we realize we missed something.
pablogsal commentedon Apr 7, 2021
New changeset 58d72ca by Saiyang Gou in branch 'master':
bpo-36540: Improve doc of function definition regarding positional-only arguments (GH-25235)
58d72ca
pablogsal commentedon Apr 7, 2021
New changeset 4554ab4 by Saiyang Gou in branch '3.8':
[3.8] bpo-36540: Improve doc of function definition regarding positional-only arguments (GH-25235) (GH-25260)
4554ab4
pablogsal commentedon Apr 7, 2021
New changeset 3b1cf20 by Saiyang Gou in branch '3.9':
[3.9] bpo-36540: Improve doc of function definition regarding positional-only arguments (GH-25235) (GH-25259)
3b1cf20