Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev

nonlocal keyword in 2.x?

 

 

First page Previous page 1 2 Next page Last page  View All Python dev RSS feed   Index | Next | Previous | View Threaded


rdmurray at bitdance

Nov 2, 2009, 11:18 AM

Post #26 of 37 (710 views)
Permalink
Re: nonlocal keyword in 2.x? [In reply to]

On Mon, 2 Nov 2009 at 10:09, Guido van Rossum wrote:
> On Mon, Nov 2, 2009 at 10:06 AM, Raymond Hettinger <python [at] rcn> wrote:
>>
>> [Guido van Rossum]
>>>
>>> I'm -0 on backporting nonlocal to 2.7. I could be +0 if we added "from
>>> __future__ import nonlocal_keyword" (or some such phrasing) to enable
>>> it.
>>
>> With the "from __future__" option, what keeps you from being
>> a full +1 on nonlocal?   Is there something that makes it a better
>> solution for 3.x than 2.x?  Just curious about the pros and cons
>> from your point of view.
>
> I think the number of projects that can afford to drop support for 2.6
> is pretty limited, so I think the utility of the feature is thereby
> also limited.

I don't currently have an opinion on this backport proposal, but in
regard to this argument: if we do not do any 2.x releases after 2.7,
then over time the number of packages that can afford to drop 2.6 support
will grow, yet many will need to retain 2.7 support for much longer.

--David


martin at v

Nov 2, 2009, 1:17 PM

Post #27 of 37 (710 views)
Permalink
Re: nonlocal keyword in 2.x? [In reply to]

> I don't currently have an opinion on this backport proposal, but in
> regard to this argument: if we do not do any 2.x releases after 2.7,
> then over time the number of packages that can afford to drop 2.6 support
> will grow, yet many will need to retain 2.7 support for much longer.

I don't think the argument applies to 2.7 as much as it applied to
earlier releases: 2.7 will have a life time of 18 months perhaps (I
think we still need to decide formally against 2.8, and also decide
when to make the last 2.7 bug fix release). There is some likelihood
that by the time people can agree to drop 2.6 support, 2.7 will be
out of bug fix maintenance already (*). I'm fairly skeptical that people
will be interested in adding new code to specifically clean up their
2.x codebase.

Regards,
Martin

(*) just as it happened with any other release: people are now dropping
support for 2.3, when this got out of security fixes a year ago. By that
measure, people will drop 2.6 support in 2015. I think there are
*really* good chances that many packages will drop 2.6 support along
with dropping 2.x altogether.
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


rdmurray at bitdance

Nov 2, 2009, 1:27 PM

Post #28 of 37 (710 views)
Permalink
Re: nonlocal keyword in 2.x? [In reply to]

On Mon, 2 Nov 2009 at 22:17, "Martin v. Löwis" wrote:
>> I don't currently have an opinion on this backport proposal, but in
>> regard to this argument: if we do not do any 2.x releases after 2.7,
>> then over time the number of packages that can afford to drop 2.6 support
>> will grow, yet many will need to retain 2.7 support for much longer.
>
> I don't think the argument applies to 2.7 as much as it applied to
> earlier releases: 2.7 will have a life time of 18 months perhaps (I
> think we still need to decide formally against 2.8, and also decide
> when to make the last 2.7 bug fix release). There is some likelihood

I was under the impression that if 2.7 was the last release that it
would be maintained (ie: bugfixed) until we decided 3.x uptake was
"sufficient", and that that might be considerably longer than 18 months.
If that is not the case, then what you say is true.

--David


guido at python

Nov 2, 2009, 1:33 PM

Post #29 of 37 (709 views)
Permalink
Re: nonlocal keyword in 2.x? [In reply to]

On Mon, Nov 2, 2009 at 1:27 PM, R. David Murray <rdmurray [at] bitdance> wrote:
> On Mon, 2 Nov 2009 at 22:17, "Martin v. Löwis" wrote:
>>>
>>> I don't currently have an opinion on this backport proposal, but in
>>> regard to this argument:  if we do not do any 2.x releases after 2.7,
>>> then over time the number of packages that can afford to drop 2.6 support
>>> will grow, yet many will need to retain 2.7 support for much longer.
>>
>> I don't think the argument applies to 2.7 as much as it applied to
>> earlier releases: 2.7 will have a life time of 18 months perhaps (I
>> think we still need to decide formally against 2.8, and also decide
>> when to make the last 2.7 bug fix release). There is some likelihood
>
> I was under the impression that if 2.7 was the last release that it
> would be maintained (ie: bugfixed) until we decided 3.x uptake was
> "sufficient", and that that might be considerably longer than 18 months.
> If that is not the case, then what you say is true.

Is it even wort doing a 2.7 release? Isn't the effort better spent on
3.2 alone? (Note, these aren't rhetorical questions. It's well
possible that there are good reasons for pushing along with 2.7. Maybe
considering those reasons will also help answering questions about
whether to backport things like nonlocal.)

