[issue19427] enhancement: dictionary maths

2013-10-28 Thread Georg Brandl
Georg Brandl added the comment: This specialized use case has no chance of being added to the very general dict object. But have a look at the collections.Counter class which does exactly what you propose for positive values and the +/- operations. -- nosy: +georg.brandl

[issue19427] enhancement: dictionary maths

2013-10-28 Thread R. David Murray
R. David Murray added the comment: In the meantime the issue should be closed. It can be reopened if consensus is reached. -- nosy: +r.david.murray resolution: -> postponed stage: -> committed/rejected status: open -> closed ___ Python tracker

[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)

2013-10-28 Thread Eric Snow
Eric Snow added the comment: This time against tip. :) I should also point out that this patch is on top of the path in issue19413. -- Added file: http://bugs.python.org/file32408/modulespec-primary-changes.diff ___ Python tracker

[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)

2013-10-28 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file32407/modulespec-primary-changes.diff ___ Python tracker ___ ___ Python-bugs-l

[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)

2013-10-28 Thread Eric Snow
Eric Snow added the comment: Here's an updated patch that implements the meat of the current PEP. Docs are still lacking and I could probably add a few more tests. Other key things left to do: * deprecations and removals * refactor importlib finders and loaders to use the new Finder/Loader A

[issue17762] platform.linux_distribution() should honor /etc/os-release

2013-10-28 Thread Andrei Dorian Duma
Andrei Dorian Duma added the comment: Yes, I will provide a patch including tests soon. -- ___ Python tracker ___ ___ Python-bugs-list

[issue18964] test_tcl fails when _tkinter linked with Tcl 8.4

2013-10-28 Thread Georg Brandl
Georg Brandl added the comment: Should be done. -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue18408] Fixes crashes found by pyfailmalloc

2013-10-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 549cd815bf8d by Victor Stinner in branch 'default': Issue #18408: Fix error handling in PyBytes_FromObject() http://hg.python.org/cpython/rev/549cd815bf8d New changeset 9d9371d4ff7b by Victor Stinner in branch 'default': Issue #18408: Fix bytearrayi

[issue19413] Reload semantics changed unexpectedly in Python 3.3

2013-10-28 Thread Eric Snow
Changes by Eric Snow : Removed file: http://bugs.python.org/file32385/reload-semantics.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue19413] Reload semantics changed unexpectedly in Python 3.3

2013-10-28 Thread Eric Snow
Eric Snow added the comment: Here's an updated patch. -- Added file: http://bugs.python.org/file32406/reload-semantics.diff ___ Python tracker ___ ___

[issue18408] Fixes crashes found by pyfailmalloc

2013-10-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4749c3ac0654 by Victor Stinner in branch 'default': Issue #18408: Fix iobase_readline(), handle PyByteArray_Resize() failure http://hg.python.org/cpython/rev/4749c3ac0654 -- ___ Python tracker

[issue19429] OSError constructor does not handle errors correctly

2013-10-28 Thread STINNER Victor
New submission from STINNER Victor: Using failmalloc project to inject MemoryError, I found a reference counter issue in OSError constructor. args parameter passed to OSError_new() becomes invalid when OSError constructor fails. I don't yet where is the bug exactly. Traces when the bug occur

[issue19428] marshal: error cases are not documented

2013-10-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 11958c69a4b2 by Victor Stinner in branch 'default': Issue #19428: zipimport now handles errors when reading truncated or invalid http://hg.python.org/cpython/rev/11958c69a4b2 -- nosy: +python-dev ___ Pyth

[issue18408] Fixes crashes found by pyfailmalloc

2013-10-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset e1d51c42e5a1 by Victor Stinner in branch 'default': Issue #18408: Fix PyUnicode_AsUTF8AndSize(), raise MemoryError exception on http://hg.python.org/cpython/rev/e1d51c42e5a1 New changeset 7f4a976829f1 by Victor Stinner in branch 'default': Issue #18

[issue19428] marshal: error cases are not documented

2013-10-28 Thread STINNER Victor
New submission from STINNER Victor: Since changeset 4059e871e74e (issue #19219), it becomes more clear in the source code that reading data from marshal can fail. It was already true in Python 3.3, but less explicit. Failures are not documented in Doc/c-api/marshal.rst. Failures are not teste

[issue18408] Fixes crashes found by pyfailmalloc

2013-10-28 Thread STINNER Victor
STINNER Victor added the comment: Ok, most critical bugs have been fixed. If I find new bugs, I will open new issues. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue18408] Fixes crashes found by pyfailmalloc

