[issue24248] Deprecate inspect.Signature.from_function and from_builtin

2015-05-20 Thread Yury Selivanov

Yury Selivanov added the comment:

Patch is attached.

--
keywords: +patch
Added file: http://bugs.python.org/file39439/sig_warns.patch

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



[issue24248] Deprecate inspect.Signature.from_function and from_builtin

2015-05-20 Thread Yury Selivanov

New submission from Yury Selivanov:

I want to deprecate Signature.from_function and Signature.from_builtin in 3.5.

There is no use for these methods (they aren't generic), and we also now have a 
very handy 'from_callable' for easy Signature subclassing.

--
assignee: yselivanov
components: Library (Lib)
messages: 243684
nosy: brett.cannon, larry, ncoghlan, yselivanov
priority: normal
severity: normal
status: open
title: Deprecate inspect.Signature.from_function and from_builtin
type: behavior
versions: Python 3.5

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



[issue24248] Deprecate inspect.Signature.from_function and from_builtin

2015-05-20 Thread Yury Selivanov

Yury Selivanov added the comment:

Forgot to mention: from_function and from_builtin are not documented.

--

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



[issue24248] Deprecate inspect.Signature.from_function and from_builtin

2015-05-20 Thread Yury Selivanov

Yury Selivanov added the comment:

 For the documentation, in addition to noting the deprecation itself, it may 
 also be worth noting how to explicitly recreate the type restriction.

Nick, what do you mean by type restriction?  Also, since the functions aren't 
documented, I think we don't need to document that they are deprecated?

--

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



[issue24248] Deprecate inspect.Signature.from_function and from_builtin

2015-05-20 Thread Nick Coghlan

Nick Coghlan added the comment:

+1 from me.

The deprecation warning text in the patch has a typo (callback instead of 
callable).

For the documentation, in addition to noting the deprecation itself, it may 
also be worth noting how to explicitly recreate the type restriction.

--

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



[issue24248] Deprecate inspect.Signature.from_function and from_builtin

2015-05-20 Thread Nick Coghlan

Nick Coghlan added the comment:

Oh, right - you said they weren't documented, and I completely glazed over that 
bit.

The type restrictions comment isn't valid in the absence of documentation, 
but it was basically about how to fully replicate the behaviour of the existing 
functions in conjunction with from_callable.

--

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



[issue24248] Deprecate inspect.Signature.from_function and from_builtin

2015-05-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 64fba4ea031b by Yury Selivanov in branch 'default':
Issue 24248: Deprecate inspect.Signature.from_function and .from_builtin
https://hg.python.org/cpython/rev/64fba4ea031b

--
nosy: +python-dev

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



[issue24248] Deprecate inspect.Signature.from_function and from_builtin

2015-05-20 Thread Yury Selivanov

Changes by Yury Selivanov yseliva...@gmail.com:


--
resolution:  - fixed
stage:  - resolved
status: open - closed

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



[issue24248] Deprecate inspect.Signature.from_function and from_builtin

2015-05-20 Thread Yury Selivanov

Yury Selivanov added the comment:

OK, committed! Thanks for the review, Nick.

--

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



[issue24248] Deprecate inspect.Signature.from_function and from_builtin

2015-05-20 Thread Yury Selivanov

Yury Selivanov added the comment:

I documented the deprecation in the whatsnew section anyways.

--

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