[issue3872] Python 2.6rc2: Tix ComboBox error

2008-09-26 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc [EMAIL PROTECTED]:


--
priority:  - critical

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3969] turtle.py - setup() doesn't work correctly

2008-09-26 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

Committed as r66626 (2.5 branch only).

--
nosy: +georg.brandl
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3969
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3968] turtle.py: fill() and end_fill() do not work correctly

2008-09-26 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

Committed in r66627 (2.5 branch only).

--
nosy: +georg.brandl
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3968
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3972] Add Option to Bind to a Local IP Address in httplib.py

2008-09-26 Thread Eldon Ziegler

New submission from Eldon Ziegler [EMAIL PROTECTED]:

I updated httplib.py, python 2.4, to be able to bind to a specific IP
address when connecting to a remote site.

  conn = httplib.HTTPConnection('82.94.237.218', 80)

will connect to '82.94.237.218' using one of the local IP addresses. For
example, if a machine has an primary IP address and an alias such as

eth0192.168.1.10
eth0:1  192.168.1.11

the outbound connection might use either eth0 or eth0:1. I'm not sure
how it picks now. I added a bind option both for http and https so we
can direct the connection through one or the other. For example,

  conn = httplib.HTTPConnection('82.94.237.218', 80, None, None, None,
'192.168.1.10')

would make sure it used 192.168.1.10 not 192.168.1.11.

I ran into this on a server that is contacted by an external legacy
server which requires a reverse connection over the same IP address that
the original connection came in on.

--
components: Library (Lib)
files: httplib2.4.diff
keywords: patch
messages: 73840
nosy: [EMAIL PROTECTED]
severity: normal
status: open
title: Add Option to Bind to a Local IP Address in httplib.py
type: feature request
versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1
Added file: http://bugs.python.org/file11607/httplib2.4.diff

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3972
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3973] Invalid line number in Exception traceback with header # -*- coding: xxx -*-

2008-09-26 Thread STINNER Victor

New submission from STINNER Victor [EMAIL PROTECTED]:

Short example:
---
# -*- coding: ASCII -*-
raise Exception(line 2)
---

Result:

Traceback (most recent call last):
  File plop.py, line 3, in module

Exception: line 2


The problem is around newtracebackobject() which calls 
PyCode_Addr2Line(). It maybe a bug is frame-co_lnotab generation.

This bus is specified to python3 (trunk).

--
messages: 73841
nosy: haypo
severity: normal
status: open
title: Invalid line number in Exception traceback with header # -*- coding: xxx 
-*-
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3973
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3973] Invalid line number in Exception traceback with header # -*- coding: xxx -*-

2008-09-26 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Looks like a duplicate of #2384. Do you confirm?

--
nosy: +pitrou

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3973
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3973] Invalid line number in Exception traceback with header # -*- coding: xxx -*-

2008-09-26 Thread Antoine Pitrou

Changes by Antoine Pitrou [EMAIL PROTECTED]:


--
resolution:  - duplicate
status: open - closed
superseder:  - [Py3k] line number is wrong after encoding declaration

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3973
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2384] [Py3k] line number is wrong after encoding declaration

2008-09-26 Thread Antoine Pitrou

Changes by Antoine Pitrou [EMAIL PROTECTED]:


--
nosy: +haypo

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2384
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2384] [Py3k] line number is wrong after encoding declaration

2008-09-26 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

#3973 is a duplicate.

--
nosy: +pitrou

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2384
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3974] collections.namedtuple uses exec to create new classes

2008-09-26 Thread Jens Kadenbach

New submission from Jens Kadenbach [EMAIL PROTECTED]:

Rewrite of the namedtuple implementation to avoid the use of exec for
class generation.  The new code uses a custom class dictionary and the
builtin type to create new classes dynamically.

--
components: Library (Lib)
files: new_namedtuples.diff
keywords: patch
messages: 73844
nosy: audax
severity: normal
status: open
title: collections.namedtuple uses exec to create new classes
versions: Python 2.6
Added file: http://bugs.python.org/file11608/new_namedtuples.diff

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3974
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2384] [Py3k] line number is wrong after encoding declaration

2008-09-26 Thread STINNER Victor

STINNER Victor [EMAIL PROTECTED] added the comment:

ocean-city testcase is invalid: it uses subprocess.call() which 
returns the exit code, not the Python error line number! Here is a 
better testcase using subprocess.Popen() checking the line number but 
also the display line. It tests ASCII, UTF-8 and GBK charsets. Using 
GBK charset, you get the bug described by ocean-city (problem with 
multibyte charset). My testcase takes also care of script with # 
coding at the second line.

Added file: http://bugs.python.org/file11609/test_traceback-gbk.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2384
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2384] [Py3k] line number is wrong after encoding declaration

2008-09-26 Thread STINNER Victor

STINNER Victor [EMAIL PROTECTED] added the comment:

Hum, about the empty line error using a multibyte charset, the issue 
is different. PyTraceBack_Print() calls _Py_DisplaySourceLine() which 
doesn't take care of the charset.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2384
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-09-26 Thread Jeffrey C. Jacobs

Jeffrey C. Jacobs [EMAIL PROTECTED] added the comment:

Matthew,

Did you upload a public SSH key to your Launchpad account?

You're on MS Windows, right?  I can try and do an install on an MS
Windows XP box or 2 I have lying around and see how that works, but we
should try and solve this vexing thing I've noticed about Windows
development, which is that Windows cannot understand Unix-style file
permissions, and so when I check out Python on Windows and then check it
back in, I've noticed that EVERY python and C file is changed by
virtue of its permissions having changed.  I would hope there's some way
to tell Bazaar to ignore 'permissions' changes because I know our edits
really have nothing to do with that.

Anyway, I'll try a few things visa-vi Windows to see if I get a similar
problem; there's also the https://answers.launchpad.net/bazaar forum
where you can post your Bazaar issues and see if the community can help.
 Search previous questions or click the Ask a question button and type
your subject.  Launchpad's UI is even smart enough to scan your question
title for similar ones so you may be able to find a solution right away
that way.  I use the Launchpad Answers section all the time and have
found it usually is a great way of getting help.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2636
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3872] Python 2.6rc2: Tix ComboBox error

2008-09-26 Thread Hirokazu Yamamoto

Hirokazu Yamamoto [EMAIL PROTECTED] added the comment:

May this info help?
http://coding.derkeiler.com/Archive/Tcl/comp.lang.tcl/2008-02/msg01363.html

--
nosy: +ocean-city

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header

