[issue28781] On Installation of 3.5 Python get error message

2016-12-02 Thread Mark Harris

Mark Harris added the comment:

Hi All,

Just wanted to check if there is any progress on the below? I understand it's a 
bit of a mess, however I use python in my day job(this is on my work pc) so any 
help getting it sorted would be great.

Thanks again,

Mark

--

___
Python tracker 

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



[issue26861] shutil.copyfile() doesn't close the opened files

2016-12-02 Thread Vukasin Felbab

Vukasin Felbab added the comment:

Okay, so the problem is that I have a command library instance which is 
containing a connection to a server and functions can be called to execute some 
queries. As I pass this instance as a parameter in a recursive chain, after a 
while the open files limit is reached, I got it a few times an error on file 
opening. It is sure that I don't leave connections and open files before 
calling the next recursion, only thing this command library has the connection 
open. Additionally, when I store the instance in a global variable and call it 
from there then there are no IO errors. So, it means that the python is not 
giving parameters by reference, but by value? Because according to the Python, 
if I pass a mutable object as an argument, an if I use that for querying and 
passing the same instance to the next recursion level it should work fine, 
because in this case it should pass by reference, but it is not obviously, it 
passes by value, the connections remain open and the io limit is reached.

--
status: pending -> open

___
Python tracker 

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



[issue28850] Regression in Python 3: Subclassing PrettyPrinter.format doesn't work anymore

2016-12-02 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +xiang.zhang
stage:  -> needs patch
versions: +Python 3.7 -Python 3.3, Python 3.4

___
Python tracker 

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



[issue27435] ctypes library loading and AIX - also for 2.7.X (and later)

2016-12-02 Thread Michael Felt

Michael Felt added the comment:

Considering that python-2.7.13 is posed for a release - I ask again, 
considering that python-2.7.12 (and I expect a few earlier ones) can load "AIX" 
.a type shared libraries - if you know how to supply the name - 

that my patch be included in python-2.7.13.

michael@x071:[/data/prj/python]-2.7.12.0/Lib/ctypes/util.py<
--- python-2.7.12/Lib/ctypes/util.py2016-06-25 21:49:30 +
+++ python-2.7.12.0/Lib/ctypes/util.py  2016-12-02 10:12:01 +
@@ -262,6 +262,10 @@
 print cdll.LoadLibrary("libcrypto.dylib")
 print cdll.LoadLibrary("libSystem.dylib")
 print cdll.LoadLibrary("System.framework/System")
+if sys.platform == "aix5":
+from ctypes import CDLL
+RTLD_MEMBER =  0x0004
+print CDLL("libc.a(shr_64.o)", RTLD_MEMBER)
 else:
 print cdll.LoadLibrary("libm.so")
 print cdll.LoadLibrary("libcrypt.so")

And the result is:

root@x064:[/data/prj/python/python-2.7.12.0/Lib/ctypes]../../python util.py
None
None
None


In, other words, as is, find_library() will always return None for standard 
libraries (will only return a value if "root" has extracted and renamed a 
shared library member as a file) - while, if you know the magic that 
find_library cannot return - you can load such a library.

IMVHO (in my Very humble opinion) - a bug that has been too long unnoticed - 
but can be repaired.

There is no additional ability being added - it is already there. Just making 
it more accessible and legible for python programmers on AIX.

If the patch-code needs more cleanup, improvement, etc. - fine. But do not lock 
out an easy interface to such a basic function.

regards,
Michael

--

___
Python tracker 

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



[issue27172] Undeprecate inspect.getfullargspec()

2016-12-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 14c2d93ffcb3 by Nick Coghlan in branch '3.6':
Issue #27172: Undeprecate inspect.getfullargspec()
https://hg.python.org/cpython/rev/14c2d93ffcb3

--
nosy: +python-dev

___
Python tracker 

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



[issue27172] Undeprecate inspect.getfullargspec()

2016-12-02 Thread Nick Coghlan

Nick Coghlan added the comment:

I've pushed the change for 3.6.0rc1 based on Yury and Martin's review, but 
wasn't able to forward merge it to default due to merge conflicts on Misc/NEWS 
that I wasn't sure how to resolve.

