[issue5345] cStringIO class name typo

2009-04-03 Thread Alexandre Vassalotti

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.

Alternatively, you could upgrade to Python 2.7 or 3.0 and use
io.StringIO() which doesn't have this limitation.

--
nosy: +alexandre.vassalotti
resolution:  - wont fix

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5345
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2389] Array pickling exposes internal memory representation of elements

2009-04-03 Thread Alexandre Vassalotti

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 constructor function, the binary data of the
array and a string representing the format of the array.  Upon
unpickling, the special constructor function would be called with the
binary data and its format and then it would recreate the array.

Now, the only thing I am not sure about is whether this would work well
with subclasses of array.array. I guess we make __reduce__ also return
the instance's type which could be used by special constructor to
recreate the instance from the proper subclass.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2389
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3675] Python 2.6 can't read sets pickled with Python 3.0

2009-04-03 Thread Alexandre Vassalotti

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 method to do the name translation on-the-fly.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3675
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5671] Speed up pickling of lists in cPickle

2009-04-03 Thread Antoine Pitrou

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5671
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1654429] thread join() with timeout hangs on Windows 2003 x64

2009-04-03 Thread Amaury Forgeot d'Arc

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1654429
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5678] typo in future_builtins documentation

2009-04-03 Thread Friedrich Weber

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
that is
   then converted to hexadecimal.

should rather be something like '... that is then converted to octal.'

--
assignee: georg.brandl
components: Documentation
messages: 85304
nosy: fredreichbier, georg.brandl
severity: normal
status: open
title: typo in future_builtins documentation
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5678
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5654] Add C hook in PyDict_SetItem for debuggers

2009-04-03 Thread Guido van Rossum

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 good place to start looking
for benchmarks might be the Performance section of
http://code.google.com/p/unladen-swallow/wiki/ProjectPlan .

--
nosy: +gvanrossum

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5654
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2527] Pass a namespace to timeit

2009-04-03 Thread Stefan van der Walt

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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2057] difflib: add patch capability

2009-04-03 Thread Stefan van der Walt

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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5670] Speed up pickling of dicts in cPickle

2009-04-03 Thread Alexandre Vassalotti

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 commit both patches. Nice work!

--
assignee:  - collinwinter
keywords: +patch
resolution:  - accepted
stage:  - commit review
Added file: http://bugs.python.org/file13597/pickle_batch_dict_exact_py3k-4.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5670
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5670] Speed up pickling of dicts in cPickle

2009-04-03 Thread Alexandre Vassalotti

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 rep...@bugs.python.org
http://bugs.python.org/issue5670
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5670] Speed up pickling of dicts in cPickle

2009-04-03 Thread Alexandre Vassalotti

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5670] Speed up pickling of dicts in cPickle

2009-04-03 Thread Alexandre Vassalotti

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5640] Wrong print() result when unicode error handler is not 'strict'

2009-04-03 Thread Walter Dörwald

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5538] tearDown in unittest should be executed regardless of result in setUp

2009-04-03 Thread Michael Foord

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 review it first and post any further comments here.

--
nosy: +michael.foord

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5538
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5538] tearDown in unittest should be executed regardless of result in setUp

2009-04-03 Thread Michael Foord

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 applied as it is a big change to
unittest setUp / tearDown semantics) and a new feature request be added
for cleanUp.

OTOH if we do have consensus that cleanUp is a worthy feature I'll just
do it...

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5538
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1705393] Select() failure (race condition)

2009-04-03 Thread Amaury Forgeot d'Arc

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 so well for
objects which have a fileno(), but do data buffering: select() only sees
the file descriptor and cannot know whether there is data in the buffer.

--
nosy: +amaury.forgeotdarc

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1705393
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5671] Speed up pickling of lists in cPickle

2009-04-03 Thread Collin Winter

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 probably the upper bound on the performance improvement to be
realized from this patch.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5671
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5665] Add more pickling tests

2009-04-03 Thread Collin Winter

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 can add tests for the pure-Python pickle module if you
want. At that point, though, test_xpickle will be very slow and we'll
want to add a regrtest resource to control how much time test_xpickle
spends running. Does xpickle work for the resource name (ie, regrtest.py
-u xpickle)?