2008-09-26 Thread STINNER Victor

New submission from STINNER Victor [EMAIL PROTECTED]:

PyTraceBack_Print() doesn't take care of the # coding: xxx header of 
a Python script. It calls _Py_DisplaySourceLine() which opens the file 
as a byte stream (and not an unicode characters stream). Because of 
this problem, the traceback maybe truncated or invalid. Example (write 
it into a file and execute the file):

from sys import executable
from os import execvpe
filename = pouet.py
out = open(filename, wb)
out.write(b# -*- coding: GBK -*-
print(--asc\xA1\xA7i--)
raise Exception(--asc\xA1\xA7i--))
out.close()
execvpe(executable, [executable, filename], None)


This issue depends on issue2384 (line number).

Note: Python 2.6 may also has the problem but it doesn't parse # 
coding: GBK. So it's a different problem (issue?).

--
messages: 73851
nosy: haypo
severity: normal
status: open
title: PyTraceBack_Print() doesn't respect # coding: xxx header
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3975
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2384] [Py3k] line number is wrong after encoding declaration

2008-09-26 Thread STINNER Victor

STINNER Victor [EMAIL PROTECTED] added the comment:

Here is a patch fixing this issue: it's quite the same that ocean-city 
patch, but I prefer to patch lineno only if set_readline() succeed.

About the truncated traceback for multibyte charset: see the new 
issue3975.

Added file: http://bugs.python.org/file11610/tokenizer-coding.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2384
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-09-26 Thread Matthew Barnett

Matthew Barnett [EMAIL PROTECTED] added the comment:

I have it working finally!

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2636
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-09-26 Thread Jeffrey C. Jacobs

Jeffrey C. Jacobs [EMAIL PROTECTED] added the comment:

Great, Matthew!!

Now, I'm still in the process of setting up branches related to your
work; generally they should be created from a core and set of features
implemented for example:

To get from Version 2 to Version 3 of your Engine, I had to first check
out lp:~pythonregexp2.7/python/issue2636-01+09-02+17 and then push it
back onto launchpad as
lp:~pythonregexp2.7/python/issue2636-01+09-02+17+26.  This way the
check-in logs become coherent.

So, please hold off on checking your code in until I have your current
patch-set checked in, which I should finish by today; I also need to
rename some of the projects based on the fact that you also implemented
item 26 in most of your patches.  Actually, I keep a general To-Do list
of what I am up to on the
https://code.launchpad.net/~pythonregexp2.7/python/issue2636 whiteboard,
which you can also edit, if you want to see what I'm up to.  But I'll
try to have that list complete by today, fingers crossed!  In the mean
time, would you mind seeing if you are getting the file permissions
issue by doing a checkout or pull or branch and then calling bzr stat
to see if this caused Bazaar to add your entire project for checkin
because the permissions changed.  Thanks and congratulations again!

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2636
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3909] Building PDF documentation from tex files

2008-09-26 Thread Winfried Plappert

Winfried Plappert [EMAIL PROTECTED] added the comment:

I had a go at commenting stuff in sphinx.sty, but every change produced
another error message. In the end I concluded that the best thing is to
leave sphinx.sty untouched, despite the fact that the index is always
missing. Since I do not understand the magic of tex (or pdflatex), I
better leave it to the expert(s) to figure out how one generates perfect
PDF documentation.  Sorry for that.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3909
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3944] faster long multiplication

2008-09-26 Thread Fredrik Johansson

Changes by Fredrik Johansson [EMAIL PROTECTED]:


--
nosy: +fredrikj

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3944
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2384] [Py3k] line number is wrong after encoding declaration

2008-09-26 Thread STINNER Victor

STINNER Victor [EMAIL PROTECTED] added the comment:

Oh! My patch breaks python -m. The problem is maybe no in the token 
parser but... somewhere else?
--- test.py ---
# coding: ASCII
raise Exception(line 2)
# try again!
---

Python 3.0 trunk unpatched:
---
$ ./python test.py
Traceback (most recent call last):
  File test.py, line 3, in module

$ ./python -m test
Traceback (most recent call last):
  File /home/haypo/prog/py3k/Lib/runpy.py, line 121, in 
_run_module_as_main
__main__, fname, loader, pkg_name)
  File /home/haypo/prog/py3k/Lib/runpy.py, line 34, in _run_code
exec(code, run_globals)
  File /home/haypo/prog/py3k/test.py, line 2, in module
raise Exception(line 2)
Exception: line 2
---

Python 3.0 trunk + tokenizer-coding.patch:
---
marge$ ./python test.py
Traceback (most recent call last):
  File test.py, line 2, in module
raise Exception(line 2)
Exception: line 2

Traceback (most recent call last):
  File /home/haypo/prog/py3k/Lib/runpy.py, line 121, in 
_run_module_as_main
__main__, fname, loader, pkg_name)
  File /home/haypo/prog/py3k/Lib/runpy.py, line 34, in _run_code
exec(code, run_globals)
  File /home/haypo/prog/py3k/test.py, line 1, in module
# coding: ASCII
Exception: line 2
---

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2384
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3976] pprint._safe_repr is not general enough in one instance

2008-09-26 Thread Erick Tryzelaar

New submission from Erick Tryzelaar [EMAIL PROTECTED]:

I've run into a case where pprint isn't able to print out a particular 
data structure, and have distilled it down to a simple example:

import pprint

class A:
pass

pprint.pprint({A(): 1, A(): 2})

Which throws this exception:

Traceback (most recent call last):
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3
.0/pprint.py, line 272, in _safe_repr
items = sorted(items)
TypeError: unorderable types: A()  A()

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File foo.py, line 6, in module
pprint.pprint({A(): 1, A(): 2})
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3
.0/pprint.py, line 55, in pprint
printer.pprint(object)
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3
.0/pprint.py, line 106, in pprint
self._format(object, self._stream, 0, 0, {}, 0)
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3
.0/pprint.py, line 129, in _format
rep = self._repr(object, context, level - 1)
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3
.0/pprint.py, line 216, in _repr
self._depth, level)
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3
.0/pprint.py, line 228, in format
return _safe_repr(object, context, maxlevels, level)
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/3.0/lib/python3
.0/pprint.py, line 277, in _safe_repr
items = sorted(items, key=sortkey)
TypeError: unorderable types: A()  A()


This is happening because of this block of code:

try:
items = sorted(items)
except TypeError:
def sortkey(item):
key, value = item
return str(type(key)), key, value
items = sorted(items, key=sortkey)