--
priority: release blocker -> deferred blocker
stage: needs patch -> commit review
versions:  -Python 3.6

___
Python tracker 

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



[issue28856] %b format for bytes does not support objects that follow the buffer protocol

2016-12-02 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +xiang.zhang

___
Python tracker 

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



[issue28853] locals() and free variables

2016-12-02 Thread Marco Buttu

Marco Buttu added the comment:

In addition, also if here "function blocks" means nested function, the sentence 
"Free variables are returned by locals() when it is called in function blocks" 
I think is wrong. It is true only in case of free variables belonging to the 
local enclosing scope. For instance, in the following case ``x`` is free in 
``moo()``, but it is not in ``locals()``::

>>> x = 10
>>> def foo():
... def moo():
... print(x)
... print(locals())
... return moo
... 
>>> moo = foo()
>>> moo()
10
{}

I attach a patch with a new description and an example.

PS. Is the rst rendered by Sphinx? In that case, why we are not using the 
doctest Sphinx extension to test the code examples?

--
keywords: +patch
Added file: http://bugs.python.org/file45732/locals_func.patch

___
Python tracker 

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



[issue28855] Compiler warnings in _PyObject_CallArg1()

2016-12-02 Thread STINNER Victor

STINNER Victor added the comment:

No problem, thanks for the fix Benjamin!

--

___
Python tracker 

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



[issue26861] shutil.copyfile() doesn't close the opened files

2016-12-02 Thread Josh Rosenberg

Josh Rosenberg added the comment:

You're going to need to provide a real repro; your description is effectively 
useless. For the record, Python is not precisely pass by reference (it's 
roughly equivalent to passing a pointer in C, binding the local name to the 
same pointer, so if you reassign the local name, you lose the reference, but 
otherwise it behaves like pass-by-reference).

Are you sure the command library doesn't open new connections as needed? In a 
recursive call scenario, if it goes deep enough, even if it clean up with the 
recursive call eventually returns, you could still hit the open files limit.

The problem is not copyfile, even if you happen to see copyfile in the 
traceback. You've got too many open files, and copyfile is the straw that broke 
the camel's back, but unless you're running 1000 threads doing copyfile 
simultaneously, it's not responsible for the excess open file handles.

But this is all speculation; the only thing I'm confident of is that copyfile 
isn't ultimately responsible. We have no idea what's wrong, so you need to 
provide some sort of minimal repro that exhibits the problem.

--

___
Python tracker 

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



[issue28853] locals() and free variables

2016-12-02 Thread Julien Palard

Julien Palard added the comment:

Hi, thanks for reporting,

Variables are defined in python docs¹ by:

> If a name is bound in a block, it is a local variable of that block, unless 
> declared as nonlocal or global. If a name is bound at the module level, it is 
> a global variable. (The variables of the module code block are local and 
> global.) If a variable is used in a code block but not defined there, it is a 
> free variable.

According to this definition, global variables used in a code block are free 
variable, is this intentional? I think so, but can't be sure, maybe someone is 
seeing this as "globals are NOT free variables", in this case, this definition 
should probably be enhanced.

If I'm right, maybe we should just change "Free variables are returned"… to 
"Non-global free variables are returned"…?

--
nosy: +mdk

___
Python tracker 

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-12-02 Thread Tim Graham

Tim Graham added the comment:

Hi, this causes a regression in Django and I'm not sure if Django or cpython is 
at fault. For a simple model that uses super() rather than super(Model self) in 
save():

from django.db import models

class Model(models.Model):
def save(self, *args, **kwargs):
super().save(*args, **kwargs)

>>> Model().save()
Traceback (most recent call last):
  File "/home/tim/code/mysite/model/tests.py", line 8, in test
Model().save()
  File "/home/tim/code/mysite/model/models.py", line 5, in save
super().save(*args, **kwargs)
RuntimeError: super(): empty __class__ cell


django.db.models.Model does some things with metaclasses which is likely 
related to the root cause:
https://github.com/django/django/blob/6d1394182d8c4c02598e0cf47f42a5e86706411f/django/db/models/base.py

If someone could provide guidance about what the issue might be, I'm happy to 
provide more details or to debug this further.

Thank you!

--
nosy: +Tim.Graham

