[issue32484] ImportError for gdbm 1.14

2018-01-02 Thread Chi Hsuan Yen

Chi Hsuan Yen  added the comment:

I can confirm a rebuild fixes _gdbm for Python 3.6.4.

This is also a bug in gdbm - it should bump soname (gdbm.so.4 => gdbm.so.5) for 
such an ABI incompatibility. I've sent a report to gdbm developers.

--

___
Python tracker 

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



[issue31340] Use VS 2017 compiler for build

2018-01-02 Thread Christoph Gohlke

Christoph Gohlke  added the comment:

Since this has not been reverted/changed for 3.6.4 or 3.7.0a3, another 
potential issue arises: C extensions that are compiled with Visual Studio 2017 
are linked to a newer version of vcruntime140.dll (latest is 14.12.25810, 
VS2017 15.5) than the DLL shipped with the CPython 3.6.4/3.7.0a3 installer 
(14.0.24210, VS2015 Update 3). There is no standard way C extensions that are 
compiled with VS2017 can load the correct/newer vcruntime140.dll. That said, I 
have not noticed any problems yet while testing with Python 3.7.0a3.

--

___
Python tracker 

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



[issue32484] ImportError for gdbm 1.14

2018-01-02 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

It seems like Python will need to be recompiled then.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue32484] ImportError for gdbm 1.14

2018-01-02 Thread Chi Hsuan Yen

Change by Chi Hsuan Yen :


--
nosy: +Chi Hsuan Yen

___
Python tracker 

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



[issue32479] inconsistent ImportError message executing same import statement

2018-01-02 Thread Xiang Zhang

Xiang Zhang  added the comment:

It's fine. Let's keep this issue open for some time before close it.

--

___
Python tracker 

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



[issue32481] Hitting the acute accent ´ button on a Danish keyboard causes Python with tkinter to crash immediately.

2018-01-02 Thread Ned Deily

Ned Deily  added the comment:

This is a well-known bug with older versions of Tk on macOS.  Chances are that 
the Python 3.6.3 you are using is using the Apple-supplied version of Tk 8.5.x 
which exhibits this bug.  If you are using Python 3.6.3 downloaded from 
python.org, as documented in the installer readme and release notice, be aware 
that it links with Tk 8.5, not 8.6, so you will need to install a more recent 
version of ActiveTcl 8.5.  More details here: 
https://www.python.org/download/mac/tcltk/

--
nosy: +ned.deily
resolution:  -> third party
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



[issue29708] support reproducible Python builds

2018-01-02 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

PEP 552 has been implemented for 3.7.

--

___
Python tracker 

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



[issue29708] support reproducible Python builds

2018-01-02 Thread Alexandru Ardelean

Alexandru Ardelean  added the comment:

Hey,

Allow me to join the discussion here.

Context:
- I'm the maintainer of Python & Python3 in the OpenWrt distro, and (since a 
while) we also care about reproducible builds.
- The person [Alexander Couzens] who's leading the effort for OpenWrt, has 
pinged me about Python(3) and packages [to see about making them reproducible]
- In OpenWrt we *only* ship .pyc files, because of performance considerations 
[.pyc can be 10x faster than .py on some SoCs], and size limitation [we cannot 
allow auto .pyc generation since it can be expensive on RAM [ < 32 MB systems ] 
or flash [ ~8 MB sizes ] ; believe it or not, people run Python on something 
like this

Current status:
- so far I've implemented a simple change to Python & Python3 here:
  
https://github.com/openwrt/packages/pull/5303/commits/1b6dd4781f901a769718c49f6f255c15fd376f6e
- that has improved reproduce-ability quite a bit : only binaries are not 
reproduce-able now
- when I did this [1-2 weeks ago] I did not think of checking of any bug/issue 
opened here [ I only thought if this now ]
- I only checked what other distros may do regarding Python:
  https://tests.reproducible-builds.org/debian/reproducible.html

References:
- initial discussion on OpenWrt: https://github.com/openwrt/packages/issues/5278
- PR with discussion: https://github.com/openwrt/packages/pull/5303
- current OpenWrt reproducible state [with the patch applied]: 
https://tests.reproducible-builds.org/lede/lede_ar71xx.html

I wanted to share my [and our] interest in this.

If we can help in any way, feel free to ping.

I will try to hack/patch some more stuff in the current Python releases to make 
them fully reproducible [for us], and probably share the results here.
When PEP 552 gets implemented and there will be a Python we will switch to them.
Atm, in trunk we package Python 2.7.14 & Python 3.6.4

Thanks
Alex

--
nosy: +Alexandru Ardelean

___
Python tracker 

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



[issue32471] Add an UML class diagram to the collections.abc module documentation

2018-01-02 Thread Brett Cannon

Brett Cannon  added the comment:

I brought this up on python-ideas, but I think discussing it here may be 
better: I think we may need to use a data file format that has an open source 
implementation. The tool Yahya used (plantuml) doesn't appear to be open 
source, which is a problem for the long-term maintainability of the diagram. If 
I'm wrong about open source tools for reading .puml files to generate SVG files 
then my worries are alleviated, but if there aren't any then something like a 
dot file may be better long-term.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue32484] ImportError for gdbm 1.14