--
--Guido van Rossum (python.org/~guido)
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


martin at v

Nov 2, 2009, 1:33 PM

Post #30 of 37 (712 views)
Permalink
Re: nonlocal keyword in 2.x? [In reply to]

R. David Murray wrote:
> On Mon, 2 Nov 2009 at 22:17, "Martin v. Löwis" wrote:
>>> I don't currently have an opinion on this backport proposal, but in
>>> regard to this argument: if we do not do any 2.x releases after 2.7,
>>> then over time the number of packages that can afford to drop 2.6
>>> support
>>> will grow, yet many will need to retain 2.7 support for much longer.
>>
>> I don't think the argument applies to 2.7 as much as it applied to
>> earlier releases: 2.7 will have a life time of 18 months perhaps (I
>> think we still need to decide formally against 2.8, and also decide
>> when to make the last 2.7 bug fix release). There is some likelihood
>
> I was under the impression that if 2.7 was the last release that it
> would be maintained (ie: bugfixed) until we decided 3.x uptake was
> "sufficient", and that that might be considerably longer than 18 months.
> If that is not the case, then what you say is true.

I think that's as-yet undecided. My understanding was that we would
decide, at some point, whether to create a 2.8 release or not, and if
not, that 2.7 would be the final release. To me, this always implied
that there wouldn't be any bug fix releases after 18 months, and no
security releases after five years.

If we would decide to continue doing 2.x releases, the we definitely
wouldn't go beyond 2.9 (because there can't be a 2.10 release,
numerically). At a rate of a release every 18 month, this would mean
we would make bug fix releases for 2.x for no more than 5 years
(from now). But I would really hope that we stop before 2.9.

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


solipsis at pitrou

Nov 2, 2009, 1:41 PM

Post #31 of 37 (709 views)
Permalink
Re: nonlocal keyword in 2.x? [In reply to]

Guido van Rossum <guido <at> python.org> writes:
>
> Is it even wort doing a 2.7 release? Isn't the effort better spent on
> 3.2 alone? (Note, these aren't rhetorical questions. It's well
> possible that there are good reasons for pushing along with 2.7. Maybe
> considering those reasons will also help answering questions about
> whether to backport things like nonlocal.)

2.7 has an up-to-date backport of the C IO lib (as well as the memoryview
object), which means it is better for people wanting to ease transition to 3.x.

But of course, as Martin said, few people will want to support 2.7 only and not
2.6.



_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


martin at v

Nov 2, 2009, 1:42 PM

Post #32 of 37 (709 views)
Permalink
Re: nonlocal keyword in 2.x? [In reply to]

> Is it even wort doing a 2.7 release? Isn't the effort better spent on
> 3.2 alone? (Note, these aren't rhetorical questions. It's well
> possible that there are good reasons for pushing along with 2.7. Maybe
> considering those reasons will also help answering questions about
> whether to backport things like nonlocal.)

If no 2.7 is produced, people will ask for the life time of 2.6. I think
users will appreciate not being forced to 3.x as long as possible, which
essentially means as long as we create 2.x releases. It may be that
users could also "live" with 2.6 bug fix releases only - in this case,
we would have to decide for how long these will have to be created.

There is also the issue of committers who already added stuff to the
trunk after the 2.6 release - some may be unhappy to learn that their
stuff is not going to be released (at least not on that branch).

In the end, the EOL for 2.x will need to be decided by BDFL
pronouncement. Users would continue to ask for 2.x releases until
2020 and beyond if all they have to do is ask. Some committers would
likely also want to continue creating 2.x releases for a few more
years (not sure whether that's because they see themselves also as
users, or because they sympathize with the users, or for other reasons).

In any case, a decision not to release 2.7 should be made before
Benjamin produces the first alpha release.

Regards,
Martin

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


mal at egenix

Nov 3, 2009, 1:10 AM

Post #33 of 37 (702 views)
Permalink
Re: nonlocal keyword in 2.x? [In reply to]

Antoine Pitrou wrote:
> Guido van Rossum <guido <at> python.org> writes:
>>
>> Is it even wort doing a 2.7 release? Isn't the effort better spent on
>> 3.2 alone? (Note, these aren't rhetorical questions. It's well
>> possible that there are good reasons for pushing along with 2.7. Maybe
>> considering those reasons will also help answering questions about
>> whether to backport things like nonlocal.)
>
> 2.7 has an up-to-date backport of the C IO lib (as well as the memoryview
> object), which means it is better for people wanting to ease transition to 3.x.
>
> But of course, as Martin said, few people will want to support 2.7 only and not
> 2.6.

Since 2.7 will be closer to 3.2 than 2.6, the result will more likely
be: many people will want to support 2.7 and 3.x - which is really
what we should be after.

