[issue4660] multiprocessing.JoinableQueue task_done() issue

2009-05-13 Thread Alvaro

Changes by Alvaro al...@ifca.unican.es:


--
nosy: +aloga

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



[issue2813] No float formatting in PyString_FromFormat

2009-05-13 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

I also think it would be good to use PyOS_double_to_string here.  That
does make it impossible to format long doubles, though, except by doing
a possibly lossy conversion to double first.

As far as I can see, Python doesn't use long double anywhere outside the
ctypes module, so I'm not sure that long double support really matters
right now.

--

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



[issue6010] unable to retrieve latin-1 encoded data from sqlite3

2009-05-13 Thread izarf

New submission from izarf izarf.m...@gmail.com:

it is impossible to retrieve a latin-1 encoded string from sqlite3 database.

How to:
1. create a new db.
2. create a new table with text field.
3. insert a row with data like åäö

4. select all rows from table
5. write:
 for data in cursor1:
   var = data

you will now get an error explaining something like ascii couldn't decode

--
components: None
messages: 87672
nosy: izarf
severity: normal
status: open
title: unable to retrieve latin-1 encoded data from sqlite3
type: behavior
versions: Python 2.5

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



[issue6009] optparse docs say 'default' keyword is deprecated but uses it in most examples

2009-05-13 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Pesonally I would prefer that the deprication be reversed.  In most of
my optparse use cases it is more convenient than calling set_defaults. 
In fact, I'm not sure I've ever used set_defaults, though I am glad that
it exists since I can certainly envision use cases for it.

--
nosy: +r.david.murray

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



[issue6011] python doesn't build if prefix contains non-ascii characters

2009-05-13 Thread Baptiste Carvello

New submission from Baptiste Carvello baptiste...@free.fr:

I have tried to build python (version 3.1 beta 1) on linux and install
it to a non-standard prefix which contains non-ascii utf-8 characters
(my locale being utf-8). The build directory's path is ascii-only. The
exact configure line is given in the attached file 'tb.txt'.

Then the 'make' command fails at the stage where python extensions are
built, with the traceback displayed in file tb.txt (in short:
UnicodeDecodeError: 'ascii' codec can't decode byte ... ).

The problem is triggered when 'distutils.sysconfig.get_config_vars'
tries to parse the Makefile. The Makefile is opened with
'distutils.text_file.TextFile', which in turns calls 'io.open' with no
'encoding' parameter. At this stage of the build, the 'locale' module is
not available (due to '_collections' not being), so that
'locale.getprefferedencoding' cannot be called and the encoding falls
back to ascii (a quick look to 'Modules/_io/textio.c' suggests that this
fallback mechanism is already designed for being used at build time).

The solution I propose would be to use 'sys.getfilesystemencoding' as a
fallback first, as it is defined during build time on most systems:
windows, mac and on posix if 'CODESET' exists in 'langinfo.h'. Given
that in build routines, non-ascii characters are only likely to be
encountered in filesystem paths, this seems a reasonable behavior.

The attached patch 'text_file.diff' implements this strategy in
'distutils.text_file', and then calls 'io.open' with the appropriate
'encoding' parameter. It could be argued, however, that this new
fallback is of general interest and should be implemented directly in
'Modules/_io/textio.c'. If you deem so, I could try to come up with a
new patch.

The attached patch solves the problem on my system, and does not
introduce test failures (which is expected, as the new fallback should
only make a difference at build time).

Cheers,
Baptiste

--
assignee: tarek
components: Distutils
files: tb.txt
messages: 87674
nosy: tarek, zegreek
severity: normal
status: open
title: python doesn't build if prefix contains non-ascii characters
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file13974/tb.txt

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



[issue6011] python doesn't build if prefix contains non-ascii characters

2009-05-13 Thread Baptiste Carvello

Baptiste Carvello baptiste...@free.fr added the comment:

And here comes the patch

--
keywords: +patch
Added file: http://bugs.python.org/file13975/text_file.diff

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



[issue5752] xml.dom.minidom does not escape newline characters within attribute values

2009-05-13 Thread Tomalak

Tomalak m8r-t1tu...@mailinator.com added the comment:

Francesco,

 if you want to encode the newline character, 
 this should be done by both parseString and 
 setAttribute methods. Otherwise, the 
 behaviour is not symmetric.

I believe you still don't see the issue. The behaviour is not symmetric
*now*. You store a '\n' in an attribute value with setAttribute(), save
the document to XML, load it again and out comes a space where the '\n'
should have been.

The point is that parseString() behaves correctly, but serializing does
not. There is only one side to fix, because only one side is broken.

 If you want to encode the newline in different 
 manner, you should develop a patch that
 introduces this kind of encoding in both 
 parseString and setAttribute methods.

It would be pointless to do the encoding in setAttribute(). The valid
ways to XML-encode a '\n' character are '#xA', '#x0A' or '#10'. Doing
so in setAttribute() would produce doubly encoded output, like this:
'amp;#10'. This is even more wrong.

However, if parseString() encounters a '#10' in the input, it correctly
translates this to '\n' in the DOM. As I said, there is nothing to fix
in parsing, this exercise is about getting minidom to actually *output*
a '#10;' where appropriate. :-)