The exception block is trying to sort the items again, but in this 
instance, it's still not orderable. Could we get _safe_repr to at least 
give up on sorting at this point? Or, we could try just falling back to 
sorting according to the class name, with:

try:
items = sorted(items)
except TypeError:
def sortkey(item):
key, value = item
return str(type(key)), key, value
try:
items = sorted(items, key=sortkey)
except TypeError:
def sortkey(item):
key, value = item
return str(type(key))

That would at least give some ordering to the output. Unfortunately, in 
this case it's a shame that we don't have the cmp function any more, 
because then we could just fall back to giving up on the ordering for 
just certain unorderable keys, but still have sorted output for 
orderable keys. I thought maybe we could test if the key and value have 
__lt__, but it looks like all classes now have that function, even if 
the user didn't implement it. In the long run though, I suppose the case 
where you have mixed types in a dict there's no sensible ordering 
anyway.

--
components: Library (Lib)
messages: 73858
nosy: erickt
severity: normal
status: open
title: pprint._safe_repr is not general enough in one instance
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3976
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header

2008-09-26 Thread STINNER Victor

STINNER Victor [EMAIL PROTECTED] added the comment:

Here is a new version of _Py_DisplaySourceLine() using 
PyTokenizer_FindEncoding() to read the coding header, and 
PyFile_FromFd() to create an unicode-awake file. The code could be 
optimized, but it least it displays correctly the file line ;-)

The code is based on the original _Py_DisplaySourceLine() and 
call_find_module() (import.c).

Notes:
* The code is young and new, it might be delayed until python 3.1
* Some functions may raise new exceptions (eg. MemoryError). I don't 
know how Python will react if an exception is raised during 
PyTraceBack_Print() ?
* The return code is 0 for success, but is it -1 or 1 for an error? It 
looks like error is result != 0, so both -1 and 1 should be valid. I 
used -1.

--
keywords: +patch
Added file: http://bugs.python.org/file11611/traceback_unicode.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3975
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3976] pprint._safe_repr is not general enough in one instance

2008-09-26 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Another solution would be to separate the dict items by key type, try to
sort each items list with separate fallback on onsorted. Then merge the
whole thing, ordered by key type name.

--
nosy: +pitrou

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3976
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-09-26 Thread Jeffrey C. Jacobs

Jeffrey C. Jacobs [EMAIL PROTECTED] added the comment:

Thanks, Matthew.  My reading of that Answer is that you should be okay
because you, I assume, installed the Windows-Native package rather than
the cygwin that I first tested.  I think the problem is specific to
Cygwin as well as the circumstances described in the article.  Still, it
should be quite easy to verify if you just check out python and then do
a stat, as this will show all files whose permissions have changed as
well as general changes.  Unfortunately, I am still working on setting
up those branches, but once I finish documenting each of the branches, I
should proceed more rapidly.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2636
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header

2008-09-26 Thread STINNER Victor

STINNER Victor [EMAIL PROTECTED] added the comment:

(oops, first patch included an useless whitespace change)

Added file: http://bugs.python.org/file11612/traceback_unicode.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3975
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3946] PyObject_CheckReadBuffer crashes on memoryview object

2008-09-26 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

The rest of the patch is fine with me (I assume you've run all the unit
tests :-)).

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3946
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3976] pprint._safe_repr is not general enough in one instance

2008-09-26 Thread Erick Tryzelaar

Erick Tryzelaar [EMAIL PROTECTED] added the comment:

fyi, I found another case where pprint needs a safe sort, this is
when you have a list that contains a dictionary. Anyway, Here's a
simple patch that creates a _safe_sorted function that implements the
fallback:

--- /opt/local/lib/python3.0/pprint.py  2008-09-26 09:35:21.0 -0700
+++ /tmp/pprint.py  2008-09-26 09:35:13.0 -0700
@@ -145,7 +145,7 @@
 if length:
 context[objid] = 1
 indent = indent + self._indent_per_level
-items  = sorted(object.items())
+items  = _safe_sorted(object.items())
 key, ent = items[0]
 rep = self._repr(key, context, level)
 write(rep)
@@ -267,14 +267,7 @@
 append = components.append
 level += 1
 saferepr = _safe_repr
-items = object.items()
-try:
-items = sorted(items)
-except TypeError:
-def sortkey(item):
-key, value = item
-return str(type(key)), key, value
-items = sorted(items, key=sortkey)
+items = _safe_sorted(object.items())
 for k, v in items:
 krepr, kreadable, krecur = saferepr(k, context, maxlevels, level)
 vrepr, vreadable, vrecur = saferepr(v, context, maxlevels, level)
@@ -321,6 +314,20 @@
 rep = repr(object)
 return rep, (rep and not rep.startswith('')), False

+def _safe_sorted(items):
+try:
+return sorted(items)
+except TypeError:
+def sortkey(item):
+key, value = item
+return str(type(key)), key, value
+try:
+return sorted(items, key=sortkey)
+except TypeError:
+def sortkey(item):
+key, value = item
+return str(type(key))
+return sorted(items, key=sortkey)

 def _recursion(object):
 return (Recursion on %s with id=%s

One other thing to note is that I'm also aware that the yaml project
also has this problem, and they've got their own safe_sorted
function. It might be worthwhile formalizing this in a public function
in the api somewhere.

--
nosy: +idadesub

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3976
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3872] Python 2.6rc2: Tix ComboBox error

2008-09-26 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

Yes, the sample program works with Tix8.4.3.

The procedure to rebuild Tix was removed from PCBuild/readme.txt, and
the instructions in the 2.5 version are incomplete.  Here is what I did,
after several attempts:

- downloaded and extracted following file:
http://garr.dl.sourceforge.net/sourceforge/tix/Tix8.4.3-src.tar.gz

- created file win32/python.mak with the content:
TCL_MAJOR=8
TCL_MINOR=5
TCL_PATCH=2
INSTALL_DIR=..\..\tcltk
TOOLS32=$(VCINSTALLDIR)
MKDIR=md
RMDIR=rd
!include makefile.vc

- then cd Tix8.4.3\win, and compile with:
nmake -f python.mak TK_DIR=..\..\tk-8.5.2.0 TCL_DIR=..\..\tcl-8.5.2.1
TK_TMPDIR=Release_VC8 TCL_TMPDIR=Release_VC8 install

What is the procedure to have this new version merged into the msi file?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3623] _json: fix raise_errmsg(), py_encode_basestring_ascii() and linecol()

