[issue11734] Add half-float (16-bit) support to struct module

2011-04-05 Thread Eli Stevens
Eli Stevens added the comment: More questions: The current _PyFloat_Pack4 doesn't round to even: fbits = (unsigned int)(f + 0.5); /* Round */ Is the mismatch going to be a problem? Should I change the _PyFloat_Pack4 implementation while I'm in there? -- ___

[issue11725] httplib and urllib2 failed ssl connection httplib.BadStatusLine

2011-04-05 Thread Ronald Oussoren
Ronald Oussoren added the comment: Ned: we could work around this platform issue by including openssl 1.0d in the OSX installer. I'm not sure if that's acceptable for a bugfix release though. -- ___ Python tracker

[issue11747] unified_diff function product incorrect range information

2011-04-05 Thread ysj.ray
ysj.ray added the comment: Since if one of the two comparing files is empty, gnu diff regards the beginning line of differences as line 0 (there is not any lines), but difflib regards it as line 1(there is a line, but empty). Not sure weather is correct since the practice usage of diff output

[issue11764] inspect.getattr_static code execution w/ class body as non dict

2011-04-05 Thread ysj.ray
Changes by ysj.ray : -- nosy: +ysj.ray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/m

[issue2736] datetime needs an "epoch" method

2011-04-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Just to add another data point to this discussion: mxDateTime, which in large parts inspired the Python datetime module, has had a .ticks() method (for local time) and a .gmticks() method (for UTC) for more than a decade now and so far, I haven't seen a sin

[issue2736] datetime needs an "epoch" method

2011-04-05 Thread STINNER Victor
STINNER Victor added the comment: Marc, could you maybe write a new patching taking care of the DST and maybe also the timezone? It looks like you have a long experience in timestamps :-) -- ___ Python tracker

[issue11703] Bug in python >= 2.7 with urllib2 fragment

2011-04-05 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue11707] Create C version of functools.cmp_to_key()

2011-04-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset a03fb2fc3ed8 by Raymond Hettinger in branch 'default': Issue #11707: Fast C version of functools.cmp_to_key() http://hg.python.org/cpython/rev/a03fb2fc3ed8 -- nosy: +python-dev ___ Python tracker

[issue2736] datetime needs an "epoch" method

2011-04-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > Marc, could you maybe write a new patching taking care of the DST and > maybe also the timezone? It looks like you have a long experience in > timestamps :-) Sorry, but no. I'm not really a

[issue11707] Create C version of functools.cmp_to_key()

2011-04-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the patch Filip. Closing this. If anyone wants to lobby the RM for a 3.2 backport, feel free to re-open and assign to the release manager for consideration. -- status: open -> closed ___ Python track

[issue11734] Add half-float (16-bit) support to struct module

2011-04-05 Thread Eli Stevens
Eli Stevens added the comment: Made the _PyFloat_Pack2 match the algo in _PyFloat_Pack4, and did similar for Unpack. This should work on platforms that don't have IEEE 754 floats except for situations where an INF or NAN is unpacked (this is the same as the Unpack4 behavior). This also gets

[issue11707] Create C version of functools.cmp_to_key()

2011-04-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 76ed6a061ebe by Victor Stinner in branch 'default': Issue #11707: Fix compilation errors with Visual Studio http://hg.python.org/cpython/rev/76ed6a061ebe -- ___ Python tracker

[issue11707] Create C version of functools.cmp_to_key()

2011-04-05 Thread STINNER Victor
STINNER Victor added the comment: functools_cmp_to_key() doesn't check that the argument is a callable. >>> table=list(range(3)) >>> table.sort(key=functools.cmp_to_key(3)) Traceback (most recent call last): File "", line 1, in TypeError: 'int' object is not callable PyCallable_Check() shou

[issue11766] test_multiprocessing failure (test_pool_worker_lifetime)

2011-04-05 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue11707] Create C version of functools.cmp_to_key()

2011-04-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: > functools_cmp_to_key() doesn't > check that the argument is a callable. I don't think that is necessary; it will fail with a TypeError when the attempt is made to call it. This is the approach we take elsewhere (look at the built-in filter() function f

[issue11277] test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD)