2013-10-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4ef4578db38a by Victor Stinner in branch 'default': Issue #18408: Add a new PyFrame_FastToLocalsWithError() function to handle http://hg.python.org/cpython/rev/4ef4578db38a -- ___ Python tracker

[issue4331] Add functools.partialmethod

2013-10-28 Thread alon horev
alon horev added the comment: Adding a patch with tests and documentation. Please feel free to comment on anything: my English, coding/testing style. I'm pretty sure the documentation can be better but it turns out I speak better Python than English. Two decisions I've made and unsure of: 1.

[issue18509] CJK decoders should return MBERR_EXCEPTION on PyUnicodeWriter error

2013-10-28 Thread STINNER Victor
STINNER Victor added the comment: I should now be fixed. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Py

[issue18509] CJK decoders should return MBERR_EXCEPTION on PyUnicodeWriter error

2013-10-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset f63d34cd3714 by Victor Stinner in branch 'default': Issue #18509: handle PyUnicode_Writer() error http://hg.python.org/cpython/rev/f63d34cd3714 -- nosy: +python-dev ___ Python tracker

[issue19425] multiprocessing.Pool.map hangs if pickling argument raises an exception

2013-10-28 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue19425] multiprocessing.Pool.map hangs if pickling argument raises an exception

2013-10-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6aa42fc0c2f6 by Richard Oudkerk in branch '2.7': Issue #19425 -- a pickling error should not cause pool to hang. http://hg.python.org/cpython/rev/6aa42fc0c2f6 New changeset a2230a8420a5 by Richard Oudkerk in branch '3.3': Issue #19425 -- a pickling

[issue19413] Reload semantics changed unexpectedly in Python 3.3

2013-10-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue19427] enhancement: dictionary maths

2013-10-28 Thread Eric V. Smith
Eric V. Smith added the comment: I suggest you get consensus on this idea on the python-ideas mailing list first. -- nosy: +eric.smith ___ Python tracker ___

[issue10734] test_ttk test_heading_callback fails with newer Tk 8.5

2013-10-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue18964] test_tcl fails when _tkinter linked with Tcl 8.4

2013-10-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue19427] enhancement: dictionary maths

2013-10-28 Thread Richard Neill
New submission from Richard Neill: It would be really nice if python supported mathematical operations on dictionaries. This is widely requested (eg lots of stackoverflow queries), but there's currently no simple way to do it. I propose that this should work in the "obvious" way, i.e. for ever

[issue17441] Do not cache re.compile

2013-10-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue17762] platform.linux_distribution() should honor /etc/os-release

2013-10-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue19410] Restore empty string special casing in importlib.machinery.FileFinder

2013-10-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue19424] _warnings: patch to avoid conversions from/to UTF-8

2013-10-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue19421] FileIO destructor imports indirectly the io module at exit

2013-10-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue19385] dbm.dumb should be consistent when the database is closed

2013-10-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue19426] Opening a file in IDLE causes a crash or hang

2013-10-28 Thread Ned Deily
New submission from Ned Deily: Using current IDLE in 2.7 tip (as in 2.7.6rc1), selecting a file to open in the IDLE menu or on the command line cause IDLE to either (depending on the platform and invocation) crash or hang due to an uncaught exception in idlelib/IOBinding.py: /usr/local/bin/id

[issue19229] operator.py: move the Python implementation in the else block of try/except ImportError

2013-10-28 Thread STINNER Victor
STINNER Victor added the comment: Without the patch: $ ./python -m timeit "import sys; modname='operator'" "__import__(modname); del sys.modules[modname]" 1000 loops, best of 3: 289 usec per loop $ ./python -m timeit "import sys; modname='_operator'" "__import__(modname); del sys.modules[mod

[issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots

2013-10-28 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue19418] audioop.c giving signed/unsigned warnings on Windows

2013-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue19229] operator.py: move the Python implementation in the else block of try/except ImportError

