[issue22340] Fix Python 3 warnings in Python 2 tests

2014-09-06 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
stage: patch review - resolved

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



[issue22340] Fix Python 3 warnings in Python 2 tests

2014-09-05 Thread STINNER Victor

New submission from STINNER Victor:

Running Python 2 test suite with python -3 -Wd displays a lot of 
DeprecationWarning warnings. Just one example:

/home/haypo/prog/python/2.7/Lib/test/test_ssl.py:2368: DeprecationWarning: 
urllib.urlopen() has been removed in Python 3.0 in favor of urllib2.urlopen()

Attached patch fix most of them (maybe all).

--
components: Tests
files: fix_py3k_warn.patch
keywords: patch
messages: 226418
nosy: haypo
priority: normal
severity: normal
status: open
title: Fix Python 3 warnings in Python 2 tests
versions: Python 2.7
Added file: http://bugs.python.org/file36547/fix_py3k_warn.patch

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



[issue22340] Fix Python 3 warnings in Python 2 tests

2014-09-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Why test_support.check_py3k_warnings is not used in test_calltips.py? Or may be 
change the test to 1+0, 1//0 or 1.0/0.0?

--
nosy: +serhiy.storchaka, terry.reedy

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



[issue22340] Fix Python 3 warnings in Python 2 tests

2014-09-05 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Please just change '1/0' to '1//0'.  Any expression that raises something other 
than NameError or AttributeError will do. .get_entity evals user code and Idle 
previously crashed when other exceptions were not caught. Thanks, Serhiy, for 
catching this.

The other warned code appears to be essential to the corresponding test. I 
presume Serhiy checked this also.

--
assignee:  - haypo
stage:  - patch review
type:  - behavior

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



[issue22340] Fix Python 3 warnings in Python 2 tests

2014-09-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The rest of the patch LGTM.

--

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



[issue22340] Fix Python 3 warnings in Python 2 tests

2014-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0675b3a55941 by Victor Stinner in branch '2.7':
Issue #22340: Fix Python 3 warnings in Python 2 tests
http://hg.python.org/cpython/rev/0675b3a55941

--
nosy: +python-dev

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



[issue22340] Fix Python 3 warnings in Python 2 tests

2014-09-05 Thread STINNER Victor

STINNER Victor added the comment:

Ok, I replaced 1/0 with 1//0 in IDLE tests.

I also changed the context manager in test_collections, the sets module is just 
deprecated, it's not a Python 3 specific warning.

Thanks for the review Serhiy.

--
resolution:  - fixed
status: open - closed

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



[issue22340] Fix Python 3 warnings in Python 2 tests

2014-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 407653078135 by Victor Stinner in branch '2.7':
Issue #22340: Fix test_collections if the sets module was already imported
http://hg.python.org/cpython/rev/407653078135

--

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