I agree with your other points.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5665
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5665] Add more pickling tests

2009-04-03 Thread Antoine Pitrou

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5665] Add more pickling tests

2009-04-03 Thread Collin Winter

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 using the resource flag if we want to
add the same tests for the pickle module.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5665
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5665] Add more pickling tests

2009-04-03 Thread Raymond Hettinger

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 will get run even if testers are routinely not
enabling the resource.

--
nosy: +rhettinger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5665
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5646] test_importlib fails for py3k on Windows

2009-04-03 Thread Brett Cannon

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2578] additional unittest type equality methods

2009-04-03 Thread Michael Foord

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
http://bugs.python.org/issue2578
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5665] Add more pickling tests

2009-04-03 Thread Antoine Pitrou

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 minutes is already too much for a single test IMHO. I
fully agree with the desire to test as deeply as possible, but if all
modules were to become as well tested, nobody would bother running the
regression suite anymore :-)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5665
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface

2009-04-03 Thread Kurt B. Kaiser

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 the extra spaces and 
CR by hand.  The 
only 
way around it that I've found is to use hard CR.  
But then you have 
to 
second guess the right margin.  You'll notice 
that if you undo the 
wrapping it did on my comment, that the lines are 
shorter than in 
your 
comments! This paragraph was entered w/o returns. 
It gets screwed as 
soon as I click outside the widget. And the screwing 
depends on the width of my browser window, because that 
affect the width of the text entry widget.

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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2704
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5665] Add more pickling tests

2009-04-03 Thread Antoine Pitrou

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
http://bugs.python.org/issue5665
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5679] cleanUp stack for unittest

2009-04-03 Thread Michael Foord

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 tearDown.

Similar functionality is in the testing frameworks used by bzr, Twisted,
and Zope.

I will create a patch similar to the bzr implementation.

The public API is via a new method:

def addCleanUpItem(self, callable, *args, **kwargs):

Usage is:

self.db = self.createDB()
self.addCleanUpItem(self.db.close)

--
assignee: michael.foord
components: Library (Lib)
messages: 85321
nosy: michael.foord
severity: normal
status: open
title: cleanUp stack for unittest
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5679
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3851] IDLE: Pressing Home on Windows places cursor before instead of after. Solution offered.

2009-04-03 Thread Kurt B. Kaiser

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, because this is not a bug, but a feature.
It's useful for copying blocks from the shell.

If you press home to get to the start of the code
text next to the prompt, why did you press it again
except to get to the left margin?  And if you did so
accidentally, press it a third time!

--
assignee:  - kbk
resolution:  - wont fix
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3851
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5679] cleanUp stack for unittest

2009-04-03 Thread Gregory P. Smith

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 callbacks.  Got pointers 
to good examples of this in bzr/twisted/zope?


def setUp(self):
  try:
do_a_bunch_of_stuff_that_could_fail()
  finally:
conditionally_undo_setup()
  do_more()

def conditionally_undo_setup(self):
  if self.foo: 
self.foo.close()
  if self.bar:
shutil.rmtree(self.bar)

def tearDown(self):
  conditionally_undo_setup()
  undo_more()


fwiw, in your self.db.close example, normally i'd also want to remove 
and unlink the database as well as just closing it for a unittest.  
maybe not the best example.

--
nosy: +gregory.p.smith

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5679
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5679] cleanUp stack for unittest

2009-04-03 Thread Michael Foord

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 unusual.)

It provides a clean way to clean up just the resources you have
allocated in the event of test failure, without having to keep track
yourself of how far the test has got. Manually tracking resource usage
is easy to get wrong.

bzr:

http://bazaar.launchpad.net/~jml/testtools/trunk/annotate/head%3A/testtools/testcase.py


And from zope.testing:

The documentation:
http://svn.zope.org/zope.testing/trunk/src/zope/testing/setupstack.txt?rev=92340view=auto


The module:
http://svn.zope.org/zope.testing/trunk/src/zope/testing/setupstack.py?rev=92340view=auto

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5679
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5679] cleanUp stack for unittest