2008-09-26 Thread STINNER Victor

STINNER Victor [EMAIL PROTECTED] added the comment:

 Is this something that needs to be backported to 2.6?

Hum, here is a part of my patch which can be applied to python 2.6. I 
don't know if it fixes real bugs, but the code looks better with the 
patch: PyErr_SetObject() and Py_DECREF() should not be called with 
NULL argument.

Added file: http://bugs.python.org/file11613/_json26.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3935] bisect insort C implementation ignores methods on list subclasses

2008-09-26 Thread Dmitry Vasiliev

Dmitry Vasiliev [EMAIL PROTECTED] added the comment:

Actually it was an optimization. PyList_Insert() was used for list and
list-derived objects.

I've attached the patch which fix the issue and for me the new code
looks even cleaner than the original code.

--
keywords: +patch
nosy: +hdima
Added file: http://bugs.python.org/file11614/bisect.diff

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3935
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3977] Check PyInt_AsSsize_t/PyLong_AsSsize_t error

2008-09-26 Thread STINNER Victor

New submission from STINNER Victor [EMAIL PROTECTED]:

PyLong_Ssize_t() returns -1 and set an error (OverflowError) on
overflow, but some modules don't check this case. Here is a first patch
for BytesIO() and StringIO().

--
components: Library (Lib)
files: py3k_bytes_stringio.patch
keywords: patch
messages: 73868
nosy: haypo
severity: normal
status: open
title: Check PyInt_AsSsize_t/PyLong_AsSsize_t error
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file11615/py3k_bytes_stringio.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3977
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3623] _json: fix raise_errmsg(), py_encode_basestring_ascii() and linecol()

2008-09-26 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

_json26.patch looks good, and is necessary, because the called python
function has more than one way to raise an exception (KeyboardInterrupt
at least...)

I would just add another minor change: this raise_errmsg() function
should be made static.

--
nosy: +amaury.forgeotdarc

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3977] Check PyInt_AsSsize_t/PyLong_AsSsize_t error

2008-09-26 Thread STINNER Victor

STINNER Victor [EMAIL PROTECTED] added the comment:

Here is a fix for struct.pack_into().

Added file: http://bugs.python.org/file11616/py3k_struct.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3977
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3977] Check PyInt_AsSsize_t/PyLong_AsSsize_t error

2008-09-26 Thread STINNER Victor

STINNER Victor [EMAIL PROTECTED] added the comment:

Fix _bytesio of Python 2.6.

Added file: http://bugs.python.org/file11617/py26_bytesio.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3977
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3977] Check PyInt_AsSsize_t/PyLong_AsSsize_t error

2008-09-26 Thread STINNER Victor

STINNER Victor [EMAIL PROTECTED] added the comment:

py3k_struct.patch can be ported to python trunk: so here is the fix for
python trunk (2.6).

Added file: http://bugs.python.org/file11618/py26_struct.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3977
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3935] bisect insort C implementation ignores methods on list subclasses

2008-09-26 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

We could keep the optimization for the standard case:
What about simply replacing PyList_Check with PyList_CheckExact?

- most usages use plain lists, and will even run slightly faster
- list-derived objects get the desired behaviour.

--
nosy: +amaury.forgeotdarc

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3935
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3909] Building PDF documentation from tex files

2008-09-26 Thread Winfried Plappert

Winfried Plappert [EMAIL PROTECTED] added the comment:

I found at least one bug:

% Detect if we're using XeLaTeX
\IfFileExists{ifxetex.sty}{%
  \RequirePackage{ifxetex}
}{% not using xelatex
  \newif\ifxetex\xetexfalse %(line 69)
}
should say:
  \newif\ifxetex\xetexfalse\fi

That makes it possible to run through without any serious errors.

However the index is still defective. Here are the relevant line from
reference.log (just as an example):


Writing index file reference.idx
\modindexfile=\write6

...

No file reference.ind.
[99

] (reference.aux) )

Something with your suffixes seems to be incorrect, but I cannot find
it. I guess you are using a built-in macro, but you're not obeying the
filename specifications correctly. Otherwise the index should be included. 

The generated PDF looks far better, but still lacks a proper footer. The
current footer is just Contents (at least for reference.pdf,
documenting.pdf, extending.pdf file).

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3909
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-09-26 Thread Jeffrey C. Jacobs

Jeffrey C. Jacobs [EMAIL PROTECTED] added the comment:

Phew!  Okay, all you patches have been applied as I said in a previous
message, and you should now be able to check out
lp:~pythonregexp2.7/python/issue2636+01+09-02+17+18+19+20+21+24+26 where
you can then apply your latest known patch (rc2+7) to add a fix for the
findall / finditer bug.

However, please review my changes to:

a) lp:~pythonregexp2.7/python/issue2636-01+09-02+17
b) lp:~pythonregexp2.7/python/issue2636-01+09-02+17+26
c) lp:~pythonregexp2.7/python/issue2636-01+09-02+17+18+26
d) lp:~pythonregexp2.7/python/issue2636-01+09-02+17+18+19+20+21+26

To make sure my mergers are what your code snapshots should be.  I did
get one conflict with patch 5 IIRC where a reverse attribute was added
to the SRE_STATE struct, and get a weird grouping error when running the
tests for (a) and (b), which I think is a typo; a compile error
regarding the afore mentioned missing reverse attribute from patch 3 or
4 in (c) and the SRE_FLAG_REVERSE seems to have been lost in (d) for
some reason.

Also, if you feel like tackling any other issues, whether they have
numbers or not, and implementing them in your current development line,
please let me know so I can get all the documentation and development
branches set up.  Thanks and good luck!

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2636
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue433029] SRE: posix classes aren't supported

2008-09-26 Thread Jeffrey C. Jacobs

Jeffrey C. Jacobs [EMAIL PROTECTED] added the comment:

To clarify, you mean named character sets as found in Perl and Emacs,
which are normally written, for example, like '[:ALPHANUM:]', right?  We
are working on that as Item 8 of Issue 2636: Regexp 2.7.  If not, please
clarify so I nknow what needs to be added.  Thanks!

--
nosy: +timehorse
versions: +Python 2.7

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue433029
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3547] Ctypes is confused by bitfields of varying integer types

2008-09-26 Thread Thomas Heller

Thomas Heller [EMAIL PROTECTED] added the comment:

Ok, here is an additional patch bitfields-mingw.patch.
It fixes the problem reported by rpetrov, and updates the comments.

Please review again ;-).

The previous patch bitfields-3.patch has already been applied.

