[issue19178] Entries for "module" and "package" in glossary

2013-10-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5e1f359d54c4 by Georg Brandl in branch '2.7': Closes #19178: backport entries for "module" and "package" from 3.x glossary. Patch by Berker Peksag. http://hg.python.org/cpython/rev/5e1f359d54c4 New changeset b6205505e1e4 by Georg Brandl in branch '

[issue19178] Entries for "module" and "package" in glossary

2013-10-07 Thread Georg Brandl
Georg Brandl added the comment: Looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue19190] Improve cross-references in builtins documentation.

2013-10-07 Thread Georg Brandl
Georg Brandl added the comment: Why the need for these changes -- the references I checked are working fine as is. -- nosy: +georg.brandl ___ Python tracker ___

[issue19178] Entries for "module" and "package" in glossary

2013-10-07 Thread Berker Peksag
Berker Peksag added the comment: For 3.x, I've added cross references between module and package entries. For 2.7, I've backported importing, module and package entries. -- keywords: +patch nosy: +berker.peksag stage: needs patch -> patch review Added file: http://bugs.python.org/file31

[issue19178] Entries for "module" and "package" in glossary

2013-10-07 Thread Berker Peksag
Changes by Berker Peksag : Added file: http://bugs.python.org/file31995/issue19178_py2.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue19188] Add PySet_CheckExact()

2013-10-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: AFACIT, there is no use case. I left this out of the API for a reason. It was not an unintentional omission. -- assignee: -> rhettinger ___ Python tracker __

[issue19187] Use a set for interned strings

2013-10-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: If sets need to be hacked-up to accommodate this, I would like to draft the patch for it that I think will be cleaner. FWIW, I'm dubious that there will be any benefit from this at all. The savings of one-pointer is the dictionary is likely to be insignifi

[issue18037] 2to3 passes through string literal which causes SyntaxError in 3.x

2013-10-07 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: These revisions also introduced escaping of \u and \U in raw literals, which is incorrect. It breaks e.g. Sphinx. -- resolution: fixed -> stage: committed/rejected -> status: closed -> open ___

[issue19142] Cross-compile fails trying to execute foreign pgen on build host

2013-10-07 Thread Trevor Bowen
Trevor Bowen added the comment: FWIW, I also explored my original proposal, which essentially moved the above script and modifications into the Python configure.ac and Makefile.pre.in files, so that Python's internal build process would create the native build system versions of Python and Par

[issue19142] Cross-compile fails trying to execute foreign pgen on build host

2013-10-07 Thread Trevor Bowen
Trevor Bowen added the comment: Short version of cross-compile script without error checking: #!/bin/bash export RFS=/local/my_root_file_system make distclean rm -rf python_for_build Parser/pgen_for_build git checkout -- Makefile.pre.in Modules/Setup.dist configure setup.py ./configure make pyth

[issue19142] Cross-compile fails trying to execute foreign pgen on build host

2013-10-07 Thread Trevor Bowen
Trevor Bowen added the comment: In the vein of: http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html I have created a patch and top-level build script, which builds the requisite python interpreter and Parser/pgen binary to run on the build system, which are both used dur

[issue19187] Use a set for interned strings

2013-10-07 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue19190] Improve cross-references in builtins documentation.

2013-10-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file31990/refs.builtins.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue19190] Improve cross-references in builtins documentation.

2013-10-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file31989/refs.builtins.patch ___ Python tracker ___ ___ Python-bugs-list m

[issue18948] deliberately crashing tests should prevent core dumps