2009-04-03 Thread Michael Foord

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 rep...@bugs.python.org
http://bugs.python.org/issue5679
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2578] additional unittest type equality methods

2009-04-03 Thread Gregory P. Smith

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
http://bugs.python.org/issue2578
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2578] additional unittest type equality methods

2009-04-03 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

Fair point. :-)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2578
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5538] tearDown in unittest should be executed regardless of result in setUp

2009-04-03 Thread Michael Foord

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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5538
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4487] Add utf8 alias for email charsets

2009-04-03 Thread Tony Nelson

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 same issue of being
accepted by Python but not be understood by other email clients.

This issue also affects 2.6.1 and 2.7trunk.  I haven't checked 3.x.

--
nosy: +barry, tony_nelson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4487
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4487] Add utf8 alias for email charsets

2009-04-03 Thread Tony Nelson

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5665] Add more pickling tests

2009-04-03 Thread Raymond Hettinger

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 saved in a
logfile so that a particular pattern of tests can be re-run.

The idea to run some random tests when the resource flag is disabled
provides more coverage than not running any tests at all.  This was very
helpful during the early development of the decimal module.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5665
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5665] Add more pickling tests

2009-04-03 Thread Collin Winter

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.

Added backwards compat tests for the pure-Python pickle module. Total
run time with -uxpickle maxes out a little above five minutes on my
machine, with a lot of variation between runs.

Also addressed the comment about [0, 1, 2] - protocols.

--
Added file: http://bugs.python.org/file13599/pickle_tests.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5665
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5679] cleanUp stack for unittest

2009-04-03 Thread Michael Foord

Changes by Michael Foord mich...@voidspace.org.uk:


--
type: behavior - feature request

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5679
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5345] cStringIO class name typo

2009-04-03 Thread Benjamin Peterson

Changes by Benjamin Peterson benja...@python.org:


--
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5345
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5670] Speed up pickling of dicts in cPickle

2009-04-03 Thread Collin Winter

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 (t=216.895643, a=0.95)

I still need to address the comment about pickling empty dicts.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5670
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3851] IDLE: Pressing Home on Windows places cursor before instead of after. Solution offered.

2009-04-03 Thread Terry J. Reedy

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 ' '.  I am sorry if I was not clear
enough before.

Toggle behavior would be fine if it happened, and I never said
otherwise.  But it does not happen, at least not on my machine, using
the PSF .msi installer.  There is still a 3.0.2 to come.

--
resolution: wont fix - 
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3851
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5670] Speed up pickling of dicts in cPickle

2009-04-03 Thread Collin Winter

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
Type help, copyright, credits or license for more information.
 import cPickle, pickletools
 data = cPickle.dumps({}, protocol=2)
 pickletools.dis(data)
0: \x80 PROTO  2
2: }EMPTY_DICT
3: .STOP
highest protocol among opcodes = 2
 data
'\x80\x02}.'


What are you doing to produce the MARK SETITEMS sequence?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5670
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4847] csv fails when file is opened in binary mode

2009-04-03 Thread Benjamin Peterson

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1672568] silent error in email.message.Message.get_payload

2009-04-03 Thread Renaud Blanch

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 the decoding has been successful or not.
to find my malformed email i had to patch the module like that
(basically just removing the try/except blocks):

patch
--- message.py.orig 2009-04-03 23:46:47.0 +0200
+++ message.py  2009-04-03 23:48:27.0 +0200
@@ -192,19 +192,11 @@
 if cte == 'quoted-printable':
 return utils._qdecode(payload)
 elif cte == 'base64':
-try:
-return utils._bdecode(payload)
-except binascii.Error:
-# Incorrect padding
-return payload
+return utils._bdecode(payload)
 elif cte in ('x-uuencode', 'uuencode', 'uue', 'x-uue'):
 sfp = StringIO()
-try:
-uu.decode(StringIO(payload+'\n'), sfp, quiet=True)
-payload = sfp.getvalue()
-except uu.Error:
-# Some decoding problem
-return payload
+uu.decode(StringIO(payload+'\n'), sfp, quiet=True)
+return sfp.getvalue()
 # Everything else, including encodings with 8bit or 7bit are