2011-04-05 Thread STINNER Victor
Changes by STINNER Victor : -- title: test_zlib crashes under Snow Leopard buildbot -> test_zlib.test_big_buffer crashes under BSD (Mac OS X and FreeBSD) ___ Python tracker ___

[issue11757] test_subprocess.test_communicate_timeout_large_ouput failure on select(): negative timeout?

2011-04-05 Thread STINNER Victor
Changes by STINNER Victor : -- title: test_subprocess failure -> test_subprocess.test_communicate_timeout_large_ouput failure on select(): negative timeout? ___ Python tracker

[issue11770] inspect.dir_static

2011-04-05 Thread Michael Foord
New submission from Michael Foord : A version of dir that returns all the members that can be seen by getattr_static. -- assignee: michael.foord components: Library (Lib) messages: 133017 nosy: michael.foord priority: low severity: normal stage: needs patch status: open title: inspect.d

[issue11757] test_subprocess.test_communicate_timeout_large_ouput failure on select(): negative timeout?

2011-04-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3664fc29e867 by Victor Stinner in branch 'default': Issue #11757: subprocess ensures that select() and poll() timeout >= 0 http://hg.python.org/cpython/rev/3664fc29e867 -- nosy: +python-dev ___ Python tr

[issue9390] Error in sys.excepthook on windows when redirecting output of the script

2011-04-05 Thread Michal Molhanec
Michal Molhanec added the comment: I've got the same problem with 2.7.1 (both 32bit and 64bit versions) under W7 SP1 64bit. Under WXP SP3 32bit it works OK. What's worse the output file is empty. 3.2 (tested 64bit version) behaves even worse -- it does not print the error like 2.7 but the re

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2011-04-05 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue11734] Add half-float (16-bit) support to struct module

2011-04-05 Thread Mark Dickinson
Mark Dickinson added the comment: > There's no disagreement, since they're different cases. [...] What he said. > Should I change the _PyFloat_Pack4 implementation while I'm in there? No; let's keep the patch as simple as possible. We can open a separate issue for fixing _Pack4 if necessar

[issue11771] hashlib object cannot be pickled

2011-04-05 Thread STINNER Victor
New submission from STINNER Victor : $ ./python Python 3.3a0 (default:76ed6a061ebe, Apr 5 2011, 12:25:00) >>> import hashlib, pickle >>> hash=hashlib.new('md5') >>> pickle.dumps(hash) Traceback (most recent call last): File "", line 1, in _pickle.PicklingError: Can't pickle : attribute look

[issue11605] EMail generator.flatten() disintegrates over non-ascii multipart/alternative

2011-04-05 Thread ysj.ray
Changes by ysj.ray : -- nosy: +ysj.ray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/m

[issue11771] hashlib object cannot be pickled

2011-04-05 Thread STINNER Victor
STINNER Victor added the comment: Oh, I don't know if it is possible to serialize a OpenSSL hash object (EVP_MD_CTX)... -- ___ Python tracker ___ __

[issue9592] Limitations in objects returned by multiprocessing Pool

2011-04-05 Thread STINNER Victor
STINNER Victor added the comment: > 1) A multiprocessing worker can not return (return, not raise!) an > Exception. (...) raise an error if multiple arguments are required: > TypeError: ('__init__() takes exactly 2 arguments (1 given)', > , ()) This problem comes from pickle, not multiprocessi

[issue11734] Add half-float (16-bit) support to struct module

2011-04-05 Thread Mark Dickinson
Mark Dickinson added the comment: > Is the failure to round-to-even only for legacy formats, or is it for > IEEE formats as well? Ah; I see it's just for the non-IEEE formats, so not really an issue. When the float format is known, the code just depends on a (float) cast doing the right thi

[issue11734] Add half-float (16-bit) support to struct module

2011-04-05 Thread Mark Dickinson
Mark Dickinson added the comment: > I'd also suggest adding some more to the test suite here to verify that > > ties are rounding to the nearest even properly. And I second this suggestion. -- ___ Python tracker

[issue10977] Concrete object C API needs abstract path for subclasses of builtin types

2011-04-05 Thread Nick Coghlan
Nick Coghlan added the comment: I may have found another use case for this functionality. Currently, the Python code in heapq.py accepts arbitrary sequences (that are sufficiently compatible with the Sequence ABC), but the C code in _heapq only permits use of a concrete list. The two current

[issue10977] Concrete object C API needs abstract path for subclasses of builtin types

2011-04-05 Thread Nick Coghlan
Nick Coghlan added the comment: I added a few commments on Daniel's draft patch. However, I'm getting nervous about the performance impact of all these extra pointer comparisons. We should probably hold off on this until more of the macro benchmark suite runs on Py3k so we can get as hint as

[issue975330] Inconsistent newline handling in email module

2011-04-05 Thread R. David Murray
R. David Murray added the comment: Well, it's two years later, but I did look at this during the sprints at PyCon, though I didn't get as far as posting it then (I only just now rediscovered the patch on my laptop). Python3 no longer has a "binary" flag on base64mime.encode, so here is a pro

[issue11772] email header wrapping edge case failure

2011-04-05 Thread R. David Murray
New submission from R. David Murray : I discovered the attached failure case in the process of investigating another issue. The bug (a continuation line with no leading white space) doesn't exist in 2.7, but in 2.7 the extra whitespace is not preserved (that is, the output of the new test loo

[issue11771] hashlib object cannot be pickled

2011-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why on Earth would you want to serialize a hashlib object? It makes as much sense as serializing, say, a JSONEncoder. -- nosy: +gregory.p.smith, pitrou ___ Python tracker

[issue11767] Maildir iterator leaks file descriptors by default

2011-04-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue10963] "subprocess" can raise OSError (EPIPE) when communicating with short-lived processes

2011-04-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset c10d55c51d81 by Ross Lagerwall in branch '2.7': Issue #10963: Ensure that subprocess.communicate() never raises EPIPE. http://hg.python.org/cpython/rev/c10d55c51d81 New changeset 158495d49f58 by Ross Lagerwall in branch '3.1': Issue #10963: Ensure

[issue10977] Concrete object C API needs abstract path for subclasses of builtin types

2011-04-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: I find this extremely ugly. The correct way to handle this is to use the generic methods themselves. Really, the type-specific names should only be used when you have just created the type or done PyXXX_CheckExact() yourself on it. -- nosy: +benjam

[issue10963] "subprocess" can raise OSError (EPIPE) when communicating with short-lived processes

2011-04-05 Thread Ross Lagerwall
Ross Lagerwall added the comment: Committed, thanks. -- assignee: -> rosslagerwall resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: feature request -> behavior ___ Python tracker

[issue11652] urlib{, 2} returns a pair of integers as the content-length value

2011-04-05 Thread James Whisnant
James Whisnant added the comment: Varnish on the sourceforge server has been upgraded and/or reconfigured (yesterday) to fix the issue that was happening with this file (and others). Just an FYI that you will no longer be able to re-create the triggering error. 'content-length': '289519', 'vi

[issue6040] bdist_msi does not deal with pre-release version

2011-04-05 Thread anatoly techtonik
anatoly techtonik added the comment: Metadata can be automatically figured out using regexp matching like ^\d+(\.\d+){2,3}, but for explicit handling there should be should some callback or msi-specific version property in metadata. In the end it is pretty logical if binary distribution proce

[issue6040] bdist_msi does not deal with pre-release version

2011-04-05 Thread anatoly techtonik
anatoly techtonik added the comment: Wrong code. The last line in the bdist_msi_version_hack override should be: self.distribution.metadata.version = saved -- ___ Python tracker _

[issue2736] datetime needs an "epoch" method

2011-04-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Apr 5, 2011 at 4:33 AM, Marc-Andre Lemburg wrote: .. > mxDateTime, which in large parts inspired the Python datetime module, > has had a .ticks() method (for local time) and a .gmticks() method > (for UTC) for more than a decade now Yes, mxDateTi

