[issue32915] Running Python 2 with -3 flag doesn't complain about cmp/__cmp__

2021-05-30 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue32915] Running Python 2 with -3 flag doesn't complain about cmp/__cmp__

2021-05-28 Thread Irit Katriel


Irit Katriel  added the comment:

We're not going to make changes in python 2 anymore, so this can be closed, 
right?

--
nosy: +iritkatriel
resolution:  -> out of date
status: open -> pending

___
Python tracker 

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



[issue32915] Running Python 2 with -3 flag doesn't complain about cmp/__cmp__

2018-09-23 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue32915] Running Python 2 with -3 flag doesn't complain about cmp/__cmp__

2018-05-06 Thread Stefan Behnel

Stefan Behnel  added the comment:

> cmp(a,b) can be replaced with (a>b)-(a b" and "a < b" both return something that supports 
the minus operator, such as a boolean value. That might not be the case, and it 
is definitely impossible to infer automatically from a given piece of code.

Besides, even if the transformation happens to be correct in a given case, the 
result is definitely also very difficult to read and understand. IMHO, "but it 
keeps working" isn't enough of an argument here.

--
nosy: +scoder

___
Python tracker 

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



[issue32915] Running Python 2 with -3 flag doesn't complain about cmp/__cmp__

2018-05-06 Thread Ayush

Ayush  added the comment:

I believe 2to3 should be able to replicate the same results of cmp function in 
python 3 too. I can create a PR which will allow the library to handle it. 

For example, a function call cmp(a,b) can be replaced with (a>b)-(a

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



[issue32915] Running Python 2 with -3 flag doesn't complain about cmp/__cmp__

2018-02-23 Thread Ned Deily

Change by Ned Deily :


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue32915] Running Python 2 with -3 flag doesn't complain about cmp/__cmp__

2018-02-23 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

The stated goal of -3 is "warn about Python 3.x incompatibilities that 2to3 
cannot trivially fix", so this use case seems like a good match.

On the other hand, adding this to -3 would be somewhat noisy since __cmp__ is 
pervasive in 2.7.

--
nosy: +rhettinger

___
Python tracker 

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



[issue32915] Running Python 2 with -3 flag doesn't complain about cmp/__cmp__

2018-02-22 Thread Trey Hunner

New submission from Trey Hunner :

I might be misunderstanding the use of the -3 flag, but it seems like cmp() and 
__cmp__ should result in warnings being displayed.

--
components: 2to3 (2.x to 3.x conversion tool)
files: caseless.py
messages: 312604
nosy: trey
priority: normal
severity: normal
status: open
title: Running Python 2 with -3 flag doesn't complain about cmp/__cmp__
versions: Python 2.7
Added file: https://bugs.python.org/file47459/caseless.py

___
Python tracker 

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