returned
 # unchanged.
 return payload
/patch

once again, the behaviour is documented, so it's not really a bug.
but it caused me a lot of trouble (and it does not conforms very well to
Errors should never pass silently.:)

but i guess applying such a patch could potentially break number of
client code so... is it worth the change?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1672568
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5527] multiprocessing won't work with Tkinter (under Linux)

2009-04-03 Thread Aki

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 a problem for me and most other Tkinter programmers.
It is fairy common to import Tkinter using from Tkinter Import *.

This is because otherwise all Tk constants need to be prefixed with
Tkinter. That is very painful and I don't see such coding except small
examples.

If I import Tkinter module after fork(), I cannot use from Tkinter *.
Therefore this forces programmers to use Tkinter. prefix for every Tk
constants.

Is there any way to figure out the cause of this problem?
Or, is there any way to do from Tkinter import * after fork()?

Thank you for your help.

Aki-

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5527
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5594] IDLE startup configuration

2009-04-03 Thread Kurt B. Kaiser

Changes by Kurt B. Kaiser k...@shore.net:


--
assignee:  - kbk
nosy: +kbk

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5594
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5666] Py_BuildValue(c) should return bytes?

2009-04-03 Thread Benjamin Peterson

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
http://bugs.python.org/issue5666
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5442] [3.1alpha1] test_importlib fails on Mac OSX 10.5.6

2009-04-03 Thread Brett Cannon

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
http://bugs.python.org/issue5442
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5680] Command-line arguments when running in IDLE

2009-04-03 Thread Matthew Barnett

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
status: open
title: Command-line arguments when running in IDLE
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file13600/idle-args.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5680
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5681] Add a simple pickle optimizer to cPickle

2009-04-03 Thread Collin Winter

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: Python 2.7, Python 3.1
Added file: http://bugs.python.org/file13601/cpickle_writes.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5681
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5681] Add a simple pickle optimizer to cPickle

2009-04-03 Thread Collin Winter

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5527] multiprocessing won't work with Tkinter (under Linux)

2009-04-03 Thread Jani Hakala

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

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5527
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5679] cleanUp stack for unittest

2009-04-03 Thread Michael Foord

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...

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5679
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6

2009-04-03 Thread Michael Foord

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti

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
  iobase.c
  fileio.c
  bufferedio.c
  textio.c
  bytesio.c
  stringio.c

I believe that moving the io module into its own subdirectory will make
clear whether the different I/O implementations share common bugs.
Currently, it is quite easy to miss a module when doing a bug fix.

The patch was not tested on Windows. I tried my best to configure by
hand PCbuild and PC/{VC, VS7.1, VS8.0}. However, I would be surprised if
my changes were flawless.

--
components: Build
keywords: needs review, patch
messages: 85346
nosy: alexandre.vassalotti, benjamin.peterson
priority: normal
severity: normal
status: open
title: Move io-in-c modules into a subdirectory of Modules/
versions: Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5682
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Antoine Pitrou

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6

2009-04-03 Thread Benjamin Peterson

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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1745
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5683] Speed up cPickle's pickling generally

2009-04-03 Thread Collin Winter

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 what are frequently very small writes.

Benchmarked against virgin trunk r71058 using perf.py -r -b
pickle,pickle_list,pickle_dict:

pickle:
Min: 2.225 - 1.962: 13.37% faster
Avg: 2.254 - 1.994: 13.03% faster
Significant (t=70.763434, a=0.95)

pickle_dict:
Min: 2.097 - 1.418: 47.83% faster
Avg: 2.136 - 1.446: 47.75% faster
Significant (t=214.900146, a=0.95)

pickle_list:
Min: 1.128 - 0.777: 45.22% faster
Avg: 1.152 - 0.807: 42.65% faster
Significant (t=169.789433, a=0.95)

A similar patch for unpickling will follow. As issue 5670 and 5671 are
committed, I'll update this patch to support them.

This patch passes all the tests added in issue 5665. I would recommend
reviewing that patch first. I'll port to py3k once this is reviewed for
trunk. This patch is available on Rietveld at
http://codereview.appspot.com/33070.