2013-10-28 Thread STINNER Victor
STINNER Victor added the comment: > Another option is to add a _pyoperator module. Attached builtin_operator.patch patch implements this option: operator.c becomes the main operator module, _pyoperator is the pure Python implementation (don't use "from _operator import *" anymore). With the p

[issue19229] operator.py: move the Python implementation in the else block of try/except ImportError

2013-10-28 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file32404/builtin_operator_diff.patch ___ Python tracker ___ ___ Python-bugs-li

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is simplified version of the patch. 19427e9cc500.diff: 22 files changed, 746 insertions(+), 211 deletions(-), 28 modifications(!) 19427e9cc500-simplified.diff: 21 files changed, 486 insertions(+), 67 deletions(-), 27 modifications(!) -- Added f

[issue19425] multiprocessing.Pool.map hangs if pickling argument raises an exception

2013-10-28 Thread Nadeem Vawda
New submission from Nadeem Vawda: [Split off from issue 19395] The following code hangs after hitting a TypeError trying to pickle one of the TextIOWrapper objects: import multiprocessing def read(f): return f.read() files = [open(path) for path in 3 * ['/dev/null']] pool = mu

[issue19395] unpickled LZMACompressor is crashy

2013-10-28 Thread Nadeem Vawda
Nadeem Vawda added the comment: The part of this issue specific to LZMACompressor should now be fixed; I've filed issue 19425 for the issue with Pool.map hanging. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___

[issue19418] audioop.c giving signed/unsigned warnings on Windows

2013-10-28 Thread Tim Golden
Changes by Tim Golden : Removed file: http://bugs.python.org/file32400/issue19418.diff ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue19418] audioop.c giving signed/unsigned warnings on Windows

2013-10-28 Thread Tim Golden
Tim Golden added the comment: Good point. Updated patch. -- Added file: http://bugs.python.org/file32401/issue19418.2.diff ___ Python tracker ___

[issue16286] Use hash if available to optimize a==b and a!=b for bytes and str

2013-10-28 Thread STINNER Victor
STINNER Victor added the comment: """ (4) str in __all__ (list of str): os.py: if "putenv" not in __all__: __all__.append("putenv") """ For this example: "putenv" is probably interned by "def putenv(...)". "putenv" string and the name of the function are the same constant. When a

[issue19395] unpickled LZMACompressor is crashy

2013-10-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset be363c1e94fe by Nadeem Vawda in branch '3.3': #19395: Raise exception when pickling a (BZ2|LZMA)(Compressor|Decompressor). http://hg.python.org/cpython/rev/be363c1e94fe New changeset b9df25608ad0 by Nadeem Vawda in branch 'default': #19395: Raise ex

[issue19418] audioop.c giving signed/unsigned warnings on Windows

2013-10-28 Thread STINNER Victor
STINNER Victor added the comment: You should add a comment to explain why the trick is required (because of compilers not supporting -0x8000 literal without a warning). -- nosy: +haypo ___ Python tracker _

[issue17936] O(n**2) behaviour when adding/removing classes

2013-10-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file32399/subclasses_dict2.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue19418] audioop.c giving signed/unsigned warnings on Windows

2013-10-28 Thread Tim Golden
Tim Golden added the comment: The attached patch (using Tim Peters' -1 trick) builds & tests ok on Win32/64 & Linux 32. -- Added file: http://bugs.python.org/file32400/issue19418.diff ___ Python tracker __

[issue19418] audioop.c giving signed/unsigned warnings on Windows

2013-10-28 Thread Tim Golden
Changes by Tim Golden : Removed file: http://bugs.python.org/file32390/audioop.diff ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue17936] O(n**2) behaviour when adding/removing classes

2013-10-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: For the record, an updated patch. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue16286] Use hash if available to optimize a==b and a!=b for bytes and str

2013-10-28 Thread STINNER Victor
STINNER Victor added the comment: Let's try to identify some use cases in the Python test suite using gdb: (gdb) b unicode_compare_eq (gdb) condition 1 ((PyASCIIObject*)str1)->hash != -1 && ((PyASCIIObject*)str2)->hash != -1 && ((PyASCIIObject*)str1)->hash != ((PyASCIIObject*)str2)->hash (gd

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-10-28 Thread Guido van Rossum
Guido van Rossum added the comment: @grahamd: I occasionally have felt the pain of wrapping @classmethod (or @staticmethod). Never enough though to think of how to fix it. I really don't have the stomach to review your wrapt library, but your code looks okay except for style and missing tests.

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file32398/b8d39bf9ca4a.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue16286] Use hash if available to optimize a==b and a!=b for bytes and str

2013-10-28 Thread STINNER Victor
STINNER Victor added the comment: >> That raises the question of what strings ever have had their hash >> already computed if the string hasn't been interned or has been used >> in a dict or set? > > Currently, none, I think. Strings are used (and compared) outside dict and set. -- ___

