[issue36751] Changes in the inspect module for PEP 570

2019-05-22 Thread Nick Coghlan
Nick Coghlan added the comment: I split https://bugs.python.org/issue37010 out as a separate performance issue in case anyone is inclined to explore the idea of reversing the relationship between inspect.signature and inspect.getfullargspec, such that the latter becomes a fast building block

[issue36751] Changes in the inspect module for PEP 570

2019-05-17 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36751] Changes in the inspect module for PEP 570

2019-05-17 Thread STINNER Victor
STINNER Victor added the comment: Can this issue be closed now? This issue was specific to the impact of the PEP 570 on the inspect module. It's now fixed, right? If someone wants to continue the discussion about a specific aspect of the inspect module, I suggest to start a thread on python-

[issue36751] Changes in the inspect module for PEP 570

2019-05-16 Thread mike bayer
mike bayer added the comment: Just did some benchmarks, and while Signature has apparently had a big speedup in Python 3.6, it is still much less performant than either the Python 2.7 or Python 3.3 implementations, anywhere from 6-18 times slower approximately depending on the function. Fo

[issue36751] Changes in the inspect module for PEP 570

2019-05-16 Thread mike bayer
mike bayer added the comment: > We are talking again and again that we have a lot of old things in the > standard library but it seems that removing them is also a problem. I agree that the reason we have these deprecation warnings is so that we do get notified and we do fix them. I think S

[issue36751] Changes in the inspect module for PEP 570

2019-05-16 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks Pablo. Noting for the record: positional-only arguments aren't new *semantically", since extension modules have always allowed them, and you've long been able to emulate them in Python code by accepting "*args". Prior to the introduction of argument cl

[issue36751] Changes in the inspect module for PEP 570

2019-05-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- priority: release blocker -> normal ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue36751] Changes in the inspect module for PEP 570

2019-05-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset aee19f54f6fe45f6b3c906987941e5a8af4468e9 by Pablo Galindo in branch 'master': bpo-36751: Undeprecate getfullargspec (GH-13245) https://github.com/python/cpython/commit/aee19f54f6fe45f6b3c906987941e5a8af4468e9 -- ___

[issue36751] Changes in the inspect module for PEP 570

2019-05-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: For now, I am going to proceed to merge PR13245 and un-deprecate getfullargspec(). Being said that I would want to remark that if test suites are broken when deprecation warnings are emitted that is (1) their own choice, (2) precisely to detect when

[issue36751] Changes in the inspect module for PEP 570

2019-05-16 Thread Miro Hrončok
Miro Hrončok added the comment: As a downstream maintainers of Python in Fedora, this is a great PITA for us. A lot of projects unfortunately treat DeprecationWarnings as errors and we run upstream test suites. It appears that this particular DeprecationWarning is now failing the test suites

[issue36751] Changes in the inspect module for PEP 570

2019-05-16 Thread mike bayer
mike bayer added the comment: > A deprecating warning doesn't hurt: you are still able to run your code. this is very much untrue in modern testing environments, as it is common that test suites fail on deprecation warnings, especially in libraries, to ensure downstream compatibility. My ob

[issue36751] Changes in the inspect module for PEP 570

2019-05-13 Thread Brett Cannon
Brett Cannon added the comment: RE: "if a function continues to work correctly throughout the span of a Python X version, why does it need to be removed?" In this case the argument is whether inspect.getfullargspec() works correctly in the face of positional-only parameters. There's also the

[issue36751] Changes in the inspect module for PEP 570

2019-05-13 Thread mike bayer
mike bayer added the comment: if a function continues to work correctly throughout the span of a Python X version, why does it need to be removed? I have a foggy memory but I don't seem to recall functions that were technically redundant being aggressively deprecated in the 2.x series. T

[issue36751] Changes in the inspect module for PEP 570

2019-05-13 Thread mike bayer
Change by mike bayer : -- nosy: +zzzeek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue36751] Changes in the inspect module for PEP 570

2019-05-13 Thread STINNER Victor
STINNER Victor added the comment: > And no, the undeprecation wasn't because of Python 2 (Py2 doesn't have > getfullargspec() - it's a Py3 only API). Python 3.8.0 is scheduled for: "3.8.0 final: Monday, 2019-10-21" Something like 2 months before 2.7 end of support: 2019-12-31. Does the "bec

[issue36751] Changes in the inspect module for PEP 570

2019-05-13 Thread Miro Hrončok
Miro Hrončok added the comment: Just a quick idea: What if a warning happened iff positional only argument are there, but not with functions that don't use those? Might be a different kind of warning. -- nosy: +hroncok ___ Python tracker

[issue36751] Changes in the inspect module for PEP 570

2019-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Opened PR 13245 to un-deprecate getfullargspec. -- ___ Python tracker ___ ___ Python-bugs-

[issue36751] Changes in the inspect module for PEP 570

2019-05-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +13157 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue36751] Changes in the inspect module for PEP 570

2019-05-10 Thread Nick Coghlan
Nick Coghlan added the comment: Also note #32190 regarding changing the way these APIs are documented, without introducing any programmatic deprecation warnings. -- ___ Python tracker __

[issue36751] Changes in the inspect module for PEP 570