--
components: Extension Modules
files: cpickle_writes.patch
keywords: needs review, patch
messages: 85349
nosy: alexandre.vassalotti, collinwinter
severity: normal
stage: patch review
status: open
title: Speed up cPickle's pickling generally
type: performance
versions: Python 2.7, Python 3.1
Added file: http://bugs.python.org/file13603/cpickle_writes.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5683
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Antoine Pitrou

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 for the
actual moving of the files, so that their history can be followed.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5682
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti

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 _io directory.
  PC/VS7.1/pythoncore.vcproj: Same as above.
  PC/VS8.0/pythoncore.vcproj: Same as above.
  PC/VC6/pythoncore.dsp: Renamed the paths.
  Makefile.pre.in: Updated the path to _iomodule.h
  Modules/Setup.dist: Renamed the paths.

Oh, my last patch had some junk for pickle. Here's a clean patch.

--
Added file: http://bugs.python.org/file13604/move-iomodule-in-subdir-2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5682
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4847] csv fails when file is opened in binary mode

2009-04-03 Thread R. David Murray

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti

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 for the
 actual moving of the files, so that their history can be followed.

Yes, I used svn move to rename the file in my local checkout, but
unfortunately svn diff doesn't support renames.

--
Added file: http://bugs.python.org/file13605/move-iomodule-in-subdir-3.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5682
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5634] cPickle error in case of recursion limit

2009-04-03 Thread Collin Winter

Changes by Collin Winter coll...@gmail.com:


--
nosy: +collinwinter

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5634
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3675] Python 2.6 can't read sets pickled with Python 3.0

2009-04-03 Thread Collin Winter

Changes by Collin Winter coll...@gmail.com:


--
nosy: +collinwinter

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3675
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5391] mmap: read_byte/write_byte and object type

2009-04-03 Thread STINNER Victor

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2389] Array pickling exposes internal memory representation of elements

2009-04-03 Thread Collin Winter

Changes by Collin Winter coll...@gmail.com:


--
nosy: +collinwinter

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2389
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

I think you can commit!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5682
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Antoine Pitrou

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 rep...@bugs.python.org
http://bugs.python.org/issue5682
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Antoine Pitrou

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 :
'..\..\Modules\_io\textio.c' : No such file or directory
iobase.c
c1 : fatal error C1083: Impossible d'ouvrir le fichier source :
'..\..\Modules\_io\iobase.c' : No such file or directory
bufferedio.c
c1 : fatal error C1083: Impossible d'ouvrir le fichier source :
'..\..\Modules\_io\bufferedio.c' : No such file or directory
stringio.c
c1 : fatal error C1083: Impossible d'ouvrir le fichier source :
'..\..\Modules\_io\stringio.c' : No such file or directory
bytesio.c
c1 : fatal error C1083: Impossible d'ouvrir le fichier source :
'..\..\Modules\_io\bytesio.c' : No such file or directory
fileio.c
c1 : fatal error C1083: Impossible d'ouvrir le fichier source :
'..\..\Modules\_io\fileio.c' : No such file or directory

It looks like a mistake in file names (missing leading underscores, and
a non-existent _iomodule.c instead of io.c).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5682
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Antoine Pitrou

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
http://bugs.python.org/issue5682
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1633600] using locale does not display the intended behavior

2009-04-03 Thread R. David Murray

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.
 import string
 string.lowercase
'abcdefghijklmnopqrstuvwxyz'
 string.letters
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
 import locale
 locale.setlocale(locale.LC_ALL, '')
'tr_TR'
 string.letters
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\xaa\xb5\xba\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff'
 string.lowercase
'abcdefghijklmnopqrstuvwxyz\xb5\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff'
 

It's possible that the particular python version used in the bug report
had a bug, but if so it is no longer a problem.

Note that these attributes do not exist in the 3.x string module.
For background on this decision see eg:
http://www.mail-archive.com/python-3...@python.org/msg06518.html).

--
nosy: +r.david.murray
resolution:  - works for me
stage: test needed - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1633600
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Antoine Pitrou

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5682
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5683] Speed up cPickle's pickling generally