[issue16286] Use hash if available to optimize a==b and a!=b for bytes and str

2013-10-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: > That raises the question of what strings ever have had their hash > already computed if the string hasn't been interned or has been used > in a dict or set? Currently, none, I think. -- nosy: +pitrou ___ Python tra

[issue19421] FileIO destructor imports indirectly the io module at exit

2013-10-28 Thread STINNER Victor
STINNER Victor added the comment: +PyErr_SetString(PyExc_ImportError, "__import__ blocked Python finalization"); Oops, I forgot "during" word before Python finalization. "import" is maybe less surprising than "__import__". -- ___ Python

[issue19421] FileIO destructor imports indirectly the io module at exit

2013-10-28 Thread STINNER Victor
STINNER Victor added the comment: "Again, I don't think this is a good patch. If you want to disable module imports during shutdown, it should be done inside the import machinery, not duplicated at every call site." Ah sorry, I misunderstood your previous comment. I agree that traceback_fina

[issue19421] FileIO destructor imports indirectly the io module at exit

2013-10-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2d802765d31f by Victor Stinner in branch 'default': Issue #19421: add an unit test for warnings.warn() during finalization http://hg.python.org/cpython/rev/2d802765d31f -- ___ Python tracker

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think Christian is right here. Hashing unaligned memory areas will happen quite rarely. It should work, but it doesn't have to be as fast as the common case. -- ___ Python tracker

[issue19421] FileIO destructor imports indirectly the io module at exit

2013-10-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Again, I don't think this is a good patch. If you want to disable module imports during shutdown, it should be done inside the import machinery, not duplicated at every call site. (but I don't necessarily agree that it's a good idea, either) -- __

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-28 Thread Christian Heimes
Christian Heimes added the comment: The code in your example uses volatile. That prevents lots of compiler optimizations. In my experience compilers and CPU do a better optimization job than humans until the human factor interferes with the compiler. Even 40% might not be slower than calling m

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-28 Thread Christian Heimes
Christian Heimes added the comment: Am 28.10.2013 18:15, schrieb Serhiy Storchaka: > _PyHash_Fini() should be moved out too._Py_HashBytes() is only function which > should be customized. You still haven' convinced me to scatter hash-related functions over multiple C files. And it won't work wit

[issue19421] FileIO destructor imports indirectly the io module at exit

2013-10-28 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 1bbedfb20932 by Victor Stinner in branch 'default': > Issue #19421: fix a check in warnings.warn() to be able to use it during > Python > http://hg.python.org/cpython/rev/1bbedfb20932 Without this fix, the following script crashs with an asserti

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-28 Thread Charles-François Natali
Charles-François Natali added the comment: >> Well, unaligned memory access is usually slower on all architectures :-) >> Also, I think some ARM architectures don't support unaligned access, so >> it's not really a thing of the past... > > On modern computers it's either not slower or just a tiny

[issue19421] FileIO destructor imports indirectly the io module at exit

2013-10-28 Thread STINNER Victor
STINNER Victor added the comment: Here is a patch to not import again the io module in _Py_DisplaySourceLine() if the module was unloaded. A simpler patch is to just return (don't check sys.modules) if _Py_Finalizing is set. Note: I also created issue #19424 to avoid conversion from/to UTF-8.

[issue19421] FileIO destructor imports indirectly the io module at exit

2013-10-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1bbedfb20932 by Victor Stinner in branch 'default': Issue #19421: fix a check in warnings.warn() to be able to use it during Python http://hg.python.org/cpython/rev/1bbedfb20932 -- nosy: +python-dev ___ P

[issue19424] _warnings: patch to avoid conversions from/to UTF-8

2013-10-28 Thread STINNER Victor
New submission from STINNER Victor: Attached patch removes usage of _PyUnicode_AsString() to not convert strings from/to UTF-8. -- components: Unicode files: warnings.patch keywords: patch messages: 201558 nosy: ezio.melotti, haypo priority: normal severity: normal status: open title: _

[issue19423] permutations len issue

2013-10-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: permutations() returns a generator. If you consume it with list(), the second time will return the empty list. Use list(permutations(...)) if you plan to use the result multiple times. -- nosy: +amaury.forgeotdarc resolution: -> invalid status: o

[issue19423] permutations len issue

2013-10-28 Thread Evgeny Luttsev
New submission from Evgeny Luttsev: Code: n = 2 perms = permutations(range(n), n) if list(perms) == [(0, 1), (1, 0)]: print("==") print("len(list(perms)):", len(list(perms))) Result: == len(list(perms)): 0 # SHOULD BE 2 -- components: Library (Lib) messages: 201556 nosy:

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Because you can't simple replace the files. Why not? This looks as simplest option when you build hard customized CPython. > It also contains _Py_HashBytes() and _PyHash_Fini(). _PyHash_Fini() should be moved out too._Py_HashBytes() is only function

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-28 Thread Christian Heimes
Christian Heimes added the comment: I have added an optimization for hashing of small strings. It uses an inline version of DJBX33A for small strings [1, 7) on 64bit and [1, 5) on 32bit. Nick, please use "create patch" before you do your review. --

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-28 Thread Christian Heimes
Christian Heimes added the comment: Am 28.10.2013 16:59, schrieb Charles-François Natali: > Well, unaligned memory access is usually slower on all architectures :-) > Also, I think some ARM architectures don't support unaligned access, so > it's not really a thing of the past... On modern comput

