Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #94271

Re: Should non-security 2.7 bugs be fixed?

Path csiph.com!usenet.pasdenom.info!goblin1!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'classes.': 0.07; 'before.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subclass': 0.09; 'subject:2.7': 0.09; 'jan': 0.11; '2.7': 0.13; 'properly': 0.15; 'class)': 0.16; 'commented': 0.16; 'inst': 0.16; 'old-style': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject:non': 0.16; 'wrote:': 0.16; 'of.': 0.18; '>>>': 0.20; 'changes': 0.20; 'fix': 0.21; '2.x': 0.22; 'class,': 0.22; 'object.': 0.22; 'pass': 0.22; 'needed.': 0.23; 'written': 0.24; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'example': 0.26; 'header:X -Complaints-To:1': 0.26; 'least': 0.27; 'run': 0.33; 'class': 0.33; 'raising': 0.33; 'steven': 0.33; 'file': 0.34; 'handle': 0.34; 'false': 0.35; 'instance': 0.35; 'knowledge': 0.35; 'needed': 0.36; 'lines': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'expect': 0.37; 'received:org': 0.37; 'difference': 0.38; 'someone': 0.38; 'test': 0.39; 'sure': 0.39; 'subject:-': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'forget': 0.60; 'ever': 0.60; 'claim': 0.61; 'making': 0.62; 'face': 0.64; 'differences': 0.66; 'hand': 0.82; '2.7.': 0.84; 'answer:': 0.84; 'unnecessary,': 0.84; 'received:fios.verizon.net': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: Should non-security 2.7 bugs be fixed?
Date Tue, 21 Jul 2015 01:14:48 -0400
References <moenuj$f11$1@ger.gmane.org> <CABicbJ+Fy=Jhj63VnOmS3BJD3He+i3J+P+ASMmjJDMi9X7rt-w@mail.gmail.com> <mof14q$b47$1@ger.gmane.org> <CAKJDb-Mqf7tc9osDBf+pSxjwpdgDDv4zJe8wP+rg+do_axsggA@mail.gmail.com> <moh7pg$bvq$1@ger.gmane.org>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host pool-98-114-97-173.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0
In-Reply-To <moh7pg$bvq$1@ger.gmane.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.806.1437455717.3674.python-list@python.org> (permalink)
Lines 41
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1437455717 news.xs4all.nl 2894 [2001:888:2000:d::a6]:58869
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:94271

Show key headers only | View raw


On 7/19/2015 6:19 PM, Terry Reedy wrote:

> I, and others, have already made some changes to eliminate differences
> that are unnecessary, at least for 2.7 versus 3.3+ or now 3.4+.

I just got smacked in the face by a difference I had not run into 
before.  I added about 10 lines to a test file is a section that is 
identical in 2.7 and 3.4+.  One line is
         self.assertEqual(type(obj), intended class)
It failed in 2.7.

Quiz: when is the type of an instance not the class that the instance is 
an instance of.  (I expect Steven A. is raising his hand now.)

Give up?

Answer: When you write a class in 2.x without making it a subclass of 
object.

 >>> class Class():
	pass

 >>> inst = Class()
 >>> type(inst) is Class
False
 >>> type(inst)
<type 'instance'>

Since I do not remember how to fix the assert, and was not prepared to 
make the class, in a file other than the one tested, new-style, I just 
commented it out.

This is an example of my claim that backports are best written by 
someone who is a current 2.x user with the particular 2.x knowledge 
needed.  I am not sure I ever had all the knowledge needed to handle the 
backport properly and I now I would prefer to forget about old-style 
classes.

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Should non-security 2.7 bugs be fixed? Terry Reedy <tjreedy@udel.edu> - 2015-07-21 01:14 -0400

csiph-web