[issue3677] importing from UNC roots doesn't work

2009-01-22 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

Merged in r68873(py3k).

___
Python tracker 

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



[issue5032] itertools.count step

2009-01-22 Thread David W. Lambert

Changes by David W. Lambert :


--
nosy: +LambertDW

___
Python tracker 

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



[issue5036] xml.parsers.expat make a dictionary which keys are broken if buffer_text is False.

2009-01-22 Thread Takeshi Matsuyama

New submission from Takeshi Matsuyama :

When I make a dictionary by parsing "legacy-icon-mapping.xml"(which is a
part of
icon-naming-utils[http://tango.freedesktop.org/Tango_Icon_Library]) with
the following script, the three keys of the dictionary are collapsed if
the "buffer_text" attribute is False.

=
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import with_statement
import sys
from xml.parsers.expat import ParserCreate
import codecs

class Database:
  """Make a dictionary which is accessible by Databese.dict"""
  def __init__(self, buffer_text):
self.cnt = None
self.name = None
self.data = None
self.dict = {}
p = ParserCreate()
p.buffer_text = buffer_text

p.StartElementHandler = self.start_element
p.EndElementHandler = self.end_element
p.CharacterDataHandler = self.char_data

with open("/usr/share/icon-naming-utils/legacy-icon-mapping.xml",
'r') as f:
  p.ParseFile(f)

  def start_element(self, name, attrs):
if name == 'context':
  self.cnt = attrs["dir"]
if name == 'icon':
  self.name = attrs["name"]
  
  def end_element(self, name):
if name == 'link':
  self.dict[self.data] = (self.cnt, self.name)

  def char_data(self, data):
self.data = data.strip()

def print_set(aset):
  for e in aset:
print '\t' + e

if __name__ == '__main__':
  sys.stdout = codecs.getwriter('utf_8')(sys.stdout)
  map_false_dict = Database(False).dict
  map_true_dict = Database(True).dict
  print "The keys which exist if buffer_text=False but don't exist if
buffer_text=True are"
  print_set(set(map_false_dict.keys()) - set(map_true_dict.keys()))
  print "The keys which exist if buffer_text=True but don't exist if
buffer_text=False are"
  print_set(set(map_true_dict.keys()) - set(map_false_dict.keys()))
=

The result of running this script is
==
The keys which exist if buffer_text=False but don't exist if
buffer_text=True are
rt-descending
ock_text_right
lc
The keys which exist if buffer_text=True but don't exist if
buffer_text=False are
stock_text_right
gnome-mime-application-vnd.stardivision.calc
gtk-sort-descending
==
I confirmed it in Python-2.5.2 on Fedora 10.

--
components: XML
messages: 80398
nosy: tksmashiw
severity: normal
status: open
title: xml.parsers.expat make a dictionary which keys are broken if buffer_text 
is False.
type: behavior
versions: Python 2.5

___
Python tracker 

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



[issue3677] importing from UNC roots doesn't work

2009-01-22 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

This fix needs to be ported to the py3k branch. Can somebody please do it?

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue4999] multiprocessing.Queue does not order objects

2009-01-22 Thread Jesse Noller

Jesse Noller  added the comment:

On a put to the queue, the object is appended onto a deque (self._buffer) 
- this buffer is managed by a thread (_start_thread) which is handed the 
_feed method as the target. I suspect the bug is actually in the _feed 
method.

___
Python tracker 

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



[issue4111] Add DTrace probes

2009-01-22 Thread Skip Montanaro

Skip Montanaro  added the comment:

me> I get an error later running dtrace which I have yet to investigate.

Apple's dtrace program doesn't support the -G flag.  When I remove it from
Makefile.pre.in and rebuild I get an error about privileges:

dtrace -o Python/dtrace.o  -C -s ./Python/python.d Python/ceval.o
dtrace: failed to initialize dtrace: DTrace requires additional privileges

I tried adding "sudo" to the dtrace command.  Then it prompts for my
password and emits this error:

sudo dtrace -o Python/dtrace.o  -C -s ./Python/python.d Python/ceval.o
Password:
dtrace: failed to compile script ./Python/python.d: line 11: extraneous 
argument 'Python/ceval.o' ($1 is not referenced)

I'm not sure what to do at this point.  I'm not really a dtrace person.
Perhaps the Apple and Sun dtrace experts can offer a way out of this little
corner.

Skip

___
Python tracker 

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



[issue4999] multiprocessing.Queue does not order objects

2009-01-22 Thread Jesse Noller

Jesse Noller  added the comment:

As a note to myself: adding a simple print to the multiprocessing.Queue 
put method, I can see the calls occurring from the children in order, 
for example:

obj:  0.025193 [proc1] Got lock
obj:  0.227725 [proc1] Released lock
obj:  0.228401 [proc2] Got lock
obj:  0.430501 [proc2] Released lock
obj:  0.431082 [proc0] Got lock
obj:  0.633048 [proc0] Released lock
obj:  0.633723 [proc4] Got lock
obj:  0.835692 [proc4] Released lock
obj:  0.836262 [proc3] Got lock
obj:  1.038197 [proc3] Released lock
obj:  1.038753 [proc1] Got lock
obj:  1.239288 [proc1] Released lock
obj:  1.240079 [proc2] Got lock
obj:  1.440773 [proc2] Released lock
obj:  1.441577 [proc0] Got lock
obj:  1.642142 [proc0] Released lock
obj:  1.642959 [proc4] Got lock
obj:  1.843331 [proc4] Released lock
obj:  1.844178 [proc3] Got lock
obj:  2.044549 [proc3] Released lock

Also attaching the process-based script

Added file: http://bugs.python.org/file12836/nick.py

___
Python tracker 

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



[issue4972] let's equip ftplib.FTP with __enter__ and __exit__

2009-01-22 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

As for ftplib patch you should make sure that close() gets called in any
case but never more than once.
You can use "finally" to satisfy the first requirement and "self.sock is
not None" to check the second condition:



+def __exit__(self, *args):
+"""Context management protocol.
+
+Will try to quit() if active, then close().
+If not active, a simple close() call is made.
+"""
+if self.sock is not None and self.getwelcome() is not None:
+try:
+self.quit()
+except socket.error, e:
+# [Errno 61] is Connection refused
+# if the error is different, we want to raise it.
+if e.errno != 61:
+raise
+finally:
+if self.sock is not None:
+self.close()
+else:
+self.close()

--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue5023] Segfault in datetime.time.strftime("%z")