--

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



[issue6012] enhance getargs O to accept cleanup function

2009-05-13 Thread Hirokazu Yamamoto

New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp:

This issue comes from #5990.

Currently, O doesn't accept general cleanup function. This causes
memory leak sometimes. Here is an experimental patch to create new
format O similar to O but have general cleanup function.

--
components: Interpreter Core
files: experimental_getargs_with_cleanup.patch
keywords: patch
messages: 87677
nosy: ocean-city
severity: normal
status: open
title: enhance getargs O to accept cleanup function
versions: Python 2.7, Python 3.1
Added file: 
http://bugs.python.org/file13976/experimental_getargs_with_cleanup.patch

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



[issue5990] Memory leak in os.rename() and other functions

2009-05-13 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

I opened #6012 to handle O memory leak issue.

--
nosy: +ocean-city

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



[issue5752] xml.dom.minidom does not escape newline characters within attribute values

2009-05-13 Thread Tomalak

Tomalak m8r-t1tu...@mailinator.com added the comment:

Daniel Diniz: 

The proposed behaviour is correct:
http://www.w3.org/TR/2000/WD-xml-c14n-2119.html#charescaping

In attribute values, the character information items 
TAB (#x9), newline (#xA), and carriage-return (#xD) 
are represented by #x9;, #xA;, and #xD; respectively.

Since the behaviour is correct, it is also desirable. :-)

I don't think that this change could cause existing solution to break
since the current inconsistency in handling these characters make it
impossible to rely on this anyway.

Thanks for putting up the unit test diff.

--

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



[issue5752] xml.dom.minidom does not escape newline characters within attribute values

2009-05-13 Thread Tomalak

Changes by Tomalak m8r-t1tu...@mailinator.com:


Removed file: http://bugs.python.org/file13919/minidom.patch

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



[issue5752] xml.dom.minidom does not escape newline characters within attribute values

2009-05-13 Thread Tomalak

Changes by Tomalak m8r-t1tu...@mailinator.com:


Added file: http://bugs.python.org/file13977/minidom.patch

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



[issue6007] distutils tricks you into thinking you can build extensions with mingw

2009-05-13 Thread Jean-Paul Calderone

Jean-Paul Calderone exar...@divmod.com added the comment:

 Even though I still don't understand the original issue, apparently,
 it is an issue only if the localtime() function is used. Extensions
 that don't use it might still work fine, according to the report.

I have an extension which doesn't use it and can't be loaded when built
with mingw32, so I think the issue goes beyond localtime().

 I think this is exaggerating the actual state. The compiler is
 certainly supported.

Can you elaborate on what supported means?  To me, it would mean that
it could build all the same Python extensions which MSVC can build.

--

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



[issue5752] xml.dom.minidom does not escape newline characters within attribute values

2009-05-13 Thread Tomalak

Tomalak m8r-t1tu...@mailinator.com added the comment:

I changed the patch to include support for TAB characters, which were
also left unencoded before.

Also I switched encoding from '#13;' etc. to '#xD;'. This is
equivalent, but the spec uses the latter variant.

--

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



[issue5752] xml.dom.minidom does not escape CR, LF and TAB characters within attribute values

2009-05-13 Thread Tomalak

Changes by Tomalak m8r-t1tu...@mailinator.com:


--
title: xml.dom.minidom does not escape newline characters within attribute 
values - xml.dom.minidom does not escape CR, LF and TAB characters within 
attribute values

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



[issue6010] unable to retrieve latin-1 encoded data from sqlite3

2009-05-13 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Confirmed here, tested with python2.6 
on Linux with sys.stding.encoding == 'ISO-8859-1'
on Windows with sys.stdin.encoding == 'cp437'

 import sqlite3
 db = sqlite3.connect(':memory:')
 cur = db.cursor()
 cur.execute(create table foo (x))
 cur.execute(insert into foo values ('café'))
 cur.execute(select * from foo)