[issue11773] Unicode compared using "is" results in abnormal behavior

2011-04-05 Thread Abhijeet Rastogi
New submission from Abhijeet Rastogi : >>> a = u'0' >>> a is u'0' False >>> a == u'0' True >>> -- components: Unicode messages: 133038 nosy: shadyabhi priority: normal severity: normal status: open title: Unicode compared using "is" results in abnormal behavior type: behavior versions: P

[issue2736] datetime needs an "epoch" method

2011-04-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: MAL> Since most of the datetime module was inspired by mxDateTime, MAL> I wonder why [ticks()/gmticks()] were left out. (msg75411) """ The datetime module intended to be an island of relative sanity. Because the range of dates "timestamps" can represent v

[issue11773] Unicode compared using "is" results in abnormal behavior

2011-04-05 Thread Ezio Melotti
Ezio Melotti added the comment: The fact that "is" works in this way here is just an implementation detail. If you want to compare strings use ==, "is" is used to verify if two variables refer to the same object or not. >>> x = 100 >>> x is 100 True >>> x = 1000 >>> x is 1000 False

[issue11605] EMail generator.flatten() disintegrates over non-ascii multipart/alternative

2011-04-05 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: ysj.ray, this rude workaround manages it yet for me (self._msg is a BytesParser() generated Message): if not self._msg.is_multipart(): return topmost = True for part in self._msg.walk():

[issue11605] EMail generator.flatten() disintegrates over non-ascii multipart/alternative

2011-04-05 Thread R. David Murray
R. David Murray added the comment: I'm working on this. It appears to be a bug in the bytes parser, rather than the generator. -- ___ Python tracker ___ __

[issue1596321] KeyError at exit after 'import threading' in other thread

2011-04-05 Thread hasenpfeffer
hasenpfeffer added the comment: I encountered this issue recently in Python 3.2 and wanted to make some observations about it. The real problem here is not the KeyError. Though the suggested patches would fix the KeyError symptom, they do not fix the underlying issue. The underlying issue

[issue11605] EMail generator.flatten() disintegrates over non-ascii multipart/alternative

2011-04-05 Thread R. David Murray
R. David Murray added the comment: Although there's a (different) bug in the generator, too, I think :) -- ___ Python tracker ___ ___

[issue4112] Subprocess: Popen'ed children hang due to open pipes

2011-04-05 Thread Ross Lagerwall
Ross Lagerwall added the comment: This has been fixed with all the subprocess improvements in between 3.1 and 3.2 but the decision has been taken (msg125910) not to backport the fix to 3.1 and 2.7 which would involve a C extension. However, a workaround on 2.7 and 3.1 is to set close_fds=True

[issue2320] Race condition in subprocess using stdin

2011-04-05 Thread Ross Lagerwall
Ross Lagerwall added the comment: Closing this as fixed since it has been fixed on 3.2 and decided not to be backported on 3.1 and 2.7. -- nosy: +rosslagerwall resolution: out of date -> fixed status: open -> closed ___ Python tracker

[issue9840] Recursive Repr

2011-04-05 Thread Éric Araujo
Éric Araujo added the comment: FTR, the answer to my interrogation in my previous message is contained in Raymond’s PyCon talk about API design: http://pycon.blip.tv/file/4883290/ :) -- ___ Python tracker

[issue7101] tarfile: OSError with TarFile.add(..., recursive=True) about non-existing file

2011-04-05 Thread Lars Gustäbel
Lars Gustäbel added the comment: I kept this issue open, because I have not yet come to a decision. I don't think the current behaviour is a bug, but these kinds of errors could be handled more intelligently. For example, errors during extraction can be hidden depending on the TarFile.errorle

[issue6040] bdist_msi does not deal with pre-release version

2011-04-05 Thread anatoly techtonik
anatoly techtonik added the comment: The above workaround still doesn't isolate version modification to bdist_msi command, because bdist_msi is calling `build` and `install` targets before doing its own stuff. Any ideas how to override version for MSI without copying while `bdist_msi` conten

[issue6040] bdist_msi does not deal with pre-release version

2011-04-05 Thread anatoly techtonik
anatoly techtonik added the comment: s/while/whole/ Sorry. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9861] subprocess module changed exposed attributes

2011-04-05 Thread Ross Lagerwall
Ross Lagerwall added the comment: This changes seems to have been made from 2.5 to 2.6 which are security fix only. Closing as "wont fix". -- nosy: +rosslagerwall resolution: -> wont fix status: open -> closed ___ Python tracker

[issue3905] subprocess failing in GUI applications on Windows

2011-04-05 Thread Todd Whiteman
Todd Whiteman added the comment: I still see this problem (in Python 2.7.1 and Python 3.1.2). When testing using idle, you'll need to launch using "pythonw.exe", i.e.: pythonw.exe lib\idlelib\idle.py -- ___ Python tracker

[issue2736] datetime needs an "epoch" method

2011-04-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Tue, Apr 5, 2011 at 4:33 AM, Marc-Andre Lemburg > wrote: > .. >> mxDateTime, which in large parts inspired the Python datetime module, >> has had a .ticks() method (for local

[issue11576] timedelta subtraction glitch on big timedelta values

2011-04-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > What happens is the second value is negated (__neg__) > which causes it to become less than timedelta.min and > that is causing OverflowError. Yes, and running the test case without C acceleration makes this obvious: >>> import sys >>> sys.modules['_da

[issue7311] Bug on regexp of HTMLParser

2011-04-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7d4dea76c476 by Ezio Melotti in branch '2.7': #7311: fix HTMLParser to accept non-ASCII attribute values. http://hg.python.org/cpython/rev/7d4dea76c476 -- nosy: +python-dev ___ Python tracker

[issue2736] datetime needs an "epoch" method

2011-04-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > MAL> Since most of the datetime module was inspired by mxDateTime, > MAL> I wonder why [ticks()/gmticks()] were left out. (msg75411) > > """ > The datetime module intended to be

[issue2193] Cookie Colon Name Bug

2011-04-05 Thread Carsten Klein
Carsten Klein added the comment: Guess you are right... I did overlook the quoted-string reference in the RFC: av-pair = attr ["=" value]; optional value attr= token value = word word= token | quoted-string

[issue2736] datetime needs an "epoch" method

2011-04-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Let me state my position on this issue once again. Converting datetime values to float is easy. If your dt is a naive instance representing UTC time: timestamp = (dt - datetime(1970, 1, 1)) / timedelta(seconds=1) If your dt is an aware instance:

[issue2193] Cookie Colon Name Bug

2011-04-05 Thread Carsten Klein
Carsten Klein added the comment: Ups forgot to also mention the production rule for token, which is defined in the HTTP RFC RFC2616: token = 1* separators = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | <"> | "/" |

[issue11734] Add half-float (16-bit) support to struct module

2011-04-05 Thread Eli Stevens
Eli Stevens added the comment: All four changes suggested via review from Mark Dickinson have been made. One note: the else if (!(e == 0 && f == 0.0)) { change was made; this makes the Pack2 function parallel the Pack4 function slightly less. I agree that it's cleaner this way, but I've lef

[issue11734] Add half-float (16-bit) support to struct module

2011-04-05 Thread Eli Stevens
Changes by Eli Stevens : Removed file: http://bugs.python.org/file21497/cpython-struct-float16-v1.patch ___ Python tracker ___ ___ Python-bugs

[issue11734] Add half-float (16-bit) support to struct module

2011-04-05 Thread Eli Stevens
Changes by Eli Stevens : Removed file: http://bugs.python.org/file21499/cpython-struct-float16-v3.patch ___ Python tracker ___ ___ Python-bugs

[issue2193] Cookie Colon Name Bug

2011-04-05 Thread Carsten Klein
Carsten Klein added the comment: Perhaps the best solution would be for the Python cookie module to gracefully adapt to servers not quoting cookie values as is required by the RFCs and make these quoted-strings instead? -- ___ Python tracker

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
New submission from Carsten Klein : Currently I am receiving duplicates of the notification mails by your issue tracker. -- messages: 133062 nosy: carsten.kl...@axn-software.de priority: normal severity: normal status: open title: Issue tracker sends notification mails twice... ___

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
Carsten Klein added the comment: It seems that it only happens when commenting upon an existing issue. -- ___ Python tracker ___ ___

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
Carsten Klein added the comment: Nope, it only happens on issue [issue2193] Cookie Colon Name Bug but not for this one. -- ___ Python tracker ___ ___

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Brian Curtin
Brian Curtin added the comment: http://psf.upfronthosting.co.za/roundup/meta is the bug tracker for the bug tracker. Also, consider that if you are subscribed to any of the tracker mailing lists such as python-bugs-list, you might get multiple copies of tracker comments. -- nosy: +br

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
Carsten Klein added the comment: Ah, I see, thanks for the input. Will close this then. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Ezio Melotti
Ezio Melotti added the comment: Your name appears twice in the nosy list. -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bu

[issue2193] Cookie Colon Name Bug

2011-04-05 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: -carsten.klein ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
Carsten Klein added the comment: I wonder how this happened... Thanks for the finding! -- ___ Python tracker ___ ___ Python-bugs-list

[issue2193] Cookie Colon Name Bug

2011-04-05 Thread Carsten Klein
Changes by Carsten Klein : -- nosy: +carsten.klein -carsten.kl...@axn-software.de ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Ezio Melotti
Ezio Melotti added the comment: Maybe you changed your id or registered a new one? I removed the duplicate one from #2193, if I got the wrong one feel free to fix it as you prefer. -- ___ Python tracker _

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
Carsten Klein added the comment: Actually I logged in using carsten.kl...@axn-software.de and the tracker changed my login name to that... Will issue a bug against the tracker... -- nosy: +carsten.klein ___ Python tracker

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Ezio Melotti
Ezio Melotti added the comment: Yes, that sounds like a bug. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6191] HTMLParser attribute parsing - 2 test cases when it fails