Added file: http://bugs.python.org/file11619/bitfields-mingw.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3547
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3290] python-config --cflags includes irrelevant flags

2008-09-26 Thread Erick Tryzelaar

Erick Tryzelaar [EMAIL PROTECTED] added the comment:

fyi, on the mac with gcc-4.2, distutils is erroring out because of the -
Wno-long-double it is getting from python-config --cflags, as it's no 
longer accepted as an argument. Fortunately this can be worked around by 
doing CC=gcc-4.0 python setup.py.

--
nosy: +erickt

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3290
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3947] configure --with-threads on cygwin = crash on thread related tests

2008-09-26 Thread Hirokazu Yamamoto

Hirokazu Yamamoto [EMAIL PROTECTED] added the comment:

Thread 7282896l tries to lock same object twice.
This was not cause of problem. I saw crash after one lock on another thread.

I could create the C code to reproduce crash. (reproduce.zip)
But strangely, I couldn't crash main.exe if it was built with
http://www.openssl.org/source/openssl-0.9.8h.tar.gz (same version)

I compiled openssl with config -dCygwin and make. (I needed to fix
one broken link in Include dir though)

Added file: http://bugs.python.org/file11620/reproduce.zip

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3947
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3978] ZipFileExt.read() can be incredibly slow

2008-09-26 Thread James Athey

New submission from James Athey [EMAIL PROTECTED]:

I've created a patch that improves the decompression performance of
zipfile.py by up to two orders of magnitude.

In ZipFileExt.read(), decompressed bytes waiting to be read() sit in a
string buffer, self.readbuffer.  When a piece of that string is read,
the string is split in two, with the first piece being returned, and the
second piece becoming the new self.readbuffer.  Each of these two pieces
must be allocated space and have their contents copied into them.  When
the length of the readbuffer far exceeds the number of bytes requested,
allocating space for the two substrings and copying in their contents
becomes very expensive.

The attached zeroes.zip demonstrates a worst-case scenario for this
problem.  It contains one 100 MiB file filled with zeroes.  This file
compresses to just 100 KiB, however, because it is so repetitive.  This
repetitive data means that the zlib decompressor returns many MiBs of
uncompressed data when fed just 64 KiB of compressed data.  Each call to
read() requests only 16 KiB, so each call must reallocate and copy many
MiBs.

The attached patch makes the read buffer a StringIO instead of a string.
  Each call to the decompressor creates a new StringIO buffer.  Reading
from the StringIO does not create a new string for the unread data. 
When the buffer has been exhausted, a new StringIO is created with the
next batch of uncompressed bytes.

The patch also fixes the behavior of zipfile.py when called as a script
with the -e flag.  Before, to extract a file, it decompressed the entire
file to memory, and then wrote the entire file to disk.  This behavior
is undesirable if the decompressed file is even remotely large.  Now, it
uses ZipFile.extractall(), which correctly streams the decompressed data
to disk.

unzip vs. Python's zipfile.py vs. patched zipfile.py:

$ time unzip -e zeroes.zip
Archive:  zeroes.zip
  inflating: zeroes_unzip/zeroes

real0m0.707s
user0m0.463s
sys 0m0.244s

$ time python zipfileold.py -e zeroes.zip zeroes_old

real3m42.012s
user0m57.670s
sys 2m43.510s

$ time python zipfile.py -e zeroes.zip zeroes_patched

real0m0.986s
user0m0.409s
sys 0m0.490s

In this test, the patched version is 246x faster than the unpatched
version, and is not far off the pace of the C version.

Incidentally, this patch also improves performance when the data is not
repetitive.  I tested a ZIP containing a single compressed file filled
with random data, created by running
$ dd if=/dev/urandom of=random bs=1024 count=1024
$ zip random.zip random
This archive demonstrates the opposite scenario - where compression has
next to no impact on file size, and the read buffer will never be
dramatically larger than the amount of data fed to the zlib decompressor.

$ time python zipfileold.py -e random.zip random_old

real0m0.063s
user0m0.053s
sys 0m0.010s

$ time python zipfile.py -e random.zip random_patched

real0m0.059s
user0m0.047s
sys 0m0.012s

--
components: Extension Modules
files: zipfile_read_perf.patch
keywords: patch
messages: 73880
nosy: lightstruk
severity: normal
status: open
title: ZipFileExt.read() can be incredibly slow
type: performance
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file11621/zipfile_read_perf.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3978
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3978] ZipFileExt.read() can be incredibly slow

2008-09-26 Thread James Athey

Changes by James Athey [EMAIL PROTECTED]:


Added file: http://bugs.python.org/file11622/zeroes.zip

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3978
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3935] bisect insort C implementation ignores methods on list subclasses

2008-09-26 Thread Dmitry Vasiliev

Dmitry Vasiliev [EMAIL PROTECTED] added the comment:

Good idea! Don't know why I didn't use it in the very first version. :-)

New patch attached.

Added file: http://bugs.python.org/file11623/bisect2.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3935
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3979] Doctest failing when it should pass

2008-09-26 Thread J. Pablo Fernández

New submission from J. Pablo Fernández [EMAIL PROTECTED]:

The attached file contains a function and two tests for it which are
essentially the same. One is a doctest and the other is a TestCase. The
doctest fails and I believe it shouldn't.

Here's what I get:

$ python failingdoctest.py 
**
File ../../provizora/failingdoctest.py, line 8, in __main__._to_xsistemo
Failed example:
_to_xsistemo(uĈĉĜĝĤĥĴĵŜŝŬŭ)
Expected:
'CxcxGxgxHxhxJxjxSxsxUxux'
Got:
   
u'\\xc4\\x88\\xc4\\x89\\xc4\\x9c\\xc4\\x9d\\xc4\\xa4\\xc4\\xa5\\xc4\\xb4\\xc4\\xb5\\xc5\\x9c\\xc5\\x9d\\xc5\\xac\\xc5\\xad'
**
1 items had failures:
   1 of   1 in __main__._to_xsistemo
***Test Failed*** 1 failures.
.
--
Ran 1 test in 0.000s

OK


Thank you.

--
components: Library (Lib)
files: failingdoctest.py
messages: 73882
nosy: pupeno
severity: normal
status: open
title: Doctest failing when it should pass
versions: Python 2.5
Added file: http://bugs.python.org/file11624/failingdoctest.py

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3979
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2384] [Py3k] line number is wrong after encoding declaration

2008-09-26 Thread Hirokazu Yamamoto

