[issue5097] asyncore.dispatcher_with_send undocumented

2009-02-02 Thread Kandalintsev Alexandre

Kandalintsev Alexandre  added the comment:

Ok, I'll try :). I'll send it today or tomorrow.

___
Python tracker 

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-02-02 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Mark, I have two concerns:
1) Python shouldn't (IMHO) crahs, even if you give bogus input to 
python functions.  Making sure that it doesn't crash in the test suite 
is not enough, I think.
2) It shouldn't disable assertions and other runtime tests for other 
code just because of this, as I know you are in agreement with.

My patch achieves the former, and also the latter in most cases.  That 
is to say, yes, assertions will be disabled for the whole program 
during the time some thread is running one of the "fd" functions in the 
os module, but left alone otherwise.  For the most part, a typical 
windows application (where this issue exists) will not be using those 
functions much anyway.

If you want, we can split my patch in two:  The fixes for the strftime 
and fopen() (checkable by us) and the fixes for invalid file 
desctiptors.  The workaround for the latter seems more contentious.

___
Python tracker 

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-02-02 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Martin, your reproducable behaviour involves consistently disabling 
functionality that those threads you mention may rely on (and since 
this i is a global state that no one messes with, they are unlikely to 
be doing so)

If the alternative is then just to live with invalid file descriptors 
causing crashes, except for the test suite, as Mark suggests, I can 
also live with that, I suppose.  But then we would want the additional 
tests in my patch for strftime and fopen()

___
Python tracker 

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



[issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim

2009-02-02 Thread sy12

New submission from sy12 :

platform: Windows XP

In a file (cf attached file) with mixed tabs and spaces, the line
following "else:" appears at the same level than "else:", while the file
probably still works with Python 2.6. At least, IDLE 2.5 or IDLE 2.4 or
vim don't have this problem.

--
components: IDLE
files: bug.py
messages: 80941
nosy: sy12
severity: normal
status: open
title: indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file12918/bug.py

___
Python tracker 

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



[issue2897] include structmember.h in Python.h

2009-02-02 Thread Martin v. Löwis

Changes by Martin v. Löwis :


--
assignee: loewis -> 

___
Python tracker 

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



[issue5130] Obsolete reference to "unicode" in glossary

2009-02-02 Thread Mitchell Model

New submission from Mitchell Model :

The glossary entry for "sequence" mentions the type "unicode", but that's 
gone.

--
assignee: georg.brandl
components: Documentation
messages: 80943
nosy: MLModel, georg.brandl
severity: normal
status: open
title: Obsolete reference to "unicode" in glossary
versions: Python 3.0, Python 3.1

___
Python tracker 

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



[issue1581476] Text search gives bad count if called from variable trace

2009-02-02 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

The patch looks fine, please apply.

We should come up with a deprecation strategy for GlobalCall, though,
since that function is now mostly redundant.

--
resolution:  -> accepted

___
Python tracker 

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



[issue1581476] Text search gives bad count if called from variable trace

2009-02-02 Thread Martin v. Löwis

Changes by Martin v. Löwis :


--
assignee: loewis -> gpolo

___
Python tracker 

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



[issue4448] should socket readline() use default_bufsize instead of _rbufsize?

2009-02-02 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

I have looked at this for py3k.
the behaviour of HTTPResponse.fp.read() is the same, wheter fp is 
buffered or not:  a read() will read to EOF for HTTP/1.1, which means 
blocking indefinetely.  So, read() is forbidden for HTTP/1.1.  For 
fp.read(n), buffered IO won't attempt to read more than is on the 
stream, if n bytes are avalible (SocketIO.read(N) will return a

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



[issue4879] Allow buffering for HTTPResponse

2009-02-02 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Checked in r69209 to py3k

___
Python tracker 

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



[issue1731706] tkinter memory leak problem

2009-02-02 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

I think the patch is correct. gpolo, what's your opinion?

___
Python tracker 

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



[issue1835] Update version number in __init__.py

2009-02-02 Thread Akira Kitada

Akira Kitada  added the comment:

It seems the version number has been bumped now.
Was it okay?

--
nosy: +akitada, tarek

___
Python tracker 

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



[issue1815] Distutils add ability to skip build [Feature Request]

2009-02-02 Thread Akira Kitada

Akira Kitada  added the comment:

Python 3.0 has --skip-build, too.
Can we close this ticket?

--
nosy: +akitada, tarek

___
Python tracker 

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



[issue1875] "if 0: return" not raising SyntaxError

2009-02-02 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

This was corrected by Benjamin with r69158.
Now the yield statement is still optimized away, but at least the
CO_GENERATOR flag is set only when compiling a function.

--
nosy: +amaury.forgeotdarc, benjamin.peterson
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-02-02 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

Maybe already conclusion is met, so probably I shouldn't post this patch
but... here is the patch implementing msg80934. I believe this is thread
safe. (This patch doesn't include codes of fopen.patch, but it doesn't
mean they are not necessary. My patch is just a minimal patch for CRT hook)

I'm not sure which way is the best, but I'm happy if popup dialog on
test_os.py (test_fdopen) goes away. I'm startled every time. ;-)

Added file: http://bugs.python.org/file12919/crt_report_hook.patch

___
Python tracker 

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



[issue1109659] distutils argument parsing is bogus

2009-02-02 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

yes, that's the expected behavior

*But* we could add a warning, that says that an option was unused.

--
assignee:  -> tarek
priority: normal -> low
type:  -> feature request
versions: +Python 2.7, Python 3.1

___
Python tracker 

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



[issue1835] Update version number in __init__.py

2009-02-02 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

I'll change the comment explaining how things work now.

--
assignee: lemburg -> tarek

___
Python tracker 

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-02-02 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

Just impression. I feel Martin's "disable globally, and provide API to
turn it on" is simple and good. +1/2. Of course, my impression is biased
by the fact I have never used _ASSERTE even when debugging python.

___
Python tracker 

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



[issue4471] IMAP4 missing support for starttls

2009-02-02 Thread Bill Janssen

Bill Janssen  added the comment:

Lorenzo, do we have test cases for this?  I think you should try to add
some test cases.  We may need to set up some test mail servers on
python.org to accommodate such tests.

--
nosy: +janssen

___
Python tracker 

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



[issue1875] "if 0: return" not raising SyntaxError

2009-02-02 Thread Armin Rigo

Armin Rigo  added the comment:

...which does not really solve anything, as "if 0: yield" at
module-level is now just ignored instead of raising a SyntaxError (e.g.
like "if False: yield").

___
Python tracker 

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



[issue4704] Update pybench for python 3.0

2009-02-02 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

On 2009-02-01 00:39, Antoine Pitrou wrote:
> Antoine Pitrou  added the comment:
> 
> The patch changes results a lot compared to the previous version
> (BuiltinFunctionCalls is 3x slower). I propose the following patch,
> which gives roughly the same runtimes as before (I use divmod() and
> max() rather than complex() and pow()).

Even better.

However, please see my comments on the ticket:

 * the version numbers of unaffected tests do not need to be
   changed

 * the major pybench version number also doesn't need to be
   bumped to 3.0, a minor revision (2.1) is good enough

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com



::: Try our new mxODBC.Connect Python Database Interface for free ! 

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/

___
Python tracker 

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



[issue1052827] filelist.findall should use os.lstat

2009-02-02 Thread Akira Kitada

Akira Kitada  added the comment:

This is reproducible, but I'm not sure why this could be a problem...
Is there any use cases that you think it could be better than failing?

--
nosy: +akitada, tarek

___
Python tracker 

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



[issue1835] Update version number in __init__.py

2009-02-02 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue5052] Mark distutils to stay compatible with 2.3

2009-02-02 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Some more explanation for why keeping distutils Python 2.3 compatible is
desirable:

distutils was removed from the PEP without any public discussion outside
a sprint at PyCon and the reasons given for it did not take into account
that people will want to use a single distutils version (that of the
lastest released Python version) to build packages for multiple Python
versions.

distutils in Python 2.6 no longer works with Python 2.1, but it still
does mostly with Python 2.3 and I would prefer to have to use that
version as minimum required.

Over the years I've always tried to rework any changes that were done
which did not meet that requirement and only left non-Python 2.3 code
in place that was not relevant for that version anyway, e.g. the
new MSVC code for Python 2.6.

Please also note that distutils is not a performance critical piece of
software. Making it more developer friendly to extending via
sub-classing and more user friendly by adding more support for platform
specific installer format is much more important than using the latest
and greatest tricks in Python.

With Python 2.7 released, we can then move on to Python 2.4
compatibility and so on.

___
Python tracker 

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



[issue5070] Distutils should create install dir if needed

2009-02-02 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

closing the issue since it's on setuptools side

--
status: open -> closed

___
Python tracker 

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



[issue5071] Distutils should not fail if install dir is not in PYTHONPATH

2009-02-02 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

closing for the same reason than #5070

--
status: open -> closed

___
Python tracker 

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



[issue831643] Set option for subprocess in setup.py

2009-02-02 Thread Akira Kitada

Akira Kitada  added the comment:

Sorry, but I don't understand this report.
Is reported problem fixed already?

--
nosy: +akitada, tarek

___
Python tracker 

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



[issue3871] cross and native build of python for mingw32 with distutils

2009-02-02 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

maybe you can group all your patch into one single issue since they are
related, and remove old patches,

--
nosy: +tarek

___
Python tracker 

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



[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2009-02-02 Thread Andreas Kupries

Andreas Kupries  added the comment:

Yes.

Session log:

andre...@bertha:~/tmp/x> ll
total 0

andre...@bertha:~/tmp/x> touch foobar
andre...@bertha:~/tmp/x> ll
total 0
-rw-rw-r--   1 andreask   DomainUsers  0 Feb  2 10:17 foobar

andre...@bertha:~/tmp/x> chown root foobar
andre...@bertha:~/tmp/x> ll
total 0
-rw-rw-r--   1 root   DomainUsers  0 Feb  2 10:17 foobar

___
Python tracker 

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



[issue4471] IMAP4 missing support for starttls

2009-02-02 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

For network tests like this where it is useful to test against external 
servers, could we just pick few known external servers that are unlikely 
to every go away?

imap.gmail.com:993 for instance?  (i don't know enough about imap to 
know if it supports what we need to test, I'll leave that up to you to 
determine :)

Picking another host or two from other big ISPs would also be wise in 
order to test multiple server implementations.

Once that is done, the tests that connect to external servers should be 
put in their own file marked as requiring the network resource.  Similar 
to how its done in Lib/test/test_urllib2net.py.

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-02-02 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

Of course, this won't work someone else altered hook function.

___
Python tracker 

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



[issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim

2009-02-02 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I don't see a problem with Untabify.  IDLE cannot know how big you
intended your tabs to be, so it presents a dialog asking you.  That
seems reasonable to me.

In most cases, the default is pretty good -- it attempts to infer the
tab width by finding the first manual indentation using spaces:

   'if:\n  pass\nif:\n\tpass\n'   --> guesses a two space indent

What differences are you seeing between 2.5 and 2.6?  Is it the initial
display is different, is the untabify default different, or what?

--
nosy: +rhettinger

___
Python tracker 

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



[issue4137] update SIG web pages

2009-02-02 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

akidata has started to write some proposal changes he will submit to
pydotorg.

Georg, should we keep track of this here or it's ok to close this ticket
and let the process continue in the ML ?

___
Python tracker 

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



[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2009-02-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

That explains what the test fails then. The test expects that you can't
chown a file to root as a normal user, and it verifies that an exception
is raised in that case.
Do you know if this behaviour is standard under HP-UX? If so, what do
sys.platform and platform.system() return?

(this won't be fixed in 2.5 by the way: 2.5 only receives security
fixes. 2.6 is the current stable branch and 2.7 is the in-development
version)

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

___
Python tracker 

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



[issue5132] distutils: libpython not found when building python extensions on Solaris when Python was built with --enable-shared

2009-02-02 Thread Dave Peterson

New submission from Dave Peterson :

I've had trouble building Python extensions on Solaris if the Python
install I'm using was built with the '--enable-shared' option.   In
tracking this down, it appears that the code in
'distutils/command/build_ext.py' contains a number of statements to
detect a similar situation for other platforms and explicitly add the
'lib' dir option for the linker, but there is no similar detection for
Solaris.

I've attached a patch that fixes this and solves the problem for me.  I
simply extended the checking for 'linux' and 'gnu' platforms to also
apply for 'sunos' platforms.

--
components: Distutils
files: distutils_command_build_ext.patch
keywords: patch
messages: 80977
nosy: dpeterson
severity: normal
status: open
title: distutils: libpython not found when building python extensions on 
Solaris when Python was built with --enable-shared
type: compile error
versions: Python 2.5
Added file: http://bugs.python.org/file12920/distutils_command_build_ext.patch

___
Python tracker 

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



[issue5128] compileall: consider ctime

2009-02-02 Thread Brett Cannon

Brett Cannon  added the comment:

The problem is not that ctime should be taken into account, but that the
.pyc file should be read for its timestamp and that should be used.
Otherwise you are still deviating from what Python uses internally to
decide whether bytecode should be regenerated.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue1731706] tkinter memory leak problem

2009-02-02 Thread Guilherme Polo

Guilherme Polo  added the comment:

Do we still want to say _tkinter.c supports tcl/tk from version 8.2 and
newer ? If yes, then we should add a no-op Tcl_ConditionFinalize when
using tcl older than 8.3, because that was when this function got added.

Besides that, the patch looks fine to me too (except I prefer
Tcl_Condition *cond over Tcl_Condition* cond).

___
Python tracker 

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



[issue1581476] Text search gives bad count if called from variable trace

2009-02-02 Thread Guilherme Polo

Guilherme Polo  added the comment:

Uhm, is it fine to remove it for good in 3.1 ? And then add a warning in
2.7 when it gets called which in turns just call Tkapp_Call ?

___
Python tracker 

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



[issue4471] IMAP4 missing support for starttls

2009-02-02 Thread Lorenzo M. Catucci

Lorenzo M. Catucci  added the comment:

I just found out that the gmail servers don't support connections on
the standard pop3/imapv4 ports, but only on the SSL wrapped ones.

I'm unsure if cmu.edu anonymous imap server admin's would be happy with
their server becoming python's official imap/pop testing playground;
still, I just verified it does support TLS upgrades both for pop3 and imap
and anonymous (read-only) logins.

I think I could cook-up something.

___
Python tracker 

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



[issue5133] Error with Eval

2009-02-02 Thread David Nicol

New submission from David Nicol :

The single line statements:

eval("08")  ; and
eval("09")

both crash; while

eval("07")  works fine

--
components: None
messages: 80982
nosy: davidnicol
severity: normal
status: open
title: Error with Eval
type: compile error
versions: Python 2.6

___
Python tracker 

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



[issue5134] Compiler warnings in sqlite module

2009-02-02 Thread Raymond Hettinger

New submission from Raymond Hettinger :

>From a compilation of Py3.1 r69209 :

..\..\..\sqlite-3.5.9\sqlite3.c(9702) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9703) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9813) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9814) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9817) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9818) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9819) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9820) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9835) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9836) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9838) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9881) : warning C4244: 'initializing' :
conversion from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9887) : warning C4244: '=' : conversion
from 'double' to 'time_t', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(9903) : warning C4996: 'localtime': This
function or variable may be unsafe. Consider using localtime_s instead.
To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for
details.
C:\Program Files\Microsoft Visual Studio
8\VC\include\time.inl(114) : see declaration of 'localtime'
..\..\..\sqlite-3.5.9\sqlite3.c(9998) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(10004) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(10096) : warning C4244: '+=' :
conversion from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(10102) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(10108) : warning C4244: '+=' :
conversion from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(10309) : warning C4244: 'function' :
conversion from 'u64' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(10340) : warning C4244: '=' : conversion
from 'double' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(11146) : warning C4244: 'return' :
conversion from 'sqlite3_int64' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(13798) : warning C4244: '=' : conversion
from 'sqlite3_int64' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(14408) : warning C4244: 'initializing' :
conversion from 'sqlite_uint64' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(14741) : warning C4244: '=' : conversion
from 'i64' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(16514) : warning C4244: '=' : conversion
from 'u64' to 'unsigned char', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(16517) : warning C4244: '=' : conversion
from 'u64' to 'unsigned char', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(16524) : warning C4244: '=' : conversion
from 'u64' to 'u8', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(22425) : warning C4244: 'initializing' :
conversion from 'sqlite3_int64' to 'LONG', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(22426) : warning C4244: 'initializing' :
conversion from 'sqlite3_int64' to 'LONG', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(22458) : warning C4244: 'initializing' :
conversion from 'sqlite3_int64' to 'LONG', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(22459) : warning C4244: 'initializing' :
conversion from 'sqlite3_int64' to 'LONG', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(22490) : warning C4244: 'initializing' :
conversion from 'sqlite3_int64' to 'LONG', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(22491) : warning C4244: 'initializing' :
conversion from 'sqlite3_int64' to 'LONG', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(24580) : warning C4018: '>=' :
signed/unsigned mismatch
..\..\..\sqlite-3.5.9\sqlite3.c(24597) : warning C4018: '<' :
signed/unsigned mismatch
..\..\..\sqlite-3.5.9\sqlite3.c(25331) : warning C4244: 'function' :
conversion from 'i64' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(25337) : warning C4244: 'function' :
conversion from 'i64' to 'int', possible loss of data
..\..\..\sqlite-3.5.9\sqlite3.c(25564) : warning C4244: '=' : conversi