2013-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks! The patch works fine here under Linux, too (though I haven't tried to figure out if it really prevented core files from being generated). -- ___ Python tracker ___

[issue19190] Improve cross-references in builtins documentation.

2013-10-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is a patch which fixes internal references for in the documentation of builtins. -- assignee: docs@python components: Documentation files: refs.builtins.patch keywords: patch messages: 199163 nosy: docs@python, serhiy.storchaka priority: normal

[issue19189] Improve cross-references in pickle documentation.

2013-10-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is a patch which fixes internal references in the documentation of the pickle package. -- assignee: docs@python components: Documentation files: refs.pickle.patch keywords: patch messages: 199162 nosy: alexandre.vassalotti, docs@python, pitrou,

[issue18948] deliberately crashing tests should prevent core dumps

2013-10-07 Thread Zachary Ware
Zachary Ware added the comment: Here's a patch that combines Valerie's patch with a merged suppress_crash_popup and SuppressCoreFiles called SuppressCrashReport. Tests ok on Windows; I haven't been able to test on Unix yet. -- Added file: http://bugs.python.org/file31987/issue18948-c

[issue19187] Use a set for interned strings

2013-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note that the resizing heuristic is slightly different for sets and dicts, so a small-to-middle-size dict can sometimesbe smaller than a set of the same len(). However, for large dicts (>= 5) it seems the corresponding set is most always 66% smaller.

[issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed.

2013-10-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: We are both talking about 2.7 httplib.HTTPResponse.fileno. I should have said that users should try: ...fileno(); except AttributeError rather than ValueError. Any caller can understand AttributeError as well as ValueError or any other exception. It is not an

[issue3430] httplib.HTTPResponse documentations inconsistent

2013-10-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Docs are still as deficient in 3.3, and so I presume in 3.4. Part of the discrepancy between the first two lists is that data attributes msg, version, status, and reason are instance-only attributes. #19154 is (now) about improving fileno doc. That, some other

[issue19188] Add PySet_CheckExact()

2013-10-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: There are PyFrozenSet_CheckExact() and PyAnySet_CheckExact() but there is no PySet_CheckExact(). Perhaps we should add it for consistency. -- components: Interpreter Core messages: 199157 nosy: christian.heimes, pitrou, rhettinger, serhiy.storchaka

[issue19187] Use a set for interned strings

2013-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Dict has a special case for string keys. Is set have such optimization? Yes (see set_lookkey_unicode). -- ___ Python tracker ___

[issue19187] Use a set for interned strings

2013-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Dict has a special case for string keys. Is set have such optimization? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue19187] Use a set for interned strings

2013-10-07 Thread Antoine Pitrou
New submission from Antoine Pitrou: This is a simple enhancement that may reduce memory consumption by a bit (unfortunately, this is difficult to measure using standard tools). -- components: Interpreter Core files: setintern.patch keywords: patch messages: 199154 nosy: haypo, pitrou pr

[issue16129] No good way to set 'PYTHONIOENCODING' when embedding python.

2013-10-07 Thread Bastien Montagne
Bastien Montagne added the comment: Updated patch (mostly from Brecht's remarks, removed an obvious bug...) -- Added file: http://bugs.python.org/file31985/setstdio.diff ___ Python tracker _

[issue18758] Fix internal references in the documentation

2013-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes. I have 180 Kb patch which touches 107 files, and this is yet too large for one issue. I will continue split this patch for lesser issues. -- ___ Python tracker

[issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates

2013-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated whatsnew and Misc/ files. -- Added file: http://bugs.python.org/file31984/utf_16_32_surrogates_4.patch ___ Python tracker ___

[issue19178] Entries for "module" and "package" in glossary

2013-10-07 Thread Eric Snow
Eric Snow added the comment: They are defined in the Python 3 glossary [1], so I expect it just a matter of backporting those entries. [1] http://docs.python.org/3/glossary.html -- nosy: +eric.snow versions: -Python 3.3, Python 3.4 ___ Python track

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-07 Thread Christian Heimes
Christian Heimes added the comment: Sure it does. The test for unaligned hashing passes without an error or a segfault. -- ___ Python tracker ___ ___

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > The test for unaligned hashing passes without an error or a segfault. On some platforms it can work without a segfault. -- ___ Python tracker _

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And note that the quality of the FNV hash function is reduced (msg186403). We need "shuffle" result's bits. -- ___ Python tracker ___ ___

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since hash algorithm determined at compile time, the _Py_HashSecret_t structure and the _Py_HashSecret function are redundant. We need define only the _Py_HashBytes function. Currently SipHash algorithm doesn't work with unaligned data. --

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I propose extract all hash related stuff from Include/object.h in separated file Include/pyhash.h. And perhaps move Objects/hash.c to Python/pyhash.c. -- nosy: +serhiy.storchaka ___ Python tracker

[issue19186] expat symbols should be namespaced in pyexpat again

2013-10-07 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue19186] expat symbols should be namespaced in pyexpat again

2013-10-07 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: +christian.heimes, fdrake stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset c960bed22bf6 by Christian Heimes in branch 'default': Make Nick BDFG delegate http://hg.python.org/peps/rev/c960bed22bf6 -- nosy: +python-dev ___ Python tracker __

[issue19186] expat symbols should be namespaced in pyexpat again

2013-10-07 Thread AThompson
New submission from AThompson: The issue with confliciting expat versions has poped up again in python 3. http://bugs.python.org/issue1295808 It looks like the fix for this was removed when upgrading to expat 2.1 in http://hg.python.org/cpython/rev/e4dc8be9a72f on Sat, 14 Jul 2012 14:12:35

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-07 Thread Christian Heimes
Christian Heimes added the comment: unmodified Python: 1000 loops, best of 3: 307 usec per loop (unicode) 1000 loops, best of 3: 930 usec per loop (memoryview) SipHash: 1000 loops, best of 3: 300 usec per loop (unicode) 1000 loops, best of 3: 906 usec per loop (memoryview) -- ___

[issue19070] In place operators of weakref.proxy() not returning self.

2013-10-07 Thread Graham Dumpleton
Graham Dumpleton added the comment: The __del__() method is generally something to be avoided. As this is a design issue with how you are doing things, I would suggest you move the discussion to: https://groups.google.com/forum/#!forum/comp.lang.python You will no doubt get many suggestions th

[issue19075] Add sorting algorithm visualization to turtledemo

2013-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > What are the requirements (if any) to get something added to demos? Nothing much AFAIK, except that someone must be willing to maintain the code. -- nosy: +pitrou versions: +Python 3.4 ___ Python tracker

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Your benchmark is a bit unrealistic because it times the hash cache > most of the time. Here is a better benchmark (but bytes-only): > > $ ./python -m timeit -s "words=[w.encode('utf-8') for line in > open('../LICENSE') for w in line.split()]; import collectio

[issue19070] In place operators of weakref.proxy() not returning self.

2013-10-07 Thread shishkander
shishkander added the comment: @grahamd Well, I read the PEP for weakproxy and python doc on weakref library, and I got an impression that weakproxy is really like a weak pointer in C++: i can pass it around as it was a strong pointer, and get an exception if actual object has been deleted. We

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-07 Thread Christian Heimes
Christian Heimes added the comment: Your benchmark is a bit unrealistic because it times the hash cache most of the time. Here is a better benchmark (but bytes-only): $ ./python -m timeit -s "words=[w.encode('utf-8') for line in open('../LICENSE') for w in line.split()]; import collections" --

[issue19185] Allow multiprocessing Pool initializer to return values

2013-10-07 Thread Richard Oudkerk
Richard Oudkerk added the comment: I think "misuse" is an exageration. Various functions change some state and return a value that is usually ignored, e.g. os.umask(), signal.signal(). > Global variables usage is a pattern which might lead to code errors and many > developers discourage from

[issue19070] In place operators of weakref.proxy() not returning self.

2013-10-07 Thread Graham Dumpleton
Graham Dumpleton added the comment: The proxy is intended as a wrapper around an object, it is not intended to merge in some way with the wrapped object. The wrapped object shouldn't really ever be aware that it was being accessed via a proxy. Thus the expectation that the 'self' attribute of

[issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed.

2013-10-07 Thread Florent Viard
Florent Viard added the comment: Hi Terry, I think you misunderstood what i was trying to say. Maybe fileno should raise a ValueError (and not -1) in that case. That is the question. It should only be able to be something understood by "select.select". But currently it is an Bug/Crash as the cas

[issue19070] In place operators of weakref.proxy() not returning self.

2013-10-07 Thread shishkander
shishkander added the comment: @grahamd In short, instead of this: $ python t.py => => I expected to get this (note the second line): => => I pass the proxy to the test() function, and I expect the argument inside the function to be a proxy. And that works - the type of obj in test()

[issue19070] In place operators of weakref.proxy() not returning self.

2013-10-07 Thread Graham Dumpleton
Graham Dumpleton added the comment: @shishkander I can't see how what you are talking about has got anything to do with the issue with in place operators. The results from your test script are expected and normal. What result are you expecting? The one thing you cannot override in Python is w