___
Python tracker 

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



[issue28859] os.path.mount sometimes raises FileNotFoundError on Windows

2016-12-02 Thread Christoph Reiter

New submission from Christoph Reiter:

It returns True for drives which don't exist and raises for paths starting with 
drives which don't exist.

>>> os.path.exists("C:\\")
True
>>> os.path.ismount("C:\\")
True
>>> os.path.ismount("C:\\doesnotexist")
False
>>> os.path.exists("F:\\")
False
>>> os.path.ismount("F:\\")
True
>>> os.path.ismount("F:\\doesnotexist")
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Users\lazka\AppData\Local\Programs\Python\Python35\lib\ntpath.py", 
line 290, in ismount
return path.rstrip(seps) == _getvolumepathname(path).rstrip(seps)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 
'F:\\doesnotexist'

--
components: Windows
messages: 282241
nosy: lazka, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: os.path.mount sometimes raises FileNotFoundError on Windows
versions: Python 3.5

___
Python tracker 

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



[issue28853] locals() and free variables

2016-12-02 Thread Marco Buttu

Marco Buttu added the comment:

Yes, it is the same. "Free variables belonging to the enclosing local 
namespaces" are "non-global free variables". In order for the reader to better 
contextualize the sentence, I think it is worth keeping the code example in the 
patch.

--

___
Python tracker 

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



[issue28857] SyncManager and Main Process fail to communicate after reboot or stoping with Ctrl - C

2016-12-02 Thread R. David Murray

R. David Murray added the comment:

There doesn't appear to be enough information here to determine what part of 
Python you are trying to report a bug in.  It reads more like you are asking 
for help debugging your program :)

Maybe you could ask for help on the python-list mailing list to help you 
formulate a clearer bug report.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue28853] locals() and free variables

2016-12-02 Thread R. David Murray

R. David Murray added the comment:

To answer the parenthetical question (I haven't looked at the doc issue 
itself), we don't doctest the examples because most of them were written before 
sphinx grew a doctest extension, so a lot of them don't pass for reasons that 
have nothing to do with code validity.  Issues and patches for making the 
doctests pass are welcome, and we have applied a number of them.  There is a 
lot of work to do before we could add running doctest to our doc buildbot, 
though.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue28781] On Installation of 3.5 Python get error message

2016-12-02 Thread Steve Dower

Steve Dower added the comment:

Sorry, I got caught up in work stuff yesterday and didn't get a chance to go 
through these. I'll try and find time today.

--

___
Python tracker 

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-12-02 Thread Nick Coghlan

Nick Coghlan added the comment:

This step here is likely to be causing you problems:

https://github.com/django/django/blob/6d1394182d8c4c02598e0cf47f42a5e86706411f/django/db/models/base.py#L90

Because the original class namespace isn't being passed up to type.__new__, it 
isn't seeing the `__classcell__` reference it needs in order to populate the 
automatic reference correctly. Copying that over the same way you're already 
copying `__module__` should get things working again with 3.6.0b4.

However, given that we have a least one in-the-wild example of this causing 
problems, I think the right thing to do on the CPython side is to restore the 
old behaviour where the cell reference is returned from the class creation 
closure, but issue a deprecation warning if it hasn't already been set by 
type.__new__.

We're also going to need to document `__classcell__`, as we didn't account for 
the type-subclass-passing-a-different-namespace-to-the-parent-method scenario 
when initially deciding we could treat it as a hidden implementation detail.

--
nosy: +larry
priority: normal -> release blocker
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open

___
Python tracker 

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



[issue28858] Fastcall uses more C stack

2016-12-02 Thread STINNER Victor

STINNER Victor added the comment:

Oh, I didn't understand that the regression was introduced by the revision 
b9c9691c72c5. The purpose of this revision was to *reduce* the memory usage of 
the C stack!?

It seems like _PyObject_CallArg1() uses more stack memory than 
PyObject_CallFunctionObjArgs(). PyObject_CallFunctionObjArgs() allocates 4O 
bytes (5*sizeof(PyObject*)) on the stack.

At least, I can say that when the crash occurs, _PyObject_FastCallDict() is not 
the gdb backtrace.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-12-02 Thread Tim Graham