2009-01-22 Thread Eric Wald

Eric Wald  added the comment:

Update: Undefining HAVE_SNPRINTF does not correct the problem.

___
Python tracker 

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



[issue4999] multiprocessing.Queue does not order objects

2009-01-22 Thread Jean-Paul Calderone

Jean-Paul Calderone  added the comment:

Jesse, can you explain the cause of the bug?  Maybe that will inspire
someone to come up with an idea for a fix.

--
nosy: +exarkun

___
Python tracker 

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



[issue4999] multiprocessing.Queue does not order objects

2009-01-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

That's why I was suggesting to leave Queue as it is and provide a
separate PriorityQueue. With a PriorityQueue the user is free to put
(timestamp, object) tuples in it if he wants a strict chronologic
ordering. He can also use sequence numbers instead of timestamps, etc.

___
Python tracker 

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



[issue4999] multiprocessing.Queue does not order objects

2009-01-22 Thread Jesse Noller

Jesse Noller  added the comment:

I agree, at very least it should provide the same default behavior that 
Queue does, however, it is not obvious to me how to resolve this in 
mp.Queue

___
Python tracker 

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



[issue4111] Add DTrace probes

2009-01-22 Thread Skip Montanaro

Skip Montanaro  added the comment:

After applying the patch and reconfiguring I get compilation errors in
Python/ceval.c.  I suspect it's because there is a new header file,
Python/python.h.  That's probably found by the #include directive in
favor of Include/Python.h because of the Mac's case-insensitive file
system.  Changing the Makefile targets and actions so it's named
python-dtrace.h seems to work a bit better.  I get an error later
running dtrace which I have yet to investigate.

___
Python tracker 

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



[issue4999] multiprocessing.Queue does not order objects

2009-01-22 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

The Queue module design should be followed as closely as possible.  It
provides FIFO order as the default, with options for LIFO and priority
order.

--
nosy: +rhettinger

___
Python tracker 

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



[issue4999] multiprocessing.Queue does not order objects

