[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2015-02-07 Thread Daniil Bondarev
Daniil Bondarev added the comment: As suggested adding patch from http://bugs.python.org/issue2786 which prints qualnames in function call exceptions. e.g: class A: ... def __init__(self): ... pass A(1) Traceback (most recent call last): File stdin, line 1, in module

[issue23406] interning and list comprehension leads to unexpected behavior

2015-02-07 Thread Abraham Smith
New submission from Abraham Smith: Some students were working on matrix routines for practice. The following code: L = [ [0]*3 ]*3 for i in range(3): ...for j in range(3): ...if i==j: L[i][j]=1 was expected to return [[1,0,0],[0,1,0],[0,0,1]] but it returned

[issue23406] interning and list comprehension leads to unexpected behavior

2015-02-07 Thread Abraham Smith
Abraham Smith added the comment: (Obviously, there's a copy/paste mistake in the second case; it should read map(id, M).) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23406 ___

[issue23357] pyvenv help shows incorrect usage

2015-02-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 751910294200 by Vinay Sajip in branch 'default': Closes #23357: Updated documentation on creating venvs. https://hg.python.org/cpython/rev/751910294200 -- nosy: +python-dev resolution: - fixed stage: patch review - resolved status: open -

[issue23405] Tools/freeze make gets missing file error with unix shared builds

2015-02-07 Thread Ned Deily
New submission from Ned Deily: While investigating another freeze-related issue, I found that Tools/freeze seems to not work when used with an installed shared unix build. The symptom is that the linkage step in the freeze-produced Makefile fails with: gcc -pthread -Xlinker -export-dynamic

[issue23406] interning and list comprehension leads to unexpected behavior

2015-02-07 Thread Georg Brandl
Georg Brandl added the comment: There is no interning going on. Multiplying lists just copies references. This is not so surprising if you consider that the case may be simple for nested lists, but what about ``[a] * 3`` with some arbitrary object a? Copying (or even deep copying) that

[issue23406] interning and list comprehension leads to unexpected behavior

2015-02-07 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is already a FAQ: https://docs.python.org/2/faq/programming.html#how-do-i-create-a-multidimensional-list I guess this bites every beginning Python programmer, but it's a natural, and desirable, consequence of Python's object model and the fact that *

[issue23406] interning and list comprehension leads to unexpected behavior

2015-02-07 Thread Abraham Smith
Abraham Smith added the comment: Thanks for the helpful responses and correcting my misunderstanding. Regarding improved documentation, I see now that the table at https://docs.python.org/2/library/stdtypes.html#id2 indeed says shallow copies; however, the footnote seems to bury the lede.

[issue21502] freeze.py not working properly with OS X framework builds

2015-02-07 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21502 ___ ___

[issue23174] shelve.open fails with error anydbm.error: db type could not be determined

2015-02-07 Thread Karl Richter
Karl Richter added the comment: For example, it should be clear why `shelve.open(tempfile.mkstemp()[1])` fails with the mentioned exception and `shelve.open(/tmp/bla)` fails. I still haven't figured out the constraints to create a working `shelve.Shelve` at all. It should be clear why

[issue23285] PEP 475 - EINTR handling

2015-02-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5b63010be19e by Charles-François Natali in branch 'default': Issue #23285: PEP 475 -- Retry system calls failing with EINTR. https://hg.python.org/cpython/rev/5b63010be19e -- nosy: +python-dev ___ Python

[issue23174] shelve.open fails with error anydbm.error: db type could not be determined

2015-02-07 Thread Karl Richter
Karl Richter added the comment: After checking the code, I think that it'd make more sense to document `whichdb.py`. It needs to be enhanced with references to criteria for the determination of the database type. Currently there're only function comments and the fact that some variables are

[issue21502] freeze.py not working properly with OS X framework builds

2015-02-07 Thread Ned Deily
Ned Deily added the comment: Sorry, I've finally gotten around to taking a longer look at this and it seems that freeze support is kind of a mess. First, it looks like some of the issues you ran into were fixed in 3.4.1 (changes associated with Issue11824 and Issue16047). Unfortunately, one

[issue23400] Inconsistent behaviour of multiprocessing.Queue() if sem_open is not implemented

2015-02-07 Thread Davin Potts
Davin Potts added the comment: Having installed a fresh copy of Debian Hurd into a VM, I am able to reproduce the described issue using this 2-line snippet of code: import multiprocessing q = multiprocessing.Queue() It was possible to reproduce the issue both using the builds of

[issue23400] Inconsistent behaviour of multiprocessing.Queue() if sem_open is not implemented

2015-02-07 Thread Davin Potts
Davin Potts added the comment: Apologies -- it was already pointed out that there is no sem_open implementation on Hurd. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23400 ___

[issue23407] os.walk always follows Windows junctions

2015-02-07 Thread Craig Holmquist
New submission from Craig Holmquist: os.walk follows Windows junctions even if followlinks is False: import os appdata = os.environ['LOCALAPPDATA'] for root, dirs, files in os.walk(appdata, followlinks=False): ... print(root) C:\Users\Test\AppData\Local C:\Users\Test\AppData\Local\Apple

[issue22634] importing _ctypes failed: undefined symbol: ffi_call_win32

2015-02-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: -m32 means compile a 32-bit build though I'm on a 64-bit platform. I'm not sure why Matthias says this is getting what you deserve, since everytime I've tried, -m32 worked properly for building Python. -- nosy: +pitrou

[issue21354] PyCFunction_New no longer exposed by python DLL breaking bdist_wininst installers

2015-02-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Perhaps Steve can confirm that the patch is right. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21354 ___

[issue18885] handle EINTR in the stdlib

2015-02-07 Thread Martin Panter
Martin Panter added the comment: See also Issue 23285 for the PEP -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18885 ___ ___ Python-bugs-list

[issue23285] PEP 475 - EINTR handling

2015-02-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 000bbdf0ea76 by Ned Deily in branch 'default': Issue #23285: Install new test directory. https://hg.python.org/cpython/rev/000bbdf0ea76 -- ___ Python tracker rep...@bugs.python.org

[issue21793] httplib client/server status refactor

2015-02-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: fixed - stage: resolved - needs patch status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21793 ___

[issue23285] PEP 475 - EINTR handling

2015-02-07 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23285 ___ ___ Python-bugs-list

[issue21354] PyCFunction_New no longer exposed by python DLL breaking bdist_wininst installers

2015-02-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: I'm sorry. The patch is correct from my perspective if we want to make bdist_install just working. Or as an option I can restore PyCFunction_New function declaration. What do you prefer? -- ___ Python tracker

[issue15795] Zipfile.extractall does not preserve file permissions

2015-02-07 Thread Alexander Belopolsky
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15795 ___ ___

[issue21793] httplib client/server status refactor

2015-02-07 Thread Martin Panter
Martin Panter added the comment: Currently the log output includes the new HTTPStatus codes. I don’t care much for the log output, but perhaps this wasn’t part of the plan? Before: $ python3.4 -m http.server Serving HTTP on 0.0.0.0 port 8000 ... 127.0.0.1 - - [08/Feb/2015 05:05:28] GET /

[issue20680] Pickle socket enums by names

2015-02-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't see how it can break code. If people use workaround that were not broken by changing SOCK_STREAM from int to enum, it shouldn't break by changing pickle representation of SOCK_STREAM. -- ___ Python

[issue21354] PyCFunction_New no longer exposed by python DLL breaking bdist_wininst installers

2015-02-07 Thread Larry Hastings
Larry Hastings added the comment: Still not fixed! This has been marked as release blocker for most of a year. Should I just apply the patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21354

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-02-07 Thread Martin Panter
Martin Panter added the comment: If it would help the review process, I could simplify my patch by dropping the addition of the HTTPConnection.closed flag, so that it just adds the ConnectionClosed exception. Looking forwards, I’m wondering if it might be better to add something like a

[issue21354] PyCFunction_New no longer exposed by python DLL breaking bdist_wininst installers

2015-02-07 Thread Steve Dower
Steve Dower added the comment: As Andrew says, the patch is fine for the bug, but the PyCFunction_New function is certainly part of the stable ABI and needs to be restored. -- ___ Python tracker rep...@bugs.python.org

[issue18885] handle EINTR in the stdlib

2015-02-07 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18885 ___ ___ Python-bugs-list

[issue22364] Improve some re error messages using regex for hints

2015-02-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which unify and improves re error messages. Added tests for all parsing errors. Now error message always points on the start of affected component, i.e. on the start of bad escape, group name or unterminated subpattern. -- stage:

[issue22634] importing _ctypes failed: undefined symbol: ffi_call_win32

2015-02-07 Thread Larry Hastings
Larry Hastings added the comment: What does -m32 mean? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22634 ___ ___ Python-bugs-list mailing

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-02-07 Thread Martin Panter
Martin Panter added the comment: Here is a patch to redocument the constructor arguments. I am assuming that they were only removed by accident. The constructor arguments are already tested in ExceptionTests.testAttributes() at Lib/test/test_exceptions.py:248. I did not restore the bit about

[issue13637] binascii.a2b_* functions could accept unicode strings

2015-02-07 Thread Martin Panter
Martin Panter added the comment: The error fix patch looks good. I updated the doc patch as fix_doc_binascii_unhexlify.v2.patch, which also clarifies a2b_qp(), and restores the description of Python 3.2 not allowing text strings. -- assignee: - docs@python components: +Documentation

[issue23353] generator bug with exception: tstate-exc_value is not cleared after an except block

2015-02-07 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23353 ___

[issue12304] expose signalfd(2) in the signal module

2015-02-07 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12304 ___ ___ Python-bugs-list

[issue20611] socket.create_connection() doesn't handle EINTR properly

2015-02-07 Thread Martin Panter
Martin Panter added the comment: See also PEP 475 and Issue 23285 for the general fix in Python 3 -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20611 ___

[issue23407] os.walk always follows Windows junctions

2015-02-07 Thread eryksun
eryksun added the comment: To check for a link on Windows, os.walk calls ntpath.islink, which calls os.lstat. Currently the os.lstat implementation only sets S_IFLNK for symbolic links. attribute_data_to_stat could also check for junctions (IO_REPARSE_TAG_MOUNT_POINT). For consistency,

[issue22364] Improve some re error messages using regex for hints

2015-02-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: re_errors_diff.txt contains differences for all tested error messages. -- Added file: http://bugs.python.org/file38036/re_errors_diff.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22364

[issue20680] Pickle socket enums by names

2015-02-07 Thread Ethan Furman
Ethan Furman added the comment: To make sure I understand correctly: On platform ABC the value 1 could mean SOCK_STREAM but on platform XYZ SOCK_STREAM is value 32? Assuming the need to pickle socket types is not new, then people have been doing it, possibly with painful workarounds, on the