Traceback (most recent call last):
  File stdin, line 1, in module
sqlite3.OperationalError: Could not decode to UTF-8 column 'x' with text
'café'


It seems that sqlite3 expects strings to be utf-8 encoded.
It works fine if you pass unicode strings, and with python 3.0.

--
nosy: +amaury.forgeotdarc

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



[issue5994] help(marshal) just gives an outline; no help text provided.

2009-05-13 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

I added 'variables' and 'functions' section to module docstring parallel
to the way 'time' does it, and documented 'version' there.

Checked in in r72597, r72598, and in r72599, r72600.

--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



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

2009-05-13 Thread Renaud Blanch

Renaud Blanch rndbl...@gmail.com added the comment:

looks very good to me.
thanks daniel for your work
renaud

--

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



[issue6013] json slower than simplejson

2009-05-13 Thread Thomas Heller

New submission from Thomas Heller thel...@ctypes.org:

The json package is a lot slower than the simplejson package.  Both
packages have their C compiled speedup module; however:

  C:\py26 -m timeit -s from json import dumps, loads
loads(dumps(range(32)))
  1000 loops, best of 3: 618 usec per loop

  C:\py26 -m timeit -s from simplejson import dumps, loads
loads(dumps(range(32)))
  1 loops, best of 3: 31 usec per loop

This is on Windows XP, with Python 2.6.2.

--
messages: 87685
nosy: theller
severity: normal
status: open
title: json slower than simplejson
type: performance
versions: Python 2.6

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



[issue6013] json slower than simplejson

2009-05-13 Thread Antoine Pitrou

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

This is probably because your simplejson is much more recent than the
json version shipped with 2.6.
Can you try again with trunk and post the numbers?

--
nosy: +pitrou

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



[issue6013] json slower than simplejson

2009-05-13 Thread Thomas Heller

Thomas Heller thel...@ctypes.org added the comment:

Here are the numbers from trunk (rev ) and release26-maint branch (rev ):

c:\svn\release26-maint\PCbuildpython -m timeit -s from json import loads, 
dumps loads(dumps(range(32)))
1000 loops, best of 3: 726 usec per loop

c:\svn\release26-maint\PCbuildcd ..\..\trunk\PCbuild

c:\svn\trunk\PCbuildpython -m timeit -s from json import loads, dumps 
loads(dumps(range(32)))
1 loops, best of 3: 33.5 usec per loop

So, the performance issue seems fixed in trunk but not in release26-maint.

(This stuff is an issue for me since I want to use jsonrpc on
an embedded system.  Cross-compiling Python is a pain, but installing
simplejson which uses setuptools is even more painful.)

--

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



[issue5752] xml.dom.minidom does not escape CR, LF and TAB characters within attribute values

2009-05-13 Thread Francesco Sechi

Changes by Francesco Sechi francesco.se...@iet.unipi.it:


--
nosy:  -sechi_francesco

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



[issue6013] json slower than simplejson

2009-05-13 Thread Antoine Pitrou

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

Given the amount of changed code between the two simplejson versions,
I'm afraid there's no way the new version will be backported to
release26-maint. You can probably do the backport manually in your
Python install, though (or bite the bullet and use SVN trunk, which is
rather stable currently).

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

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



[issue5990] Memory leak in os.rename() and other functions

2009-05-13 Thread Antoine Pitrou

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


--
dependencies: +enhance getargs O to accept cleanup function

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



[issue6012] enhance getargs O to accept cleanup function

2009-05-13 Thread Antoine Pitrou

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


--
nosy: +loewis
priority:  - normal
stage:  - patch review
type:  - resource usage

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



[issue1621] Do not assume signed integer overflow behavior

2009-05-13 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

A few comments:

(1) I agree that signed overflows should be avoided
where possible.

(2) I think some of the changes in the latest patch
(fix-overflows-final.patch) are unnecessary, and
decrease readability a bit. An example is the following
chunk for the x_divrem function in Objects/longobject.c.

@@ -1799,7 +1799,7 @@ x_divrem(PyLongObject *v1, PyLongObject *w1, PyLongObject 
**prem)
k = size_v - size_w;
a = _PyLong_New(k + 1);
 
