[issue34318] Convert deprecated behavior of assertRaises() etc into errors

2018-08-19 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue34318] Convert deprecated behavior of assertRaises() etc into errors

2018-08-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 77d5781835b6e0a132694ebadc22b1cbdb9913f8 by Serhiy Storchaka in 
branch 'master':
bpo-34318: Convert deprecation warnings to errors in assertRaises() etc. 
(GH-8623)
https://github.com/python/cpython/commit/77d5781835b6e0a132694ebadc22b1cbdb9913f8


--

___
Python tracker 

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



[issue34318] Convert deprecated behavior of assertRaises() etc into errors

2018-08-02 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +8128
stage:  -> patch review

___
Python tracker 

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



[issue34318] Convert deprecated behavior of assertRaises() etc into errors

2018-08-02 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

Currently assertRaises(), assertRaisesRegex(), assertWarns() and 
assertWarnsRegex() have some weird behavior.

# always success if the callable is None
self.assertRaises(SomeException, None)

# keyword arguments except "msg" are ignored
with self.assertRaises(SomeException, foobar=123):
...

# always success because keyword arguments are ignored
self.assertRaises(SomeException, callable=func)

Hardly any user code uses these "features" intentionally. More likely such 
examples are hidden bugs (see for example [1]). A DeprecationWarning is raised 
in these cases since 3.5 (issue24134), and it is time to make them errors.

[1] https://mail.python.org/pipermail/python-list/2018-July/736363.html

--
components: Tests
messages: 322946
nosy: ezio.melotti, michael.foord, rbcollins, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Convert deprecated behavior of assertRaises() etc into errors
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue34318] Convert deprecated behavior of assertRaises() etc into errors

2018-08-02 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
components: +Library (Lib)

___
Python tracker 

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