Hirokazu Yamamoto [EMAIL PROTECTED] added the comment:

Victor, this is fp_setreadl's problem, so if put tok-lineno = -1
anywhere, it should be in fp_setreadl(), I think.

r = set_readline(tok, cs);
if (r) {
/* 1 */
tok-encoding = cs;
tok-decoding_state = STATE_NORMAL;

At /* 1 */, set_readline could be buf_setreadl(), and fp_setreadl is
called elsewhere.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2384
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3909] Building PDF documentation from tex files

2008-09-26 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

If that solves the problem, that is very curious indeed. There must not
be a \fi after \newif; its syntax is

\newif\ifname\default

Later it can be used as \ifname ... \fi.

What TeX distribution and version of tex/latex are you using?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3909
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1706863] Failed to build Python 2.5.1 with sqlite3

2008-09-26 Thread Hirokazu Yamamoto

Hirokazu Yamamoto [EMAIL PROTECTED] added the comment:

extra changes that has to go in a
specific compiler class. As example platform can be any but compiler
gcc(mingw) that produce executables for windows host platform.

You are right. It should be. My patch is just one choice when switching
back to CygwinCCompiler is difficult. (Anyway I don't understand well
why CygwinCCompiler was abandoned)

it would be better to put Cygwin specific behavior 
in CygwinCCompiler, I think the changes would have be more invasive if 
you did.

Agreed.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1706863
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3947] configure --with-threads on cygwin = crash on thread related tests

2008-09-26 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

So it is a Vendor OS problem, python is not involved.

--
nosy: +amaury.forgeotdarc

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3947
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3872] Python 2.6rc2: Tix ComboBox error

2008-09-26 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

 What is the procedure to have this new version merged into the msi file?

The version of Tix being used is the one in the Subversion externals
directory. See the subversion log for a complete list of changes; most
specifically, win/python9.mak is used to compile it. See
PCbuild/build_tkinter.py for a build procedure that might work.

There is no persistent (svn-commitable) procedure to get a newer Tix
version into the MSI file; I need to replace the Tix version that I
currently have on my disk with a newer one.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3980] win32file.GetCommState incorrect handling of DCB

2008-09-26 Thread Alan Gardner

New submission from Alan Gardner [EMAIL PROTECTED]:

I believe I have found a bug in win32file.GetCommState and
win32file.SetCommState.  I have seen it in Python 2.4 and Python 2.5,
running an older version of pywin32, as well as the current (212)
version.  It exists in Win2k and WinXP.  I use pyserial 2.4 as a wrapper
for the comm ports, though I believe the problem is in win32file.

The problem manifests itself when I try to open a com port in Python
after having that port open in Procomm (an old, no longer supported
terminal program).  I have only seen it happen with a particular brand
of USB to serial converters (Edgeport, made by Digi).  In these
conditions the python script will hang at the win32file.SetCommState()
command, usually timing out after 5-30 seconds, and quitting with no
error message.

After having done some probing I think I basically understand the
problem, and have a workaround, but I lack the know-how to fix it where
it should be fixed, in win32file.  When Procomm opens the port, it sets
XoffLim to 16128 and the XonLim to 15872.  When my script (actually,
serialwin32.py from pyserial) tries to open the port it first reads the
DCB with GetCommState(), changes baud rate, etc in the local PyDCB
object, and then tries to reconfigure the port with SetCommState().  

From what I can tell, SetCommState won't accept a value for XoffLim or
XonLim 4096.  For example, if I try to execute

DCB.XoffLim = 16128
SetCommState(porthandle,DCB)

I get an exception: (87, 'SetCommState', 'The parameter is incorrect.')

However, if GetCommState gets a DCB which has XoffLim = 16128, and then
that DCB is passed to SetCommState, the script hangs for several seconds
before exiting without opening the port and with no error message.  For
example, after having opened and closed the port in Procomm:

 DCB = GetCommState(porthandle)
 DCB.XoffLim
16128L
 SetCommState(porthandle,DCB)
(.. hangs here for several seconds ..)

If I set XoffLim and XonLim to values from 0-4096 before calling
SetCommState, then it works fine.  For example, after having opened and
closed the port in Procomm:

 DCB = GetCommState(porthandle)
 DCB.XoffLim = 128
 DCB.XonLim = 512
 SetCommState(porthandle,DCB)

This works fine, and I can go on to open the port normally.  I have
incorporated this fix into serialwin32.py which is working for me now,
but it's not an elegant solution.  I am still baffled by why
SetCommState limits Xon/XoffLim to 4096, and by what GetCommState does
to the PyDCB to make it cause SetCommState to fail so dramatically.  I
also don't understand why I only see this problem with the Edgeport USB
converters, and not with several other USB converters or hardware serial
ports.  Maybe someone with a more intimate understanding of Python and
Win32 can come up with some answers.

Thank you
-Alan Gardner
Woods Hole Oceanographic Institution
Woods Hole, MA 02543

--
components: Extension Modules, Windows
messages: 73888
nosy: jiaailun
severity: normal
status: open
title: win32file.GetCommState incorrect handling of DCB
type: crash
versions: Python 2.4, Python 2.5

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3980
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2384] [Py3k] line number is wrong after encoding declaration

2008-09-26 Thread STINNER Victor

STINNER Victor [EMAIL PROTECTED] added the comment:

@ocean-city: Oops, sorry. Using your patch (set lineno in
fp_setreadl()), it works on both cases (python test.py or python -m
test).

The new patch includes your fix for tokenizer.c and a new version of the
testcase.

Added file: http://bugs.python.org/file11625/tokenizer-coding-2.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2384
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3946] PyObject_CheckReadBuffer crashes on memoryview object

2008-09-26 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

I'm actually having a hard time trying to get memoryview to use
PyObject_CheckReadBuffer. Eventually, test should be written in C, but
for now are you ok with the compile test?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3946
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3980] win32file.GetCommState incorrect handling of DCB

2008-09-26 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

This is the bug tracker for the Python Core project. Please report
problems with win32file to the Python-Win32 project
(http://sourceforge.net/projects/pywin32)

--
nosy: +loewis
resolution:  - invalid
status: open - closed
versions: +3rd party -Python 2.4, Python 2.5

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3980
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3547] Ctypes is confused by bitfields of varying integer types

2008-09-26 Thread Roumen Petrov

Roumen Petrov [EMAIL PROTECTED] added the comment:

Flag start only with one minus: -mms-bitfields
Fine with me.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3547
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1706863] Failed to build Python 2.5.1 with sqlite3