2009-04-03 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5683
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4847] csv fails when file is opened in binary mode

2009-04-03 Thread R. David Murray

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?

The set of test cases is almost exactly parallel between 2.7 and 3.1. 
3.1 adds an additional DictReader test, and refactors one set of tests
to make the code simpler.  Other than that, it is just a matter of
replacing the file opening and closing code that uses binary mode with
'with' statements where the open uses newline=''.  BytesIO is not used
so would appear to be a conversion artifact.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4847
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4847] csv fails when file is opened in binary mode

2009-04-03 Thread R. David Murray

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
http://bugs.python.org/issue4847
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4847] csv fails when file is opened in binary mode

2009-04-03 Thread R. David Murray

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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1079] decode_header does not follow RFC 2047

2009-04-03 Thread Tony Nelson

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 all contexts.

Patch and test, tested on 2.6.1, 2.7trunk.  The test mostly just
reverses the sense of test_rfc2047_without_whitespace().

--
keywords: +patch
nosy: +barry, tony_nelson
versions: +Python 2.6, Python 2.7
Added file: http://bugs.python.org/file13608/header_encwd_nows.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1079
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4491] email.Header.decode_header() doesn't work if encoded-word was separeted by CRLF

2009-04-03 Thread Tony Nelson

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4491
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5645] test_memoryio fails for py3k on windows

2009-04-03 Thread Hirokazu Yamamoto

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 Python
# implementation only does when reading.  This function forces them to
# be decoded for testing.
def force_decode():
memio.seek(0)
print(, repr(memio.getvalue()))
memio.seek(0)
print(, repr(memio.read()))
def print_newlines():
print(repr(memio.newlines))
print_newlines() # None
memio.write(a\n)
force_decode()
print_newlines() # \n
memio.write(b\r\n)
force_decode()
print_newlines() # (\n, \r\n)
memio.write(c\rd)
force_decode()
print_newlines() # (\r, \n, \r\n)

def main():
import _pyio, _io
run(_pyio)
run(_io)

if __name__ == '__main__':
main()

//-

I get result

///
// module '_pyio' from 'e:\python-dev\py3k\l
None
 'a\r\n'
 'a\n'
'\r\n'
 'a\r\nb\r\r\n'
 'a\nb\n\n'
('\r', '\r\n')
 'a\r\nb\r\r\nc\rd'
 'a\nb\n\nc\nd'
('\r', '\r\n')
///
// module 'io' (built-in)
None
 'a\n'
 'a\n'
'\n'
 'a\nb\n'
 'a\nb\n'
('\n', '\r\n')
 'a\nb\nc\nd'
 'a\nb\nc\nd'
('\r', '\n', '\r\n')

//-

Maybe universal new line decode behavior is inverse
between _pyio and _io?

That is, _pyio's write() converts '\n' to platform new line, and _io's
write() converts platform new line to '\n'.

--
nosy: +ocean-city

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5645
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1169679] modules missing from list of Carbon modules

2009-04-03 Thread R. David Murray

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1169679
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5645] test_memoryio fails for py3k on windows

2009-04-03 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp:


--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5645
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1680159] Misleading exception from unicode.__contains__

2009-04-03 Thread R. David Murray

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 you have no objection, Mark, I'll apply it.

--
components: +Interpreter Core -Unicode
keywords: +patch
nosy: +r.david.murray
stage:  - commit review
type:  - behavior
versions: +Python 2.6, Python 2.7
Added file: http://bugs.python.org/file13609/Issue1680159.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1680159
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5527] multiprocessing won't work with Tkinter (under Linux)

2009-04-03 Thread Aki

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 non-gui
process such that separating gui into another class will create another
problem.

The first suggestion worked ... almost.
I needed to import a bunch of Tkinter related modules in not only gui()
but also other call back methods.
It solves the problem but the code became pretty messy.

It would be nice if the problem is solved so that I don't need to resort
to these workarounds. It is a bit frustrating as things work flawlessly
under Solaris.

I will play around trying to find a bit nicer workaround.

Thank you!
Aki-

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5527
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com