-   for (j = size_v; a != NULL  k = 0; --j, --k) {
+   for (j = size_v; a != NULL  k = 0; j = (unsigned)j - 1 , k = 
(unsigned)k - 1) {
digit vj = (j = size_v) ? 0 : v-ob_digit[j];
twodigits q;
stwodigits carry = 0;

In this case it's easy to see from the code that j and k
will always be nonnegative, so replacing --j with j =
(unsigned)j - 1 is unnecessary.  (This chunk no longer
applies for 2.7 and 3.1, btw, since x_divrem got
rewritten recently.)  Similar comments apply to the
change:

-   min_gallop -= min_gallop  1;
+   if (min_gallop  1) min_gallop = (unsigned)min_gallop - 
1;

in Objects/listobject.c.  Here it's even clearer that
the cast is unnecessary.

I assume these changes were made to silence warnings from
-Wstrict-overflow, but I don't think that should be a goal:
I'd suggest only making changes where there's a genuine
possibility of overflow (even if it's a remote one), and
leaving the code unchanged if it's reasonably easy to
see that overflow is impossible.


(3) unicode_hash also needs fixing, as do the lookup
algorithms for set and dict.  Both use overflowing
arithmetic on signed types as a matter of course.
Probably a good few of the hash algorithms for the
various object types in Objects/ are suspect.

--
nosy: +marketdickinson

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



[issue1621] Do not assume signed integer overflow behavior

2009-05-13 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

I assume these changes were made to silence warnings from
-Wstrict-overflow, but I don't think that should be a goal:
I'd suggest only making changes where there's a genuine
possibility of overflow (even if it's a remote one), and
leaving the code unchanged if it's reasonably easy to
see that overflow is impossible.

There is a lot of value in being able to compile with -Wstrict-overflow 
and know that every warning omitted is something to be looked at.  I 
think it is advantageous to make all code pass this.  Having any 
expected warnings during compilation tends to lead people to ignore 
all warnings.

That said, I agree those particular examples of unnecessary casts are 
ugly and should be written differently if they are actually done to 
prevent a warning.

--

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



[issue4050] inspect.findsource() returns binary data for shared library modules

2009-05-13 Thread Antoine Pitrou

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

It's true inspect.findsource() behaves likes this, but help() has only
been broken very recently (and only in py3k), so I suggest these are
separate bugs.

--
nosy: +pitrou

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



[issue4050] inspect.findsource() returns binary data for shared library modules

2009-05-13 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
assignee:  - r.david.murray
nosy: +r.david.murray
versions: +Python 2.7 -Python 2.6

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



[issue4625] IDLE won't open anymore, .idlerc unaccessible

2009-05-13 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Was python installed with another user account, or a just for me install?

--
nosy: +amaury.forgeotdarc

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



[issue1621] Do not assume signed integer overflow behavior

2009-05-13 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

 There is a lot of value in being able to compile with -Wstrict-overflow 
 and know that every warning omitted is something to be looked at.

I agree in principle; this certainly applies to -Wall.  But -Wstrict-
overflow doesn't do a particularly good job of finding signed overflow
cases:  there are a good few false positives, and it doesn't pick up
the many cases of actual everyday signed overflow e.g., in unicode_hash, 
byteshash, set_lookkey, etc.), so it doesn't seem a particular good basis 
for code rewriting.

--

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



[issue1621] Do not assume signed integer overflow behavior

2009-05-13 Thread Ismail Donmez

Ismail Donmez ism...@namtrac.org added the comment:

You should be using gcc 4.4 to get the best warning behaviour.

--

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



[issue4832] idle filename extension

2009-05-13 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

I think I found the relevant documentation:
http://wiki.tcl.tk/1842

On Unix, when typing a filename without extension, the first extension
belonging to the currently selected filetype will be appended to the
filename. On Windows, this is not the case, but one can define a fixed
extension with the -defaultextension option. To get the same behaviour
on Unix, use -defaultextension {}.


I tried to add defaultextension=.py, (see attached patch) the problem
is that now it seems impossible to create a file without an extension...

--
keywords: +patch
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file13978/defaultextension.patch

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



[issue4050] inspect.findsource() returns binary data for shared library modules

2009-05-13 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Patches applied to 2.7 in r72605 and 3.1 in r72607, after discussion on
#python-dev.  Blocked on 2.6 since it represents a behavior change and
doesn't actually break anything in the 2 series.

The change that introduced the pydoc regression was not backported to
3.0, which opens the question of whether or not this fix should be
backported.

--
priority: release blocker - normal
resolution:  - fixed
stage: patch review - commit review
versions:  -Python 2.7, Python 3.1

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



[issue4050] inspect.findsource() returns binary data for shared library modules

2009-05-13 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Decision is not to backport.

--
status: open - closed
versions: +Python 2.7, Python 3.1 -Python 3.0

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



[issue4832] idle filename extension

2009-05-13 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

Amaury,
Your patch also forces '.py' to any saved file on Linux, but using
'defaultextension = ' it works correctly here. Does if fix things on
Windows?

--

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



[issue4832] idle filename extension

2009-05-13 Thread Pavel Kosina

Pavel Kosina g...@post.cz added the comment:

Trying to patch the latest revision 72608 and it didnt work, here on winxp. 

C:\prg\Python30\Lib\idlelibsvn update
Restored 'IOBinding.py'
At revision 72608.

C:\prg\Python30\Lib\idlelibpatch IOBinding.py defaultextension.patch
--verbose
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--
|Index: Lib/idlelib/IOBinding.py
|===
|--- Lib/idlelib/IOBinding.py   (revision 72282)
|+++ Lib/idlelib/IOBinding.py   (working copy)
--
Patching file IOBinding.py using Plan A...
Hunk #1 succeeded at 480 (offset -45 lines).
Hmm...  Ignoring the trailing garbage.
done


If I do the patch by hand, it works. All files are saved with ext. .py.
When set 'defaultextension = ', it is save well too, but then IDLE
crashed immediately.

--

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



[issue1621] Do not assume signed integer overflow behavior

2009-05-13 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Thanks Ismail.  I'm currently using gcc-4.4 with the -ftrapv (not 
-fwrapv!) option to see how much breaks.  (Answer: quite a lot. :-[ )

I'm finding many overflow checks that look like:

size = Py_SIZE(a) * n;
if (n  size / n != Py_SIZE(a)) {
PyErr_SetString(PyExc_OverflowError,
repeated bytes are too long);
return NULL;
}

where size and n have type Py_ssize_t.  That particular one comes
from bytesobject.c (in py3k), but this style of check occurs
frequently throughout the source.

Do people think that all these should be fixed?  

The fix itself s reasonably straightforward:  instead of multiplying
and then checking for an overflow that's already happened (and hence
has already invoked undefined behaviour according to the standards),
get an upper bound for n *first* by dividing PY_SSIZE_T_MAX
by Py_SIZE(a) and use that to do the overflow check *before*
the multiplication.  It shouldn't be less efficient:  either way
involves an integer division, a comparison, and a multiplication.

The hard part is finding all the places that need to be fixed.

--

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



[issue5956] test_distutils fails for Python 3.1b1 on MacOS X

2009-05-13 Thread Jean Brouwers

Jean Brouwers mrje...@gmail.com added the comment:

Indeed, this is Python 3.1b1 built from source on MacOS X 10.4.1 Tiger 
(Intel).

MacOS considers some of these win*.exe files directories.  See the 
attached picture and below.

% ls -l Python-3.1b1/Lib/distutils/command/win*
-rw-r--r--   1 jean  jean   61440 Jul 15  2008 Python-
3.1b1/Lib/distutils/command/wininst-6.0.1.exe
-rw-r--r--   1 jean  jean   65536 Jul 15  2008 Python-
3.1b1/Lib/distutils/command/wininst-7.1.1.exe
-rw-r--r--   1 jean  jean   61440 Jan 20 13:25 Python-
3.1b1/Lib/distutils/command/wininst-8.0.1.exe
-rw-r--r--   1 jean  jean  224256 Jan 29 05:08 Python-
3.1b1/Lib/distutils/command/wininst-9.0-amd64.1.exe
-rw-r--r--   1 jean  jean  196096 Jan 29 05:08 Python-
3.1b1/Lib/distutils/command/wininst-9.0.exe

Python-3.1b1/Lib/distutils/command/wininst-6.0.exe:

Python-3.1b1/Lib/distutils/command/wininst-7.1.exe:

Python-3.1b1/Lib/distutils/command/wininst-8.0.exe:

Python-3.1b1/Lib/distutils/command/wininst-9.0-amd64.exe:

% ls -l Python-3.1b1/Lib/distutils/command/
total 2240

-rw-r--r--   1 jean  jean   61440 Jul 15  2008 wininst-6.0.1.exe
drwxr-xr-x   2 jean  jean  68 May  7 09:10 wininst-6.0.exe
-rw-r--r--   1 jean  jean   65536 Jul 15  2008 wininst-7.1.1.exe
drwxr-xr-x   2 jean  jean  68 May  7 09:10 wininst-7.1.exe
-rw-r--r--   1 jean  jean   61440 Jan 20 13:25 wininst-8.0.1.exe
drwxr-xr-x   2 jean  jean  68 May  7 09:10 wininst-8.0.exe
-rw-r--r--   1 jean  jean  224256 Jan 29 05:08 wininst-9.0-amd64.1.exe
drwxr-xr-x   2 jean  jean  68 May  7 09:10 wininst-9.0-amd64.exe
-rw-r--r--   1 jean  jean  196096 Jan 29 05:08 wininst-9.0.exe

--

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



[issue5956] test_distutils fails for Python 3.1b1 on MacOS X

2009-05-13 Thread Jean Brouwers

Jean Brouwers mrje...@gmail.com added the comment:

Another attempt to attach the image.

--
Added file: http://bugs.python.org/file13979/Issue5956.jpg

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



[issue1621] Do not assume signed integer overflow behavior

2009-05-13 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

 [and then perform the multiplication unsigned, to silence the
 warning - right?]

That wasn't actually what I was thinking:  I was proposing to rewrite it 
as:

if (Py_SIZE(a)  0  n  PY_SSIZE_T_MAX/Py_SIZE(a)) {
PyErr_SetString(PyExc_OverflowError,
repeated bytes are too long);
return NULL;
}
size = Py_SIZE(a) * n;

The multiplication should be safe from overflow, and I don't get
any warning at all either with this rewrite (using -O3 -Wall -Wextra -
Wsigned-overflow=5) or from the original code, so there's nothing to 
silence.

 I think there is a second solution: perform the multiplication
 unsigned in the first place.

That would work too.  I find the above code clearer, though.  It's not 
immediately obvious to me that the current overflow condition actually 
works, even assuming wraparound on overflow; I find myself having to 
think about the mathematics every time.

In general, it seems to me that the set of places reported by -Wsigned-
overflow is a poor match for the set of places that need to be fixed.  -
Wsigned-overflow only gives a warning when that particular version of 
gcc, with those particular flags, happens to make use of the no-overflow 
assumption for some particular optimization.  Certainly each of the 
places reported by -Wsigned-overflow should be investigated, but I don't 
believe it's worth 'fixing' correct code just to get rid of warnings 
from this particular warning option.

--

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



[issue1523] xdrlib fails to detect overflow (struct bug?)

2009-05-13 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

On trunk, I get the described struct behavior with  DeprecationWarning:
struct integer overflow masking is deprecated. The xdr.py script gives:
18446744073709551615 -  - 4294967295

On py3k, both raise struct.error: argument out of range.

Tested on Linux ia32.

--
nosy: +ajaksu2
stage:  - test needed
versions: +Python 2.6, Python 2.7 -Python 2.4

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



[issue1523] xdrlib fails to detect overflow (struct bug?)

2009-05-13 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

I'll take a look.

--
assignee:  - marketdickinson
nosy: +marketdickinson

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



[issue731991] find correct socklen_t type

2009-05-13 Thread Daniel Diniz

Changes by Daniel Diniz aja...@gmail.com:


--
stage:  - patch review
type:  - feature request
versions: +Python 2.7, Python 3.2 -Python 2.5, Python 2.6

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



[issue1739648] zipfile.testzip() using progressive file reads

2009-05-13 Thread Daniel Diniz

Changes by Daniel Diniz aja...@gmail.com:


--
stage:  - test needed
type:  - resource usage
versions: +Python 2.7, Python 3.2

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



[issue1783] nonexistent data items declared as exports in sysmodule.h

2009-05-13 Thread Daniel Diniz

Changes by Daniel Diniz aja...@gmail.com:


--
stage:  - needs patch
type:  - behavior
versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0

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



[issue1467201] size_t warnings on OSX 10.3

2009-05-13 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

Unless someone can confirm the warnings still exist, this will be closed.

--
nosy: +ajaksu2
priority: normal - low
stage:  - test needed
status: pending - open
type:  - behavior
versions: +Python 2.6, Python 3.1 -Python 2.5

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



[issue1866] const arg for PyInt_FromString

2009-05-13 Thread Daniel Diniz

Changes by Daniel Diniz aja...@gmail.com:


--
keywords: +patch
versions: +Python 2.7, Python 3.2 -Python 2.5

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



[issue6014] No shell prompt when a graphics that was started from IDLE is closed

2009-05-13 Thread Ralf Seliger

New submission from Ralf Seliger ad...@kreidestaub.de:

Platform: Ubuntu 8.10

Affected versions: Python 2.6.2, IDLE 2.6.2 and Python 2.5.4, IDLE 1.2.4

From IDLE I run a program that opens a graphics window (e.g. using the
Natural Language Toolkit:  import nltk followed by  nltk.download()). 

When I close the graphics window, I expect to be able to continue
working with the Python shell.

What happens instead is this: The graphics window closes, but the shell
prompt () does not appear. It seems the subprocess responsible for
the graphics window is still running even though the window is no more. 

All I can do is close IDLE upon which it complains about a program that
is still running.

I am not sure whether this is an IDLE-bug, a graphics package bug or a
nltk-bug,

--
components: IDLE
messages: 87715
nosy: chessweb
severity: normal
status: open
title: No shell prompt when a graphics that was started from IDLE is closed
type: behavior
versions: Python 2.6

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



[issue2005] posixmodule expects sizeof(pid_t/gid_t/uid_t) = sizeof(long)

2009-05-13 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

That would be issue 1983.

--
dependencies: +Return from fork() is pid_t, not int
nosy: +ajaksu2

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



[issue6014] No shell prompt when a graphics window that was started from IDLE is closed

2009-05-13 Thread Ralf Seliger

Changes by Ralf Seliger ad...@kreidestaub.de:


--
title: No shell prompt when a graphics that was started from IDLE is closed - 
No shell prompt when a graphics window that was started from IDLE is closed

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



[issue1983] Return from fork() is pid_t, not int

2009-05-13 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

Is this pending for trunk and py3k too or just for 2.5 (and hence can be
closed)?

--
nosy: +ajaksu2
status: pending - open

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



[issue1428655] Use PyOS_snprintf for static buffers

2009-05-13 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

Does anyone want to adopt this one? :)

--
nosy: +ajaksu2
stage:  - patch review
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5

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



[issue1200] Allow array.array to be parsed by the t# format unit.

2009-05-13 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

PyBUF_CHARACTER is now gone, and getargs.c reads:

  /*TEO: This can be eliminated --- here only for backward
compatibility */
case 't': { /* 8-bit character buffer, read-only access */

--
nosy: +ajaksu2, pitrou
stage:  - patch review
versions: +Python 3.1 -Python 3.0

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



[issue1932] Cosmetic patch to supress compiler warning

2009-05-13 Thread Daniel Diniz

Changes by Daniel Diniz aja...@gmail.com:


--
keywords: +patch
stage:  - patch review
versions: +Python 2.6, Python 3.1 -Python 2.5

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



[issue1294] Management of KeyboardInterrupt in cmd.py

2009-05-13 Thread Daniel Diniz

Changes by Daniel Diniz aja...@gmail.com:


--
stage:  - test needed
versions: +Python 2.7, Python 3.2 -Python 2.6

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



[issue2492] Check implementation of new buffer interface for PyString in 2.6

2009-05-13 Thread Daniel Diniz

Changes by Daniel Diniz aja...@gmail.com:


--
stage:  - test needed
versions: +Python 2.7

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



[issue2325] isinstance(anything, MetaclassThatDefinesInstancecheck) raises instead of returning False

2009-05-13 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

This now works correctly (returns False) in release26-maint, trunk and py3k.

--
nosy: +ajaksu2
resolution:  - out of date
stage:  - committed/rejected
status: open - closed

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



[issue3180] Interrupts are lost during readline PyOS_InputHook processing

2009-05-13 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

Michael,
How does this interact with the fix from issue 706406?

--
components: +Extension Modules -None
nosy: +ajaksu2
priority:  - normal
stage:  - test needed
versions: +Python 2.7, Python 3.2 -Python 2.6

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



[issue1534607] IndexError: Add bad index to msg

2009-05-13 Thread Daniel Diniz

Changes by Daniel Diniz aja...@gmail.com:


--
stage:  - test needed
versions: +Python 2.7, Python 3.2 -Python 2.6

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



[issue3070] Wrong size calculation in posix_execve

2009-05-13 Thread Daniel Diniz

Changes by Daniel Diniz aja...@gmail.com:


--
nosy: +haypo, loewis
priority:  - normal
stage:  - test needed
type:  - behavior
versions: +Python 3.1 -Python 3.0

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



[issue2981] confusing action of struct.pack and struct.unpack with fmt 'p'

2009-05-13 Thread Daniel Diniz

Changes by Daniel Diniz aja...@gmail.com:


--
priority:  - normal
type: behavior - feature request
versions: +Python 2.7, Python 3.2 -Python 2.5

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



[issue2521] ABC caches should use weak refs

2009-05-13 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

Confirmed on release26-maint and trunk.

--
nosy: +ajaksu2
priority:  - normal
stage:  - test needed
type:  - resource usage

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



[issue6015] Scrollbar in Idle os x 10.5

2009-05-13 Thread Jerome

New submission from Jerome knap...@yahoo.com:

Hi, when I try to use the scrollbar to scroll through the REPL window or 
through a file I'm editing with IDLE in os x 10.5 the image of the 
scroll bar doesn't seem to correspond to anything, it moves more or less 
than my mouse when I'm trying to use it, and sometimes I can't click on 
it at all.  Also, clicking in the empty space to move forward or back a 
page doesn't always work.

~~

Also, I can't scroll the idle window with OS X's built in trackpad 
scrolling feature.  Maybe this isn't a bug thought, is it because idle 
is built with tkinter or something and for this feature to work it needs 
to be built with some os x tool?

--
components: IDLE
messages: 87721
nosy: an is
severity: normal
status: open
title: Scrollbar in Idle os x 10.5
versions: Python 3.1

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



[issue2492] Check implementation of new buffer interface for PyString in 2.6

2009-05-13 Thread Antoine Pitrou

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

Uh, this was done a long time ago.

--
nosy: +pitrou
resolution:  - fixed
status: open - closed

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



[issue1376292] Write user's version of the reference guide

2009-05-13 Thread Daniel Diniz

Changes by Daniel Diniz aja...@gmail.com:


--
dependencies: +Documentation for Descriptors in the main docs
stage:  - needs patch
versions: +Python 2.6, Python 3.1

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




[issue966625] Documentation for Descriptors in the main docs

2009-05-13 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

Maybe we should close this in favor of issue 1376292?

--
nosy: +ajaksu2
stage:  - needs patch
status: open - pending

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



[issue1739648] zipfile.testzip() using progressive file reads

2009-05-13 Thread Alan McIntyre

Alan McIntyre alan.mcint...@gmail.com added the comment:

It would appear that the change to testzip has already been made:

http://mail.python.org/pipermail/python-checkins/2008-August/072892.html
http://mail.python.org/pipermail/python-3000-checkins/2008-August/004310.html

I can add some tests, though.  I'll submit another patch shortly.

--

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



[issue966625] Documentation for Descriptors in the main docs

2009-05-13 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

I'll check but much of this has been done already.

--
assignee:  - rhettinger
status: pending - open

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



[issue1932] Cosmetic patch to supress compiler warning

2009-05-13 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

There is no warning now. Seems to be fixed.

--
resolution:  - out of date
status: open - closed

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



[issue6016] Use shipped zlib if the system version is bad

2009-05-13 Thread Daniel Diniz

New submission from Daniel Diniz aja...@gmail.com:

The attached patch makes setup.py use the shipped zlib.h in
Modules/zlib/ when a bogus zlib.h is found by find_file.

However, I couldn't test it (nor make it work) when a system zlib is
missing (no time right now). Can we build the shipped zlib and link
against it?

--
components: Build
files: zlib_setup.diff
keywords: patch, patch
messages: 87727
nosy: ajaksu2
priority: normal
severity: normal
stage: test needed
status: open
title: Use shipped zlib if the system version is bad
type: feature request
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file13980/zlib_setup.diff

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



[issue6017] Dict fails to notice addition and deletion of keys during iteration

2009-05-13 Thread Steven D'Aprano

New submission from Steven D'Aprano st...@pearwood.info:

I'm not sure if this is a documentation bug or a behaviour bug, or 
possibly both.

The documentation warns about adding or deleting items from a dict 
while iterating over it:

Using iteritems() while adding or deleting entries in the dictionary 
will raise a RuntimeError.

http://docs.python.org/library/stdtypes.html#dict.iteritems

Same for other dict iterators.

However, you can add and delete items, so long as the overall size of 
the dict doesn't change. Consequently, some modifications to the dict 
aren't caught, leading to various misbehaviour in (at least) Python 
2.5 and 2.6.

Some dicts appear to run too long:

 d = dict(x=3, y=4)  # Two items
 it = d.iteritems()
 it.next()  # One
('y', 4)
 del d['y']
 d['z'] = 5
 it.next()  # Two
('x', 3)
 it.next()  # Three
('z', 5)


While others run too short:

 d = {-1: 'aa', -2: 'bb'}  # Two items
 it = d.iteritems()
 it.next()  # One
(-2, 'bb')
 del d[-1]
 d[0] = 'cc'
 it.next()
Traceback (most recent call last):
  File stdin, line 1, in module
StopIteration

--
assignee: georg.brandl
components: Documentation, Interpreter Core
messages: 87729
nosy: georg.brandl, stevenjd
severity: normal
status: open
title: Dict fails to notice addition and deletion of keys during iteration
type: behavior
versions: Python 2.5, Python 2.6

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