--
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source (#1, Nov 03 2009)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


martin at v

Nov 3, 2009, 9:53 AM

Post #34 of 37 (691 views)
Permalink
Re: nonlocal keyword in 2.x? [In reply to]

>> 2.7 has an up-to-date backport of the C IO lib (as well as the memoryview
>> object), which means it is better for people wanting to ease transition to 3.x.
>>
>> But of course, as Martin said, few people will want to support 2.7 only and not
>> 2.6.
>
> Since 2.7 will be closer to 3.2 than 2.6, the result will more likely
> be: many people will want to support 2.7 and 3.x - which is really
> what we should be after.

Supporting 2.7 doesn't mean that you have to use the nonlocal keyword
(nor does support for 3.2 require that keyword). So I'm not sure how
the backport of a feature to 2.x could encourage people to forward-port
to 3.x.

Regards,
Martin

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


mal at egenix

Nov 3, 2009, 11:15 AM

Post #35 of 37 (689 views)
Permalink
Re: nonlocal keyword in 2.x? [In reply to]

"Martin v. Löwis" wrote:
>>> 2.7 has an up-to-date backport of the C IO lib (as well as the memoryview
>>> object), which means it is better for people wanting to ease transition to 3.x.
>>>
>>> But of course, as Martin said, few people will want to support 2.7 only and not
>>> 2.6.
>>
>> Since 2.7 will be closer to 3.2 than 2.6, the result will more likely
>> be: many people will want to support 2.7 and 3.x - which is really
>> what we should be after.
>
> Supporting 2.7 doesn't mean that you have to use the nonlocal keyword
> (nor does support for 3.2 require that keyword). So I'm not sure how
> the backport of a feature to 2.x could encourage people to forward-port
> to 3.x.

True. This particular backport is not all that useful - it is well
possible to write code that doesn't need the feature, both in 2.7 and
3.2.

However, if a 3.2 feature is required for code to work out of the
box without changes, then I'd regard such a feature as potential
backport candidate.

memoryviews are a good example. In 3.x the buffer object is gone
and memoryviews are the new replacement for it.

Code written to support both 2.7 and 3.2 would need to have
access to these memoryviews in order to avoid having to
write special support for buffer objects (for 2.7) and
memoryviews (for 3.x).

By backporting memoryviews to 2.7, users no longer have to
write support code for buffer objects and that makes things
easier for them.

--
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source (#1, Nov 03 2009)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


regebro at gmail

Nov 3, 2009, 11:06 PM

Post #36 of 37 (681 views)
Permalink
Re: nonlocal keyword in 2.x? [In reply to]

I should maybe point out that although I'm generally +1 on
backporting, I'm not specifically anything on backporting the nonlocal
keyword. There are probably things that would help more from a
compatibility standpoint than that.

For example, from __future__ import unicode_literals doesn't switch
the types. So this code will rais an assertion error in 2.6.

>>> from __future__ import unicode_literals
>>> assert isinstance("fghjkl", str)

While it of course will run fine in 3.0. Now this has a fairly trivial
workaround or two, but still.

I also would really like to see a real port of the bytes class to 2.6,
but I have a vague memory that there was some reason that wouldn't
work.

--
Lennart Regebro: Python, Zope, Plone, Grok
http://regebro.wordpress.com/
+33 661 58 14 64
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


guido at python

Nov 4, 2009, 8:53 AM

Post #37 of 37 (677 views)
Permalink
Re: nonlocal keyword in 2.x? [In reply to]

On Tue, Nov 3, 2009 at 11:06 PM, Lennart Regebro <regebro [at] gmail> wrote:
> I should maybe point out that although I'm generally +1 on
> backporting, I'm not specifically anything on backporting the nonlocal
> keyword. There are probably things that would help more from a
> compatibility standpoint than that.
>
> For example, from __future__ import unicode_literals doesn't switch
> the types. So this code will rais an assertion error in 2.6.
>
>>>> from __future__ import unicode_literals
>>>> assert isinstance("fghjkl", str)
>
> While it of course will run fine in 3.0. Now this has a fairly trivial
> workaround or two, but still.
>
> I also would really like to see a real port of the bytes class to 2.6,
> but I have a vague memory that there was some reason that wouldn't
> work.

There are many interfaces that return a str instance which should
become a bytes instance for code that is bytes-aware, but should stay
a str instance (which after all has the same representation) for code
that is not bytes-aware. In 3.x it's easy, such interfaces always
return bytes instances. But in 2.x, it would have to be context-aware,
and there are many reasons why that can't work. (E.g. an object could
be shared between two modules, one of which is bytes-aware, while the
other is not. Or a call could be made by a module that isn't
bytes-aware and the return value passed to a module that is
bytes-aware. Or vice versa. It's a mess unless *everyone* is
bytes-aware, which is the 3.x world.)

--
--Guido van Rossum (python.org/~guido)
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

First page Previous page 1 2 Next page Last page  View All Python dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.