2009-01-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Rather than providing strict ordering of Queue input/output, perhaps a
separate or derived class (PriorityQueue?) should be provided just for
that matter (heapq-based?).

--
nosy: +pitrou

___
Python tracker 

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



[issue4999] multiprocessing.Queue does not order objects

2009-01-22 Thread Jesse Noller

Changes by Jesse Noller :


--
priority:  -> normal

___
Python tracker 

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



[issue4593] Documentation for multiprocessing - Pool.apply()

2009-01-22 Thread Jesse Noller

Jesse Noller  added the comment:

fixed in trunk, r68862, merged to 3k in r68863

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue5032] itertools.count step

2009-01-22 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Am not too excited about this one.  As a heavy itertools user myself,
I've never had occasion to need a step argument.  As an implementer, I'm
aware that it would make the code for count() much more complex (because
of the internal optimizations and because step can be positive,
negative, or zero).

Have you had any real world use cases where count(start, step) would
have been the best solution?

___
Python tracker 

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



[issue5034] itertools.fixlen

2009-01-22 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Am taking this under advisement but am initially disinclined.  It is not
a basic itertool since it can be composed from the others.  Also, it's
use cases seem to be few.  One challenge for the module is that adding
more tools makes the overall toolkit harder to use because the number of
choices is increased.

___
Python tracker 

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



[issue4111] Add DTrace probes

2009-01-22 Thread Ted Leung

Ted Leung  added the comment:

On Jan 22, 2009, at 1:35 PM, Skip Montanaro wrote:

>
> Skip Montanaro  added the comment:
>
> So I completely dropped the ball on this.  It appears we have some
> folks from Sun and Brett surmised that Ronald Oussoren would be the
> likely person to do the heavy lifting on the Apple side of things.
> Ronald, I've made you nosy.  I will try to get the Solaris patch Ted
> referenced running against the trunk (2.7) and py3k (3.1) code bases,
> but it would be helpful if you could take a quick stab at it as well.

Great.  Actually the latest version of the patch is this one: 
.   I tried to quickly compile it on MacOS 10.5, Python 2.6.1, but  
it didn't work right out of the box.

Ted

Added file: http://bugs.python.org/file12835/unnamed

___
Python tracker 

___On Jan 22, 2009, at 1:35 PM, Skip 
Montanaro wrote:Skip Montanaro s...@pobox.com> added the comment:So I 
completely dropped the ball on this.  It appears we have somefolks 
from Sun and Brett surmised that Ronald Oussoren would be thelikely person 
to do the heavy lifting on the Apple side of things.Ronald, I've made you 
nosy.  I will try to get the Solaris patch Tedreferenced running 
against the trunk (2.7) and py3k (3.1) code bases,but it would be helpful 
if you could take a quick stab at it as 
well.Great.  Actually the latest 
version of the patch is this one: h
 
ttp://src.opensolaris.org/source/xref/jds/spec-files/trunk/patches/Python26-07-dtrace.diff>.
   I tried to quickly compile it on MacOS 10.5, Python 2.6.1, but it 
didn't work right out of the 
box.Ted___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4111] Add DTrace probes

2009-01-22 Thread Skip Montanaro

Skip Montanaro  added the comment:

So I completely dropped the ball on this.  It appears we have some
folks from Sun and Brett surmised that Ronald Oussoren would be the
likely person to do the heavy lifting on the Apple side of things.
Ronald, I've made you nosy.  I will try to get the Solaris patch Ted
referenced running against the trunk (2.7) and py3k (3.1) code bases,
but it would be helpful if you could take a quick stab at it as well.

--
assignee:  -> skip.montanaro
nosy: +ronaldoussoren
versions: +Python 2.7, Python 3.1 -Python 2.6

___
Python tracker 

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



[issue5035] Compilation --without-threads fails

2009-01-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The problem seems to have appeared with:

[svn r67802] #3632: the "pyo" macro from gdbinit can now run when the
GIL is released.

Patch by haypo.


