[issue12029] Catching virtual subclasses in except clauses

2015-10-21 Thread R. David Murray
R. David Murray added the comment: Note from discussion on duplicate issue 25448: when this is fixed, the try/except documentation should be updated to indicate that the except clause test is equivalent to 'issubclass', so that the handling of virtual subclasses are implied by the doc. (The

[issue25453] Arithmetics with complex infinities is inconsistent with C/C++

2015-10-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: I'm not entirely satisfied that the way it is calculated by C++11/C99 is correct. (Although I can see the appeal of the C version.) Mathematically, complex multiplication (a+bj)*x should be identical to (a+bj)*(x+0j), but obviously in the presence of NANs

[issue25453] Arithmetics with complex infinities is inconsistent with C/C++

2015-10-21 Thread Francesco Biscani
Francesco Biscani added the comment: The best reference I could find so far is in the C99 standard: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf Annex G is titled "IEC 60559-compatible complex arithmetic". In G.3.1 it is written: """ A complex or imaginary value with at least

[issue24379] operator.subscript

2015-10-21 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- priority: normal -> high ___ Python tracker ___

[issue25210] Special-case NoneType() in do_richcompare()

2015-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c7dd88cd0c5 by Berker Peksag in branch 'default': Issue #25210: Add some basic tests for the new exception message https://hg.python.org/cpython/rev/5c7dd88cd0c5 -- ___ Python tracker

[issue25453] Arithmetics with complex infinities is inconsistent with C/C++

2015-10-21 Thread Eric V. Smith
Eric V. Smith added the comment: Saksham: Also, it would be best to take this discussion of how to produce a patch to the python-committers mailing list: https://mail.python.org/mailman/listinfo/python-committers -- ___ Python tracker

[issue25449] Test OrderedDict subclass

2015-10-21 Thread Eric Snow
Eric Snow added the comment: Regarding dict.__setitem__, see issue #24726. Raymond outlined what needs to be fixed. -- ___ Python tracker ___

[issue25453] Arithmetics with complex infinities is inconsistent with C/C++

2015-10-21 Thread Saksham Agrawal
Saksham Agrawal added the comment: I read the first 6 chapters of the devguide. Now how should I proceed. -- ___ Python tracker ___

[issue24379] operator.subscript

2015-10-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: This is causing a reference leak problem: https://mail.python.org/pipermail/python-dev/2015-October/141993.html -- resolution: fixed -> status: closed -> open ___ Python tracker

[issue25449] Test OrderedDict subclass

2015-10-21 Thread Eric Snow
Changes by Eric Snow : -- stage: commit review -> patch review ___ Python tracker ___

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-10-21 Thread Eric Snow
Eric Snow added the comment: FTR, this will likely involve more than just fixing odict_repr(). -- ___ Python tracker ___

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-10-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue25453] Arithmetics with complex infinities is inconsistent with C/C++

2015-10-21 Thread Eric V. Smith
Eric V. Smith added the comment: Saksham: First we need our "experts" to decide what, if any, change is needed. If we decide that a change is needed, at that point we'd look at a patch. -- ___ Python tracker

[issue25453] Arithmetics with complex infinities is inconsistent with C/C++

2015-10-21 Thread Berker Peksag
Berker Peksag added the comment: > Also, it would be best to take this discussion of how to produce a patch to > the python-committers mailing list: or the core-mentorship list: https://mail.python.org/mailman/listinfo/core-mentorship :) -- nosy: +berker.peksag

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2015-10-21 Thread Berker Peksag
Berker Peksag added the comment: The attached patch(cgi.patch) doesn't fix the problem for me: cgi-bug.py still fails with a TypeError. Here is a patch with a test to fix the problem. With issue20504.diff applied: $ ./python t.py 5 (Only changed the "assert len(fields["my-arg"].file.read())

[issue25417] Minor typo in Path.samefile docstring

2015-10-21 Thread Berker Peksag
Berker Peksag added the comment: Fixed, thank you Antony. -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue25453] Arithmetics with complex infinities is inconsistent with C/C++

2015-10-21 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +tim.peters ___ Python tracker ___ ___

[issue25417] Minor typo in Path.samefile docstring

2015-10-21 Thread Antony Lee
Antony Lee added the comment: Actually there's also an extra dot at the end of the first line of the docstring (redundant with the one on the second line). -- ___ Python tracker

[issue25453] Arithmetics with complex infinities is inconsistent with C/C++

2015-10-21 Thread Eric V. Smith
Eric V. Smith added the comment: > Berker Peksag added the comment: > >> Also, it would be best to take this discussion of how to produce a patch to >> the python-committers mailing list: > > or the core-mentorship list: > https://mail.python.org/mailman/listinfo/core-mentorship :) Argh!

[issue25453] Arithmetics with complex infinities is inconsistent with C/C++

2015-10-21 Thread Mark Dickinson
Mark Dickinson added the comment: Changing Python versions and issue type: the current behaviour is certainly deliberate, so a proposal to change it would be a feature request, which could only land in Python 3.6 or later. -- type: behavior -> enhancement versions: -Python 2.7,

[issue25453] Arithmetics with complex infinities is inconsistent with C/C++

2015-10-21 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the update. I'm not too worried about performance: I suspect that any additional overhead would be lost in the overhead of the Python machinery. It would be worth profiling to check, of course, before any change went in. I'd expect that most

[issue25417] Minor typo in Path.samefile docstring

2015-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7d65be20e0d8 by Berker Peksag in branch '3.5': Issue #25417: Fix typo in Path.samefile() docstring https://hg.python.org/cpython/rev/7d65be20e0d8 New changeset 0b09a866da77 by Berker Peksag in branch 'default': Issue #25417: Fix typo in

[issue25449] Test OrderedDict subclass

2015-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New patch adds PurePythonOrderedDictSubclassTests, moves all tests except test_key_change_during_iteration from CPythonOrderedDictTests to OrderedDictTests to test Python implementation too, fixes a bug in values and items iteration that caused

[issue25454] operator.methodcaller should accept additional arguments during the call

2015-10-21 Thread Evgeny Kapun
New submission from Evgeny Kapun: Currently, operator.methodcaller behaves like this: def methodcaller(name, *args, **kwargs): def caller(obj): return getattr(obj, name)(*args, **kwargs) return caller That is, it is possible to supply arguments when the object

[issue25453] Arithmetics with complex infinities is inconsistent with C/C++

2015-10-21 Thread Mark Dickinson
Mark Dickinson added the comment: If the proposal is to add C99 Appendix G-style handling of nan+nanj results for complex multiplication, that doesn't seem unreasonable to me, though I'm not particularly convinced that the gain in complexity is worth it. So -0 from me. Whatever happens, I'd

[issue25453] Arithmetics with complex infinities is inconsistent with C/C++

2015-10-21 Thread Francesco Biscani
Francesco Biscani added the comment: Hi Mark, the original code is C++, and the inf + nanj result can be reproduced by the following snippet: """ #include #include int main(int argc, char * argv[]) { std::cout << std::complex(3,0) / 0. << '\n'; return 0; } """ Here is the C99 version:

[issue25455] Some repr implementations don't check for self-referential structures

2015-10-21 Thread Evgeny Kapun
New submission from Evgeny Kapun: Implementations of repr for some of the types in the standard library doesn't check for self-referential structures. As a result, when calling repr() on such objects, Python crashes due to infinite recursion. Example: >>> import functools >>> x =

[issue25450] Python 3.5 starts in C:\Windows\system32 as current directory

2015-10-21 Thread Steve Dower
Changes by Steve Dower : -- assignee: -> steve.dower ___ Python tracker ___ ___

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: __repr__() allocates a list with the size len(od) and fills it iterating linked list. If the size of linked list is less then the size of the dict, the rest of the list is not initialized. Even worse things happened when the size of linked list is greater

[issue24782] Merge 'configure extensions' into main IDLE config dialog

2015-10-21 Thread Mark Roseman
Mark Roseman added the comment: The extra width appears to be coming from the canvas inside VerticalScrolledFrame; the canvas gets the default size and the frame adjusts to fit its contents (the canvas and the scrollbar). If you really want to reduce the size, add a "-width" option where that

[issue25417] Minor typo in Path.samefile docstring

2015-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 642a7be9f384 by Berker Peksag in branch '3.5': Issue #25417: Remove the extra dot from docstring https://hg.python.org/cpython/rev/642a7be9f384 New changeset 4cd2ae001d30 by Berker Peksag in branch 'default': Issue #25417: Remove the extra dot from

[issue23981] Update test_unicodedata.py to use script_helpers

2015-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset fbd83224e132 by Berker Peksag in branch '3.5': Issue #23981: Update test_unicodedata to use script_helpers https://hg.python.org/cpython/rev/fbd83224e132 New changeset 6315abbf5f71 by Berker Peksag in branch 'default': Issue #23981: Update

[issue23981] Update test_unicodedata.py to use script_helpers

2015-10-21 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Christie. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-10-21 Thread Nan Wu
Nan Wu added the comment: Updated the patch. The typo was fixed too. Thanks for the catching. -- Added file: http://bugs.python.org/file40831/htmllib_deprecation_warning_2.patch ___ Python tracker

[issue25453] Arithmetics with complex infinities is inconsistent with C/C++

2015-10-21 Thread Ezio Melotti
Ezio Melotti added the comment: Saksham, if you would like to work on this issue you can check the devguide for more information. -- components: +Interpreter Core nosy: +eric.smith, ezio.melotti, lemburg, mark.dickinson, stutzbach versions: +Python 3.4, Python 3.5, Python 3.6 -Python

[issue25446] smtplib.py AUTH LOGIN code messed up sending login and password data since 3.5

2015-10-21 Thread R. David Murray
R. David Murray added the comment: Thanks, but special-casing login in the 'auth' method means that the auth method isn't working right, since special-casing defeats the whole purpose of the auth mechanism. I think we need to change the logic in auth so that it is checking for a 334 even if

[issue14373] C implementation of functools.lru_cache

2015-10-21 Thread Matt Joiner
Changes by Matt Joiner : -- nosy: -anacrolix ___ Python tracker ___ ___

[issue25452] Add __bool__() method to subprocess.CompletedProcess

2015-10-21 Thread Richard Neumann
New submission from Richard Neumann: The class subprocess.CompletedProcess is currently lacking a __bool__() method. It might be a practical feature to have the possibility to evaluate a CompletedProcess instance in an if/else block without the necessity to handle the exception raised by

[issue25453] Arithmetics with complex infinities is inconsistent with C/C++

2015-10-21 Thread Francesco Biscani
New submission from Francesco Biscani: The C++11/C99 standards define a complex infinity as a complex number in which at least one of the components is inf. Consider the Python snippet: >>> complex(float('inf'),float('nan'))*2 (nan+nanj) This happens because complex multiplication in Python

[issue25453] Arithmetics with complex infinities is inconsistent with C/C++

2015-10-21 Thread Saksham Agrawal
Saksham Agrawal added the comment: Hi Would like to work on this bug...but I am new, would like some guidance Please help me -- nosy: +Saksham Agrawal ___ Python tracker

[issue25449] Test OrderedDict subclass

2015-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch was not ready for commit. The problem is that test_issue24347 fails in CPythonOrderedDictSubclassTests. The failure is random, you need to run test several times to encounter it. Experimenting with this test I found other bug probably related to

[issue25450] Python 3.5 starts in C:\Windows\system32 as current directory

2015-10-21 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- title: IDLE: Save path automatically choses C:\Windows\system32 -> Python 3.5 starts in C:\Windows\system32 as current directory versions: +Python 3.6 ___ Python tracker

[issue25450] Python 3.5 starts in C:\Windows\system32 as current directory

2015-10-21 Thread eryksun
eryksun added the comment: > 'Start in:' is blank and for what ever reason, the default is ...system32. When the "Start in" field of a .lnk shortcut is blank, the child process inherits the working directory of the parent process (i.e. the process that runs the shortcut), unless the parent

[issue25450] Python 3.5 starts in C:\Windows\system32 as current directory

2015-10-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks for the explanation. When I did the test with Command Prompt, I happened to be in /Users/Terry, which is where C.P. starts. %USERPROFILE% is what I was thinking of but could not precisely remember. It worked when put in that box. I think adding

[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-10-21 Thread Martin Panter
Martin Panter added the comment: Also beware it should be :mod: not :mode: :) -- ___ Python tracker ___ ___

[issue25451] PhotoImage transparency methods

2015-10-21 Thread None Becoming
New submission from None Becoming: The transparency methods of tkinter.PhotoImage seem to be missing. Presumably, they would go something like: def transparency_get(self, x, y): """Returns a boolean indicating if the pixel at (x,y) is transparent. """ return self.tk.call(self.name,