[issue19421] FileIO destructor imports indirectly the io module at exit

2013-10-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, then I don't think it's really a bug. We might want to define import rules at shutdown but "fixing" this particular case doesn't sound important. -- ___ Python tracker ___

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-28 Thread Charles-François Natali
Charles-François Natali added the comment: > Seriously, nobody gives a ... about SPARC and MIPS. :) It's nice that > Python still works on these CPU architectures. But I neither want to > deviate from the SipHash24 implementation nor make the code slower on > all relevant platforms such as X86 an

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-28 Thread Christian Heimes
Christian Heimes added the comment: Serhiy, I would like to land my patch before beta 1 hits the fan. We can always improve the code during beta. Right now I don't want to mess around with SipHash24 code. That includes non-64bit platforms as well as architectures that enforce aligned memory fo

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-28 Thread Christian Heimes
Christian Heimes added the comment: Am 28.10.2013 16:18, schrieb Serhiy Storchaka: > Christian, why PY_HASH_EXTERNAL is here? Do you plan use it any official > build? I think that in custom build of Python whole files pyhash.c and > pyhash.h can be replaced. Because you can't simple replace th

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Christian, why PY_HASH_EXTERNAL is here? Do you plan use it any official build? I think that in custom build of Python whole files pyhash.c and pyhash.h can be replaced. When you will get rid from PY_HASH_EXTERNAL, then you could get rid from PyHash_FuncDef

[issue19421] FileIO destructor imports indirectly the io module at exit

2013-10-28 Thread STINNER Victor
STINNER Victor added the comment: > Can you explain what the actual cause of the crash is? I modified locally my Python source code (I worked on a patch for PyFrame_LocalsToFast(), issue #18408), the crash was a bug in my code, it's unrelated to the issue. I opened an issue because I'm surpri

[issue19282] dbm.open should be a context manager

2013-10-28 Thread Claudiu.Popa
Claudiu.Popa added the comment: There is issue19385 for the inconsistency of dbm.dumb, with a patch. -- ___ Python tracker ___ ___ Pyt

[issue19410] Restore empty string special casing in importlib.machinery.FileFinder

2013-10-28 Thread Brett Cannon
Brett Cannon added the comment: Changeset #76184b5339f2 contains the commit Nick is referring to. -- ___ Python tracker ___ ___ Python

[issue19421] FileIO destructor imports indirectly the io module at exit

2013-10-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Can you explain what the actual cause of the crash is? Surely failing to import the "io" module shouldn't produce a fatal error. -- ___ Python tracker _

[issue17762] platform.linux_distribution() should honor /etc/os-release

2013-10-28 Thread Vajrasky Kok
Vajrasky Kok added the comment: Hi, Andrei. Could you provide the test? You could take a look at issue 17429 to see how it is done. http://bugs.python.org/issue17429 We would be grateful if you could test the case where os-release file is non-ascii encoded file (although technically it shoul

[issue19410] Restore empty string special casing in importlib.machinery.FileFinder

2013-10-28 Thread Nick Coghlan
Nick Coghlan added the comment: The PathFinder change is fine, this is about restoring the previous FileFinder behaviour. -- ___ Python tracker ___ __

[issue19410] Restore empty string special casing in importlib.machinery.FileFinder

2013-10-28 Thread Brett Cannon
Brett Cannon added the comment: Do you actually mean PathFinder or FileFinder (I'm fairly certain you mean the latter). -- ___ Python tracker ___ ___

[issue19422] Neither DTLS nor error for SSLSocket.sendto() of UDP socket

2013-10-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Agreed, this should definitely be fixed. -- components: +Library (Lib) -Extension Modules stage: -> needs patch ___ Python tracker ___

[issue14007] xml.etree.ElementTree - XMLParser and TreeBuilder's doctype() method missing

2013-10-28 Thread Eli Bendersky
Eli Bendersky added the comment: On Mon, Oct 28, 2013 at 6:00 AM, Martin Panter wrote: > > Martin Panter added the comment: > > The best way to work around it for me is just to ignore the warning. It > doesn’t really worry me that much, I only noticed it while porting a > program to Python 3 any

[issue14007] xml.etree.ElementTree - XMLParser and TreeBuilder's doctype() method missing

2013-10-28 Thread Martin Panter
Martin Panter added the comment: The best way to work around it for me is just to ignore the warning. It doesn’t really worry me that much, I only noticed it while porting a program to Python 3 anyway. So if you don’t want to touch the 2.7 branch I can live with that :) -- ___

[issue19407] PEP 453: update the "Installing Python Modules" documentation

2013-10-28 Thread Donald Stufft
Changes by Donald Stufft : -- nosy: +dstufft ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue19421] FileIO destructor imports indirectly the io module at exit