2008-09-26 Thread Roumen Petrov

Roumen Petrov [EMAIL PROTECTED] added the comment:

no objections

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1706863
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3947] configure --with-threads on cygwin = crash on thread related tests

2008-09-26 Thread Hirokazu Yamamoto

Hirokazu Yamamoto [EMAIL PROTECTED] added the comment:

Sorry, I noticed another bit. If main.exe is linked to libssl.dll.a and
libcrypto.dll.a it will crash, but linked to libssl.a and libcrypto.a it
won't crash. (I renamed *.dll.a temporary)

I'll try to build http://www.openssl.org/source/openssl-0.9.8h.tar.gz
with shared mode if possible.

So it is a Vendor OS problem, python is not involved.

Yes, possibly. Because other platform is not crashing on buildbot.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3947
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3946] PyObject_CheckReadBuffer crashes on memoryview object

2008-09-26 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Fixed in r66630.

--
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3946
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3971] s_push: parser stack overflow MemoryError

2008-09-26 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

This really abuse of the parser. If you really need this, you can bump
MAXSTACK in Parser/parser.h to a higher number.

--
nosy: +benjamin.peterson
resolution:  - wont fix
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3971
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3967] bytearray().count()

2008-09-26 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

I think the patch is good.

--
nosy: +benjamin.peterson

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3967
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3664] Pickler.dump from a badly initialized Pickler segfaults

2008-09-26 Thread Barry A. Warsaw

Changes by Barry A. Warsaw [EMAIL PROTECTED]:


--
priority: release blocker - deferred blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3664
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3661] sys.call_tracing segfaults

2008-09-26 Thread Barry A. Warsaw

Changes by Barry A. Warsaw [EMAIL PROTECTED]:


--
priority: release blocker - deferred blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3661
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3909] Building PDF documentation from tex files

2008-09-26 Thread Winfried Plappert

Winfried Plappert [EMAIL PROTECTED] added the comment:

I just tested it under Linux/Ubuntu and it is the same behaviour as
described earlier: fix line 69 in sphinx.sty and it works. My pdflatex
version on Windows (MiKTeX) has been mentioned in my first entry and the
version for Ubuntu is (TeX-live):

pdfTeX 3.1415926-1.40.9-2.2 (Web2C 7.5.7)
kpathsea version 3.5.7
Copyright 2008 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Kpathsea is copyright 2008 Karl Berry and Olaf Weber.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Kpathsea written by Karl Berry, Olaf Weber, and others.
Compiled with libpng 1.2.29; using libpng 1.2.29
Compiled with zlib 1.2.3; using zlib 1.2.3
Compiled with xpdf version 3.02pl2

I include all reference.* files (apart from reference.tex) in zipped format.

Added file: http://bugs.python.org/file11626/reference.zip

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3909
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1210] imaplib does not run under Python 3

2008-09-26 Thread Barry A. Warsaw

Changes by Barry A. Warsaw [EMAIL PROTECTED]:


--
priority: release blocker - deferred blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1210
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3775] Update RELNOTES file

2008-09-26 Thread Barry A. Warsaw

Changes by Barry A. Warsaw [EMAIL PROTECTED]:


--
priority: release blocker - deferred blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3775
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3574] compile() cannot decode Latin-1 source encodings

2008-09-26 Thread Barry A. Warsaw

Changes by Barry A. Warsaw [EMAIL PROTECTED]:


--
priority: release blocker - deferred blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3574
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1717] Get rid of more refercenes to __cmp__

2008-09-26 Thread Barry A. Warsaw

Changes by Barry A. Warsaw [EMAIL PROTECTED]:


--
priority: release blocker - deferred blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1717
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3799] Byte/string inconsistencies between different dbm modules

2008-09-26 Thread Barry A. Warsaw

Changes by Barry A. Warsaw [EMAIL PROTECTED]:


--
priority: release blocker - deferred blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3799
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3787] Make PyInstanceMethod_Type available or remove it

2008-09-26 Thread Barry A. Warsaw

Changes by Barry A. Warsaw [EMAIL PROTECTED]:


--
priority: release blocker - deferred blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3787
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3685] Crash while compiling Python 3000 in OpenBSD 4.4

2008-09-26 Thread Barry A. Warsaw

Changes by Barry A. Warsaw [EMAIL PROTECTED]:


--
priority: release blocker - deferred blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3685
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3187] os.listdir can return byte strings

2008-09-26 Thread Barry A. Warsaw

Changes by Barry A. Warsaw [EMAIL PROTECTED]:


--
priority: release blocker - deferred blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3187
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3781] warnings.catch_warnings fails gracelessly when recording warnings but no warnings are emitted

2008-09-26 Thread Barry A. Warsaw

Changes by Barry A. Warsaw [EMAIL PROTECTED]:


--
priority: release blocker - deferred blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3781
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3623] _json: fix raise_errmsg(), py_encode_basestring_ascii() and linecol()

2008-09-26 Thread Barry A. Warsaw

Changes by Barry A. Warsaw [EMAIL PROTECTED]:


--
priority: release blocker - deferred blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3623
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3886] Integer overflow in _hashopenssl.c (CVE-2008-2316)

2008-09-26 Thread Barry A. Warsaw

Changes by Barry A. Warsaw [EMAIL PROTECTED]:


--
priority: release blocker - deferred blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3886
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3723] Py_NewInterpreter does not work

2008-09-26 Thread Barry A. Warsaw

Changes by Barry A. Warsaw [EMAIL PROTECTED]:


--
priority: release blocker - deferred blocker

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3723
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3886] Integer overflow in _hashopenssl.c (CVE-2008-2316)

2008-09-26 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

I'm going to close this because 2.5, 2.6, and 3.0 have been patched.
Gregory, if you're concerned about 2.4, I think you should make a
different issue.

--
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3886
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3947] configure --with-threads on cygwin = crash on thread related tests

2008-09-26 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

I think I have a beginning of an explanation:
libssl.dll implements a DllMain function, whose DLL_THREAD_DETACH event 
calls ERR_remove_state. 
At this time, the (posix) thread function has already exited; 
pthread::exit() was already called the pthread object has been deleted.

And the same (win32) thread will call sem_wait()... and maybe access 
freed resources.

Linking against the static library does not have this problem.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3947
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3299] invalid object destruction in re.finditer()

2008-09-26 Thread Jeffrey C. Jacobs

Changes by Jeffrey C. Jacobs [EMAIL PROTECTED]:


