[issue10557] Malformed error message from float()

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Sending this by e-mail was not a good idea ... On Sun, Nov 28, 2010 at 3:30 PM, Stefan Krah wrote: .. >> UnicodeEncodeError: 'decimal' codec can't encode character '\u066b' > > Hmm, looks like a bug? I think U+066B is correct. > Really? What about >>>

[issue10557] Malformed error message from float()

2010-11-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- Removed message: http://bugs.python.org/msg122725 ___ Python tracker ___ ___ Python-bugs-list mai

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-11-28 Thread Georg Brandl
Changes by Georg Brandl : Removed file: http://bugs.python.org/file19858/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue5211] Fix complex type to avoid coercion in 2.7.

2010-11-28 Thread Mark Dickinson
Mark Dickinson added the comment: > Just to keep this discussion as clear as possible Mark, it was your > first option that I suggest is needed. Okay, so you want + to try xint.__radd__ before float.__add__. How do you propose this be achieved? Can you explain exactly what semantics you'd

[issue5211] Fix complex type to avoid coercion in 2.7.

2010-11-28 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file19859/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Why not allow complex('1i')? (Tongue in cheek: I am really looking for arguments against lax parsing in number builtins. See issue 10557.) -- nosy: +belopolsky ___ Python tracker

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-11-28 Thread Mark Dickinson
Mark Dickinson added the comment: > It would be a welcome feature in Python if the programming language > would, like MATLAB, associate both i and j with the imaginary unit. I suggest taking this to the python-ideas mailing list. A working patch might increase the idea's chances. --

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-11-28 Thread Mark Dickinson
Mark Dickinson added the comment: > Why not allow complex('1i')? Indeed, if 4i were permitted as an imaginary literal, I'd expect to allow complex('3 + 4i') as well. (And possible just plain complex('i') too, since complex('j') is currently allowed. Grr.) -- __

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sun, Nov 28, 2010 at 3:58 PM, Mark Dickinson wrote: .. > I'd expect to allow complex('3 + 4i') as well. And with spaces surrounding '+' too. -- ___ Python tracker _

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-11-28 Thread Boštjan Mejak
Boštjan Mejak added the comment: It would be great if the feature of having both j and i would exist in the interpreter core, as well as the built-in function complex() to accept i. -- Added file: http://bugs.python.org/file19860/unnamed ___ Python

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-11-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: There should be an environment variable to make the symbol settable. $ PYTHONIMAGINARYSYMBOL=i python -c "import cmath; print(cmath.sqrt(-1))" 1i -- nosy: +pitrou ___ Python tracker

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-11-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: (and perhaps a ResourceWarning if you choose something different from i and j) -- ___ Python tracker ___ __

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-11-28 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file19860/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue10548] Error in setUp not reported as expectedFailure (unittest)

2010-11-28 Thread Michael Foord
Michael Foord added the comment: The same is also true for tearDown and cleanUp functions. -- ___ Python tracker ___ ___ Python-bugs-

[issue10569] abc: `issubclass([], my_abstract_type)` raises exception

2010-11-28 Thread Ram Rachum
New submission from Ram Rachum : >>> import abc >>> class A(object, metaclass=abc.ABCMeta): ... pass >>> issubclass([], A) Traceback (most recent call last): File "", line 1, in issubclass([], A) File "c:\Python32\lib\abc.py", line 137, in __subclasscheck__ if subclass in cls._ab

[issue10569] abc: `issubclass([], my_abstract_type)` raises exception

2010-11-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I don't agree. "issubclass(1, list)" has always raised an exception. -- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed ___ Python tracker _

[issue10569] abc: `issubclass([], my_abstract_type)` raises exception

2010-11-28 Thread Ram Rachum
Ram Rachum added the comment: But do you think it's a good idea that `issubclass(1, list)` raises an exception? Why not simply return `False`? Do you think there's someone out there who's counting on `issubclass` to raise an exception? -- status: closed -> open _

[issue10569] abc: `issubclass([], my_abstract_type)` raises exception

2010-11-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: issubclass is for relationship between classes. Did you consider isinstance() instead? -- ___ Python tracker ___ ___

[issue10569] abc: `issubclass([], my_abstract_type)` raises exception

2010-11-28 Thread Ram Rachum
Ram Rachum added the comment: Amaury, I am aware of what `issubclass` does and what `isinstance` does. I am not manually feeding `[]` into `issubclass`. I have an object which can be either a list, or a string, or a callable, or a type. And I want to check whether it's a sub-class of some bas

[issue10569] abc: `issubclass([], my_abstract_type)` raises exception

2010-11-28 Thread Benjamin Peterson
Benjamin Peterson added the comment: Tell python-ideas about it. -- nosy: +benjamin.peterson status: open -> closed ___ Python tracker ___ __

[issue5211] Fix complex type to avoid coercion in 2.7.

2010-11-28 Thread Blair
Blair added the comment: I am not really the person (I don't know how Python is implemented) to explain how the correct behaviour should be achieved (sorry). I do appreciate that this may seem like exceptional behaviour. Numbers are a bit different. However, for what its worth, I think that the

[issue10569] abc: `issubclass([], my_abstract_type)` raises exception

2010-11-28 Thread Michael Foord
Michael Foord added the comment: FWIW (which isn't much I guess) it annoys me that I have to protect calls to issubclass with if isinstance(obj, type). -- nosy: +michael.foord ___ Python tracker _

[issue10499] Modular interpolation in configparser

2010-11-28 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: Review posted. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue10548] Error in setUp not reported as expectedFailure (unittest)

2010-11-28 Thread Michael Foord
Michael Foord added the comment: Note that if an error is raised in a tearDown or cleanUp then unexpected-success should not be reported either. Not very important but might as well be fixed at the same time. -- ___ Python tracker

[issue10570] curses.tigetstr() returns bytes, but curses.tparm() expects a string

2010-11-28 Thread Jakub Wilk
New submission from Jakub Wilk : $ python3 --version Python 3.1.3 $ python3 setup.py bdist upload --sign [snip] Traceback (most recent call last): File "setup.py", line 71, in cmdclass = dict(build_py=build_py) File "/usr/local/lib/python3.1/distutils/core.py", line 149, in setup di

[issue10571] "setup.py upload --sign" broken: TypeError: 'str' does not support the buffer interface

2010-11-28 Thread Jakub Wilk
New submission from Jakub Wilk : $ python3 --version Python 3.1.3 $ python3 setup.py bdist upload --sign [snip] Traceback (most recent call last): File "setup.py", line 71, in cmdclass = dict(build_py=build_py) File "/usr/local/lib/python3.1/distutils/core.py", line 149, in setup di

[issue8879] Implement os.link on Windows

2010-11-28 Thread Brian Curtin
Brian Curtin added the comment: Amaury -- how does issue8879_unicode.diff look? Made the suggested change and added a test. -- stage: committed/rejected -> patch review Added file: http://bugs.python.org/file19862/issue8879_unicode.diff ___ Python t

[issue8879] Implement os.link on Windows

2010-11-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Looks good, except that win32_error("link", NULL) should be called instead of posix_error(). errno is not guaranteed to be correctly set by the win32 api, and GetLastError() ususally gives more accurate errors. -- __

[issue8879] Implement os.link on Windows

2010-11-28 Thread Brian Curtin
Brian Curtin added the comment: Committed in r86854 with your win32_error suggestion. Thanks for your help and input. -- ___ Python tracker ___ _

[issue10572] Move unittest test package to Lib/test

2010-11-28 Thread Michael Foord
New submission from Michael Foord : Having tests in Lib/test instead of inside the package makes it easier to grep the unittest package without grepping the tests. The Windows installer has an "install without tests" option which is easier to honour if the tests aren't in the package. However

[issue10573] Consistency in unittest assert methods: order of actual, expected

2010-11-28 Thread Michael Foord
New submission from Michael Foord : The unittest documentation, argument names and implementation need to be consistent about the order of (actual, expected) for TestCase.assert methods that take two arguments. This is particularly relevant for the methods that produce 'diffed' output on fai

[issue1705520] API for excluding methods from unittest stack traces

2010-11-28 Thread Michael Foord
Michael Foord added the comment: __unittest needs to die (with appropriate deprecation). I agree that a nicer API for marking functions and methods as needing to be excluded from unittest stacktraces would be useful. A decorator is a good way to expose that API to developers. Internally unitt

[issue10560] Fixes for Windows sources

2010-11-28 Thread Carlo Bramini
Carlo Bramini added the comment: I modified the patch by using Py_LL() as suggested in a previous comment. I just would like to say that these fixes are not required to compiling under MSVC5: I was able to compile all the sources as they were, even without changes and this is a great thing. I

[issue10478] Ctrl-C locks up the interpreter

2010-11-28 Thread Ilya Sandler
Ilya Sandler added the comment: Would avoiding PyErr_CheckSignals() while the file object is in inconsistent state be a reasonable alternative? I am guessing that it's not that uncommon for a signal handler to need IO (e.g to log a signal). If making IO safer is not an option, then I think,

[issue3243] Support iterable bodies in httplib

2010-11-28 Thread Xuanji Li
Xuanji Li added the comment: Hi Raymond, I assume you're referring to catlee's patch? 'str' has been changed to 'data' in python 3.2 While porting the patch I ran into this issue, which is that isinstance(str, collections.Iterable) doesn't behave exactly like hasattr(str,'next') >>> hasattr

[issue7245] better Ctrl-C support in pdb (program can be resumed) (issue216067)

2010-11-28 Thread Ilya Sandler
Ilya Sandler added the comment: The patch tries to write to stdout in signal handler. This currently does not work in the python 3.x (see http://bugs.python.org/issue10478). -- ___ Python tracker ___

[issue5150] IDLE to support reindent.py

2010-11-28 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> ned.deily nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailin

[issue10273] Clean-up Unittest API

2010-11-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Ezio, please do the regexp-->regex changes and move the tests under Lib/test. -- assignee: rhettinger -> ezio.melotti ___ Python tracker ___

[issue10544] yield expression inside generator expression does nothing

2010-11-28 Thread Guido van Rossum
Guido van Rossum added the comment: I think it is definitely wrong the way it works in 3.x. (Especially since it works as expected in 2.x.) I agree with Inyeol's preference of fixes: (1) make it work properly for listcomps as well as genexps, (2) if that's not possible, forbid yield in a ge

[issue10544] yield expression inside generator expression does nothing

2010-11-28 Thread Guido van Rossum
Guido van Rossum added the comment: PS. Wasn't there a similar issue with something inside a genexp that raises StopIteration? Did we ever solve that? -- ___ Python tracker __

[issue10544] yield expression inside generator expression does nothing

2010-11-28 Thread Guido van Rossum
Changes by Guido van Rossum : -- assignee: gvanrossum -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue10563] Spurious newline in time.ctime

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This looks like a bug in the underlying platform. POSIX requires [1] that the output of ctime() fits in a 26-character buffer. Note that a change has been recently made to time.asctime() to reject year > . See r85137 and issue6608. I think for co

[issue10563] Spurious newline in time.ctime

2010-11-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky stage: unit test needed -> needs patch type: -> feature request versions: +Python 3.2 -Python 2.6, Python 2.7, Python 3.1 ___ Python tracker __

[issue10544] yield expression inside generator expression does nothing

2010-11-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue10544] yield expression inside generator expression does nothing

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Isn't this the same issue as #3267? -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue10565] isinstance(x, collections.Iterator) can return True, when x isn't iterable

