New submission from Cournapeau David da...@ar.media.kyoto-u.ac.jp:
I believe the current pyport.h for windows x64 has some problems. It
does not work for compilers which are not MS ones, because building
against the official binary (python 2.6) relies on features which are
not enabled unless
Martin v. Löwis mar...@v.loewis.de added the comment:
Martin, that gives some answers like round(51, -2) -- 0 instead of 100.
I see. Here is a version that fixes that.
def round(n, i):
i = 10**(-i)
r = n%(2*i)
o = i/2
n -= r
if r = o:
return n
elif r 3*o:
Changes by Martin v. Löwis mar...@v.loewis.de:
--
priority: critical - release blocker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4631
___
___
Mark Dickinson dicki...@gmail.com added the comment:
Updated patch: fix test_builtin. (Rest of the patch unchanged.)
Added file: http://bugs.python.org/file12412/round_int_int2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4707
New submission from Kuba Wieczorek faw...@gmail.com:
This behaviour has been known of course for quite long time. I suppose
this is not intentional so I've played a bit with this and I hope you'll
consider some little change.
Currently, if a ZIP archive contains some subdirectories then
Antoine Pitrou pit...@free.fr added the comment:
The patch should have at least a test so that we don't have a regression
on this one.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4631
___
Daniel Diniz aja...@gmail.com added the comment:
Hi Mark,
I think there's an overflow for ndigits that predates your patch:
round(2, -2**31 +1)
2
round(2, -2**31 +2)
nan
(it looks like these lines above make 2.6 hang :/)
Now, I'm getting a segfault in 3.0 when Ctrl + C-ing during a long
Mark Dickinson dicki...@gmail.com added the comment:
round(2, -2**31 + 2) # Press Ctrl + C
Segmentation fault
(backtrace below)
Thanks, Daniel. It looks like I messed up the refcounting in the error-
handling section of the code. I'll fix this.
I don't think the hang itself should be
Mark Dickinson dicki...@gmail.com added the comment:
Cause of segfault was doing Py_XDECREF on a pointer that hadn't been
initialised to NULL.
Here's a fixed patch.
I still get the instant result:
round(2, -2**31+1)
2
which is a little odd. It's the correct result, but I can't see how
it
Mark Dickinson dicki...@gmail.com added the comment:
Aha. The special result for round(x, 1-2**31) has nothing to do with this
particular patch. It's a consequence of:
#define UNDEF_NDIGITS (-0x7fff) /* Unlikely ndigits value */
in bltinmodule.c. The same behaviour results for all
Daniel Diniz aja...@gmail.com added the comment:
Mark Dickinson rep...@bugs.python.org wrote:
I don't think the hang itself should be considered a bug, any more
than the hang from 10**(2**31-1) is a bug.
Well, besides the fact that you can stop 10**(2**31-1) with Ctrl+C but
not round(2,
Mark Dickinson dicki...@gmail.com added the comment:
[Me]
which is a little odd. It's the correct result, but I can't see how
[Daniel]
Is it correct?
No. :-) It should be 0, as you say.
Given that round(2, 2**31) throws an OverflowError
I think this is wrong, too. It should be 2. It's
New submission from Scott Dial sc...@scottdial.com:
There is a problem with the table contents with respect to literals that
cannot be word-wrapped. I see this issue here:
http://docs.python.org/dev/2.6/library/multiprocessing.html
The line in the table of contents that reads The
Roumen Petrov bugtr...@roumenpetrov.info added the comment:
Tests (trunk 21 dec 2008) fail as before (i.e. test_curses,
test_urllib2_localnet and test_urllibnet) but now test_smtplib fail too.
Single test always succeed as example:
$ echo test_smtplib /tmp/pynexttest
$ ./python -E -tt
Valery khame...@gmail.com added the comment:
Hi, gurus, can anyone then give a hint what we mortals should use in
order to form the URL with non-ascii symbols? We loved so much idea to
feed our national symbols to urllib.quote as unicode string... and now
we are quite disoriented... Thanks
New submission from Georg Brandl ge...@python.org:
When unpickling dict subclasses, the dict is filled via setitem before
__setstate__ is called. This, and other behavior around subclasses of
classes that have special pickle behavior should be documented.
--
assignee: georg.brandl
Valery khame...@gmail.com added the comment:
(self-answer to msg78153)
the working recipe is:
http://www.nabble.com/Re:-Problem:-neither-urllib2.quote-nor-
urllib.quote-encode-the--unicode-strings-arguments-p19823144.html
___
Python tracker
New submission from Christoph Zwerschke c...@online.de:
If you install sgmlop (downloadable from
http://effbot.org/downloads/#sgmlop) under Python 2.x, then this can
break xmlrpclib.
You can reproduce this problem as follows (I have tested with Py 2.4,
2.5 and 2.6):
data = ?xml
Changes by Christoph Zwerschke c...@online.de:
--
keywords: +patch
Added file: http://bugs.python.org/file12418/xmlrpclib.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4713
___
New submission from Antoine Pitrou pit...@free.fr:
This patch prints opcode statistics at the end of a pybench run if
DYNAMIC_EXECUTION_PROFILE has been enabled when compiling the interpreter.
Is it ok? Is it better to add it to the Benchmark class?
--
components: Demos and Tools
Koen van de Sande k...@tibed.net added the comment:
I'm no expert, but is it possible for ZIP files to have Windows-style
path seperators ('\') as well?
And is this new behavior desirable for existing code as well? It might
break existing applications, so perhaps a new extractrecursive()
New submission from Antoine Pitrou pit...@free.fr:
This patch optimizes the bytecode for conditional branches.
For example, the list comprehension [x for x in l if not x] produced
the following bytecode:
1 0 BUILD_LIST 0
3 LOAD_FAST0 (.0)
Kuba Wieczorek faw...@gmail.com added the comment:
I'm not sure if it would make sense to save current
extract()/extractall() behaviour and implement new with another function
because current one is simply faulty. And if it's about BC breaks then
well... it may be introduced in 3.0 line, I think
Martin v. Löwis mar...@v.loewis.de added the comment:
Unfortunately, the patch is broken. The program
fname='test123'
f=open(fname,'w')
f.read()
crashes with the patch applied.
I think I will revert the patch in 2.5.3, release 2.5.4, and reject the
patch.
Guilherme Polo ggp...@gmail.com added the comment:
It isn't being careful when calling PyErr_SetFromErrno inside the
Py_UniversalNewlineFread function since this function is being called
all over fileobject after releasing the GIL.. so, isn't this just a
matter of adding pairs of
Guilherme Polo ggp...@gmail.com added the comment:
On Sun, Dec 21, 2008 at 9:52 PM, Martin v. Löwis rep...@bugs.python.org wrote:
Martin v. Löwis mar...@v.loewis.de added the comment:
It isn't being careful when calling PyErr_SetFromErrno inside the
Py_UniversalNewlineFread function since
Antoine Pitrou pit...@free.fr added the comment:
Here is an optional patch which provides the two opcodes I was talking
about (I've called them POP_OR_JUMP and JUMP_OR_POP). Together with a
bit of work on the peepholer they make the bytecode expression of
boolean calculations very concise.
A
Changes by hippietrail hippytr...@gmail.com:
--
nosy: +hippietrail
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3297
___
___
Python-bugs-list
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
From the thread in c.l.p:
Pros (of changing os.pipe() to return inheritable pipes):
- as it isn't explicitely documented whether os.pipe() returns
inheritable pipes or not, both versions are right according to the
documentation.
29 matches
Mail list logo