2011-04-05 Thread Ezio Melotti
Changes by Ezio Melotti : -- versions: +Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
Changes by Carsten Klein : -- nosy: -carsten.kl...@axn-software.de ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue2736] datetime needs an "epoch" method

2011-04-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Apr 5, 2011 at 1:45 PM, Marc-Andre Lemburg wrote: .. > BTW: A "timestamp" usually refers to the combination of date and > time. The time.time() return value is "seconds since the Epoch". > I usually call those values "ticks" (not sure whether it's

[issue11734] Add half-float (16-bit) support to struct module

2011-04-05 Thread Mark Wiebe
Mark Wiebe added the comment: Just a few small tweaks. I think you meant to subtract the second term here: +#('>e', b'\x80\x01', -2.0**-25 + 2.0**-35), # Rounds to minimum subnormal Isn't the "x < 0" part unnecessary? Maybe a comment explaining why the signbit function is used, to preserv

[issue11597] Can't get ConfigParser.write to write unicode strings

2011-04-05 Thread Łukasz Langa
Łukasz Langa added the comment: In my opinion we should unfortunately close this with WONTFIX because: * adding a feature in a point release is not an option * this may be poorly documented but most of the standard library in 2.x assumes bytestrings (and fails with Unicode strings). Same goes

[issue7311] Bug on regexp of HTMLParser

2011-04-05 Thread Ezio Melotti
Ezio Melotti added the comment: With 3.2 the situation is more complicated because there is a strict and a non-strict mode. The strict mode uses: attrfind = re.compile( r'\s*([a-zA-Z_][-.:a-zA-Z_0-9]*)(\s*=\s*' r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~@]*))?') and the toler

[issue11775] `bool(Counter({'a': 0'})) is True`