2010-11-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Fixed in r86857. Needs backport. -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs

[issue10500] Palevo.DZ worm msix86 installer 3.x installer

2010-11-28 Thread Vil
Vil added the comment: I am using CA antivirus, I downloaded 3.13 in link http://www.python.org/ftp/python/3.1.3/python-3.1.3.msi and it is still showing Win32/Palevo.DZ when i scan and it quarantines and then erases the installer msix86 binary (does not include source) On Sun, Nov 28, 2010 at

[issue10544] yield expression inside generator expression does nothing

2010-11-28 Thread Guido van Rossum
Guido van Rossum added the comment: Yes it is, but I was never asked about it back then. -- ___ Python tracker ___ ___ Python-bugs-li

[issue10500] Palevo.DZ worm msix86 installer 3.x installer

2010-11-28 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: I would recommend to the poster to contact CA and to notify them that they have a false positive no other antivirus (check VirusTotal site) in the world is having :-). -- ___ Python tracker

[issue8879] Implement os.link on Windows

2010-11-28 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: This patch seems to break quite a few buildbots. for instance: http://www.python.org/dev/buildbot/all/builders/x86%20OpenIndiana%203.x/builds/81/steps/test/logs/stdio """ test_mbcs_name (test.test_os.LinkTests) ... test test_os failed -- Traceback (most rec

