[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS

2012-09-19 Thread Ronald Oussoren
Ronald Oussoren added the comment: How can you work around it in os.read, without knowing anything about what the file descriptor represents? Just triggering on getting on EINVAL error when calling read might trigger other problems and might even be a valid result for some file descriptors (fo

[issue14783] Make int() and str() docstrings correct

2012-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > +.. function:: int(number=0) First argument is named "x". >>> int(number=42) Traceback (most recent call last): File "", line 1, in TypeError: 'number' is an invalid keyword argument for this function >>> int(x=42) 42 + int(string, base=10)

[issue6471] errno and strerror attributes incorrectly set on socket errors wrapped by urllib

2012-09-19 Thread Ezio Melotti
Ezio Melotti added the comment: > I seem to remember writing code that fished the wrapped error > out using one of those attributrs... That would be err.reason: from urllib.request import urlopen try: urlopen('http://www.pythonfoobarbaz.org') except Exception as exc: print('err:', err)

[issue6471] errno and strerror attributes incorrectly set on socket errors wrapped by urllib

2012-09-19 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +cjerdonek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue14783] Make int() and str() docstrings correct

2012-09-19 Thread Ezio Melotti
Ezio Melotti added the comment: > First argument is named "x". Sometimes the doc uses "better" names to improve clarity when the argument is not supposed to be called as keyword arg. > Here can be not only string, but bytes or bytearray. The same applies here. "string" is also used in the er

[issue11454] email.message import time

2012-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > If I change the regex to _has_surrogates = > re.compile('[\udc80-\udcff]').search, the tests still pass but there's no > improvement on startup time (note: the previous regex was matching all the > surrogates in this range too, however I'm not sure how wel

[issue11454] email.message import time

2012-09-19 Thread Ezio Melotti
Ezio Melotti added the comment: > What about _has_surrogates = re.compile('[^\udc80-\udcff]*\Z').match ? The runtime is a bit slower than re.compile('[\udc80-\udcff]').search, but otherwise it's faster than all the other alternatives. I haven't checked the startup-time, but I suspect it won't

[issue11454] email.message import time

2012-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I haven't checked the startup-time, but I suspect it won't be better -- maybe > even worse. I suppose it will be much better. -- ___ Python tracker __

[issue11454] email.message import time

2012-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Startup-time: $ ./python -m timeit -s 'import re' 're.compile("([^\ud800-\udbff]|\A)[\udc00-\udfff]([^\udc00-\udfff]|\Z)").search; re.purge()' 100 loops, best of 3: 4.16 msec per loop $ ./python -m timeit -s 'import re' 're.purge()' 're.compile("[\udc8

[issue11664] Add patch method to unittest.TestCase

2012-09-19 Thread Michael Foord
Michael Foord added the comment: It maybe that patch.object is a more natural interface to the small sample of people commenting here, in which case great - that's what it's there for. However in common usage patch is used around two orders of magnitude more. I've seen large codebases with hu

[issue15946] Windows 8 x64 - IO-Error

2012-09-19 Thread Martin v . Löwis
Martin v. Löwis added the comment: I think it should be possible to add a wait=False parameter to rmtree which makes it block until the directory is gone away. This could be similar to the test.support feature added in #15496. For compatibility, such a flag should default to False, and users n

[issue11454] email.message import time

2012-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Faster set-version: $ ./python -m timeit -s 'h=lambda s, hn=set(map(chr, range(0xDC80, 0xDD00))).isdisjoint: not hn(s); s = "A"*1000' 'h(s)' 1 loops, best of 3: 43.8 usec per loop -- ___ Python tracker

[issue15276] unicode format does not really work in Python 2.x

2012-09-19 Thread Martin v . Löwis
Martin v. Löwis added the comment: > What do you think? [Even though I wasn't asked] I think we may need to close the issue as "won't fix". Depending on the exact change propsosed, it may be that the return type for existing operations might change, which shouldn't be done in a bug fix release.

[issue15964] SyntaxError in asdl when building 2.7 with system Python 3

2012-09-19 Thread Martin v . Löwis
Martin v. Löwis added the comment: The case that "python" is a Python 3 binary is not a supported installation (see PEP 394). asdl_c.py works on both 2.x and 3.x unmodified in the 3.x branch, however, backporting this to 2.7 would be a new feature (support for building on systems where "python

[issue15966] concurrent.futures: Executor.submit keyword arguments may not be called 'fn' (or 'self')

2012-09-19 Thread Mark Dickinson
Mark Dickinson added the comment: Ah, I added the wrong Brian to the nosy. Sorry, Brian C. -- ___ Python tracker ___ ___ Python-bugs-

[issue15971] Sporadic failure in test_dump_tracebacks_later_file (test_faulthandler)

2012-09-19 Thread STINNER Victor
STINNER Victor added the comment: Code of the failing test: import faulthandler import time def func(timeout, repeat, cancel, file, loops): for loop in range(loops): faulthandler.dump_tracebacks_later(timeout, repeat=repeat, file=file) if cancel: faulthandler

[issue6471] errno and strerror attributes incorrectly set on socket errors wrapped by urllib

2012-09-19 Thread R. David Murray
R. David Murray added the comment: Ah, of course. I should have reread the whole issue :) The backward compatibility is the big concern here. Regardless of what we do about that, we should at least fix this in 3.4. -- ___ Python tracker

[issue15415] Add temp_dir() and change_cwd() to test.support

2012-09-19 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue11664] Add patch method to unittest.TestCase

2012-09-19 Thread Michael Foord
Michael Foord added the comment: I think those guidelines are horrible and I've told the pyramid folks that. There is a related issue for unittest that failing to import a test module (due to a failed import in the test module for example) should not kill the test run but should create a "fail

[issue11664] Add patch method to unittest.TestCase

2012-09-19 Thread Éric Araujo
Éric Araujo added the comment: A data point: at work I follow Pyramid testing guidelines which tell you not to import code under test at module level, but in your test functions, so that if you have an error your tests do start and you see the error under the test method. This means that I us

[issue15972] wrong error message for os.path.getsize

2012-09-19 Thread John Taylor
New submission from John Taylor: import os.path a = [ r'c:\Windows\notepad.exe' ] print( os.path.getsize(a) ) Under Python 3.2.3, this error message is returned: File "c:\python32\lib\genericpath.py", line 49, in getsize return os.stat(filename).st_size TypeError: Can't convert 'list' obje

[issue15972] wrong error message for os.path.getsize

2012-09-19 Thread Christian Heimes
Christian Heimes added the comment: Linux: >>> os.stat([]) Traceback (most recent call last): File "", line 1, in FileNotFoundError: [Errno 2] No such file or directory: '' [60996 refs] >>> os.stat([None]) Traceback (most recent call last): File "", line 1, in TypeError: an integer is requ

[issue15964] SyntaxError in asdl when building 2.7 with system Python 3

2012-09-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: > The case that "python" is a Python 3 binary is not a supported installation Just to clarify, in the original scenario, "python" did not refer to anything. From the original comment: $ python No such file or directory ("python2" and "python3" did refer to t

[issue15964] SyntaxError in asdl when building 2.7 with system Python 3

2012-09-19 Thread Christian Heimes
Christian Heimes added the comment: > $ make touch > make: *** No rule to make target `touch'. Stop. Martin meant: touch Include/Python-ast.h Python/Python-ast.c -- ___ Python tracker _

[issue15964] SyntaxError in asdl when building 2.7 with system Python 3

2012-09-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: Yes, that works. Rather than closing this as "won't fix," however, I would suggest that we document the workaround in the devguide. -- ___ Python tracker

[issue11454] email.message import time

2012-09-19 Thread Ezio Melotti
Changes by Ezio Melotti : Removed file: http://bugs.python.org/file27223/issue11454_surr1.py ___ Python tracker ___ ___ Python-bugs-list maili

[issue11454] email.message import time

2012-09-19 Thread Ezio Melotti
Changes by Ezio Melotti : Removed file: http://bugs.python.org/file27203/issue11454_surr1.py ___ Python tracker ___ ___ Python-bugs-list maili

[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS

2012-09-19 Thread Vitaly
Vitaly added the comment: > And what kind of workaround do you propose? [os.read(fd, buffersize)] I am thinking about these options: Option 1: Fix breakages as they are discovered at higher level (above os.read) as needed in places where usage semantics are known, and address the issue via er

[issue15973] Segmentation fault on timezone comparison

2012-09-19 Thread Lance Helsten
New submission from Lance Helsten: In the 3.2.3 interpreter execute the following line: `None == datetime.timezone(datetime.timedelta())` The interpreter will crash with a `Segmentation fault: 11`. -- assignee: ronaldoussoren components: Macintosh files: CoreDump.txt messages: 170732

[issue15974] Optional compact and colored output for regrest

2012-09-19 Thread Brett Cannon
New submission from Brett Cannon: It would be nice to have something like sphinx's build output where the output is all kept on a single line except for failures. The color would help when scrolling through current output looking for failures. Currently I just look until the failure count swit

[issue15973] Segmentation fault on timezone comparison

2012-09-19 Thread Stefan Krah
Stefan Krah added the comment: Reproducible also on Linux with Python 3.3. -- components: +Extension Modules -Macintosh nosy: +belopolsky, skrah stage: -> needs patch versions: +Python 3.3 ___ Python tracker _

[issue15974] Optional compact and colored output for regrest

2012-09-19 Thread Ezio Melotti
Ezio Melotti added the comment: > It would be nice to have something like sphinx's build output where > the output is all kept on a single line except for failures. +1 I wanted the exact same thing for a long time but never had time to look at it. OTOH the more features are added to regrtest,

[issue15973] Segmentation fault on timezone comparison

2012-09-19 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: ronaldoussoren -> belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue15973] Segmentation fault on timezone comparison

2012-09-19 Thread John Taylor
John Taylor added the comment: Crashes Python 3.2.3 and Python 3.3.0rc2 on Windows 7 as well. -- nosy: +jftuga ___ Python tracker ___

[issue15975] Allow multiplying timedelta by Decimal

2012-09-19 Thread Ram Rachum
New submission from Ram Rachum: Please allow multiplying timedelta by a Decimal: Python 3.3.0a1 (default, Mar 4 2012, 17:27:59) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> import decimal >>> decimal.Decimal

[issue15974] Optional compact and colored output for regrest

2012-09-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: I also think it would be better to refactor regrtest before adding this kind of complication. -- nosy: +pitrou ___ Python tracker ___ _

[issue15975] Allow multiplying timedelta by Decimal

2012-09-19 Thread Mark Dickinson
Mark Dickinson added the comment: Do you have a particular use-case in mind? Is there a reason that td * 0.1 or td / 10.0 aren't good enough? -- nosy: +mark.dickinson ___ Python tracker __

[issue15975] Allow multiplying timedelta by Decimal

2012-09-19 Thread Ram Rachum
Ram Rachum added the comment: This is for cases where I already have the number as a Decimal. Asking me to convert it to `float` myself is annoying. -- ___ Python tracker ___ __

[issue15973] Segmentation fault on timezone comparison

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I cannot reproduce on a Mac with py3k tip. Python 3.3.0rc2+ (default:19c74cadea95, Sep 19 2012, 14:39:07) [GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.61)] on darwin Type "help", "copyright", "credits" or "license" for more information. >

[issue15975] Allow multiplying timedelta by Decimal

2012-09-19 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue15975] Allow multiplying timedelta by Decimal

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This is similar to issue 14262. If we decide that timedelta should play nice with Decimal, I would like to consider all related features. -- versions: -Python 3.3 ___ Python tracker

[issue15975] Allow multiplying timedelta by Decimal

2012-09-19 Thread Mark Dickinson
Mark Dickinson added the comment: > Asking me to convert it to `float` myself is annoying. Well, it's just a call to 'float', right? On the other side, we're looking at significant extra code to implement Decimal * timedelta, so there needs to be a good reason to add it. (And there's feature

[issue15975] Allow multiplying timedelta by Decimal

2012-09-19 Thread Mark Dickinson
Mark Dickinson added the comment: Agreed; +1 on folding this into issue 14262. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue14262] Allow using decimals as arguments to `timedelta`

2012-09-19 Thread Mark Dickinson
Changes by Mark Dickinson : -- versions: +Python 3.4 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15975] Allow multiplying timedelta by Decimal

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: In fact, this is a near-duplicate of #14262 becaus instead of >>> decimal.Decimal('0.1')*datetime.timedelta(seconds=3) one can always write >>> datetime.timedelta(seconds=decimal.Decimal('0.1')*3) -- ___ Pyth

[issue14262] Allow using decimals as arguments to `timedelta`

2012-09-19 Thread Mark Dickinson
Mark Dickinson added the comment: > (1) timedelta() does no loose precision over the entire range > of timedelta and rounding is documented; Agreed that this should be a requirement. -- ___ Python tracker

[issue15975] Allow multiplying timedelta by Decimal

2012-09-19 Thread Ram Rachum
Ram Rachum added the comment: +1 on folding this into issue 14262. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue15975] Allow multiplying timedelta by Decimal

2012-09-19 Thread Mark Dickinson
Changes by Mark Dickinson : -- resolution: -> duplicate status: open -> closed superseder: -> Allow using decimals as arguments to `timedelta` ___ Python tracker ___ __

[issue14262] Allow using decimals as arguments to `timedelta`

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Mark wrote in his comment on issue 15975: > we're looking at significant extra code to implement > Decimal * timedelta Not necessarily. I will only support adding this feature if it can be done without making datetime know about Decimal. If we can agre

[issue14262] Allow using decimals as arguments to `timedelta`

2012-09-19 Thread Mark Dickinson
Mark Dickinson added the comment: @Ram Rachum: out of curiosity, where are your Decimal objects coming from in the first place? -- ___ Python tracker ___ __

[issue14262] Allow using decimals as arguments to `timedelta`

2012-09-19 Thread Mark Dickinson
Mark Dickinson added the comment: > If we can agree on a lossless protocol to communicate floating pointing > numbers of different base What sort of thing did you have in mind? This is sounding like a PEP-level proposal. -- ___ Python tracker

[issue14262] Allow using decimals as arguments to `timedelta`

2012-09-19 Thread Ram Rachum
Ram Rachum added the comment: @mark.dickinson: Many different sources. One example is decimal fields on Django, used for dollar amounts. -- ___ Python tracker ___ __

[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS

2012-09-19 Thread Ned Deily
Ned Deily added the comment: Out of curiosity, has anyone checked whether this is also an issue with any of the supported BSD's? There have been other issues which were detected first on OS X but turned out to be more general BSD vs Linux differences, rather than OS X "bugs". -- ___

[issue14262] Allow using decimals as arguments to `timedelta`

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Sep 19, 2012 at 3:09 PM, Ram Rachum wrote: > One example is decimal fields on Django, used for dollar amounts. .. and since time is money and money is time we should support easy conversion between the two. :-) -- nosy: +Alexander.Belopol

[issue14262] Allow using decimals as arguments to `timedelta`

2012-09-19 Thread Ram Rachum
Ram Rachum added the comment: I hope this was intended as a joke. If this was an actual criticism, let me know so I could explain why it makes sense. -- ___ Python tracker ___ _

[issue15974] Optional compact and colored output for regrest

2012-09-19 Thread Brett Cannon
Brett Cannon added the comment: I totally agree, I just wanted this in the tracker as a long-term goal to have. I have made this a dependency on issue #10967 which is tracking moving regrtest over unittest as much as possible. -- dependencies: +move regrtest over to using more unittest

[issue15973] Segmentation fault on timezone comparison

2012-09-19 Thread Stefan Krah
Stefan Krah added the comment: The segfault does not occur in a debug build. The stack trace suggests that timezone_richcompare() accesses other->offset of the None object: (gdb) f 2 #2 0x0041d4e9 in do_richcompare (v=None, w=, op=) at Objects/object.c:563 563 res = (*f

[issue15973] Segmentation fault on timezone comparison

2012-09-19 Thread R. David Murray
R. David Murray added the comment: On linux it segfaults for me in the debug interpreter. On default tip. -- nosy: +r.david.murray ___ Python tracker ___ ___

[issue14262] Allow using decimals as arguments to `timedelta`

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Sep 19, 2012 at 3:24 PM, Ram Rachum wrote: > I hope this was intended as a joke. If this was an actual criticism, let me > know so > I could explain why it makes sense. It was both. Yes, any use cases will be helpful. Timedelta is already a dec

[issue15949] docs.python.org not getting updated

2012-09-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: It has been 8 days since the last update. -- priority: normal -> high ___ Python tracker ___ ___ Pyt

[issue15976] Inconsistent behavior of search_for_exec_prefix() results in startup failure in certain cases

2012-09-19 Thread Evangelos Foutras
New submission from Evangelos Foutras: On Arch Linux /lib is a symbolic link to /usr/lib. When the Python interpreter is provided with an argv[0] of e.g. '/python2.7' and the current working directory is /, it'll fail to start with the following error: IOError: invalid Python installation: una

[issue11454] email.message import time

2012-09-19 Thread Ezio Melotti
Ezio Melotti added the comment: Attached new benchmark file. Results: Testing runtime of the _has_surrogates functions Generating chars... Generating samples... 1.61 <- re.compile(current_regex).search 0.24 <- re.compile(short_regex).search 15.13 <- return any(c in surrogates for c in s)

[issue11454] email.message import time

2012-09-19 Thread R. David Murray
R. David Murray added the comment: So by your measurements the short search is the clear winner? -- ___ Python tracker ___ ___ Python-

[issue11454] email.message import time

2012-09-19 Thread Ezio Melotti
Ezio Melotti added the comment: Yes, however it has a startup cost that the function that returns re.search(short_regex, s) and the one with functool.partial don't have, because with these the compilation happens at the first call. If we use one of these two, the startup time will be reduced a

[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS

2012-09-19 Thread Charles-François Natali
Charles-François Natali added the comment: > Option 1: > Fix breakages as they are discovered at higher level (above os.read) as > needed in places where usage semantics are known, and address the issue via > errata documentation (i.e., "On Mac OS X, don't make individual pipe read > requests

[issue11454] email.message import time

2012-09-19 Thread R. David Murray
R. David Murray added the comment: This issue may be about reducing the startup time, but this function is a hot spot in the email package so I would prefer to sacrifice startup time optimization for an increase in speed. However, given the improvements to import locking in 3.3, what about a s

[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS

2012-09-19 Thread Vitaly
Vitaly added the comment: > It's not Python's job to workaround stupid platform bugs... > So I'd suggest closing this, and urge people to complain to the OS-X folks After digesting the postings, I've come around to this point of view as well, so closing as "rejected". And, as mentioned earlier

[issue11454] email.message import time

2012-09-19 Thread Ezio Melotti
Ezio Melotti added the comment: That might work. To avoid the overhead of the cache lookup I was thinking about something like regex = None def _has_surrogates(s): global regex if regex is None: regex = re.compile(short_regex) return regex.search(s) but I have discarded it

[issue15896] Sporadic EINVAL in nonblocking pipe os.read when forked child fails on Mac OS

2012-09-19 Thread Vitaly
Changes by Vitaly : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue11454] email.message import time

2012-09-19 Thread R. David Murray
R. David Murray added the comment: It passed the email test suite. Patch attached. -- Added file: http://bugs.python.org/file27226/email_import_speedup.patch ___ Python tracker

[issue14262] Allow using decimals as arguments to `timedelta`

2012-09-19 Thread Ram Rachum
Ram Rachum added the comment: I can think of millions of use cases. Here's a random one out of those millions: A client is entitled to X hours of service a month. We grant him a promotion where he is allowed 15% more than x, i.e. 1.15*x. But that number, 1.15, is stored in a Django decimal fie

[issue11454] email.message import time

2012-09-19 Thread Ezio Melotti
Ezio Melotti added the comment: It would be better to add/improve the _has_surrogates tests before committing. The patch I attached is also still valid if you want a further speed up improvement. -- ___ Python tracker

[issue14262] Allow using decimals as arguments to `timedelta`

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Sep 19, 2012 at 4:32 PM, Ram Rachum wrote: > But that number, 1.15, is stored in a Django decimal field. My criticism was towards the idea that one may need to multiply timedelta by a dollar amount or convert a dollar amount to a timedelta. Stor

[issue11454] email.message import time

2012-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: def _has_surrogates(s): try: s.encode() return False except UnicodeEncodeError: return True Results: 0.26 <- re.compile(short_regex).search 0.06 <- try encode -- ___ Python tracker

[issue14262] Allow using decimals as arguments to `timedelta`

2012-09-19 Thread Ram Rachum
Ram Rachum added the comment: In the example I gave, Decimal is clearly preferred over float. Why would we use float to represent the ratio of the bonus to the client? Why would we risk imprecision there when Decimal provides us with perfect precision? -- _

[issue15977] Memory leak in _ssl.c

2012-09-19 Thread Daniel Sommermann
New submission from Daniel Sommermann: I noticed that the function _set_npn_protocols() has the following line: self->npn_protocols = PyMem_Malloc(protos.len); There is no check to see if self->npn_protocols is already allocated. Thus, multiple calls to _set_npn_protocols() will leak memory. T

[issue10967] move regrtest over to using more unittest infrastructure

2012-09-19 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +cjerdonek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue10967] move regrtest over to using more unittest infrastructure

2012-09-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: One important piece is that regrtest currently has no tests (e.g. there is no test_regrtest.py), so changing it must be done more carefully. How do people feel about new (or newly modified) regrtest classes and functions going into a different fully-tested mo

[issue14262] Allow using decimals as arguments to `timedelta`

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sep 19, 2012, at 5:36 PM, Ram Rachum wrote: > Why would we use float to represent the ratio of the bonus to the client? Because float is the builtin type that Python provides to represent such quantities. > Why would we risk imprecision there when

[issue15888] ipaddress doctest examples have some errors

2012-09-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attaching an updated patch that does not render the import statements in the final HTML, so that it renders the same as before. -- Added file: http://bugs.python.org/file27227/issue-15888-2.patch ___ Python tracker

[issue15276] unicode format does not really work in Python 2.x

2012-09-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: If we don't fix this (I'm leaning that way myself), I think we should somehow document the limitation. There are ways to acknowledge the limitation without getting into the specifics of this particular issue. -- __

[issue15977] Memory leak in _ssl.c

2012-09-19 Thread Christian Heimes
Christian Heimes added the comment: You are right. I did some testing and the function indeed leaks memory. The attached patch fixes the issue for me. -- keywords: +patch nosy: +christian.heimes stage: -> patch review type: -> resource usage Added file: http://bugs.python.org/file2722

[issue15973] Segmentation fault on timezone comparison

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I think the following simple patch should do the trick. I'll add some tests and commit. Should this get in 3.3.0? diff -r 19c74cadea95 Modules/_datetimemodule.c --- a/Modules/_datetimemodule.c Wed Sep 19 08:25:01 2012 +0300 +++ b/Modules/_datetimemodu

[issue15973] Segmentation fault on timezone comparison

2012-09-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: Hopefully, there will be some more braces, though. :) -- nosy: +benjamin.peterson ___ Python tracker ___

[issue15978] asyncore: included batteries don't fit

2012-09-19 Thread chrysn
New submission from chrysn: the asyncore module would be much more useful if it were well integrated in the standard library. in particular, it should be supported by: * subprocess * BaseHTTPServer / http.server (and thus, socketserver) * urllib2 / urllib, http.client * probably many other netw

[issue15973] Segmentation fault on timezone comparison

2012-09-19 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue15977] Memory leak in _ssl.c

2012-09-19 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea stage: patch review -> type: resource usage -> ___ Python tracker ___ ___ Python-bugs-li

[issue15977] Memory leak in _ssl.c

2012-09-19 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- stage: -> patch review type: -> resource usage ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue15973] Segmentation fault on timezone comparison

2012-09-19 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: What about datetime subclasses? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue15978] asyncore: included batteries don't fit

2012-09-19 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Library (Lib) nosy: +giampaolo.rodola, josiahcarlson, stutzbach type: -> enhancement versions: +Python 3.4 ___ Python tracker ___ _

[issue15973] Segmentation fault on timezone comparison

2012-09-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > What about datetime subclasses? Do you mean timezone subclasses? Timezone type is not subclassable, but we should probably support comparison with any tzinfo subclass. I'll add this logic, but arguably that would be a new feature. -- __

[issue15979] Improve timeit documentation

2012-09-19 Thread Ezio Melotti
New submission from Ezio Melotti: The documentation of timeit can be improved in several ways: * it should start with a couple of short and comprehensible examples that show the basic usage from the command-line and from the code; * the 3 convenience functions should be moved before the class

[issue15979] Improve timeit documentation

2012-09-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue14873] Windows devguide: clarification for build errors due to missing optional dependencies

2012-09-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset a9f8a205fa9a by Ezio Melotti in branch 'default': #14873: add paragraph about building errors caused by missing dependencies on Windows. Patch by Chris Jerdonek, initial patch by Merlijn van Deen. http://hg.python.org/devguide/rev/a9f8a205fa9a ---

[issue14873] Windows devguide: clarification for build errors due to missing optional dependencies

2012-09-19 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the patches! -- assignee: -> ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue14873] Windows devguide: clarification for build errors due to missing optional dependencies

2012-09-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks, Ezio! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue15978] asyncore: included batteries don't fit

2012-09-19 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: The proposal looks way too ambitious and vaguely defined to me to say the least. Integrating any async framework into another one which uses a blocking concurrency model is hard. If that async framework is asyncore is usually also a bad idea. -- __

[issue15939] make *.rst files in Doc/ parseable by doctest

2012-09-19 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue15939] make *.rst files in Doc/ parseable by doctest

2012-09-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: My opinion on the "+LINUX" and "+WINDOWS" doctest directives in Doc/library/ctypes.rst is simply to leave them alone for now. We can make those errors go away in code when running doctest by adding no-op calls to doctest.register_optionflag() as below: +doct

[issue15949] docs.python.org not getting updated

2012-09-19 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +loewis, ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

  1   2   >