--
nosy: +timehorse

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3299
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3967] bytearray().count()

2008-09-26 Thread STINNER Victor

STINNER Victor [EMAIL PROTECTED] added the comment:

Fixed in Python trunk, rev66631, by amaury.forgeotdarc.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3967
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3967] bytearray().count()

2008-09-26 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

Committed in trunk: r66631, in release25-maint: r66632 and py3k: r66633.

--
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3967
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3947] configure --with-threads on cygwin = crash on thread related tests

2008-09-26 Thread Hirokazu Yamamoto

Hirokazu Yamamoto [EMAIL PROTECTED] added the comment:

Thank you for great explanation! Probably you are right... I'll look
into the code.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3947
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3947] configure --with-threads on cygwin = crash on thread related tests

2008-09-26 Thread Hirokazu Yamamoto

Hirokazu Yamamoto [EMAIL PROTECTED] added the comment:

Maybe I can fix this openssl bug with pthread_cleanup_push, but this is
openssl bug, we cannot fix it directly.

I propose to commit workaround in msg73649 for 2.6 release.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3947
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3892] bsddb: test01_basic_replication fails on Windows sometimes

2008-09-26 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


--
priority: release blocker - normal

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3892
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3947] configure --with-threads on cygwin = crash on thread related tests

2008-09-26 Thread Hirokazu Yamamoto

Hirokazu Yamamoto [EMAIL PROTECTED] added the comment:

And after openssl will be fixed, change it to

#if defined(WITH_THREAD)  !(defined(__CYGWIN__) 
OPENSSL_VERSION_NUMBER  ???)

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3947
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3872] Python 2.6rc2: Tix ComboBox error

2008-09-26 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

I join two patches:

- the first applies to the official tix-8.4.3 source tree, and 
modifies the makefiles: adapt to new naming scheme for tcl/tk files and 
directories, embed manifest file...

- the other updates build_tkinter.py to build tcl-8.5.2.1, tk-8.5.2.0 
and tix-8.4.3. More options were needed. Tested on win32 with vs9 
express, Release  Debug modes.

At the end of the day, the given test_combotix.py passes (and displays a 
combobox in a small window!)

--
keywords: +patch
Added file: http://bugs.python.org/file11627/tix843.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3872] Python 2.6rc2: Tix ComboBox error

2008-09-26 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc [EMAIL PROTECTED]:


Added file: http://bugs.python.org/file11628/build_tkinter.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3872
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3932] HTMLParser cannot handle '' and non-ascii characters in attribute names

2008-09-26 Thread Simon Cross

Simon Cross [EMAIL PROTECTED] added the comment:

I can't reproduce this on current trunk (r66633, 27 Sep 2008). I checked
sys.getdefaultencoding() but that returned 'ascii' as expected and I
even tried language Python with LANG=C ./python but that didn't fail
either. Perhaps this has been fixed? It looks like it might originally
have been a problem in the re module from the traceback.

--
nosy: +hodgestar

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3932
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3187] os.listdir can return byte strings

2008-09-26 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Ok. Here's another possibility. It adds another optional parameter to
listdir. If False, bytes strings can be returned. Otherwise, the
UnicodeDecodeError is reraised.

Added file: http://bugs.python.org/file11629/force_unicode.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3187
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3187] os.listdir can return byte strings

2008-09-26 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file11629/force_unicode.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3187
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3187] os.listdir can return byte strings

2008-09-26 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


Added file: http://bugs.python.org/file11630/force_unicode.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3187
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3187] os.listdir can return byte strings

2008-09-26 Thread Guido van Rossum

Guido van Rossum [EMAIL PROTECTED] added the comment:

On Fri, Sep 26, 2008 at 5:47 PM, Benjamin Peterson
[EMAIL PROTECTED] wrote:
 Ok. Here's another possibility. It adds another optional parameter to
 listdir. If False, bytes strings can be returned. Otherwise, the
 UnicodeDecodeError is reraised.

I don't see the advantage over the existing rule bytes in - bytes out...

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3187
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3187] os.listdir can return byte strings

2008-09-26 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Does that mean that the right thing to do is raise decoding errors when
unicode is given and fix the path modules so they can use bytes?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3187
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3892] bsddb: test01_basic_replication fails on Windows sometimes

2008-09-26 Thread Jesús Cea Avión

Jesús Cea Avión [EMAIL PROTECTED] added the comment:

I need some MS Windows user able to replicate this issue locally (not in
the buildbot). Oracle people need to do some test and I would like to
avoid to mess with builtbots.

Please, help!.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3892
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3939] Patch to implement a real ftplib test suite

2008-09-26 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Excellent! Barry gave me permission to put this in 2.6, so I'll do so soon.

--
versions: +Python 2.6 -Python 2.7

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3939
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3358] 2to3 Iterative Wildcard Matching

2008-09-26 Thread Nick Edds

Nick Edds [EMAIL PROTECTED] added the comment:

What do you think would be the best way to implement a test for this? To
test it, I ran it on a known file that caused the old recursive method
to fail, but I don't know if it makes sense to include that with the
tests. I could always write a test to verify that the iterative element
works, but as for testing the transition from recursive to iterative
when the recursion limit is exceeded, do you think that is something I
should do, and is there a better way than simply including the file that
I know causes the recursion limit to be exceeded?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3358
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2876] Write UserDict fixer for 2to3

2008-09-26 Thread Nick Edds

Nick Edds [EMAIL PROTECTED] added the comment:

I have the functionality for this working, and will post it tomorrow
when I complete its test suite.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2876
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3358] 2to3 Iterative Wildcard Matching

2008-09-26 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

On Fri, Sep 26, 2008 at 9:24 PM, Nick Edds [EMAIL PROTECTED] wrote:

 Nick Edds [EMAIL PROTECTED] added the comment:

 What do you think would be the best way to implement a test for this? To
 test it, I ran it on a known file that caused the old recursive method
 to fail, but I don't know if it makes sense to include that with the
 tests. I could always write a test to verify that the iterative element
 works, but as for testing the transition from recursive to iterative
 when the recursion limit is exceeded, do you think that is something I
 should do, and is there a better way than simply including the file that
 I know causes the recursion limit to be exceeded?

I recommend generating a deeply nested structure and/or using
sys.setrecursionlimit to make the recursion limit artificially low,
and testing that refactoring works as planned.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3358
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3939] Patch to implement a real ftplib test suite

2008-09-26 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Commited in r66634.

--
resolution:  - accepted
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3939
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >