Mark Dickinson dicki...@gmail.com added the comment:
Fixed in r76663, r76664. Thanks for the report!
--
resolution: - fixed
status: open - closed
versions: +Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7430
Mark Dickinson dicki...@gmail.com added the comment:
Zooko: Yes; that's the sort of solution that's needed if we're not
allowed to assume two's complement with the extraordinary value (-
sys.maxint - 1) not a trap representation. If we are allowed to
assume this, then more efficient solutions
Mark Dickinson dicki...@gmail.com added the comment:
Mike Cowlishaw has confirmed that the tests scbx164, scbx165 (in version
2.59 of the tests) are implementation-specific, so test_decimal is doing
the right thing in skipping them. So I think this issue can be closed.
I don't think it's
Changes by Antoine Pitrou pit...@free.fr:
--
assignee: - tarek
nosy: +tarek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1923
___
___
Antoine Pitrou pit...@free.fr added the comment:
Why do you say that:
There is no feasible way the bf_releasebuffer can keep track of how many
calls to it have been made.
Because that's exactly what e.g. bytearray objects do (see the
ob_exports field in Objects/bytearrayobject.c).
Antoine Pitrou pit...@free.fr added the comment:
Nice catch. I wonder whether there's a simple way of cooking up an unit
test for this (short of creating a new extension type).
--
assignee: - pitrou
nosy: +pitrou
priority: - high
stage: - needs patch
versions: +Python 2.7, Python 3.2
Pauli Virtanen p...@iki.fi added the comment:
Why do you say that:
There is no feasible way the bf_releasebuffer can keep track of how
many calls to it have been made.
I was probably thinking about allocating new temporary arrays for
strides etc. on each *_getbuffer -- if that's done,
Antoine Pitrou pit...@free.fr added the comment:
I was probably thinking about allocating new temporary arrays for
strides etc. on each *_getbuffer -- if that's done, then manually
keeping track of all the allocated memory seems like a waste of effort
(ie. not feasible).
Yes, I know it
Pauli Virtanen p...@iki.fi added the comment:
I think this is an implementation issue in MemoryView rather than an
issue with the buffer interface. PEP 3118 states, This same bufferinfo
structure must be passed to bf_releasebuffer (if available) when the
consumer is done with the memory. -- this
Eric Smith e...@trueblade.com added the comment:
See the discussion on python-dev, in particular Martin's comment at
http://mail.python.org/pipermail/python-dev/2009-December/094412.html
The solutions to this seem too complex for 2.x. It is not a problem in 3.x.
--
resolution: - wont
Antoine Pitrou pit...@free.fr added the comment:
To work around this, *_releasebuf must be written so that it does not
use the view pointer passed to it -- the data structure may have been
shallow copied and any memory pointers in it may have already been freed.
I can try to cook up a
New submission from Anthony Foglia afog...@gmail.com:
It would be nice if pprint could format namedtuples wrapping lines as it
does with tuples.
Looking at the code, this does not look like an easy task. Completely
rewriting pprint to allow it to be extensible to user-created classes
would be
Changes by Benjamin Peterson benja...@python.org:
--
assignee: - rhettinger
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7434
___
Jake McGuire j...@youtube.com added the comment:
I think what's happening is that your connection is being closed due to
inactivity, so the status line that comes back is empty. Printing
repr(line) would probably make the emptiness clear, but maybe the httplib
code should put in a more
Brian Curtin cur...@acm.org added the comment:
#1286 looks related
--
nosy: +brian.curtin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7426
___
Changes by Alexandre Vassalotti alexan...@peadrop.com:
--
resolution: - duplicate
stage: - committed/rejected
status: open - closed
superseder: - fileinput, StringIO, and cStringIO do not support the with
protocol
___
Python tracker
New submission from flox la...@yahoo.fr:
In python 3.x there's a single type for integer: int.
The automatic conversion of the test suite has created many tests which
are duplicate of each other.
The attached patch removes duplication of tests, and fix the strings for
these modules:
Changes by flox la...@yahoo.fr:
--
keywords: +patch
Added file: http://bugs.python.org/file15449/issue7435_py3k.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7435
___
New submission from Terry J. Reedy tjre...@udel.edu:
On Python list, someone asked what guarantees that functions have and
will continue to have assignable attributes. I started to say 'the docs'
but failed to find anything specific in 7.6. Function definitions or
LibRef 5.12.3. Functions (all
Tom Switzer thomas.swit...@gmail.com added the comment:
I am not sure I understand the reasoning behind removing the cmp
parameter (and agree with Lea Wiemann). Trying to wedge a proper
comparison into the key parameter is clumsy and unreadable (as can be
seen in the 2to3 example above). The
Terry J. Reedy tjre...@udel.edu added the comment:
I consider the binary bitwise operations, for negative ints, to be
either undefined or wrongly implemented. Consider the following (3.1)
3^2
1
-3^2
-1
3^-2
-3
-3^-2
3
2^3
1
-2^3
-3
Something change sign just flips the sign of the result,
Guido van Rossum gu...@python.org added the comment:
Can someone provide a code sample to make this argument more
understandable for those of us who don't compare points by angular order
for a living... :-)
I'm not sure what the 2to3 example (I presume you mean msg59937) shows
except that
Tim Peters tim.pet...@gmail.com added the comment:
Terry, the language reference also says:
For the purpose of shift and mask operations, a binary representation is
assumed, and negative numbers are represented in a variant of 2's
complement which gives the illusion of an infinite string of
Antoine Pitrou pit...@free.fr added the comment:
Here is a new patch with an internal memo dict to reuse equal keys, and
some tests.
--
stage: - patch review
versions: +Python 3.2
Added file: http://bugs.python.org/file15450/json-opts2.patch
___
Changes by Antoine Pitrou pit...@free.fr:
Removed file: http://bugs.python.org/file15444/json-opts.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6594
___
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +eric.smith, mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7435
___
___
New submission from Ned Deily n...@acm.org:
See the thread starting at http://mail.python.org/pipermail/pythonmac-
sig/2009-December/021907.html for full details.
It appears two vestigial gif files included in the 2.6.4 OS installer
are being installed under corrupted file names by the OS X
Tarek Ziadé ziade.ta...@gmail.com added the comment:
Notice that we are also losing something else that can mean a lot
in reST : empty lines. They also need to be escaped.
But we can't do it properly unless we encode empty lines with something
else than a 8 space line because when
New submission from Arfrever Frehtes Taifersar Arahesis
arfrever@gmail.com:
It is sometimes useful to call subprocess.Popen() in setup.py of
Python. Currently it would fail, because subprocess module tries to
import some modules, which not always are used. I suggest to delay some
imports.
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
Added file: http://bugs.python.org/file15452/subprocess.py-3.2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7438
___
New submission from David W. Lambert b49p23t...@stny.rr.com:
Raymond Hettinger posted clever Hamming number generator,
http://code.activestate.com/recipes/576961/
which I tried to modify. The function gives incorrect output when
called as hamming_numbers(shorthand = True). It seemed reasonable
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
FWIW, we had a long discussion on comp.lang.python and the net result
was that no use cases were found that required a cmp function. One
complex case (sorting recursive tree structures) at first appeared to
need a
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
I agree with you that pprint needs to be rewritten to make it more
extensible.
I do not see a straight-forward way of handling your feature request.
First, namedtuple() is a factory function and is not itself a class, so
New submission from Mario Vilas mvi...@gmail.com:
I just hit this silly bug in distutils, should be quite easy to fix.
When building MSI installers for a target_version other than the current
Python version, the target directory selection dialog shows a wrong message.
For example, here is a
Mario Vilas mvi...@gmail.com added the comment:
My proposed patch is to change line 506 of bdist_msi.py from this:
version = sys.version[:3]+
to this:
version = self.target_version[:3]+
which is what I did to work around the problem.
--
35 matches
Mail list logo