Tim Graham added the comment:

Thanks Nick. Your suggestion does fix the issue for Django: 
https://github.com/django/django/pull/7653.

--

___
Python tracker 

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



[issue28859] os.path.mount sometimes raises FileNotFoundError on Windows

2016-12-02 Thread Wolfgang Maier

Changes by Wolfgang Maier :


--
nosy: +wolma

___
Python tracker 

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



[issue28781] On Installation of 3.5 Python get error message

2016-12-02 Thread Mark Harris

Mark Harris added the comment:

No worries Steve, I've managed to fix it.

I uninstalled, went through regedit & removed all mentions of python. I then 
installed python 2.7, installed 3.4 afterwards, uninstalled python 2.7 and for 
some reason that worked, it is working correctly now!

Thanks for all your help,

Mark

--

___
Python tracker 

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



[issue28794] inspect.isasyncgen and inspect.isasyncgenfunction aren't documented

2016-12-02 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Can anyone review this please? :)

Thanks.

--

___
Python tracker 

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



[issue28781] On Installation of 3.5 Python get error message

2016-12-02 Thread Steve Dower

Steve Dower added the comment:

> installed 3.4 afterwards

Did you mean 3.5 here? If you're going to change versions, I'd at least suggest 
grabbing the 3.6 beta - it's *much* better than 3.4, and we've had very little 
trouble with the most recent version (RC is coming in a week or two).

--

___
Python tracker 

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



[issue28858] Fastcall uses more C stack

2016-12-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, that is why I asked you to revert your changes.

In additional, they introduced compiler warnings.

--

___
Python tracker 

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



[issue26876] Extend MSVCCompiler class to respect environment variables

2016-12-02 Thread Rohit Jamuar

Rohit Jamuar added the comment:

Bump! The changes, that Steve was asking for, have been incorporated. If 
something was missed, please inform. Otherwise, could this be merged?

--

___
Python tracker 

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



[issue23224] LZMADecompressor object is only initialized in __init__

2016-12-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is not the only issue. Calling __init__ multiple times causes leaking 
locks, bz2/lzma internal buffers, etc.

It looks to me that the most straightforward way is using __new__ instead of 
__init__.

--
versions: +Python 3.6, Python 3.7 -Python 3.4

___
Python tracker 

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



[issue28853] locals() and free variables

2016-12-02 Thread Xavier de Gaye

Xavier de Gaye added the comment:

FWIW the definition of free variables can be found in the Language Reference at 
section 4.2.1. "Binding of names" [1].
The list of the free variables of a user defined function can be accessed 
through the __closure__ function attribute, a tuple. The function attributes 
are listed in the Language Reference
at section 3.2. "The standard type hierarchy" [2]. In the example given at 
msg282236, the value of x would be printed by the statement:
print(moo.__closure__[0].cell_contents)

[1]https://docs.python.org/3/reference/executionmodel.html#naming-and-binding
[2] 
https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy

--
nosy: +xdegaye

___
Python tracker 

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



[issue27172] Undeprecate inspect.getfullargspec()

2016-12-02 Thread Ned Deily

Ned Deily added the comment:

It looks like Serhiy took care of the merge to default in dd4c420b8e66.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue19795] Formatting of True/False/None in docs

2016-12-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue21818] cookielib documentation references Cookie module, not cookielib.Cookie class

2016-12-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5b40d81e8883 by Serhiy Storchaka in branch '2.7':
Issue #21818: Fixed references to classes that have names matching with module
https://hg.python.org/cpython/rev/5b40d81e8883

New changeset d64e37b9204e by Serhiy Storchaka in branch '3.5':
Issue #21818: Fixed references to classes that have names matching with module
https://hg.python.org/cpython/rev/d64e37b9204e

New changeset 62c9a89a2103 by Serhiy Storchaka in branch '3.6':
Issue #21818: Fixed references to classes that have names matching with module
https://hg.python.org/cpython/rev/62c9a89a2103

New changeset c642c597d05c by Serhiy Storchaka in branch 'default':
Issue #21818: Fixed references to classes that have names matching with module
https://hg.python.org/cpython/rev/c642c597d05c

--
nosy: +python-dev

