Alexandre Vassalotti alexan...@peadrop.com added the comment:
This is not a typo. cStringIO.StringIO is a factory function that
returns either a cStringO object (for writing) or cStringI (for
reading). If this behavior causes a problem to you, then consider using
StringIO.StringIO.
Alexandre Vassalotti alexan...@peadrop.com added the comment:
Ah, I just remembered the smart way I had devised some time ago to
handle this issue without changing the constructor of array.array. The
trick would be to add a __reduce__ method to array.array. This method
would return a special
Alexandre Vassalotti alexan...@peadrop.com added the comment:
Would it would be sufficient to add a function in the pickletools
capable of converting old Python 2 pickles to the new format in Python
3? Alternatively, we could add a compatibility Unpickler class that
would override the find_class
Antoine Pitrou pit...@free.fr added the comment:
A micro-benchmark of Collin's patch:
python -m timeit -s import cPickle; l=range(150) cPickle.dumps(l,
protocol=-1)
* before: 12.1 usec per loop
* after: 10.1 usec per loop
= 15% faster on a favorable case
--
nosy: +pitrou
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
I reproduce the problem with python 2.5, and it seems corrected with
python 2.6.1.
2.5 now only accept security fixes: closing as out of date.
--
nosy: +amaury.forgeotdarc
resolution: - out of date
status: open - closed
New submission from Friedrich Weber f...@reichbier.de:
Hi,
from http://docs.python.org/library/future_builtins.html:
.. function:: oct(object)
Works like the builtin :func:`oct`, but instead of :meth:`__oct__` it
will
use the :meth:`__index__` method on its argument to get an integer
Guido van Rossum gu...@python.org added the comment:
John, I'm adding a +0 to cancel out Raymond's -1. I've read your
motivation and, like you, hope/expect that benchmarking will show this
has no real impact. But I need data to decide. Once there are
benchmark results I'll revise my view. A
Changes by Stefan van der Walt ste...@sun.ac.za:
--
nosy: +stefanv
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2527
___
___
Python-bugs-list
Changes by Stefan van der Walt ste...@sun.ac.za:
--
nosy: +stefanv
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2057
___
___
Python-bugs-list
Alexandre Vassalotti alexan...@peadrop.com added the comment:
Silly me, I had changed the PyDict_Size call in outer loop for Py_SIZE
and this is of course totally wrong. Here's a good patch (I am pretty
sure now! ;-) I ran the whole test suite and I saw no failures.
Collin, you can go ahead and
Alexandre Vassalotti alexan...@peadrop.com added the comment:
Sigh... silly me again. There is some other junk in my last patch.
--
Added file: http://bugs.python.org/file13598/pickle_batch_dict_exact_py3k-5.diff
___
Python tracker
Changes by Alexandre Vassalotti alexan...@peadrop.com:
Removed file:
http://bugs.python.org/file13596/pickle_batch_dict_exact_py3k-3.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5670
___
Changes by Alexandre Vassalotti alexan...@peadrop.com:
Removed file:
http://bugs.python.org/file13597/pickle_batch_dict_exact_py3k-4.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5670
___
Walter Dörwald wal...@livinglogic.de added the comment:
Indeed this patch does fix the bug. Go ahead and check it in.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5640
___
Michael Foord mich...@voidspace.org.uk added the comment:
+1 on adding a cleanUp list where entries are executed unconditionally
even on failure of setUp.
If there is consensus that this is a good thing (looks like it to me
from the discussion here) then I can apply the patch to head.
I'll
Michael Foord mich...@voidspace.org.uk added the comment:
OK, so the patch as submitted *isn't* for the cleanUp suggestion (d'oh -
I should have read it before posting the last comment).
One possibility is that this bug is closed as won't fix (the patch as
provided should definitely not be
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
This older post
http://bytes.com/groups/python/786579-python-2-2-1-select
describes a similar problem where select() is used on a buffered file
object (a pipe to another process)
IMO it should be documented that select() does not work
Collin Winter coll...@gmail.com added the comment:
I've added a microbenchmark to perf.py called pickle_list. Running that
on this change (perf.py -r -b pickle_list):
pickle_list:
Min: 1.126 - 0.888: 26.86% faster
Avg: 1.154 - 0.906: 27.43% faster
Significant (t=115.404547, a=0.95)
That's
Collin Winter coll...@gmail.com added the comment:
I've made test_xpickle support Python 2.4 because it uses Python 2.4,
2.5 and 2.6 to check that we haven't broken backwards compatibility with
those versions.
I made AbstractCompatTests use cPickle because that's what I've been
changing :) I
Antoine Pitrou pit...@free.fr added the comment:
How much is very slow? If it's less than 10-15 seconds I think it's ok.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5665
Collin Winter coll...@gmail.com added the comment:
test_xpickle currently takes over three minutes on my MacBook Pro to
test compatibility with Python 2.4, 2.5 and 2.6, and adding tests for
the pickle module will at least double that, if not push it well above
10 minutes. That's why I recommend
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
We took a similar issue in test_decimal and came up with a better
approach to using the resource flag. If the resource is not enabled,
the tester runs a random subset of the tests. Over time, that means
that all the tests
Changes by Brett Cannon br...@python.org:
--
resolution: - fixed
stage: commit review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5646
___
Michael Foord mich...@voidspace.org.uk added the comment:
Why is assertMultiLineEqual not the default assert method for basestring?
Even for small strings the output is useful.
--
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
test_xpickle currently takes over three minutes on my MacBook Pro to
test compatibility with Python 2.4, 2.5 and 2.6, and adding tests for
the pickle module will at least double that, if not push it well above
10 minutes.
Ouch! A couple of
Kurt B. Kaiser k...@shore.net added the comment:
As far as typing in the comment widget goes - it
works fine if you
don't
add CR at the end of the lines until you go back
and edit it by
inserting some text. Then the faulty
wordwrapping kicks in, and it
has
to be fixed by removing all
Antoine Pitrou pit...@free.fr added the comment:
Raymond, how would you reconcile your random approach with the fact that
buildbots only display errors after a second verification run?
--
___
Python tracker rep...@bugs.python.org
New submission from Michael Foord mich...@voidspace.org.uk:
Proposal to add a cleanUp stack to unittest.TestCase. This is a list of
callables to be called (LIFO) to cleanup resources. If there are items
on the stack it should be called even if setUp fails. Otherwise it
should be called after
Kurt B. Kaiser k...@shore.net added the comment:
Rev 62545 to 2.6 was forward ported to 3.0 on 4May,
r62716. I'm using py3k HEAD and it works the same
as 2.6: pressing Home toggles beween the left margin
and the start of the code text. It works the same way
on Linux and Windows XP.
Won't fix,
Gregory P. Smith g...@krypto.org added the comment:
I'm used to doing this using a finally clause in the setUp() method (if
I do it at all, I'm not used to setUp failing).
I guess this would be a convenience to avoid the need for this pattern?
I'm not sure we really need a list of cleanup
Michael Foord mich...@voidspace.org.uk added the comment:
This is a nice (simple to use and understand) pattern for resource
allocation / deallocation.
Supporting the cleaning up of resources when setUp fails (without
duplicating clean up code) is just one use case. (I agree setUp failure
is
Michael Foord mich...@voidspace.org.uk added the comment:
From your example this would completely remove the need for the
conditional checking in the cleanup code. Only resources actually
allocated would be in the stack.
--
___
Python tracker
Gregory P. Smith g...@krypto.org added the comment:
assertMultiLineEqual might be reasonable as a default assertEqual for
unicode. I wouldn't want to do it for bytes (py 2.x string).
--
___
Python tracker rep...@bugs.python.org
Michael Foord mich...@voidspace.org.uk added the comment:
Fair point. :-)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2578
___
___
Michael Foord mich...@voidspace.org.uk added the comment:
Closing. The patch as suggested should not be applied. Instead tearDown
should be called in a finally block in the setUp for this specific use case.
I've created a new issue (#5679) for the cleanUp idea which I think is good.
--
Tony Nelson tony_nel...@users.sourceforge.net added the comment:
This seems entirely reasonable, helpful, and in accord with the mapping
of ascii to us-ascii. I recommend accepting this patch or a slightly
fancier one that would also do utf_8.
There are pobably other encoding names with the
Changes by Tony Nelson tony_nel...@users.sourceforge.net:
--
versions: +Python 2.6, Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4487
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
The buildbots should be running with the resource enabled (run the full
set of tests, every time).
If we need the reproducible results with the resource disabled, then a
random seed (different for each successful run) can be
Collin Winter coll...@gmail.com added the comment:
Updated the patch to include a regrtest xpickle resource, which
restricts if the backwards compat tests will be run. For normal
development, the existing tests should be fine; you only need these
tests if you're mucking with the pickle output.
Changes by Michael Foord mich...@voidspace.org.uk:
--
type: behavior - feature request
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5679
___
___
Changes by Benjamin Peterson benja...@python.org:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5345
___
___
Collin Winter coll...@gmail.com added the comment:
FYI, I just added a pickle_dict microbenchmark to perf.py. Using this
new microbenchmark, I see these results (perf.py -r -b pickle_dict):
pickle_dict:
Min: 2.092 - 1.341: 56.04% faster
Avg: 2.126 - 1.360: 56.37% faster
Significant
Terry J. Reedy tjre...@udel.edu added the comment:
The bug reported here is that on Windows XP, on my machine, in 2.5 and
still in multiple releases of 3.0 and 3.0.1, pressing Home sends the
cursor DIRECTLY to the left margin, before '', and never stops at the
beginning of the text, after ' '.
Collin Winter coll...@gmail.com added the comment:
Amaury, I can't reproduce the issue you're seeing with empty dicts.
Here's what I'm doing:
dhcp-172-19-19-199:trunk collinwinter$ ./python.exe
Python 2.7a0 (trunk:71100M, Apr 3 2009, 14:40:49)
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Benjamin Peterson benja...@python.org added the comment:
So this is a doc bug? If so, need it still block tomorrow's release?
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4847
Renaud Blanch rndbl...@gmail.com added the comment:
Daniel: i can't remember the exact scenario (i filled this bug 2 years
ago !)
after having a look back at email.message.Message.get_payload, i
remember the problem: the decoding errors are silented by the method and
you have no way to know if
Aki akin...@users.sourceforge.net added the comment:
Hello Jani Hakala,
Thank you very much for working on the case I created.
And, sorry for not getting back to you.
I have confirmed observation that the problem is fixed under Linux if
Tkinter is imported after fork().
However, this remains
Changes by Kurt B. Kaiser k...@shore.net:
--
assignee: - kbk
nosy: +kbk
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5594
___
___
Benjamin Peterson benja...@python.org added the comment:
Applied the patch in r71107. The issues these depend on can be fixed now.
--
nosy: +benjamin.peterson
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
Brett Cannon br...@python.org added the comment:
If you could, Ismail, can you verify this either from svn or when the
next release of 3.1 comes out and update this issue?
--
status: closed - pending
___
Python tracker rep...@bugs.python.org
New submission from Matthew Barnett pyt...@mrabarnett.plus.com:
Patch idle-args.diff adds a dialog for entering command-line arguments
for a script from within IDLE itself.
--
components: IDLE
files: idle-args.diff
keywords: patch
messages: 85341
nosy: mrabarnett
severity: normal
Changes by Collin Winter coll...@gmail.com:
--
components: Extension Modules
files: cpickle_writes.patch
keywords: needs review, patch
nosy: alexandre.vassalotti, collinwinter
severity: normal
status: open
title: Add a simple pickle optimizer to cPickle
type: performance
versions:
New submission from Collin Winter coll...@gmail.com:
Bah, hit enter too soon.
--
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5681
___
Jani Hakala jahak...@iki.fi added the comment:
You can do something like
import gui
gui.start()
in your Panel.draw() and 'from Tkinter import *' in the gui module which
should contain your GUI-related code.
Or you could just do 'from Tkconstants import *' in your tk_test.py
--
Michael Foord mich...@voidspace.org.uk added the comment:
And actually your conditionally_undo_setup() call in setUp is incorrect.
It should in an except block that re-raises rather than a finally block
(which will do the cleanup even in non-exceptional circumstances). Easy
code to get wrong...
Michael Foord mich...@voidspace.org.uk added the comment:
Running out of time for 2.7 as well...
--
nosy: +michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1745
___
New submission from Alexandre Vassalotti alexan...@peadrop.com:
Here is a patch that moves the source files of the _io module (and
closely related modules) into subdirectory of Modules. The new file
hierarchy proposed is the following:
Modules/
_io/
_iomodule.h
_iomodule.c
Antoine Pitrou pit...@free.fr added the comment:
Where's the patch?
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5682
___
___
Benjamin Peterson benja...@python.org added the comment:
2009/4/3 Michael Foord rep...@bugs.python.org:
Michael Foord mich...@voidspace.org.uk added the comment:
Running out of time for 2.7 as well...
How so? The first 2.7 alpha probably won't be until the end of summer.
--
Changes by Alexandre Vassalotti alexan...@peadrop.com:
Added file: http://bugs.python.org/file13602/move-iomodule-in-subdir.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5682
___
New submission from Collin Winter coll...@gmail.com:
This patch simplifies cPickle's complicated internal buffering system.
The new version uses a single buffer closer to the Pickler object,
flushing to a file object only when necessary. This avoids the overhead
of several indirection layers for
Antoine Pitrou pit...@free.fr added the comment:
Some comments:
- there are some unrelated pickle changes in your patch
- in Makefile.pre.in, it seems the IO_OBJS definition might need updating
Otherwise I don't have any objections.
Please note, when committing, it would be good to use svn mv
Alexandre Vassalotti alexan...@peadrop.com added the comment:
Antoine, you're too quick. :-)
By the way, the patch is fairly large due to the renaming. So, here's
quick-and-dirty summary of the important changes.
PCbuild/pythoncore.vcproj: Renamed the paths and added a Filter/ tag
for the
R. David Murray rdmur...@bitdance.com added the comment:
Nope. Sorry I forgot to change the priority.
--
priority: release blocker - normal
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4847
Alexandre Vassalotti alexan...@peadrop.com added the comment:
Antoine wrote:
- in Makefile.pre.in, it seems the IO_OBJS definition might need updating
I updated the patch to also fix IO_OBJS. Also, I added stringio.c to
IO_OBJS.
Please note, when committing, it would be good to use svn mv
Changes by Collin Winter coll...@gmail.com:
--
nosy: +collinwinter
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5634
___
___
Python-bugs-list
Changes by Alexandre Vassalotti alexan...@peadrop.com:
Removed file: http://bugs.python.org/file13602/move-iomodule-in-subdir.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5682
___
Changes by Alexandre Vassalotti alexan...@peadrop.com:
Removed file: http://bugs.python.org/file13604/move-iomodule-in-subdir-2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5682
___
Changes by Collin Winter coll...@gmail.com:
--
nosy: +collinwinter
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3675
___
___
Python-bugs-list
STINNER Victor victor.stin...@haypocalc.com added the comment:
#5666 is closed. I finally prefers getarg('c') (byte string of lenght 1).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5391
Changes by Collin Winter coll...@gmail.com:
--
nosy: +collinwinter
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2389
___
___
Python-bugs-list
Antoine Pitrou pit...@free.fr added the comment:
I think you can commit!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5682
___
___
Alexandre Vassalotti alexan...@peadrop.com added the comment:
Have you tested PCbuild changes? As, this is the part I am the most
unsure about.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5682
Antoine Pitrou pit...@free.fr added the comment:
Have you tested PCbuild changes? As, this is the part I am the most
unsure about.
Ok, unless someone beats me to it, I'm gonna fire a Windows VM and test
this.
--
___
Python tracker
Antoine Pitrou pit...@free.fr added the comment:
Some failures:
_iomodule.c
c1 : fatal error C1083: Impossible d'ouvrir le fichier source :
'..\..\Modules\_io\_iomodule.c' : No such file or directory
textio.c
c1 : fatal error C1083: Impossible d'ouvrir le fichier source :
Antoine Pitrou pit...@free.fr added the comment:
Or perhaps these are really meant as the new file names? Initially I
thought the purpose was initially to move the files into a subdir.
--
___
Python tracker rep...@bugs.python.org
R. David Murray rdmur...@bitdance.com added the comment:
rdmur...@backup:~/trunkecho $LC_ALL
tr_TR
rdmur...@backup:~/trunk./python
Python 2.7a0 (unknown, Apr 3 2009, 19:56:38)
[GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)] on linux2
Type help, copyright, credits or license for more information.
Antoine Pitrou pit...@free.fr added the comment:
After also renaming the files, there is a slight bug in
PCbuild/pythoncore.vcproj. Here is a subpatch incorporating the changes
to this only file.
--
Added file: http://bugs.python.org/file13606/pythoncore.patch
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5683
___
___
Python-bugs-list mailing
R. David Murray rdmur...@bitdance.com added the comment:
Is this about correct? Do any test cases need to be updated or added? I
notice that something called BytesIO is imported from io but not used.
Were
some test cases removed which used to involve that class or is that a 2to3
artifact?
R. David Murray rdmur...@bitdance.com added the comment:
Oh, yeah, other 3.1 differences are that the unicode test is uncommented
and updated, and a test is added to make sure nulls are handled correctly.
--
___
Python tracker rep...@bugs.python.org
Alexandre Vassalotti alexan...@peadrop.com added the comment:
Thanks! Here is the updated patch.
--
Added file: http://bugs.python.org/file13607/move-iomodule-in-subdir-4.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5682
R. David Murray rdmur...@bitdance.com added the comment:
Doc patch applied in r71116.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4847
___
Tony Nelson tony_nel...@users.sourceforge.net added the comment:
I think the problem is best viewed as headers are not being parsed
according to RFC2822 and decoded after that, so the recognition of
encoded words should be looser, and not require whitespace around them,
as it is not required in
Tony Nelson tony_nel...@users.sourceforge.net added the comment:
See patch in issue1079. I don't think email.header can require
whitespace until it decodes parsed headers, as whitespace is not always
required.
--
nosy: +barry, tony_nelson
versions: +Python 2.7
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:
I'm sure, but with following test code,
def run(module):
print(///)
print(//, module)
memio = module.StringIO(newline=None)
# The C StringIO decodes newlines in write() calls, but the
R. David Murray rdmur...@bitdance.com added the comment:
Duplicate of 896199, fixed in r70719.
--
nosy: +r.david.murray
resolution: - duplicate
stage: - committed/rejected
status: open - closed
superseder: - Some Carbon modules missing from documentation
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp:
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5645
___
___
R. David Murray rdmur...@bitdance.com added the comment:
Still gives the same message in 2.7a0. Looks to be simple enough to
fix: just stop masking the UnicodeDecode and TypeError messages produced
by the PyUnicode_FromObject call in the PyUnicode_Contains method. Test
and patch attached. If
Aki akin...@users.sourceforge.net added the comment:
Hello Jani Hakala,
Thank you for your suggestions.
Yes, from Tkconstants import * would ease the pain.
The second suggestion, importing gui in another file didn't work well
with my code as I'm using a class to host both gui process and
90 matches
Mail list logo