diff -r 68d511e1c4bc -r 584e97b40be9 Objects/object.c
--- a/Objects/object.c  Mon Dec 15 22:47:57 2008 +0100
+++ b/Objects/object.c  Mon Dec 15 23:29:14 2008 +0100
@@ -331,8 +331,11 @@
if (op == NULL)
fprintf(stderr, "NULL\n");
else {
+   PyGILState_STATE gil;
fprintf(stderr, "object  : ");
+   gil = PyGILState_Ensure();
(void)PyObject_Print(op, stderr, 0);
+   PyGILState_Release(gil);
/* XXX(twouters) cast refcount to long until %zd is
   universally available */
fprintf(stderr, "\n"

--
nosy: +amaury.forgeotdarc, haypo

___
Python tracker 

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



[issue5035] Compilation --without-threads fails

2009-01-22 Thread Antoine Pitrou

New submission from Antoine Pitrou :

libpython2.7.a(object.o): In function `_PyObject_Dump':
/home/antoine/cpython/__svn__/Objects/object.c:341: undefined reference
to `PyGILState_Ensure'
/home/antoine/cpython/__svn__/Objects/object.c:343: undefined reference
to `PyGILState_Release'

--
messages: 80379
nosy: jnoller, pitrou
priority: normal
severity: normal
status: open
title: Compilation --without-threads fails
type: compile error
versions: Python 2.7

___
Python tracker 

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



[issue5034] itertools.fixlen

2009-01-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

"Return an iterator fixing *iterable*\ 's length to *length* by either
cutting elements off or adding *value* to the iterable."

Rather than mixing both, it would be more flexible to have a separate
function for each IMO.
Cutting off is already be handled by islice() (isn't it?), and padding
should be done with a function called e.g. pad() or rpad().

--
nosy: +pitrou

___
Python tracker 

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



[issue4111] Add DTrace probes

2009-01-22 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +rhettinger

___
Python tracker 

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



[issue3807] _multiprocessing build fails when configure --without-threads

2009-01-22 Thread Jesse Noller

Jesse Noller  added the comment:

Here's a simplified patch, unfortunately I can't test this as an OS/X 
build with --without-threads enabled has other issues besides this.

Added file: http://bugs.python.org/file12834/issue3807.patch

___
Python tracker 

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



[issue4111] Add DTrace probes

2009-01-22 Thread Robert Kern

Changes by Robert Kern :


--
nosy: +robert.kern

___
Python tracker 

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



[issue3881] IDLE won't start in custom directory.

2009-01-22 Thread Jacob

Jacob  added the comment:

Fantastic.
I started this post in October, and now we finaly found a solution.
Thank you Martin.
Will this patch be included in future versions of python?
Best regards, Jacob.

___
Python tracker 

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



[issue3578] 'dictionary changed size' error in test_multiprocessing

2009-01-22 Thread Jesse Noller

Changes by Jesse Noller :


--
priority:  -> normal

___
Python tracker 

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



[issue4660] multiprocessing.JoinableQueue task_done() issue

2009-01-22 Thread Jesse Noller

Changes by Jesse Noller :


--
priority:  -> high

___
Python tracker 

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



[issue3272] Multiprocessing hangs when multiprocessing.Pool methods are called

2009-01-22 Thread Jesse Noller

Jesse Noller  added the comment:

This is now covered in the multiprocessing documentation:

"Note Functionality within this package requires that the __main__ method 
be importable by the children. This is covered in Programming guidelines 
however it is worth pointing out here. This means that some examples, such 
as the multiprocessing.Pool examples will not work in the interactive 
interpreter."

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue3273] multiprocessing and meaningful errors

2009-01-22 Thread Jesse Noller

Jesse Noller  added the comment:

I am going to track this as part of issue 5001

--
resolution:  -> duplicate
status: open -> closed
superseder:  -> Remove assertion-based checking in multiprocessing

___
Python tracker 

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



[issue3831] Multiprocessing: Expose underlying pipe in queues

2009-01-22 Thread Jesse Noller

Changes by Jesse Noller :


--
priority:  -> low

___
Python tracker 

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



[issue3551] multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000)

2009-01-22 Thread Jesse Noller

Changes by Jesse Noller :


--
priority:  -> normal
type:  -> resource usage

___
Python tracker 

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



[issue3273] multiprocessing and meaningful errors

2009-01-22 Thread Jesse Noller

Changes by Jesse Noller :


--
priority:  -> low

___
Python tracker 

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



[issue3283] multiprocessing.connection doesn't import AuthenticationError, while using it

2009-01-22 Thread Jesse Noller

Jesse Noller  added the comment:

Fixed in 66023 by nnorwitz

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue3093] Namespace pollution from multiprocessing

2009-01-22 Thread Jesse Noller

Changes by Jesse Noller :


--
priority:  -> low

___
Python tracker 

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



[issue5034] itertools.fixlen

2009-01-22 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger
nosy: +rhettinger
versions: +Python 3.1

___
Python tracker 

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



[issue5032] itertools.count step

2009-01-22 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger
components: +Extension Modules -None
nosy: +rhettinger
priority:  -> low
versions: +Python 2.7, Python 3.1 -Python 3.0

___
Python tracker 

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



[issue5034] itertools.fixlen

2009-01-22 Thread Robert Lehmann

New submission from Robert Lehmann :

As raised recently on python-ideas [1]_, an itertools method fixing
iterators to a certain length might be handy (where fixing is either
cutting elements off or appending values).

I appended a patch implementing this feature in Python/C, unit tests and
documentation included.

.. [1] http://thread.gmane.org/gmane.comp.python.ideas/2472/focus=2479

--
components: Library (Lib)
files: fixlen.patch
keywords: patch
messages: 80372
nosy: lehmannro
severity: normal
status: open
title: itertools.fixlen
type: feature request
versions: Python 2.7
Added file: http://bugs.python.org/file12833/fixlen.patch

___
Python tracker 

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



[issue4242] Classify language vs. impl-detail tests, step 1

2009-01-22 Thread Jim Baker

Changes by Jim Baker :


--
nosy: +jbaker

___
Python tracker 

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



[issue4944] os.fsync() doesn't work as expect in Windows

2009-01-22 Thread Javen Wang

Javen Wang  added the comment:

I don't have Python2.6 installed. I just have ever read a bench article
comparing the performance between different version of Python, including
2.5, 2.6 and 3.0. That article shows, for the same script, Python2.6 has
longer running time than Python2.5. My application is a build system and
the users are very care about the time spent in build. That's why I have
the performance concern.

What concerns me more is the stdout/stderr redirection. Python2.6 manual
says they cannot be redirected if close_fds is set to True. My
application relies on the I/O redirection to control the screen output
from subprocess.

Actually I have had a work-around for this issue. It works very well so
far. I reported a bug here just because I want the Python to be better.
I learned it one year ago but I love this language. I just hope nobody
else encounter such problem again. If you guys think it won't be fixed
in Python 2.5 or has been fixed in Python 2.6, it's OK to close this
tracker. Thanks for your time.

___
Python tracker 

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



[issue5033] setup.py crashes if sqlite version contains 'beta'

2009-01-22 Thread blahblahwhat

New submission from blahblahwhat :

When I try to 'make' Python 2.6.1:

Traceback (most recent call last):
  File "./setup.py", line 1880, in 
main()
  File "./setup.py", line 1875, in main
'Lib/smtpd.py']
  File "/home/apps/Python-2.6.1/Lib/distutils/core.py", line 152, in 
setup
dist.run_commands()
  File "/home/apps/Python-2.6.1/Lib/distutils/dist.py", line 975, in 
run_commands
self.run_command(cmd)
  File "/home/apps/Python-2.6.1/Lib/distutils/dist.py", line 995, in 
run_command
cmd_obj.run()
  File "/home/apps/Python-2.6.1/Lib/distutils/command/build.py", line 
134, in run
self.run_command(cmd_name)
  File "/home/apps/Python-2.6.1/Lib/distutils/cmd.py", line 333, in 
run_command
self.distribution.run_command(command)
  File "/home/apps/Python-2.6.1/Lib/distutils/dist.py", line 995, in 
run_command
cmd_obj.run()
  File "/home/apps/Python-2.6.1/Lib/distutils/command/build_ext.py", 
line 343, in run
self.build_extensions()
  File "./setup.py", line 103, in build_extensions
missing = self.detect_modules()
  File "./setup.py", line 915, in detect_modules
for x in sqlite_version.split(".")])
ValueError: invalid literal for int() with base 10: '1beta'

This was solved by replacing

  m = re.search(r'\s*.*#\s*.*define\s.*SQLITE_VERSION\W*"(.*)"', incf)

with

  m = re.search(r'\s*.*#\s*.*define\s.*SQLITE_VERSION\W*"([\d\.]*)"', 
incf)

on line 911

--
components: Build
messages: 80370
nosy: blahblahwhat
severity: normal
status: open
title: setup.py crashes if sqlite version contains 'beta'
type: compile error
versions: Python 2.6

___
Python tracker 

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



[issue3881] IDLE won't start in custom directory.

2009-01-22 Thread Martin v. Löwis

Changes by Martin v. Löwis :


--
versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.5

___
Python tracker 

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



[issue3881] IDLE won't start in custom directory.

2009-01-22 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

Here is a patch that should fix the problem. It uses Vista's
GetFinalPathNameByHandleW to expand symbolic links before passing the
path to Tcl.

--
keywords: +patch
Added file: http://bugs.python.org/file12832/symlink.diff

___
Python tracker 

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



[issue5032] itertools.count step

2009-01-22 Thread steve21

New submission from steve21 :

I'd like to request a 'step' argument be added for itertools.count. It
would be useful in the same way that step is useful for the 'range'
function.

('range' and 'count' are very similar - 'count' could even be merged into
'range', for example by making 'range(None)' equivalent to 'count()')

--
components: None
messages: 80368
nosy: steve21
severity: normal
status: open
title: itertools.count step
type: feature request
versions: Python 3.0

___
Python tracker 

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



[issue4874] decoding functions in _codecs module accept str arguments

2009-01-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Committed in r68857, r68858.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue4874] decoding functions in _codecs module accept str arguments

2009-01-22 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

The patch looks good. 
I think the missing b in test_errorcallback_longindex is an overlook
when the tests were updated for py3k. You are right to change the test.

___
Python tracker 

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



[issue4874] decoding functions in _codecs module accept str arguments

2009-01-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

"Fixing" multibytecodec.c produces a TypeError in the following test:

def test_errorcallback_longindex(self):
dec = codecs.getdecoder('euc-kr')
myreplace  = lambda exc: ('', sys.maxsize+1)
codecs.register_error('test.cjktest', myreplace)
self.assertRaises(IndexError, dec,
  'apple\x92ham\x93spam', 'test.cjktest')

TypeError: decode() argument 1 must be bytes or buffer, not str

Since the test is meant to test recovery from a misbehaving callback, I
guess the type of the input string is not really important and can be
changed to a bytes string instead. What do you think?

(in any case, here is a patch)

Added file: http://bugs.python.org/file12831/mbdecode-unicode.patch

___
Python tracker 

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



[issue4874] decoding functions in _codecs module accept str arguments

2009-01-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Right, I hadn't thought of that.

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue4874] decoding functions in _codecs module accept str arguments

2009-01-22 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

IMO, Modules/cjkcodecs/multibytecodec.c should be changed as well.

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue4874] decoding functions in _codecs module accept str arguments

2009-01-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Committed in r68855, r68856. Thanks!

--
resolution: accepted -> fixed
status: open -> closed

___
Python tracker 

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



[issue4874] decoding functions in _codecs module accept str arguments

2009-01-22 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee:  -> pitrou
resolution:  -> accepted

___
Python tracker 

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



[issue5031] Thread.daemon docs

2009-01-22 Thread steve21

New submission from steve21 :

In the threading module the Thread.daemon documentation says:

"The thread’s daemon flag. This must be set before start() is called,
otherwise RuntimeError is raised.

The initial value is inherited from the creating thread.

The entire Python program exits when no alive non-daemon threads are
left."

I think the docs should state Thread.daemon's type (boolean, or integer,
or something else?) and its default value (when you have not set .daemon
in the creating thread.)

--
assignee: georg.brandl
components: Documentation
messages: 80361
nosy: georg.brandl, steve21
severity: normal
status: open
title: Thread.daemon docs
versions: Python 3.0

___
Python tracker 

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



[issue5029] Odd slicing behaviour

2009-01-22 Thread Georg Brandl

Changes by Georg Brandl :


--
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue5029] Odd slicing behaviour

2009-01-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Why should it return an empty list?

>>> foo = [1,2,3]
>>> foo[1::-1]
[2, 1]
>>> foo[0::-1]
[1]

looks quite consistent to me.

--
nosy: +pitrou

___
Python tracker 

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



[issue4944] os.fsync() doesn't work as expect in Windows

2009-01-22 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

python2.6 is not so different from python2.5. Which performance concerns
do you have?

___
Python tracker 

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