2011-04-05 Thread Ram Rachum
New submission from Ram Rachum : bool(Counter({'a': 0'})) is True. Is this wise? I want to be able to do: if my_counter: whatever To check whether my counter has any elements. Currently this seems to be impossible because of this bug. Will we have to keep this weird behavior beca

[issue11775] `bool(Counter({'a': 0})) is True`

2011-04-05 Thread Ram Rachum
Changes by Ram Rachum : -- title: `bool(Counter({'a': 0'})) is True` -> `bool(Counter({'a': 0})) is True` ___ Python tracker ___ ___ P

[issue11775] `bool(Counter({'a': 0})) is True`

2011-04-05 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, rhettinger stage: -> test needed type: -> behavior ___ Python tracker ___ ___ Pyth

[issue11775] `bool(Counter({'a': 0})) is True`

2011-04-05 Thread Ram Rachum
Ram Rachum added the comment: Before coding a test I want to know whether we can even make this change with regards to backwards compatibility. -- ___ Python tracker ___ __

[issue11734] Add half-float (16-bit) support to struct module

2011-04-05 Thread Eli Stevens
Eli Stevens added the comment: Updated patch with changes suggested by Mark Wiebe. I also removed the commented-out "if (!(e == 0 && f == 0.0))" part. It feels like the patch is approaching an acceptable state; after both of you agree it's there, what do I need to do next? -- _

[issue11775] `bool(Counter({'a': 0})) is True`

2011-04-05 Thread Matthew Barnett
Matthew Barnett added the comment: It depends on what kind of object it's like. If it's like a dict then your example is clearly not empty, but if it's like a set then it /is/ empty, in which case it's empty if: all(count == 0 for count in my_counter.values()) -- nosy: +mrabarnet

[issue11597] Can't get ConfigParser.write to write unicode strings

2011-04-05 Thread R. David Murray
R. David Murray added the comment: No, the need for an encoding parameter for read/write makes it unambiguous that it is indeed a feature. -- resolution: -> wont fix status: open -> closed ___ Python tracker ___

[issue11775] `bool(Counter({'a': 0})) is True`

2011-04-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, this is at odds with how Guido wants bool to work with containers. The bool check is all about whether or not a container is empty, not about its contents. -- resolution: -> invalid status: open -> closed _

[issue11775] `bool(Counter({'a': 0})) is True`

2011-04-05 Thread Ram Rachum
Ram Rachum added the comment: Hmm... So how about making `elements` a smart object which will implement `__bool__`? Then we could give it a `__len__` too and be rid of issue11733. -- ___ Python tracker __

[issue7311] Bug on regexp of HTMLParser

2011-04-05 Thread R. David Murray
R. David Murray added the comment: The goal of tolerant mode is to accept anything a typical browser would accept. I suspect that means the tolerant regex should stay, but I don't remember the details. As for the strictas far as I know the current module follows 4.01, not 5. I'm not su

[issue11605] EMail generator.flatten() disintegrates over non-ascii multipart/alternative

2011-04-05 Thread R. David Murray
R. David Murray added the comment: Here is a patch against 3.2, with test. Simple fix, but it took me a while to track down the critical piece of code. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file21546/parse_8bit_multipart.patch _

[issue11707] Create C version of functools.cmp_to_key()

2011-04-05 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I have a follow-up question: why keyobject_type needed traverse function? From what I read in docs I assumed it is required for GC tracked types. Why was it required here and how it is used? -- ___ Python track

[issue11775] `bool(Counter({'a': 0})) is True`

2011-04-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: We could do that, but that's not the Python way :-) Really, you should be posting recipes somewhere else to see if there is interest and uptake. The tracker is not the right place to toss one random idea after another. We need to place some value on API

[issue11670] configparser read_file now iterates over f, docs still say it calls readline

2011-04-05 Thread Łukasz Langa
Łukasz Langa added the comment: How about this? (available for review: http://codereview.appspot.com/4358054) -- keywords: +patch Added file: http://bugs.python.org/file21547/issue11670.patch ___ Python tracker __

[issue11733] Implement a `Counter.elements_count` method

2011-04-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: After more thought, I've decided to close this feature request. The operation is utterly trivial and isn't worth fattening the API. I see no advantage in `c.total_count()` versus `sum(c.values())`. -- resolution: -> rejected status: open -> clos

  1   2   >