2013-10-28 Thread STINNER Victor
STINNER Victor added the comment: "show_warning() and/or _Py_DisplaySourceLine() should not try to display the Python line while Python is exiting. There is for example the flag _Py_Finalizing." Or PyImport_Import() should fail with an ImportError("block importing 'io' when python is exiting"

[issue19422] Neither DTLS nor error for SSLSocket.sendto() of UDP socket

2013-10-28 Thread Christian Heimes
Christian Heimes added the comment: I think either sendto() or wrap_socket() should raise some kind of error for UDP instead of silently sending unencrypted data. -- nosy: +giampaolo.rodola, janssen, pitrou ___ Python tracker

[issue19422] Neither DTLS nor error for SSLSocket.sendto() of UDP socket

2013-10-28 Thread Christian Heimes
New submission from Christian Heimes: Python's SSL module doesn't support DTLS (datagram TLS for UDP). The SSL code doesn't complain when an UDP socket is wrapped in a SSL socket. It happily sends the bytes unprotected and not encrypted over the wire: >>> import ssl, socket >>> sock = socket.s

[issue19421] FileIO destructor imports indirectly the io module at exit

2013-10-28 Thread STINNER Victor
STINNER Victor added the comment: By the way, the filename of the warning is not really useful. Example script test.py: - f = open(__file__) - At exit, Python displays: - sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='t

[issue14007] xml.etree.ElementTree - XMLParser and TreeBuilder's doctype() method missing

2013-10-28 Thread Eli Bendersky
Eli Bendersky added the comment: Martin, do you see a way to work around the problem? I'm not sure it's serious enough to warrant committing to the 2.7.x branch at this point. -- ___ Python tracker __

[issue19421] FileIO destructor imports indirectly the io module at exit

2013-10-28 Thread STINNER Victor
New submission from STINNER Victor: Since Python 3.3, when an unclosed file is destroyed, a warning is emitted. Good. The problem is when the warning is emitted after the io has been unloaded: in this case, the warning will try to reload the io module to display the Python line where the warn

[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-28 Thread Nick Coghlan
Nick Coghlan added the comment: On 27 Oct 2013 23:46, "Christian Heimes" wrote: > > > Christian Heimes added the comment: > > Nick, please review the latest patch. I have addressed Antoine's review in 257597d20fa8.diff. I'll update the PEP as soon as you are happy with the patch. Comments from

[issue16427] Faster hash implementation

2013-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since issue19183 supersedes it, yes. -- resolution: -> duplicate stage: patch review -> committed/rejected status: open -> closed superseder: -> PEP 456 Secure and interchangeable hash algorithm ___ Python tracker

[issue19420] Leak in _hashopenssl.c

2013-10-28 Thread Christian Heimes
Christian Heimes added the comment: 2.7 isn't affected. It's not a security issue which means I'm not going to apply it to 3.2. -- versions: +Python 3.3, Python 3.4 ___ Python tracker _

[issue19420] Leak in _hashopenssl.c

2013-10-28 Thread Christian Heimes
Christian Heimes added the comment: Which Python versions are affected? -- assignee: -> christian.heimes components: +Extension Modules nosy: +christian.heimes stage: -> patch review type: -> resource usage ___ Python tracker

  1   2   >