[issue5132] distutils: libpython not found when building python extensions on Solaris when Python was built with --enable-shared

2009-02-02 Thread Tarek Ziadé

Changes by Tarek Ziadé :


--
assignee:  -> tarek
nosy: +tarek
versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.5

___
Python tracker 

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



[issue5133] Error with Eval

2009-02-02 Thread Ezio Melotti

Ezio Melotti  added the comment:

The leading zero is used to define octal numbers, 8 and 9 are not valid
octal digits, see
http://docs.python.org/reference/lexical_analysis.html#integer-and-long-integer-literals

Also, you don't need to use eval to reproduce that behavior.

The number displayed is the decimal equivalent:
>>> 07
7
>>> 010
8

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue5135] Expose simplegeneric function in functools module

2009-02-02 Thread Paul Moore

New submission from Paul Moore :

This patch takes the existing "simplegeneric" decorator, currently an
internal implementation detail of the pkgutil module, and exposes it as
a feature of the functools module.

Documentation and tests have been added, and the pkgutil code has been
updated to use the functools implementation.

Open issue: The syntax for registering an overload is rather manual:

def xxx_impl(xxx):
pass
generic_fn.register(XXX, xxx_impl)

It might be better to make the registration function a decorator:

@generic_fn.register(XXX)
def xxx_impl(xxx):
pass

However, this would involve changing the existing (working) code, and I
didn't want to do that before there was agreement that the general idea
(of exposing the functionality) was sound.

--
assignee: ncoghlan
components: Library (Lib)
files: generic.patch
keywords: needs review, patch
messages: 80986
nosy: ncoghlan, pmoore
priority: normal
severity: normal
stage: patch review
status: open
title: Expose simplegeneric function in functools module
type: feature request
versions: Python 2.7
Added file: http://bugs.python.org/file12921/generic.patch

___
Python tracker 

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



[issue2090] __import__ with fromlist=[''] causes double initialization of modules

2009-02-02 Thread Mart Sõmermaa

Mart Sõmermaa  added the comment:

A pointer for people who keep referring to this bug -- after
discussions, the following idiom was selected as the "official" way to
import modules by name in 2.x (as seen in latest 2.x docs
http://docs.python.org/dev/library/functions.html#__import__ ).

---

If you simply want to import a module (potentially within a package) by
name, you can get it from sys.modules:

>>> import sys
>>> name = 'foo.bar.baz'
>>> __import__(name)

>>> baz = sys.modules[name]
>>> baz


___
Python tracker 

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



[issue4343] New function in Tkinter.py: setup_master

2009-02-02 Thread Guilherme Polo

Guilherme Polo  added the comment:

Any chance I can get this in ? I'm using something very similar to test
the ttk wrapper and will also be using in other tests, extensions would
also benefit from it, and old code doesn't get affected to it.

--
versions: +Python 3.1 -Python 3.0

___
Python tracker 

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



[issue2090] __import__ with fromlist=[''] causes double initialization of modules

2009-02-02 Thread Brett Cannon

Brett Cannon  added the comment:

And just some more info, Python 2.7/3.1 have gained the importlib
module/package and its import_module function which gives a much saner
API than __import__.

___
Python tracker 

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



[issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim

2009-02-02 Thread sy12

sy12  added the comment:

The problem appeared in the initial display, with a file similar to bug.py.

Here is how to reproduce it:
1. open the bug.py file with IDLE 2.5 (or with Firefox from the
bugs.python.org website): the display shows the file the way the
compiler will (probably) see it;
2. open the bug.py file with IDLE 2.6: the line 7 (just after "else:")
is displayed differently.

Summary: IDLE 2.6 doesn't display the indentation that the compiler will
see.

-
About the secondary problem with Untabify (discovered when trying to
solve the display problem without having to reinstall Python 2.5):

Actually, Untabify is more a solution than a problem, except maybe that
the only safe value is 8 spaces for a tabulation. Using a different
value on legacy code (old code without tests) might add subtle bugs.

According to the Python Language Reference:
"First, tabs are replaced (from left to right) by one to eight spaces
such that the total number of characters up to and including the
replacement is a multiple of eight (this is intended to be the same rule
as used by Unix)."
-

___
Python tracker 

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



[issue5128] compileall: consider ctime

2009-02-02 Thread Martin von Gagern

Martin von Gagern  added the comment:

Like this? Should the magic number be checked as well, and if so,
against what value? I couldn't find that constant in any structure
accessible from python, and jumping through hoops seems too much, as
updating the python version should probably result in all system-wide
modules being updated as well, at least on a well-maintained system.

Added file: http://bugs.python.org/file12922/compileall-timestamp1.patch

___
Python tracker 

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



[issue5128] compileall: consider ctime

2009-02-02 Thread Brett Cannon

Brett Cannon  added the comment:

On Mon, Feb 2, 2009 at 12:22, Martin von Gagern  wrote:
>
> Martin von Gagern  added the comment:
>
> Like this?

Don't have the time right now to do a code review right now, but
hopefully I can get to this soon.

> Should the magic number be checked as well,

If one is already reading the file you might as well.

> and if so,
> against what value?

imp.get_magic().

___
Python tracker 

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



[issue5128] compileall: consider ctime

2009-02-02 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> brett.cannon
stage:  -> patch review

___
Python tracker 

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



[issue5119] wide character parameter handling in ctypes

2009-02-02 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

I see this in the documentation, which basically answers the question:

"windll does not try to select [wide or narrow functions] by magic, you
must access the version you need by specifying GetModuleHandleA or
GetModuleHandleW explicitely, and then call it with normal strings or
unicode strings respectively."

This behavior is inconsistent with how structures are handled, where
members are up-converted to unicode.  For example.

>>> class simple(Structure):
>>>   _fields_ = [('value', c_wchar_p)]
>>>
>>> simple('foo').value
u'foo'

___
Python tracker 

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



[issue2459] speedup for / while / if with better bytecode

2009-02-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Here is an updated patch against trunk.
To be honest I don't think it has a lot of future:
- it changes the lnotab format (to allow negative offsets)
- it rewrites the buggy block reordering code in the pure Python
compiler package, but nobody seems interested in maintaining that
package (see #2472).
Perhaps we should just declare the experiment failed and switch to
something else.

Added file: http://bugs.python.org/file12923/for_iter.patch

___
Python tracker 

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



[issue5128] compileall: consider ctime

2009-02-02 Thread Martin von Gagern

Martin von Gagern  added the comment:

Next iteration. With magic number, and now also closing the file again.
I changed from unpack and number comparison to pack and string
comparison, makes things a bit easier, as there is only one comparison,
and as underflow of the packed data isn't an issue any more.

Would you prefer the use of private marshal functions, as bootstrap
does, over the struct packing as I do here?

Looking forward to your review.

Added file: http://bugs.python.org/file12924/compileall-timestamp2.patch

___
Python tracker 

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



[issue1109659] distutils argument parsing is bogus

2009-02-02 Thread Akira Kitada

Akira Kitada  added the comment:

Here's the usage of setup.py

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

and '--dry-run' is a global option.
So it looks like valid behavior for me.

--
nosy: +akitada, tarek

___
Python tracker 

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



[issue3871] cross and native build of python for mingw32 with distutils

2009-02-02 Thread Roumen Petrov

Roumen Petrov  added the comment:

The proposed patch for this issue include parts of other pending issues
- so its all is single file. If python team don't like idea for
"canonical host names" (part of issue 3754) this patch can be modified
do not use host-triplet. Also some discussions in py-dev list show that
small patches are preferred. I'm ready to split into small patches to be
reviewed.

___
Python tracker 

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-02-02 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> Martin, your reproducable behaviour involves consistently disabling 
> functionality that those threads you mention may rely on

Right. So with the current implementation, they notice immediately that
something is wrong.

> (and since 
> this i is a global state that no one messes with, they are unlikely to 
> be doing so)

Except that Python messes with it, so in the small window where the
assertions get disabled, they may run past them

___
Python tracker 

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



[issue1581476] Text search gives bad count if called from variable trace

2009-02-02 Thread Guilherme Polo

Guilherme Polo  added the comment:

Commited in r69217 (r69219), r69220, r69222, r69223

Martin, I will open another ticket about GlobalCall deprecation, later
today.

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

___
Python tracker 

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



[issue1835] Update version number in __init__.py

2009-02-02 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

The distutils version number is now updated automatically by the Python
release process, so the comment in that file can be removed.

___
Python tracker 

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-02-02 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> I'm not sure which way is the best

I think that is easy to answer: Python should validate all parameters,
and report ValueError if any of the parameters would otherwise be
rejected by the CRT. Then, we could leave assertions on, and would never
trigger them.

___
Python tracker 

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



[issue5128] compileall: consider ctime

2009-02-02 Thread Martin von Gagern

New submission from Martin von Gagern :

When trying to decide whether or not a given file needs to be
recompiled, the inode creation time should be taken into account along
with the file modification time.

Scenario: Suppose you have three times, A < B < C < D. At time A, you
package version 1 of foo.py. At time B, you package version 2. At time C
you install version 1 onto some system, and byte-compile it for all
users. Therefore foo.py has mtime A and ctime C, and foo.pyc has both
mtime C. At time D you delete foo.py from version 1 and install version
2. Then you byte-compile it without force. At that time, foo.py has
mtime B (because that was when it was packaged) but ctime D (because
that was when the file was created). foo.pyc has mtime C (because that
was when it was last modified). The current comparison compares only
mtimes, sees C > B, and skips foo.py. With this patch in place, it will
check for C > max(B, D), which is not the case, and thus recompile foo.c.

In other words, max(st_mtime, st_ctime) can be interpreted as the last
time a file at a given path was changed, either through modification of
its contents (mtime) or deletion followed by recreation (ctime).
Installation systems that overwrite files without deleting them before
still are in the same trouble as before, but all others will benefit
from this.

See also: http://bugs.gentoo.org/256953

--
components: Library (Lib)
messages: 80939
nosy: gagern
severity: normal
status: open
title: compileall: consider ctime
type: feature request
versions: Python 2.5

___
Python tracker 

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



[issue1731706] tkinter memory leak problem

2009-02-02 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> Do we still want to say _tkinter.c supports tcl/tk from version 8.2 and
> newer ? If yes, then we should add a no-op Tcl_ConditionFinalize when
> using tcl older than 8.3, because that was when this function got added.

Good point. If we want to fix this in 2.6, we *have* to say that. If we
ignore 2.6, and only fix 2.7, we could require a newer Tcl version.

___
Python tracker 

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



[issue5134] Compiler warnings in sqlite module

2009-02-02 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

I don't think we should do anything about these, except perhaps for
disabling all warnings when compiling the file. These are upstream
sources, so we definitely should not "fix" them.

--
nosy: +loewis

___
Python tracker 

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



[issue5128] compileall: consider ctime

2009-02-02 Thread Brett Cannon

Brett Cannon  added the comment:

On Mon, Feb 2, 2009 at 12:42, Martin von Gagern  wrote:
>
> Martin von Gagern  added the comment:
>
> Next iteration. With magic number, and now also closing the file again.
> I changed from unpack and number comparison to pack and string
> comparison, makes things a bit easier, as there is only one comparison,
> and as underflow of the packed data isn't an issue any more.
>
> Would you prefer the use of private marshal functions, as bootstrap
> does, over the struct packing as I do here?
>

No since importlib only does it that way for bootstrapping
considerations (might end up at the implementation of import itself so
it has special requirements).

> Looking forward to your review.

I have not looked, Martin, but are proper tests in place already in
the standard library? If not I would appreciate tests.

___
Python tracker 

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



[issue5128] compileall: consider ctime

2009-02-02 Thread Brett Cannon

Brett Cannon  added the comment:

On Mon, Feb 2, 2009 at 13:50, Brett Cannon  wrote:
> On Mon, Feb 2, 2009 at 12:42, Martin von Gagern  
> wrote:
>>
>> Martin von Gagern  added the comment:
>>
>> Next iteration. With magic number, and now also closing the file again.
>> I changed from unpack and number comparison to pack and string
>> comparison, makes things a bit easier, as there is only one comparison,
>> and as underflow of the packed data isn't an issue any more.
>>
>> Would you prefer the use of private marshal functions, as bootstrap
>> does, over the struct packing as I do here?
>>
>
> No since importlib only does it that way for bootstrapping
> considerations (might end up at the implementation of import itself so
> it has special requirements).
>
>> Looking forward to your review.
>
> I have not looked, Martin, but are proper tests in place already in
> the standard library? If not I would appreciate tests.
>

Although, now that I said that, I have had testing issues myself when
it comes to mtime on bytecode as Python tends to execute faster than
the granularity the file system supports.

___
Python tracker 

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



[issue1242657] list(obj) can swallow KeyboardInterrupt

2009-02-02 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Thanks for the review.
Fixed in r69227.

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

___
Python tracker 

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



[issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim

2009-02-02 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> kbk
nosy: +kbk
priority:  -> high

___
Python tracker 

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



[issue3959] Add Google's ipaddr.py to the stdlib

2009-02-02 Thread pmoody

pmoody  added the comment:

(kicking an old thread)

On Mon, Jan 5, 2009 at 11:21 AM, Guido van Rossum
 wrote:
>
> Guido van Rossum  added the comment:
>
> I've been on vacation and unable to follow this, and won't have time to
> catch up now. Note that I have no vested interest in Google's module
> except knowing it has many happy users (I have never used it myself --
> but Collin Winter has and he tells me it's great).
>
> Since I haven't used either module and am not particularly interested in
> this functionality, I'm withdrawing myself from the set of experts who
> can decide which is better.
>
> Duncan McGreggor asked some questions on python-dev; here are my responses:
>
>>  * do we want to limit it to IP (i.e. no EUI/MAC support)?
>
> I don't want to exclude EUI/MAC support, but it seems quit a separate
> (and much more specialized) application area, so it's probably best to
> keep it separate (even if it may make sense to use a common (abstract
> or concrete) base class or just have similar APIs).
>
>>  * do we want a single module or is a package acceptable?
>
> I don't care either way.
>
>>  * other thoughts?
>
> How about a merger?

so we've talked about this on the ipaddr/netaddr lists and it seems
like a merger is pretty unlikely.  ipaddr and netaddr have some pretty
fundamental design differences, to the point where a merger wouldn't
mean a complete re-write of one or the other (in which case we're back
to picking one over the other).

so I guess a decision needs to be made. Is this something that should
be made on python-dev or does this bug have enough visibility?

for ipaddr's part, trunk is now pep8 compliant (with some backwards
compatible aliases).  I also know that David hasn't stopped adding
features to netaddr as well.

So, where do we go from here?

Cheers,
/peter

> ___
> Python tracker 
> 
> ___
>

___
Python tracker 

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



[issue5125] Strange locale problem with Python 3

2009-02-02 Thread Robin Stocker

Changes by Robin Stocker :


--
nosy: +robin.stocker

___
Python tracker 

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



[issue3959] Add Google's ipaddr.py to the stdlib

2009-02-02 Thread Guido van Rossum

Guido van Rossum  added the comment:

Beats me. I personally haven't had the pleasure to use either so I can't
decide.  Maybe a vote or a bake-off?

___
Python tracker 

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



[issue3959] Add Google's ipaddr.py to the stdlib

2009-02-02 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue1717] Get rid of more references to __cmp__

2009-02-02 Thread Mark Dickinson

Mark Dickinson  added the comment:

All relevant changes from the py3k-issue1717 branch have now been merged into 
the py3k 
branch (and from there into the 3.0 maintenance branch), in a series of 
revisions.  
Here they are, listed in py3k/release30-maint pairs:

r69188, r69189,
r69190, r69191,
r69192, r69193,
r69214, r69215,
r69218, r69221,
r69224, r69225.

The idea to raise TypeError on non-NULL tp_compare was abandoned after Martin 
pointed 
out that it would be a binary incompatible change _[1], but Nick Coghlan 
suggested a 
DeprecationWarning when tp_compare is non-NULL and tp_richcompare is NULL _[2], 
and 
remarked that the warning should also be implemented for Python 2.7 when run 
with the -
3 option.

Still to do before this can be closed:

 - fix up Doc/extending/newtypes.rst;  I think Georg has said he'll
   take care of this, so once everything else is done I'll just reassign
   this issue to him and let him get on with it.

 - add Nick Coghlan's suggested DeprecationWarning.

 - grep through the sources looking for tp_compare, __cmp__, cmpfunc,
   PyObject_Cmp, PyObject_Compare and cmp, and check all remaining
   references are legitimate.

 - update pybench;  there's a separate issue already open for this.
   (issue 4704), and it looks like Antoine and Marc-André are on the
   case.

 - anything else that I've forgotten.

Thanks everyone for your help so far, especially Christian for much of
the original code and Antoine for code and review.

[1] http://mail.python.org/pipermail/python-dev/2009-February/085797.html
[2] http://mail.python.org/pipermail/python-dev/2009-February/085809.html

___
Python tracker 

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



[issue3959] Add Google's ipaddr.py to the stdlib

2009-02-02 Thread Duncan McGreggor

Duncan McGreggor  added the comment:

Well, here are my thoughts on the matter:
 * ipaddr is relatively small, fast, and focuses on some core functionality
 * netaddr is designed to be very flexible (sometimes at the cost of a
little speed), leaning more towards a network calculation/address
manipulation "framework"

As such, and given the recent work made to ipaddr to make it
stdlib-friendly, my vote would be to include ipaddr in Python while
netaddr can continue growing, providing its user base with diverse
functionality while hopefully taking advantage of ipaddr in the Python
stdlib as much as is practical and useful.

___
Python tracker 

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



[issue3959] Add Google's ipaddr.py to the stdlib

2009-02-02 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> so I guess a decision needs to be made. Is this something that should
> be made on python-dev or does this bug have enough visibility?

The bug doesn't have enough visibility, so it definitely needs to be
discussed in public.

> So, where do we go from here?

Maybe some committer is willing to make a decision (I know that I will
not, but I wouldn't be opposed to somebody else making one).

Lacking that, the ususal procedures apply: either
a) publish the respective code on the relevant sites, build community,
   and come back in a few years, or
b) write a PEP, and ask for BDFL pronouncement in the end.

IOW, it is not clear to me why a decision *needs* to be made (unless
you count "defer" as a decision as well). Of course, in either a and
b, there is a chance that the result will again be "defer"

___
Python tracker 

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



[issue3959] Add Google's ipaddr.py to the stdlib

2009-02-02 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> As such, and given the recent work made to ipaddr to make it
> stdlib-friendly, my vote would be to include ipaddr in Python while
> netaddr can continue growing, providing its user base with diverse
> functionality while hopefully taking advantage of ipaddr in the Python
> stdlib as much as is practical and useful.

I could live with such a choice if the netaddr authors agree that it
is the right choice (them being experts themselves in the domain).
I don't want to be accused of drkjam's accusation of fast-tracking
code just because it comes from Google (which would be a false
accusation regardless, but there is no reason to make some Python
users unhappy because they feel they are subject to political games).

___
Python tracker 

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



[issue5128] compileall: consider ctime

2009-02-02 Thread Brett Cannon

Brett Cannon  added the comment:

If you want an easy way to see how bytecode is checked, look at
importlib._bootstrap in Python 3.1:
http://svn.python.org/view/python/branches/py3k/Lib/importlib/_bootstrap.py?view=markup
. Specifically, look at the get_code() method for _PyFileLoader.

___
Python tracker 

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



[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2009-02-02 Thread Andreas Kupries

Andreas Kupries  added the comment:

I do not know if this is standard for hpux or not.

I can say that right now we have six different HPUX machines which
behave in this manner, i.e. do not throw an error for the 'chown root
foobar' command for an ordinary (non-root) user.

Regarding the platform codes, here are the results.

andre...@bertha:~/tmp/autotest> ./apy/bin/python2.5
ActivePython 2.5.4.3 (ActiveState Software Inc.) based on
Python 2.5.4 (r254:67916, Jan 20 2009, 14:48:58) [C] on hp-ux11
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, platform
>>> sys.platform
'hp-ux11'
>>> platform.system()
'HP-UX'
>>> quit()

The six machines I mentioned are

bertha   - HP-UX 11.00 (PA-RISC)
bigsur03 - HP-UX 11.22 (Itanium)
hpa180   - HP-UX 11.00 (PA-RISC)
bigsur03 - HP-UX 11.22 (Itanium)
hpl3000  - HP-UX 11.23 (PA-RISC)
bigsur05 - HP-UX 11.32 (Itanium)

___
Python tracker 

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



[issue4528] test_httpservers consistently fails on OS X using tarball, but not svn tag r30

2009-02-02 Thread Erkan Yilmaz

Erkan Yilmaz  added the comment:

below you find following sections:
-summary
-details
-system info



summary:
**
The above message also appeared on 
- non-OS X: Distro Pardus 2008.2 Canis aureus
- Python 3.1a0 py3k:69210 (see details:steps 1-3)
(in step4 you find info about test_httpservers failed in: Python 2.7a0
trunk:69209)

To find out if there is an error on my side - on request - I can provide
more info.



details (4 steps):

1. I was trying to build with the py3k svn version (Revision 69210) and
got following error during the "make test":

302 tests OK.  
 
2 tests failed:
 
test_httpservers test_urllib   
 
21 tests skipped:  
 
test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp  
 
test_codecmaps_kr test_codecmaps_tw test_curses test_kqueue
 
test_nis test_normalization test_ossaudiodev test_pep277   
 
test_socketserver test_startfile test_timeout test_ttk_guionly 
 
test_urllib2net test_urllibnet test_winreg test_winsound   
 
test_xmlrpc_net test_zipfile64 
 
Those skips are all expected on linux2.
 
[913083 refs]


2. verbose output as non-admin first brought an exception:

er...@e-pardus2 python-svn $ ./python -m test.regrtest -v
test_httpservers test_urllib   
./python: error while loading shared libraries: libpython3.1.so.1.0:
cannot open shared object file: No such file or directory  
 
er...@e-pardus2 python-svn $ export
LD_LIBRARY_PATH=/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn  
   
  
er...@e-pardus2 python-svn $ ./python -m test.regrtest -v
test_httpservers test_urllibCould not find
'/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/test' in
sys.path to remove it  
   
test_httpservers   
 
test_command (test.test_httpservers.BaseHTTPServerTestCase) ... ok 
 
test_handler (test.test_httpservers.BaseHTTPServerTestCase) ... ok 
 
test_head_keep_alive (test.test_httpservers.BaseHTTPServerTestCase) ...
ok   
test_header_close (test.test_httpservers.BaseHTTPServerTestCase) ... ok
 
test_internal_key_error (test.test_httpservers.BaseHTTPServerTestCase)
... ok
test_request_line_trimming
(test.test_httpservers.BaseHTTPServerTestCase) ... ok 
test_return_custom_status (test.test_httpservers.BaseHTTPServerTestCase)
... ok  
test_return_header_keep_alive
(test.test_httpservers.BaseHTTPServerTestCase) ... ok  
test_send_blank (test.test_httpservers.BaseHTTPServerTestCase) ... ok  
 
test_version_bogus (test.test_httpservers.BaseHTTPServerTestCase) ... ok

test_version_digits (test.test_httpservers.BaseHTTPServerTestCase) ...
ok
test_version_invalid (test.test_httpservers.BaseHTTPServerTestCase) ...
ok   
test_version_none (test.test_httpservers.BaseHTTPServerTestCase) ... ok
 
test_version_none_get (test.test_httpservers.BaseHTTPServerTestCase) ...
ok  
test_get (test.test_httpservers.SimpleHTTPServerTestCase) ... Exception
in thread Thread-15: 
Traceback (most recent call last): 
 
  File
"/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/threading.py", line
507, in _bootstrap_inner   

self.run() 
 
  File
"/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/test/test_httpservers.py",
line 43, in run
 
self.server.serve_forever()
 
  File
"/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/socketserver.py",
line 224, in serve_forever 
  
r, w, e = select.select([self], [], [], poll_interval) 
 
select.error: (4, 'Interrupted system call')   
 


3. and as admin following output:

[issue4111] Add DTrace probes

2009-02-02 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue5128] compileall: consider ctime

2009-02-02 Thread Martin von Gagern

Changes by Martin von Gagern :


--
keywords: +patch
Added file: http://bugs.python.org/file12917/compileall-ctime.patch

___
Python tracker 

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-02-02 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Btw, I am going to use our contact at MS to pressure them to expose a 
validation function for file descriptors to avoid this bloody mess.

___
Python tracker 

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



[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2009-02-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, and when you try to chown back to yourself the root-owned foobar,
does it fail?

___
Python tracker 

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-02-02 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Well, as long as you think that an assertion is fine for the fd 
functions, I am fine with that too.
I attach a limited patch to the fopen() and strftime() functions that 
avoids the assertions for those functions without messing with the 
runtime state.

Added file: http://bugs.python.org/file12916/fopen.patch

___
Python tracker 

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



[issue5097] asyncore.dispatcher_with_send undocumented

2009-02-02 Thread Kandalintsev Alexandre

Kandalintsev Alexandre  added the comment:

This is my explanation of dispatcher_with_send. As my english is far from 
perfect and I'm not expirienced writing documentation you need to review 
it and fix my mistakes.


class asyncore.dispatcher_with_send

This is class based on asyncore.dispatcher. The only difference that 
unlike dispatcher.send which is direct mean to the socket.send() send() 
of this class uses buffered io. At first all outgoing data saved to the 
buffer and later it will send when socket becomes avaliable for write. 
Thus dispatcher_with_send.send() will never return EWOULDBLOCK error. 
Also you shuldn't overrdie writable() method as in this dispatcher it 
will automatically return convient value depending weither output buffer 
empty or not.

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

___
Python tracker 

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



[issue4494] Python 2.6 fails to build with Py_NO_ENABLE_SHARED

2009-02-02 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

Thanks for the patch. Committed as r69205, r69206, r69207, r69208.

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

___
Python tracker 

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



[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2009-02-02 Thread Andreas Kupries

Andreas Kupries  added the comment:

Yes, that does fail with error 'not owner'.

andre...@bertha:~/tmp> mkdir x
andre...@bertha:~/tmp> cd x
andre...@bertha:~/tmp/x> touch foobar
andre...@bertha:~/tmp/x> ll
total 0
-rw-rw-r--   1 andreask   DomainUsers  0 Feb  2 15:06 foobar
andre...@bertha:~/tmp/x> chown root foobar
andre...@bertha:~/tmp/x> ll
total 0
-rw-rw-r--   1 root   DomainUsers  0 Feb  2 15:06 foobar
andre...@bertha:~/tmp/x> chown andreask foobar
foobar: Not owner
andre...@bertha:~/tmp/x>

___
Python tracker 

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



[issue3959] Add Google's ipaddr.py to the stdlib

2009-02-02 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-02-02 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

Sorry for interruption. Maybe is _CrtSetReportHook useful?
http://msdn.microsoft.com/en-us/library/0yysf5e6(VS.80).aspx

1. Call _CrtSetReportHook on startup
2. Py_BEGIN_CRT_ERROR_HANDLING sets flag in thread local storage.
3. In hook function, look at above flag and change return value of hook
function.

This is just impression from MSDN document, I didn't try yet.

--
nosy: +ocean-city

___
Python tracker 

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



[issue1731706] tkinter memory leak problem

2009-02-02 Thread Guilherme Polo

Guilherme Polo  added the comment:

It is much more important to fix the memory leak anyway, it is possible
to notice real problems using test_tkleak1.py and watching the process
with ps or something else provided by the platform. Besides, not calling
ConditionFinalize doesn't introduce memory leaks, so it is not in par
with issue's title.

But I'm unsure about the existence of systems using Python as the main
language which are also using tkinter and at the same time depend on
tcl/tk 8.2 for some reason. So, to me, it would seem fine to start
requiring tcl/tk 8.3 (or even newer!) starting with 2.7 and 3.1

___
Python tracker 

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



[issue5133] Error with Eval

2009-02-02 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

They don't crash.  They raise a SyntaxError because the "08" and "09"
are invalid octal literals.

If you're working with decimal literals that are padded on the left with
zeroes, those need to be stripped off before conversion:

   '000987'.lstrip('0') --> '987'

Or, you can use the int() function:

   int('000987')

--
nosy: +rhettinger
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue1759169] clean up Solaris port and allow C99 extension modules

2009-02-02 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

If the Sun guy only commented on _XOPEN_SOURCE_EXTENDED, I'm not sure
that this also applies to _XOPEN_SOURCE. For example, on my Solaris 9,
I have (in signal.h) conditionally

#pragma redefine_extname sigwait __posix_sigwait 

and in sys/socket.h

#pragma redefine_extname connect __xnet_connect

So these feature selection macros not only select what API is declared
in the header files, but also what specific semantics some of the
functions have (e.g. if the traditional BSD semantics deviates from the
POSIX semantics).

In cases where there are alternative implementations of some system
calls, we *want* to select the POSIX definition. So I think we should
continue to define _XOPEN_SOURCE. I don't mind also defining __EXTENSIONS__.

___
Python tracker 

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



[issue1731706] tkinter memory leak problem

2009-02-02 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> Besides, not calling ConditionFinalize doesn't introduce memory leaks

Are you sure about this?  On Unix, TclpFinalizeCondition does

pthread_cond_destroy(pcondPtr);
ckfree((char *) pcondPtr);

both of which release memory (IIUC). Likewise for Windows, except
that it calls DeleteCriticalSection.

___
Python tracker 

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



[issue1731706] tkinter memory leak problem

2009-02-02 Thread Guilherme Polo

Guilherme Polo  added the comment:

>> Besides, not calling ConditionFinalize doesn't introduce memory leaks
>
> Are you sure about this?  On Unix, TclpFinalizeCondition does
>
>pthread_cond_destroy(pcondPtr);
>ckfree((char *) pcondPtr);
>
> both of which release memory (IIUC). Likewise for Windows, except
> that it calls DeleteCriticalSection.
>

I think I meant something more like "it doesn't result in memory
definitely lost" because tcl will free these conditions when tcl
finishes, but it does introduce memory leak in the sense that the
memory isn't freed right after it is not longer used.

___
Python tracker 

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



[issue4471] IMAP4 missing support for starttls

2009-02-02 Thread Lorenzo M. Catucci

Lorenzo M. Catucci  added the comment:

Thanks for following-up, Bill.

While I fully understand the need for unit-testing, I don't have the
guts to start writing a dummy imap server from scratch.

I tested my changes on a couple of servers I manage, one running
uw-imapd and the other running cyrus imapd; still, I don't think unit
tests could rely on a "real" server. On the other hand, I don't think a
python.org hosted test server would be a very wise choice: even if we
found some dummy all-data-in-memory server, I fear the ssl/tls load on
the server.

___
Python tracker 

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



[issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim

2009-02-02 Thread sy12

sy12  added the comment:

IDLE's "untabify" feature (required by IDLE 2.6 when running from IDLE)
seems to do the job correctly but this function doesn't inspire trust
and might damage the code, because IDLE 2.6 is not able to correctly
display mixed spaces and tabs (maybe for a reason linked to python 3 but
I didn't find it in the logs, so maybe it's just a bug) and because of
the default value given by the dialog, quite frightening: 4 spaces for a
tab, instead of 8. By giving 8 the problem seems to be solved, even for
IDLE 2.6.

Maybe IDLE 2.6 is assuming by default that a tab is 4 spaces?

___
Python tracker 

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



[issue5127] UnicodeEncodeError - I can't even see license

2009-02-02 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

There were non-ascii characters in the Windows license file. This was
corrected with r67860.


> I believe that chr(0x1) and chr(0x11000) should have the 
> opposite behavior.

This other problem is because on a narrow unicode build,
Py_UNICODE_ISPRINTABLE takes a 16bit integer.
And indeed, 

>>> unicodedata.category(chr(0x1 % 65536))
'Cc'
>>> unicodedata.category(chr(0x11000 % 65536))
'Lo'

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue1875] "if 0: return" not raising SyntaxError

2009-02-02 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Here is a patch that properly raises SyntaxError when 'return' or  
'yield' statements appear outside a function.

I did not bother to update the (deprecated) compiler package: it seems 
to be completely foreign to this kind of checks...

>>> dis.dis(compiler.compile("return 1", "module.py", "exec"))
  1   0 LOAD_CONST   1 (1)
  3 RETURN_VALUE
  4 LOAD_CONST   0 (None)
  7 RETURN_VALUE

--
assignee:  -> amaury.forgeotdarc
keywords: +needs review, patch
resolution: fixed -> 
status: closed -> open
Added file: http://bugs.python.org/file12926/return_outside_func.patch

___
Python tracker 

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



[issue5131] pprint doesn't know how to print a set or a defaultdict

2009-02-02 Thread Nick Craig-Wood

New submission from Nick Craig-Wood :

I noticed this the other day when debugging a program that neither set()
nor defaultdict() pprint() properly

Same under 3.1 and 2.5 (Not tried 2.6/2.7 but I assume it is the same)

>>> pprint(set(range(100)))
set([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
91, 92, 93, 94, 95, 96, 97, 98, 99])

>>> from collections import defaultdict
>>> pprint(defaultdict(int).fromkeys(range(100)))
defaultdict(None, {0: None, 1: None, 2: None, 3: None, 4: None, 5: None,
6: None, 7: None, 8: None, 9: None, 10: None, 11: None, 12: None, 13:
None, 14: None, 15: None, 16: None, 17: None, 18: None, 19: None, 20:
None, 21: None, 22: None, 23: None, 24: None, 25: None, 26: None, 27:
None, 28: None, 29: None, 30: None, 31: None, 32: None, 33: None, 34:
None, 35: None, 36: None, 37: None, 38: None, 39: None, 40: None, 41:
None, 42: None, 43: None, 44: None, 45: None, 46: None, 47: None, 48:
None, 49: None, 50: None, 51: None, 52: None, 53: None, 54: None, 55:
None, 56: None, 57: None, 58: None, 59: None, 60: None, 61: None, 62:
None, 63: None, 64: None, 65: None, 66: None, 67: None, 68: None, 69:
None, 70: None, 71: None, 72: None, 73: None, 74: None, 75: None, 76:
None, 77: None, 78: None, 79: None, 80: None, 81: None, 82: None, 83:
None, 84: None, 85: None, 86: None, 87: None, 88: None, 89: None, 90:
None, 91: None, 92: None, 93: None, 94: None, 95: None, 96: None, 97:
None, 98: None, 99: None})
>>>

--
components: Library (Lib)
messages: 80948
nosy: ncw
severity: normal
status: open
title: pprint doesn't know how to print a set or a defaultdict
type: feature request
versions: Python 2.5, Python 3.1

___
Python tracker 

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



[issue1815] Distutils add ability to skip build [Feature Request]

2009-02-02 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

right, nothing to fix here, the feature is available

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue4804] Python on Windows disables all C runtime library assertions

2009-02-02 Thread Mark Hammond

Mark Hammond  added the comment:

> Python shouldn't (IMHO) crahs, even if you give bogus input to
> python functions.  

But it doesn't actually crash does it?  It throws an assertion dialog,
which sucks when the machine is unattended - which is why it is a
problem for the buildbots - but otherwise if you hit 'ignore', things
keep working IIUC?

> Making sure that it doesn't crash in the test suite is 
> not enough, I think.

I think it is enough.  The tests are explicitly checking insane input to
these functions but "in the real world" such assertions blowing would
almost certainly be demonstrating a real bug.  pywin32 has a similar
issue - one or 2 tests cause such an assertion failure, but outside of
the test suite, such assertions should always be enabled IMO.  I'd even
advocate the assertions are disabled only for the individual tests known
to throw such errors and enabled for the rest.

Hirokazu Yamamoto's suggestion sounds reasonable too, but still doesn't
change my mind that it *is* reasonable to leave these assertions enabled
in the general case, and thus the idea isn't really necessary IMO.

Martin has the final say on what actually gets accepted though :)

___
Python tracker 

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



  1   2   >