2019-05-10 Thread Nick Coghlan
Nick Coghlan added the comment: And no, the undeprecation wasn't because of Python 2 (Py2 doesn't have getfullargspec() - it's a Py3 only API). The undeprecation was because there are a lot of 3rd party projects for whom the getfullargspec() representation is good enough, and switching to i

[issue36751] Changes in the inspect module for PEP 570

2019-05-10 Thread Nick Coghlan
Change by Nick Coghlan : -- priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue36751] Changes in the inspect module for PEP 570

2019-05-10 Thread Nick Coghlan
Nick Coghlan added the comment: This PR needs to be reverted - we previously deprecated this API, but then undeprecated it again in #27172, as the consequence of deprecating it was projects copying & pasting the getfullargspec() implementation into their own code, not switching to inspect.Si

[issue36751] Changes in the inspect module for PEP 570

2019-04-29 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg341129 ___ Python tracker ___ ___ Python-bugs-list

[issue36751] Changes in the inspect module for PEP 570

2019-04-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: PR 13016 is fixed, and I will remove the release blocker, but I will leave it open for now until we can check if there is consensus on the status and future of the inspect module after PEP 570 :) -- priority: release blocker -> normal ___

[issue36751] Changes in the inspect module for PEP 570

2019-04-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: PR 13016 is merged, and I will remove the release blocker, but I will leave it open for now until we can check if there is consensus on the status and future of the inspect module after PEP 570 :) -- ___ Py

[issue36751] Changes in the inspect module for PEP 570

2019-04-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset d5d2b4546939b98244708e5bb0cfccd55b99d244 by Pablo Galindo in branch 'master': bpo-36751: Deprecate getfullargspec and report positional-only args as regular args (GH-13016) https://github.com/python/cpython/commit/d5d2b4546939b98244708e5

[issue36751] Changes in the inspect module for PEP 570

2019-04-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: PR 13016 adds the positional-only arguments together with the regular arguments as suggested by Steve and Łukasz and deprecates getfullargspec() in favour of inspect.signature. -- ___ Python tracker

[issue36751] Changes in the inspect module for PEP 570

2019-04-29 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +12939 stage: -> patch review ___ Python tracker ___ ___ Pytho

[issue36751] Changes in the inspect module for PEP 570

2019-04-29 Thread Łukasz Langa
Łukasz Langa added the comment: I'm with Steve on this one. Report positional-only args as regular arguments in the old functions. -- ___ Python tracker ___ __

[issue36751] Changes in the inspect module for PEP 570

2019-04-29 Thread Brett Cannon
Brett Cannon added the comment: If I remember correctly the un-deprecation was because 2/3 code could only use getfullargspec() to get all relevant details. Since we're so close to being done w/ Python 2 I think this might be the last change to make to them, document their deprecation, tack

[issue36751] Changes in the inspect module for PEP 570

2019-04-29 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue36751] Changes in the inspect module for PEP 570

2019-04-29 Thread Steve Dower
Steve Dower added the comment: > My proposal was to raise an exception if the input function has positonal > arguments Counter-proposal - just report them as regular position-or-name arguments. Users of inspect are most likely to be IDEs or editors getting information to present to users. A

[issue36751] Changes in the inspect module for PEP 570

2019-04-29 Thread STINNER Victor
STINNER Victor added the comment: IMHO getargs(), getargspec(), getfullargspec() should be deprecated in favor of signature() which is future-proof. But Nick Coghlan undeprecated these functions in 2017 https://bugs.python.org/issue20438 whereas these were deprecated since 2015. I didn't und

[issue36751] Changes in the inspect module for PEP 570

2019-04-29 Thread Brett Cannon
Brett Cannon added the comment: Steve's right that we can't change the indexes on those functions for pre-existing values, so appending to the end is the only real option in that case. I still think they should both be deprecated due to how limiting their APIs are. Obviously signature() can

[issue36751] Changes in the inspect module for PEP 570

2019-04-29 Thread Steve Dower
Steve Dower added the comment: Nope, I was right the first time. The FullArgSpec tulle has changed indexes, and formatargspec has additional (undocumented) arguments. Since formatargspec is deprecated, it should probably just not change. The FullArgSpec tuple might have to become a concrete

[issue36751] Changes in the inspect module for PEP 570

2019-04-29 Thread Steve Dower
Change by Steve Dower : -- nosy: -steve.dower ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue36751] Changes in the inspect module for PEP 570

2019-04-29 Thread Steve Dower
Steve Dower added the comment: My bad, there were PR changes that GitHub didn't show me. As you were -- nosy: -lukasz.langa priority: release blocker -> normal ___ Python tracker ___

[issue36751] Changes in the inspect module for PEP 570

2019-04-29 Thread Steve Dower
Steve Dower added the comment: Marking as a release blocker and adding RM. The 3.8 branch now contains breaking API changes to these functions that we have to resolve before the next release (or revert while deciding how to handle the change) - PR 12701 has been merged. -- keywords:

[issue36751] Changes in the inspect module for PEP 570

2019-04-29 Thread STINNER Victor
STINNER Victor added the comment: Context: see https://github.com/python/cpython/pull/12701 discussion. -- ___ Python tracker ___ _

[issue36751] Changes in the inspect module for PEP 570

2019-04-29 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : This issue is to discuss how to handle the changes in the inspect module for PEP 570. In particular, how to handle: * getfullargspec * formatargspec for positional-only parameters. -- components: Interpreter Core messages: 341070 nosy: pabl