[issue37497] Add inspect.Signature.from_text().

2020-03-06 Thread Yury Selivanov


Yury Selivanov  added the comment:

I'd be fine with `Signature.from_text()`, but not with `Signature` constructor 
/ `signature()` function accepting both callable and string arguments. Overall, 
I think that we ought to have a real need to add this new API, so unless 
there's a good (or any, really) use case I'd say we shouldn't merge this now.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37497] Add inspect.Signature.from_text().

2020-03-06 Thread Eric Snow


Eric Snow  added the comment:

Honestly, I don't recall exactly the concrete use case for which I opened this. 
:)  I *think* it was related to applying a more restrictive signature onto an 
existing function (e.g. with a decorator).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37497] Add inspect.Signature.from_text().

2020-02-26 Thread Yury Selivanov


Yury Selivanov  added the comment:

What's the actual use case for exposing this functionality?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37497] Add inspect.Signature.from_text().

2019-07-03 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +yselivanov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37497] Add inspect.Signature.from_text().

2019-07-03 Thread Eric Snow


Eric Snow  added the comment:

Note that there has been a little discussion of this in the past, particularly 
around the time that argument clinic was introduced:  
https://bugs.python.org/issue23967#msg241140.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37497] Add inspect.Signature.from_text().

2019-07-03 Thread Eric Snow


New submission from Eric Snow :

In early 2014 (3.3), when argument clinic was added, we added support for 
turning func.__text_signature__ into an inspect.Signature object.  However, the 
functionality to convert a string into a Signature was never exposed publicly.  
Here's a patch to do so.

Note that inspect.signature() will also support taking a string.

--
assignee: eric.snow
components: Library (Lib)
messages: 347250
nosy: eric.snow
priority: normal
pull_requests: 14398
severity: normal
stage: needs patch
status: open
title: Add inspect.Signature.from_text().
type: enhancement
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com