2018-01-02 Thread sds

New submission from sds :

After upgrading to gdbm stable 1.14, I get this:
```
>>> import gdbm
Traceback (most recent call last):
  File "", line 1, in 
ImportError: dlopen(/.../lib/python2.7/lib-dynload/gdbm.so, 2): Symbol not 
found: _gdbm_errno
  Referenced from: /.../lib/python2.7/lib-dynload/gdbm.so
  Expected in: /usr/local/opt/gdbm/lib/libgdbm.4.dylib
 in /.../lib/python2.7/lib-dynload/gdbm.so
```
This is probably related to this change:
```
* Make gdbm_error global thread safe.
```
(https://lists.gnu.org/archive/html/info-gnu/2018-01/msg0.html)

--
components: Library (Lib)
messages: 309392
nosy: sam-s
priority: normal
severity: normal
status: open
title: ImportError for gdbm 1.14
versions: Python 2.7

___
Python tracker 

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



[issue32413] Document that locals() may return globals()

2018-01-02 Thread Martin Panter

Martin Panter  added the comment:

FWIW a few years ago I wrote a patch for Issue 17546 that documents three 
personalities of “locals”, including:

* At the module level, the dictionary returned is the global symbol table, also 
returned by :func:`globals`.

--
nosy: +martin.panter

___
Python tracker 

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



[issue32456] PYTHONIOENCODING=undefined doesn't work in Python 3

2018-01-02 Thread Martin Panter

Martin Panter  added the comment:

My guess is there is no message because in Python 3, errors are encoded 
according to PYTHONIOENCODING. Perhaps it works as you expect if you bypass 
sys.excepthook:

$ PYTHONIOENCODING=undefined python -c 'import sys, os; sys.excepthook = lambda 
*exc: os.write(2, ascii(exc).encode()); print(u"abc")'
(, UnicodeError('undefined encoding',), )

--
nosy: +martin.panter

___
Python tracker 

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



[issue32483] Misleading reflective behaviour due to PEP 3131 NFKC identifiers normalization.

2018-01-02 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

We don't generally update finalized PEPs. The official documentation for a 
feature is in the Python docs. Feel free to propose a PR if you think it could 
be improved.

--
nosy: +benjamin.peterson
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> hasattr, delattr, getattr fail with unnormalized names

___
Python tracker 

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



[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2018-01-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Le 02/01/2018 à 18:13, Mark Shannon a écrit :
> 
> Rather than go around in circles any more, I suggest that we merge Serhiy's 
> PR (PR 5006). I can then cherry-pick my commits to clean up the 
> implementation of the `with` statement (as a new PR).

Fair enough. I'm making a final review round on Serhiy's PR and
hopefully this will be in.

Also looking forward to the cleanup followup.

--

___
Python tracker 

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



[issue31530] Python 2.7 readahead feature of file objects is not thread safe

2018-01-02 Thread Benjamin Peterson

Change by Benjamin Peterson :


--
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



[issue27632] build on AIX fails when builddir != srcdir, more than bad path to ld_so_aix

2018-01-02 Thread Eric N. Vander Weele

Eric N. Vander Weele  added the comment:

I can also confirm that OOT builds work as well. 
https://github.com/python/cpython/commit/395733d46bbc23d2f559eba4e5f75783f9bca6f1#diff-6fd819bc2460d3a50e561d2da6c09c02
 addressed fixing this issue.

--

___
Python tracker 

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



[issue31530] Python 2.7 readahead feature of file objects is not thread safe

2018-01-02 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset dbf52e02f18dac6f5f0a64f78932f3dc6efc056b by Benjamin Peterson in 
branch '2.7':
bpo-31530: fix crash when multiple threads iterate over a file, round 2 (#5060)
https://github.com/python/cpython/commit/dbf52e02f18dac6f5f0a64f78932f3dc6efc056b


--

___
Python tracker 

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



[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2018-01-02 Thread Mark Shannon

Mark Shannon  added the comment:

> It looks like the build core dumped on Travis-CI

I failed to account for the extra stuff left on the stack when handling 
exceptions and jumping out of a finally block due to a `break`. Caught by 
Serhiy's tests in https://github.com/python/cpython/pull/5078.
I could add a work around, but it would be a bit hacky.

I'm now convinced that code duplication is the only way to do this properly. 
The only real advantage of JSR-style finally blocks is the ease of 
implementation of `frame.set_lineno()`.

Rather than go around in circles any more, I suggest that we merge Serhiy's PR 
(PR 5006). I can then cherry-pick my commits to clean up the implementation of 
the `with` statement (as a new PR).

I then plan to implement `try-finally` using code duplication, but that might 
not make it into 3.7 and we shouldn't hold up this issue any longer.

--

___
Python tracker 

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



[issue32346] Speed up slot lookup for class creation

2018-01-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

./python -m timeit -- "class A: pass"
- before: 6.63 usec per loop
- after:  5.41 usec per loop

./python -m timeit -s "class A: pass" -- "class B(A): pass"
- before: 7.04 usec per loop
- after:  4.91 usec per loop

./python -m timeit -s "class A: pass" -s "class B(A): pass" -- "class C(B): 
pass"
- before: 8.24 usec per loop
- after:  5.09 usec per loop

./python -m timeit -s "class A: pass" -s "class B(A): pass" -s "class C(B): 
pass" -- "class D(C): pass"
- before: 9.59 usec per loop
- after:  5.29 usec per loop

./python -m timeit -s "class A: pass" -s "class B(A): pass" -s "class C(B): 
pass" -s "class D(C): pass" -- "class E(D): pass"
- before: 10.9 usec per loop
- after:  5.45 usec per loop

--

___
Python tracker 

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



[issue32483] Misleading reflective behaviour due to PEP 3131 NFKC identifiers normalization.

2018-01-02 Thread Iago-lito -

Iago-lito -  added the comment:

I just found out about [this](https://bugs.python.org/issue13793) very close 
issue. Much of the philosophy has been made very clear there.

Since the solution to issue13793 is to *document* much this NFKC normalization. 
Then I think I'd be a good thing to make an explicit statement about these 
particular reflective limitations in PEP 3131 :)

--

___
Python tracker 

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



[issue32483] Misleading reflective behaviour due to PEP 3131 NFKC identifiers normalization.

2018-01-02 Thread Iago-lito -

New submission from Iago-lito - :

Consistent with [PEP 3131](https://www.python.org/dev/peps/pep-3131/) and NFKC 
normalization of identifiers, these two last lines yield an error, since `휏` 
(U+1D70F) is automatically converted to `τ` (U+03C4).

class Base(object):
def __init__(self):
self.휏 = 5 # defined with U+1D70F

a = Base()
print(a.휏) # 5 # (U+1D70F) expected and intuitive
print(a.τ) # 5 as well # (U+03C4)  normalized version, okay.
d = a.__dict__ # {'τ':  5} # (U+03C4)  still normalized version
print(d['τ'])  # 5 # (U+03C4)  consistent with normalization
assert hasattr(a, 'τ') # (U+03C4)  consistent with normalization
# But if I want to retrieve it the way I entered it because I can type 
(U+1D70F)
print(d['휏'])  # KeyError: '휏' # (U+1D70F) counterintuitive
assert hasattr(a, '휏') # Fails # (U+1D70F) counterintuitive

I've described and undestood the problem in [this 
post](https://stackoverflow.com/questions/48063082/).

Nothing is unconsistent here. However, I am worried that:

- this behaviour might be counterintuitive and misleading, especially if it 
occurs that the character user can easily enter for some reason (e.g. U+1D70F) 
is not equivalent to its NFKC normalization (e.g. U+03C4)

- this behaviours makes it more difficult to enjoy python's reflective 
`__dict__`, `hasattr` and `getattr` features in this particular case.

Maybe it is user's responsibility to be aware of this limitation, and to keep 
considering utf-8 coding a bad practice. In this case, maybe this particular 
reflective limitation could be made explicit in PEP 3131.

Or maybe it is python's responsibility to ensure intuitive and consistent 
behaviour even in tricky-unicode-cases. So reflective features like 
`__dict__.__getitem__`, `hasattr` or `getattr` would NFKC-convert their 
arguments before searching just like `a.휏` does, so that:

getattr(a, '휏') is gettatr(a, 'τ')

always yields True.

I actually have no idea of the philosophy to stick to. And the only purpose of 
this post is to inform the community about this particular, low-priority case.

Thank you for supporting Python anyway, cheers for your patience.. and happy 
2018 to everyone :)


--
Iago-lito

--
components: Unicode
messages: 309382
nosy: Iago-lito -, ezio.melotti, vstinner
priority: normal
severity: normal
status: open
title: Misleading reflective behaviour due to PEP 3131 NFKC identifiers 
normalization.
type: behavior
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



[issue32479] inconsistent ImportError message executing same import statement

2018-01-02 Thread Nick Coghlan

Nick Coghlan  added the comment:

Since the problem is specific to Python 2.7 and has been resolved in the 
importlib based import implementation, I'm inclined to close this as "Won't 
Fix".

The only reason I haven't is that if someone really wanted to dig into the 
Python 2.7 import implementation and figure out how to improve the situation, 
I'd actually be willing to review the patch.

Alternatively, it might be worthwhile for OpenStack to investigate migrating 
over to importlib2 for their Python 2.7 support (or at least supporting it as a 
debugging option).

--
priority: normal -> low

___
Python tracker 

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



[issue32452] Brackets and Parentheses used in an ambiguous way

2018-01-02 Thread R. David Murray

R. David Murray  added the comment:

Thanks, Mariatta.  I did click on the details link, so either the restart link 
isn't obvious or I don't have the correct permissions to do a restart :)

And thanks Emily for doing the PR.

--
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



[issue32480] czipfile installation failure

2018-01-02 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
status: pending -> closed

___
Python tracker 

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



[issue32452] Brackets and Parentheses used in an ambiguous way

2018-01-02 Thread R. David Murray

R. David Murray  added the comment:


New changeset 0e0d1017a4c8ad6f77ee42d7b640463058037f62 by R. David Murray (Miss 
Islington (bot)) in branch '2.7':
bpo-32452: clarify term 'brackets' in generator tutorial (GH-5079) (#5082)
https://github.com/python/cpython/commit/0e0d1017a4c8ad6f77ee42d7b640463058037f62


--

___
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)

2018-01-02 Thread David Edelsohn

Change by David Edelsohn :


--
nosy: +David.Edelsohn

___
Python tracker 

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



[issue10656] "Out of tree" build fails on AIX

2018-01-02 Thread David Edelsohn

Change by David Edelsohn :


--
nosy: +David.Edelsohn

___
Python tracker 

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



[issue28009] core logic of uuid.getnode() is broken for AIX - all versions

2018-01-02 Thread David Edelsohn

Change by David Edelsohn :


--
nosy: +David.Edelsohn

___
Python tracker 

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



[issue32390] AIX (xlc_r) compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-02 Thread David Edelsohn

David Edelsohn  added the comment:

/* typedef for the File System Identifier (fsid).  This must correspond 
 * to the "struct fsid" structure in _ALL_SOURCE below.
 */
typedef struct fsid_t {
#ifdef __64BIT_KERNEL
unsigned long val[2];
#else  /* __64BIT_KERNEL */
#ifdef _ALL_SOURCE
unsigned int val[2];
#else  /* _ALL_SOURCE */
unsigned int __val[2];
#endif /* _ALL_SOURCE */
#endif /* __64BIT_KERNEL */
} fsid_t;

#ifdef _KERNEL
typedef struct fsid32_t {
unsigned int val[2];
} fsid32_t;
#endif /* __64BIT_KERNEL */

typedef struct fsid64_t {
#if defined(_ALL_SOURCE) && (defined(__64BIT__) || defined(_LONG_LONG))
uint64_t val[2];
#else /* _ALL_SOURCE */
uint32_t __val[4];
#endif /* _ALL_SOURCE */
} fsid64_t;

/* typedef for the File System Identifier (fsid) */
struct fsid {
#ifndef __64BIT_KERNEL
unsigned intval[2];
#else
unsigned long   val[2];
#endif
};

--

___
Python tracker 

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



[issue32461] the first build after a change to Makefile.pre.in uses the old Makefile

2018-01-02 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

Hum, GNU make does re-execute the updated Makefile [1] after the 'Makefile' 
target has been remade.
The problem occurs though with the other make variants that do not have this 
feature.

[1] This may be shown by updating Makefile.pre.in and adding an 'echo' recipe 
in the 'Python/sysmodule.o' target for example, or by running 'make -d' after 
Makefile.pre.in has been modified and confirming that the command prints 
"Re-executing[1]: make -d".

--

___
Python tracker 

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



[issue32390] AIX (xlc_r) compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-02 Thread David Edelsohn

David Edelsohn  added the comment:

struct statvfs {
ulong_tf_bsize; /* preferred file system block size  */
ulong_tf_frsize;/* fundamental file system block size*/
fsblkcnt_t f_blocks;/* total # of blocks of f_frsize in fs   */ 
fsblkcnt_t f_bfree; /* total # of free blocks*/
fsblkcnt_t f_bavail;/* # of blocks available to non super user   */
fsfilcnt_t f_files; /* total # of file nodes (inode in JFS)  */
fsfilcnt_t f_ffree; /* total # of free file nodes*/
fsfilcnt_t f_favail;/* # of nodes available to non super user*/
#ifdef _ALL_SOURCE
fsid_t f_fsid;  /* file system id*/
#else
ulong_tf_fsid;  /* file system id*/
#ifndef __64BIT__
ulong_tf_fstype;/* file system type  */
#endif
#endif  /* _ALL_SOURCE */
char   f_basetype[_FSTYPSIZ]; /* Filesystem type name (eg. jfs)  */
ulong_tf_flag;  /* bit mask of flags */
ulong_tf_namemax;   /* maximum filename length   */
char   f_fstr[32];  /* filesystem-specific string */
ulong_tf_filler[16];/* reserved for future use   */
};

--
nosy: +David.Edelsohn

___
Python tracker 

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



[issue28290] BETA report: Python-3.6 build messages to stderr: AIX and "not GCC"

2018-01-02 Thread David Edelsohn

Change by David Edelsohn :


--
nosy: +David.Edelsohn

___
Python tracker 

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



[issue27643] test_ctypes fails on AIX with xlc

2018-01-02 Thread David Edelsohn

Change by David Edelsohn :


--
nosy: +David.Edelsohn

___
Python tracker 

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



[issue32452] Brackets and Parentheses used in an ambiguous way

2018-01-02 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

I clicked the "Details" link and restarted the build from there.
Closing and reopening the PR will also restart the build.

--
nosy: +Mariatta

___
Python tracker 

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



[issue32482] Improve tests for syntax and grammar in 2.7

2018-01-02 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4961

___
Python tracker 

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



[issue32482] Improve tests for syntax and grammar in 2.7

2018-01-02 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

The proposed PR:

* Fixes Py3k warnings introduced by recent backports.
* Backports tests from Python 3.
* Improve handling of Py3k warnings. They are now checked only for statements 
that emit them instead of silencing for the whole module.
* Fixes few minor defects that can lead to hiding expected errors.

--
components: Tests
messages: 309374
nosy: benjamin.peterson, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Improve tests for syntax and grammar in 2.7
type: enhancement
versions: Python 2.7

___
Python tracker 

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



[issue32482] Improve tests for syntax and grammar in 2.7

2018-01-02 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +4960
stage:  -> patch review

___
Python tracker 

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



[issue32447] IDLE shell won't open on Mac OS 10.13.1

2018-01-02 Thread Steve Margetts

Steve Margetts  added the comment:

OK, so I created a profile for my son (single name without any spaces!) and 
that seems to allow both Python and IDLE to work fine. I'll try and sort out my 
profile slow time - it doesn't seem to be causing any other issues just now. 
Thanks for the guidance.

--

___
Python tracker 

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



[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2018-01-02 Thread Mark Shannon

Mark Shannon  added the comment:

I've added a commit to compute the stack size.
It should compute the exact stack size in all cases, and thus fix bpo-24340.

--

___
Python tracker 

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



[issue32452] Brackets and Parentheses used in an ambiguous way

2018-01-02 Thread R. David Murray

R. David Murray  added the comment:

It looks like the docs job hung on the 2.7 backport, but I don't see how to 
restart it.

--

___
Python tracker 

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



[issue32452] Brackets and Parentheses used in an ambiguous way

2018-01-02 Thread R. David Murray

R. David Murray  added the comment:


New changeset f24c1857a8a1ba3efb3f957d43371bc9499e3c86 by R. David Murray (Miss 
Islington (bot)) in branch '3.6':
bpo-32452: clarify term 'brackets' in generator tutorial (GH-5079) (#5081)
https://github.com/python/cpython/commit/f24c1857a8a1ba3efb3f957d43371bc9499e3c86


--

___
Python tracker 

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



[issue32390] AIX (xlc_r) compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-02 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

Can you please post the definition of the statvfs structure on AIX.

--

___
Python tracker 

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



[issue32480] czipfile installation failure

2018-01-02 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

This is an issue with the czipfile package on PyPI 
() and not a bug in CPython.

Note that czipfile appears to support Python 2 only, which would explain the 
error message you are getting.

--
nosy: +ronaldoussoren
resolution:  -> not a bug
stage:  -> resolved
status: open -> pending

___
Python tracker 

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



[issue32453] shutil.rmtree can have O(n^2) performance on large dirs

2018-01-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Yes, so `rm -rf` is quadratic on my SSD too...

--

___
Python tracker 

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



[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2018-01-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> With fixed deltas, it is not too hard to construct an algorithm to 
determine the correct stack size. The presence of JSR-style finally 
blocks complicates things a little, but not that much.

Any chance you can put that patch somewhere to get an idea of the additional 
complexity?

I'd like to gauge the total complexity of each approach including the stack 
size computation fix (since fixing that issue is one of the end goals).  Also, 
that would help compare your PR and Serhiy's on more equal terms.

--

___
Python tracker 

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



[issue32481] Hitting the acute accent ´ button on a Danish keyboard causes Python with tkinter to crash immediately.

2018-01-02 Thread Jacob Jorvang

New submission from Jacob Jorvang :

Hitting the acute accent ´ button on a Danish keyboard causes Python with 
tkinter to crash immediately. This is a problem because the key is just left of 
the backspace key.
Using:
Python 3.6.3
MacOS version of tkinter
ActiveTCL 8.6.4.1

MacBook-Pro:~ username$ python3 --version
Python 3.6.3
MacBook-Pro:~ username$ pip3 list
DEPRECATION: The default format will switch to columns in the future. You can 
use --format=(legacy|columns) (or define a format=(legacy|columns) in your 
pip.conf under the [list] section) to disable this warning.
altgraph (0.15)
future (0.16.0)
lxml (4.1.1)
macholib (1.9)
modulegraph (0.16)
pefile (2017.11.5)
pip (9.0.1)
py2app (0.14)
PyInstaller (3.4.dev0+ab8fd9753)
setuptools (28.8.0)
xmltodict (0.11.0)
MacBook-Pro:~ username$ python3 -c 'import tkinter; tkinter.Text().pack(); 
tkinter.mainloop()'
2018-01-02 11:31:53.488 Python[80562:5642430] *** Terminating app due to 
uncaught exception 'NSRangeException', reason: '-[__NSCFConstantString 
characterAtIndex:]: Range or index out of bounds'
*** First throw call stack:
(
0   CoreFoundation  0x00010010e00b 
__exceptionPreprocess + 171
1   libobjc.A.dylib 0x000100de0c76 
objc_exception_throw + 48
2   CoreFoundation  0x00010019fc9d 
+[NSException raise:format:] + 205
3   CoreFoundation  0x000100089f26 
-[__NSCFString characterAtIndex:] + 102
4   Tk  0x000103ef1353 
TkpInitKeymapInfo + 731
5   Tk  0x000103ef71b1 
Tk_MacOSXSetupTkNotifier + 798
6   Tcl 0x000103dd1a50 
Tcl_DoOneEvent + 300
7   _tkinter.cpython-36m-darwin.so  0x000101fedaa1 
_tkinter_tkapp_mainloop + 209
8   Python  0x0001007bd7b8 
_PyCFunction_FastCallDict + 552
9   Python  0x000100847164 
call_function + 612
10  Python  0x000100848b74 
_PyEval_EvalFrameDefault + 5604
11  Python  0x000100846e21 
fast_function + 465
12  Python  0x00010084714b 
call_function + 587
13  Python  0x000100848b74 
_PyEval_EvalFrameDefault + 5604
14  Python  0x000100846500 
_PyEval_EvalCodeWithName + 2720
15  Python  0x0001008466a4 
PyEval_EvalCode + 100
16  Python  0x000100883747 
PyRun_StringFlags + 183
17  Python  0x0001008837d1 
PyRun_SimpleStringFlags + 65
18  Python  0x00010089c304 Py_Main + 
1812
19  Python  0x00010dfe Python + 3582
20  Python  0x00010c34 Python + 3124
21  ??? 0x0003 0x0 + 3
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

--
components: Tkinter
messages: 309365
nosy: Jacob Jorvang
priority: normal
severity: normal
status: open
title: Hitting the acute accent ´ button on a Danish keyboard causes Python 
with tkinter to crash immediately.
type: crash
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



[issue32480] czipfile installation failure

2018-01-02 Thread Ajay

New submission from Ajay :

pip installation for czipfile is failing with compilation error (as below)

Command Execute:
pip install --no-cache-dir czipfile

Error:
Collecting czipfile
  Downloading czipfile-1.0.0.tar.gz (144kB)
100% || 153kB 726kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "", line 1, in 
  File 
"C:\Users\503022~1\AppData\Local\Temp\pip-build-3uthum1g\czipfile\setup.py", 
line 18
print "cython not found, using previously-cython'd .c file."
   ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(int 
"cython not found, using previously-cython'd .c file.")?


Command "python setup.py egg_info" failed with error code 1 in...

--
components: Library (Lib)
messages: 309364
nosy: ajayhn
priority: normal
severity: normal
status: open
title: czipfile installation failure
type: compile error
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



[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2018-01-02 Thread Mark Shannon

Mark Shannon  added the comment:

On 01/01/18 17:54, Antoine Pitrou wrote:
> 
> Antoine Pitrou  added the comment:
> 
> I took a quick look at Mark's PR.  The main thing going for it IMHO is that 
> it produces simpler bytecode: it removes the complicated with/finally-related 
> opcodes, while Serhiy's has non-trivial END_FINALLY and POP_FINALLY.
> 
> It would be nice to know if it's able to fix the stack size issues as in the 
> following tests:
> https://github.com/python/cpython/pull/5006/files?diff=unified#diff-dae68b96e8fdcb924e1ea46c31f51aec

Yes, it can. The key to determining a correct stack size is that each 
bytecode has a fixed stack delta for each exiting edge.
For example, FOR_ITER is good because it has a delta of 0 when entering 
the body and a delta of -1 when leaving the loop.
But (the old) WITH_CLEANUP_START is bad because it has a variable delta.

With fixed deltas, it is not too hard to construct an algorithm to 
determine the correct stack size. The presence of JSR-style finally 
blocks complicates things a little, but not that much.

An outline algorithm would be:
 Find all "finally" subgraphs, so as to distinguish them from the 
main CFG - It might be easiest to do this by marking the basic blocks 
where generating the code.
 For each subgraph compute max-depth, by keeping a running total of
 depth. Jumps to finally blocks should not alter the depth, but 
would potentially increase the max-depth.
 The max-depth for the main CFG is the stack depth for the function.

> 
> --
> 
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue32472] Mention of __await__ missing in Coroutine Abstract Methods

2018-01-02 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

`Coroutine` is inherited from `Awaitable`, that's why inherited abstract 
`__await__` method is present.

It **is** consistent with the rest of the document: e.g. Mapping has no 
`__len__` method but inherits it from Collection which in turn is inherited 
from Sized

--
nosy: +asvetlov
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



[issue32477] Move jumps optimization from the peepholer to the compiler

2018-01-02 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
nosy: +inada.naoki, pitrou

___
Python tracker 

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



[issue32478] Add tests for 'break' and 'return' inside 'finally' clause

2018-01-02 Thread Serhiy Storchaka

Change 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



[issue32478] Add tests for 'break' and 'return' inside 'finally' clause

2018-01-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset b495377a8bdd711e9aab0885c60cd148284156e8 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-32478: Add tests for 'break' and 'return' inside 'finally' clause. 
(GH-5078). (#5084)
https://github.com/python/cpython/commit/b495377a8bdd711e9aab0885c60cd148284156e8


--

___
Python tracker 

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



[issue32479] inconsistent ImportError message executing same import statement

2018-01-02 Thread Xiang Zhang

New submission from Xiang Zhang :

While debugging a problem in my job I find an odd case about import, it could 
be reduced to the following tracebacks:

>>> from keystone.assignment import schema
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.7/site-packages/keystone/assignment/__init__.py", line 
15, in 
from keystone.assignment import controllers  # noqa
  File "/usr/lib/python2.7/site-packages/keystone/assignment/controllers.py", 
line 26, in 
from keystone.common import controller
  File "/usr/lib/python2.7/site-packages/keystone/common/controller.py", line 
24, in 
from keystone.common import authorization
  File "/usr/lib/python2.7/site-packages/keystone/common/authorization.py", 
line 23, in 
from keystone.models import token_model
  File "/usr/lib/python2.7/site-packages/keystone/models/token_model.py", line 
15, in 
from keystoneclient.common import cms
ImportError: No module named keystoneclient.common
>>> from keystone.assignment import schema
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.7/site-packages/keystone/assignment/__init__.py", line 
15, in 
from keystone.assignment import controllers  # noqa
  File "/usr/lib/python2.7/site-packages/keystone/assignment/controllers.py", 
line 25, in 
from keystone.assignment import schema
ImportError: cannot import name schema

keystoneclient is deliberately not installed. I think it should always report 
keystoneclient.common could not be found which reveals the root causes. But 
only the first time it does so. Later tries it always report cannot import 
schema.

The reason of this behaviour is that first time although keystone.assignment 
import fails but keystone.assignment.schema is successfully installed in 
sys.modules. And then, in ensure_fromlist, it calls import_submodule which 
returns the module in sys.modules, without set schema attribute to 
keystone.assignment. So it then fails in import_from for not able to get the 
attribute.

It could be simply reproduced by the following package structure:

test
|-- a.py
|-- b.py
`-- __init__.py

__init__.py:
from test import a

a.py: 
from test import b
import modulenotexisting

b.py: #emtpy

>>> import test
Traceback (most recent call last):
  File "", line 1, in 
  File "test/__init__.py", line 1, in 
from test import a
  File "test/a.py", line 2, in 
import dd
ImportError: No module named dd
>>> import test
Traceback (most recent call last):
  File "", line 1, in 
  File "test/__init__.py", line 1, in 
from test import a
  File "test/a.py", line 1, in 
from test import b
ImportError: cannot import name b

Python3 doesn't suffer this problem, at least for 3.7.

I don't know this should be identified as a bug or not. But this does bring me 
trouble debugging problems and lead to confusions because it doesn't  tell 
users the real module can't be imported.

--
components: Interpreter Core
messages: 309360
nosy: brett.cannon, eric.snow, ncoghlan, xiang.zhang
priority: normal
severity: normal
status: open
title: inconsistent ImportError message executing same import statement
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue32478] Add tests for 'break' and 'return' inside 'finally' clause

2018-01-02 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4959

___
Python tracker 

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



[issue32453] shutil.rmtree can have O(n^2) performance on large dirs

2018-01-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thanks for your investigations Niklas. I ran my benchmark on a spinning disk, 
but significant nonlinearity is observed only for the size of directory around 
100 and more. And yes, sorting by inode number helps.

$ for j in 1 2 3 4 6 8 12 16; do i=$((j*10)); mkdir x; (cd x && seq 
$i|xargs touch); env time -f "%e $i" python3.7-unpatched -c 'import shutil; 
shutil.rmtree("x")'; done
1.01 10
3.80 20
3.64 30
4.89 40
8.72 60
11.86 80
56.80 120
209.82 160

$ for j in 1 2 3 4 6 8 12 16; do i=$((j*10)); mkdir x; (cd x && seq 
$i|xargs touch); env time -f "%e $i" python3.7-patched -c 'import shutil; 
shutil.rmtree("x")'; done
0.97 10
2.42 20
3.84 30
4.48 40
7.07 60
10.01 80
15.53 120
23.24 160

$ for j in 1 2 3 4 6 8 12 16; do i=$((j*10)); mkdir x; (cd x && seq 
$i|xargs touch); env time -f "%e $i" env rm -rf x; done
0.68 10
1.34 20
2.10 30
3.95 40
5.95 60
10.28 80
47.66 120
89.32 160

On an SSD:

$ for j in 1 2 3 4 6 8 12 16; do i=$((j*10)); mkdir x; (cd x && seq 
$i|xargs touch); env time -f "%e $i" python3.7-unpatched -c 'import shutil; 
shutil.rmtree("x")'; done
1.00 10
1.93 20
2.90 30
4.98 40
7.05 60
9.87 80
21.45 120
36.19 160

$ for j in 1 2 3 4 6 8 12 16; do i=$((j*10)); mkdir x; (cd x && seq 
$i|xargs touch); env time -f "%e $i" python3.7-patched -c 'import shutil; 
shutil.rmtree("x")'; done
0.96 10
1.99 20
3.09 30
4.85 40
7.55 60
9.44 80
16.03 120
21.28 160

$ for j in 1 2 3 4 6 8 12 16; do i=$((j*10)); mkdir x; (cd x && seq 
$i|xargs touch); env time -f "%e $i" env rm -rf x; done
0.67 10
1.38 20
2.41 30
2.82 40
5.24 60
7.02 80
18.60 120
30.58 160

Interesting that patched Python is faster than 'rm' (GNU coreutils 8.26) for 
large numbers.

--

___
Python tracker 

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



[issue32478] Add tests for 'break' and 'return' inside 'finally' clause

2018-01-02 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset aea95c2fbdec058b833a74eeb7ec8dc69706 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
bpo-32478: Add tests for 'break' and 'return' inside 'finally' clause. 
(GH-5078) (#5083)
https://github.com/python/cpython/commit/aea95c2fbdec058b833a74eeb7ec8dc69706


--

___
Python tracker 

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