___
Python tracker 

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



[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2016-12-02 Thread Martin Panter

Changes by Martin Panter :


--
title: os.path.mount sometimes raises FileNotFoundError on Windows -> 
os.path.ismount sometimes raises FileNotFoundError on Windows

___
Python tracker 

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



[issue28860] Fixed all the doctest failures in Doc/library/configparser.rst

2016-12-02 Thread Marco Buttu

New submission from Marco Buttu:

With Python 3.7.0a0  and sphinx-build 1.4.9, this was the result before 
applying the patch:

Doctest summary
===
   80 tests
8 failures in tests
0 failures in setup code
0 failures in cleanup code
build finished with problems, 139 warnings.

After applaying the patch there are 0 failures in 84 tests. All the doctests 
also pass with Python 3.6 and 3.5. I skipped three tests (doctest: +SKIP) 
because their output is random (iterating over dictionary keys).

--
assignee: docs@python
components: Documentation
files: configparser.patch
keywords: patch
messages: 282258
nosy: docs@python, marco.buttu
priority: normal
severity: normal
status: open
title: Fixed all the doctest failures in Doc/library/configparser.rst
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45733/configparser.patch

___
Python tracker 

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



[issue28808] Make PyUnicode_CompareWithASCIIString() never failing

2016-12-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updated patch addresses some Victor's comments. But I disagree that this bugfix 
needs a versionchanged directive.

--
Added file: 
http://bugs.python.org/file45734/PyUnicode_CompareWithASCIIString-no-errors-2.patch

___
Python tracker 

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



[issue28853] locals() and free variables

2016-12-02 Thread Martin Panter

Martin Panter added the comment:

Marco, your patch removes the description for class blocks. Is that your 
intent, or just an accident? See r53954.

My understanding is “function block” is there to distinguish these three modes:

def foo():
# Function block
print(locals())

class Bar:
# Class block
print(locals())

# Module level
print(locals())

There are patches proposed at Issue 17546 which also address this reference to 
“free variables”. Perhaps you could provide feedback on them?

Also see Issue 26683 and Issue 12165, about what free variables, locals, 
nonlocals, non-globals, etc can mean to different people.

--
nosy: +martin.panter
stage:  -> patch review
versions:  -Python 3.3, Python 3.4

___
Python tracker 

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



[issue28829] Tkinter messagebox cx_freeze Python 3.4

2016-12-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

You code is buggy and will not run in Python because it does import messagebox. 
 Add

from tkinter import messagebox

If you only tested with IDLE before freezing, you might have missed the bug in 
your program because of a bug in IDLE, now fixed in 2.7 and 3.5+.

--
nosy: +terry.reedy
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue28853] locals() and free variables

2016-12-02 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +terry.reedy

___
Python tracker 

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



[issue28852] sorted(range(1000)) is slower in Python 3.7 than in 3.5

2016-12-02 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
title: sorted(range(1000)) is slower in Python 3.7 compared to Python 3.5 -> 
sorted(range(1000)) is slower in Python 3.7 than in 3.5

___
Python tracker 

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



[issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied

2016-12-02 Thread Martin Panter

Martin Panter added the comment:

“the current mapping of '__builtins__' is copied into *globals* ”

That sounds like we insert each individual builtin name, i.e. 
globals.update(builtins_mapping). But my understanding is that it is the 
__builtins__ global variable that is affected:

globals["__builtins__"] = builtins_mapping

What about borrowing the wording from exec():

If the *globals* dictionary is present and lacks ‘__builtins__’, a reference to 
the current mapping of ‘__builtins__’ is inserted under that key . . .

See also Issue 26363, which also covers this problem.

--
nosy: +martin.panter
stage: needs patch -> patch review
versions: +Python 3.6, Python 3.7 -Python 3.4

___
Python tracker 

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



[issue26363] __builtins__ propagation is misleading described in exec and eval documentation

2016-12-02 Thread Martin Panter

Martin Panter added the comment:

Xavier, you are welcome to propose your own version of the text, or build on 
Julien’s. See also Issue 22057, about copying all globals vs builtins.

--
nosy: +martin.panter
stage:  -> patch review
versions: +Python 2.7, Python 3.6, Python 3.7

___
Python tracker 

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



[issue28847] dumbdbm should not commit if in read mode

2016-12-02 Thread Martin Panter

Martin Panter added the comment:

Serhiy: The Windows buildbots are having trouble removing read-only files. 
Maybe restore the write mode for the end of the test, or fix support.rmtree()? 
See .

--
nosy: +martin.panter

___
Python tracker 

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



[issue28847] dumbdbm should not commit if in read mode

2016-12-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dc7c86de9e13 by Martin Panter in branch '2.7':
Issue #28847: Fix spelling
https://hg.python.org/cpython/rev/dc7c86de9e13

--

___
Python tracker 

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



[issue28847] dumbdbm should not commit if in read mode

2016-12-02 Thread Martin Panter

Martin Panter added the comment:

http://buildbot.python.org/all/builders/AMD64%20Windows8%202.7/builds/9/steps/test/logs/stdio
==
ERROR: test_readonly_files (test.test_dumbdbm.DumbDBMTestCase)
--
Traceback (most recent call last):
  File "D:\buildarea\2.7.bolen-windows8\build\lib\test\test_dumbdbm.py", line 
190, in test_readonly_files
test_support.rmtree(dir)
  File "D:\buildarea\2.7.bolen-windows8\build\lib\test\test_support.py", line 
289, in rmtree
_rmtree(path)
  File "D:\buildarea\2.7.bolen-windows8\build\lib\test\test_support.py", line 
245, in _rmtree
_waitfor(_rmtree_inner, path, waitall=True)
  File "D:\buildarea\2.7.bolen-windows8\build\lib\test\test_support.py", line 
199, in _waitfor
func(pathname)
  File "D:\buildarea\2.7.bolen-windows8\build\lib\test\test_support.py", line 
244, in _rmtree_inner
_force_run(path, os.unlink, fullname)
  File "D:\buildarea\2.7.bolen-windows8\build\lib\test\test_support.py", line 
194, in _force_run
return func(*args)
WindowsError: [Error 5] Access is denied: '@test_3796_tmp\\db.dat'

--
'test_dumbdbm' left behind directory '@test_3796_tmp'
. . .
test test_dumbdbm crashed -- : [Error 5] Access 
is denied: '@test_3796_tmp\\db.dat'
Traceback (most recent call last):
  File "D:\buildarea\2.7.bolen-windows8\build\PCbuild\..\Lib\test\regrtest.py", 
line 948, in runtest_inner
test_time = time.time() - start_time
  File "D:\buildarea\2.7.bolen-windows8\build\PCbuild\..\Lib\test\regrtest.py", 
line 899, in __exit__
restore(original)
  File "D:\buildarea\2.7.bolen-windows8\build\PCbuild\..\Lib\test\regrtest.py", 
line 876, in restore_files
test_support.rmtree(fn)
. . .
'test_dumbdbm' left behind directory '@test_3796_tmp' and it couldn't be 
removed: [Error 5] Access is denied: '@test_3796_tmp\\db.dat'
Traceback (most recent call last):
  File "D:\buildarea\2.7.bolen-windows8\build\PCbuild\..\Lib\test\regrtest.py", 
line 1679, in 
main()
  File "D:\buildarea\2.7.bolen-windows8\build\lib\contextlib.py", line 35, in 
__exit__
self.gen.throw(type, value, traceback)
  File "D:\buildarea\2.7.bolen-windows8\build\lib\test\test_support.py", line 
765, in temp_cwd
rmtree(name)

--

___
Python tracker 

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



[issue17546] Document the circumstances where the locals() dict get updated

2016-12-02 Thread Martin Panter

Martin Panter added the comment:

Some minor tweaks to my earlier patch:
* list comprehension → comprehension
* time it is called → time of the call

--
versions: +Python 3.6, Python 3.7 -Python 3.3, Python 3.4
Added file: http://bugs.python.org/file45735/locals_doc.04.patch

___
Python tracker 

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



[issue27172] Undeprecate inspect.getfullargspec()

2016-12-02 Thread Nick Coghlan

Nick Coghlan added the comment:

Thank you Serhiy!

That leaves this just as a pending update for 3.5.3 to bring it into line with 
3.6.0.

I've reverted the stage to "needs patch" and removed the patch keyword, as the 
3.5 patch will be slightly different:

- using 3.5.3 in the versionchanged notice
- adjusting the 3.5 What's New to change the list of deprecated inspect module 
APIs

--
stage: commit review -> needs patch
versions:  -Python 3.7

___
Python tracker 

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



[issue28847] dumbdbm should not commit if in read mode

2016-12-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cb4a892e9b66 by Serhiy Storchaka in branch '2.7':
Try to fix test.test_support.rmtree() on Windows for fixing issue28847 tests.
https://hg.python.org/cpython/rev/cb4a892e9b66

--

___
Python tracker 

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-12-02 Thread Nick Coghlan

Nick Coghlan added the comment:

Attached patch is some new test cases for an approach that I figured out *won't 
work*.

The problem I hit is that "__classcell__" is only injected into the class body 
execution namespace when there is at least one method implementation that needs 
it. In any other case, including when constructing types dynamically, it's 
entirely legitimate for it to be missing.

The attached draft test cases explored the idea of requiring that 
`__classcell__` be set to `None` to affirmatively indicate that it wasn't 
needed, but that would be a *major* compatibility break for dynamic type 
creation.

I haven't given up on providing that eager warning though - it should be 
possible to emit it in __build_class__ based on PyCell_GET returning NULL (as 
that should reliably indicate that type.__new__ never got access to the 
compiler provided cell object)

--
Added file: 
http://bugs.python.org/file45736/issue23722_enhanced_classcell_tests.diff

___
Python tracker 

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



[issue28847] dumbdbm should not commit if in read mode

2016-12-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Martin for pointing on this. Now buildbots are green.

--

___
Python tracker 

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



[issue4865] system wide site-packages dir not used on Mac OS X

2016-12-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a8a342b3fbc7 by Ned Deily in branch '2.7':
Issue #28440: No longer add /Library/Python/site-packages, the Apple-supplied
https://hg.python.org/cpython/rev/a8a342b3fbc7

--
nosy: +python-dev

___
Python tracker 

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



[issue28440] ensurepip and pip install failures on macOS Sierra with non-system Python 2.7.x

2016-12-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a8a342b3fbc7 by Ned Deily in branch '2.7':
Issue #28440: No longer add /Library/Python/site-packages, the Apple-supplied
https://hg.python.org/cpython/rev/a8a342b3fbc7

--
nosy: +python-dev

___
Python tracker 

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



[issue28829] Tkinter messagebox cx_freeze Python 3.4

2016-12-02 Thread Parviz Karimli

Parviz Karimli added the comment:

Thanks, mr. Reedy for your response! I have already solved the issue.
Actually I had encountered this before and figured out the problem, but
unfortunately forgot when I encountered it again. I should have deleted
this issue from Python Bug community, but I thought it was not online since
I needed to complete some kind of form before it published on the site...
My bad!

On Sat, Dec 3, 2016 at 5:35 AM, Terry J. Reedy 
wrote:

>
> Terry J. Reedy added the comment:
>
> You code is buggy and will not run in Python because it does import
> messagebox.  Add
>
> from tkinter import messagebox
>
> If you only tested with IDLE before freezing, you might have missed the
> bug in your program because of a bug in IDLE, now fixed in 2.7 and 3.5+.
>
> --
> nosy: +terry.reedy
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue28440] ensurepip and pip install failures on macOS Sierra with non-system Python 2.7.x

2016-12-02 Thread Ned Deily

Ned Deily added the comment:

I've pushed the change to revert Issue4865 for the 2.7 branch for release with 
2.7.13.  I am leaving this open to push similar changes for 3.x branches in 
anticipation of Apple someday supplying system Python 3.x.  It would also be 
good to see if the post-install script that runs ensurepip can be made to fail 
more noisily.

--
priority: release blocker -> 
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue4865] system wide site-packages dir not used on Mac OS X

2016-12-02 Thread Ned Deily

Ned Deily added the comment:

Update: this change has been reverted in Python 2.7.13.  See Issue #28440 for 
details.

--
nosy: +ned.deily
stage:  -> resolved

___
Python tracker 

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