[issue10500] Palevo.DZ worm msix86 installer 3.x installer

2010-11-28 Thread Stephen Hansen
Stephen Hansen added the comment: I downloaded that linked MSI again (as its different from the one originally reported)-- and it too is still coming up as clean. I would suggest that its clearly either a false positive as Jesús is suggesting... or something on your side or between you and py

[issue10500] Palevo.DZ worm msix86 installer 3.x installer

2010-11-28 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: The virustotal (Note: I am associated to those guys) link I posted included HASHES you can verify in your side to know if it is a false positive or the file is actually altered by "something" in transit/in your site. -- _

[issue8879] Implement os.link on Windows

2010-11-28 Thread Brian Curtin
Brian Curtin added the comment: Maybe the test should be Windows-only? I don't really know the answer...things tend to fall apart when I get involved with Unicode, encoding, codecs, etc. :/ -- ___ Python tracker _

[issue8879] Implement os.link on Windows

2010-11-28 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: I am not familiar with this either, but better to restrict the test to platforms with actual mbcs encoding. -- ___ Python tracker ___

[issue10574] email.header.decode_header fails if the string contains multiple directives

2010-11-28 Thread Roy H. Han
New submission from Roy H. Han : email.header.decode_header fails for the following message subject: :: email.header.decode_header('=?UTF-8?B?MjAxMSBBVVRNIENBTEwgZm9yIE5PTUlO?==?UTF-8?B?QVRJT05TIG9mIFZQIGZvciBNZW1iZXJz?==?UTF-8?B?aGlw?=') If the directives are removed and the padding prob

[issue10574] email.header.decode_header fails if the string contains multiple directives

2010-11-28 Thread Roy Hyunjin Han
Roy Hyunjin Han added the comment: Currently using the following workaround. import re import email.header def decodeSafely(x): match = re.search('(=\?.*?\?B\?)', x) if not match: return x encoding = match.group(1) return email.header.decode_header('%s%s==?=' % (encodin

[issue10574] email.header.decode_header fails if the string contains multiple directives

2010-11-28 Thread Roy Hyunjin Han
Roy Hyunjin Han added the comment: Improved workaround to handle another degenerate case where the encoded string is in between non-encoded strings. import re import email.header pattern_ecre = re.compile(r'((=\?.*?\?[qb]\?).*\?=)', re.VERBOSE | re.IGNORECASE | re.MULTILINE) def decodeSafel

[issue10557] Malformed error message from float()

2010-11-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: After a bit of svn archeology, it does appear that Arabic-Indic digits' support was deliberate at least in the sense that the feature was tested for when the code was first committed. See r15000. The test migrated from file to file over the last 10 year

[issue10574] email.header.decode_header fails if the string contains multiple directives

2010-11-28 Thread Roy Hyunjin Han
Roy Hyunjin Han added the comment: The following code seems to solve the first case just as well. It seems that it is a problem of missing whitespace. email.header.decode_header('=?UTF-8?B?MjAxMSBBVVRNIENBTEwgZm9yIE5PTUlO?==?UTF-8?B?QVRJT05TIG9mIFZQIGZvciBNZW1iZXJz?==?UTF-8?B?aGlw?='.replace(

[issue10571] "setup.py upload --sign" broken: TypeError: 'str' does not support the buffer interface

2010-11-28 Thread Matthias Klose
Matthias Klose added the comment: that seems to be the wrong report. did you mean Package: python3.1 Version: 3.1.2+20101012-1 Severity: normal curses.tigetstr() returns bytes (which makes sense), but curses.tparm() expects a Unicode string as first argument. As a consequence even the example

<    1   2