[Python-Dev] 3.7.0rc1 and 3.6.6rc happening later today!

2018-06-11 Thread Ned Deily
Short and sweet: thanks to a *lot* of work by a lot of people, we appear
to be about ready to finally tag and manufacture the 3.7.0 release
candidate!

At the moment, we have no "release blocker" or "deferred blocker" issues
open for 3.7 - a first! We also now have 21 out of 22 3.7 "production"
buildbots consistently green or occasionally pink (meaning successful
test retry) - also quite an accomplishment. (Only the 3.7 AIX PPC64
buildbot remains red but, since we really only support AIX on a "best
effort" basis, we are not going to further delay 3.7.0 for it.) We have
also had to make some tough decisions and defer some features to 3.8 and
a few more complex bug resolutions to 2.7.1 or later. And releasing the
"bonus beta", 3.7.0b5, resulted in some good feedback and squashing a few
more issues.

As you may recall, the most recently updated schedule calls for both
3.7.0rc1 and 3.6.6rc1 to be produced today, 2018-06-11, with the finals
coming about two weeks later on 2018-06-27. I plan to start on 3.6.6rc1
in about 12 hours (around 22:00 UTC) with 3.7.0rc1 to follow soon
thereafter. Feel free to use the remaining time to merge any last-minute
documentation updates or minor bug fixes - but please do not break
anything! When in doubt, ask. (I will be off-line for the next 8 hours or
so.)

After 3.7.0rc1 cutoff, new 3.7 merges will appear in 3.7.1, which should
appear sometime next month (by the end of 2018-07). Likewise, new 3.6
merges will next appear in 3.6.7rc1, by the end of 2018-09. Please
continue to exercise diligence when deciding whether a change is
appropriate for 3.7; as a rule of thumb, treat the 3.7 branch as if it
were already released and in maintenance mode. Please also pay attention
to CI test failures and buildbot test failures and see if you can help
resolve them. As always, if you think you may have found a critical
problem at any time in either release candidate, please open (or reuse)
an issue on bugs.python.org and mark it as "release blocker" priority.

3.7.0: here we come, thanks to you!

--Ned

--
  Ned Deily
  n...@python.org -- []

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Python3 compiled listcomp can't see local var - bug or feature?

2018-06-11 Thread Rob Cliffe via Python-Dev
Skip, I think you have misunderstood the  point I was making.  It was 
not whether the loop variable should leak out of a list comprehension.  
Rather, it was whether a local variable should, so to speak, "leak into" 
a list comprehension.  And the answer is: it depends on whether the code 
is executed normally, or via exec/eval.  Example:


def Test():
      x = 1
      print([x+i for i in range(1,3)])          # Prints [2,3]
  exec('print([x+i for i in range(1,3)])') # Raises NameError (x)
Test()

I (at least at first) found the difference in behaviour surprising.

Regards

Rob Cliffe


On 08/06/2018 19:27, Skip Montanaro wrote:

Is this a bug or a feature?

The bug was me being so excited about the new construct (I pushed in
someone else's work, can't recall who now, maybe Fredrik Lundh?) that
I didn't consider that leaking the loop variable out of the list
comprehension was a bad idea. Think of the Py3 behavior as one of
those "corrections" to things which were "got wrong" in Python 1 or 2.
:-)

Skip

---
This email has been checked for viruses by AVG.
http://www.avg.com




___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Python3 compiled listcomp can't see local var - bug or feature?

2018-06-11 Thread Skip Montanaro
> Skip, I think you have misunderstood the  point I was making.  It was
> not whether the loop variable should leak out of a list comprehension.
> Rather, it was whether a local variable should, so to speak, "leak into"
> a list comprehension.  And the answer is: it depends on whether the code
> is executed normally, or via exec/eval.
>

Got it. Yes, you'll have to pass in locals to exec. (Can't verify, as I'm
on the train, on my phone.) Builtins like range are global to everything,
so no problem there.

Your clarification also make it more of a Python programming question , I
think.

Skip

>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Python3 compiled listcomp can't see local var - bug or feature?

2018-06-11 Thread Eric Fahlgren
On Mon, Jun 11, 2018 at 3:10 PM Rob Cliffe via Python-Dev <
python-dev@python.org> wrote:

> Skip, I think you have misunderstood the  point I was making.  It was
> not whether the loop variable should leak out of a list comprehension.
> Rather, it was whether a local variable should, so to speak, "leak into"
> a list comprehension.  And the answer is: it depends on whether the code
> is executed normally, or via exec/eval.  Example:
>
> def Test():
>x = 1
>print([x+i for i in range(1,3)])  # Prints [2,3]
>exec('print([x+i for i in range(1,3)])') # Raises NameError (x)
> Test()
>
> I (at least at first) found the difference in behaviour surprising.
>

​Change 'def' to 'class' and run it again.  You'll be even more surprised.​
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Python3 compiled listcomp can't see local var - bug or feature?

2018-06-11 Thread Greg Ewing

Skip Montanaro wrote:

Yes, you'll have to pass in locals to exec.


Exec changed between python 2 and 3. It used to be treated
specially by the compiler so that it could see and modify
the locals where it was used. But now it's just an ordinary
function, so you can't expect it to magically know about
anything that's not passed into it.

--
Greg

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com