[issue5287] logging package on IronPython

2009-02-18 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

I know - I just thought 2.6 was the priority for Michael, so I checked
that in first, then got sidetracked...I'll get on it shortly. I should
have left the issue as Open to remind me - correcting that now.

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

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



[issue1785] inspect gets broken by some descriptors

2009-02-18 Thread Floris Bruynooghe

Changes by Floris Bruynooghe floris.bruynoo...@gmail.com:


--
nosy: +flub

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



[issue5302] Allow package_data globs match directories

2009-02-18 Thread George Sakkis

George Sakkis george.sak...@gmail.com added the comment:

 I am no in favor of MANIFEST.in removal because I find it very
 convenient to define what is included in a package  and I rarely use
 package_data or data_files. 

AFAIK the MANIFEST is used only by sdist; what's the point of including
files in the archive sdist creates if they are not going to be installed
somewhere ? The only case I can think of is temporary files/modules
needed only for the installation.
 
 Maybe some kind of plugin system could be created so people can
 implement their own way to get a file list. I am thinking here about
 the feature in setuptools that builds the file list using .svn,
 so you don't have to define anything at all.

Right, but it's still good to have a shortcut for the common cases
expressed in MANIFEST.in; anything more complex can use the plugin.
 
 In any case, for the glob in data_files, how do you express this
 MANIFEST.in line ?
 
 recursive-include directory/subdir *.py *.txt

Currently I don't; that requires a modification (or extension) of the
API, for example instead of a flat list of globs, expect a list of (dir,
globs, recursive) tuples. For convenience we could define an adaptor
function def match(dir=None, globs=('*',), recursive=True) to create
the triples from the provided args.

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



[issue4191] urlparse normalize URL path

2009-02-18 Thread Daniel Diniz

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

Thanks Senthil!

--
status: pending - closed

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



[issue1001150] hotspot profiler does not work correctly on P4 CPUs with HT

2009-02-18 Thread Daniel Diniz

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

Thanks Viktor!

--
status: pending - closed

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



[issue1047540] Turtle.py hangs Idle

2009-02-18 Thread Daniel Diniz

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

Here's Taro message:

Turtle.py hanging is hardly important, but it's symptomatic of an
underlying problem, and I can still reproduce in Python 3...

Python 3.0 (r30:67507, Dec  3 2008, 20:14:27) [MSC v.1500 32 bit
(Intel)] on win32
System is Windows XP

The procedure to reproduce is:
a/ Open the directory in Explorer (for me it's D:\Python30\Lib)
b/ right click on Turtle.py and select the Edit with IDLE menu option
(IDLE will open with an IDLE 3.0   No Subprocess  in
the header, along with a turtle.py window; the Shell menu will be missing)
c/ hit the F5 key to run turtle.py
d/ let the demo run
e/ click on the turtle
(Turtle has not quit and returned to the prompt)
f/ ^Q out of IDLE (yes to force-quit)
g/ Open the Windows Task Manager
(You now have a zombie pythonw.exe process)


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



[issue991266] Cookie.py does not correctly quote Morsels

2009-02-18 Thread Zan Dobersek

Zan Dobersek zandober...@gmail.com added the comment:

This patch properly quotes cookie's comment and successfully passes
test_cookie.py with applied patch.

Added file: http://bugs.python.org/file13130/991266fix.patch

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



[issue991266] Cookie.py does not correctly quote Morsels

2009-02-18 Thread Daniel Diniz

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

Thanks, Zan!

All tests pass with both patches applied. Test and fix look correct to me.

--
nosy: +ajaksu2
stage: test needed - patch review

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



[issue2733] mmap resize fails on anonymous memory (Windows)

2009-02-18 Thread Tim Golden

Tim Golden m...@timgolden.me.uk added the comment:

Hirokazu Yamamoto wrote:
 Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:
 
 I reconsidered this issue. When mmap is anonymous, 
 self-file_handle == INVALID_HANDLE_VALUE (-1), so we should not call
 SetFilePointer and SetEndOfFile for this handle.

I'm inclined to agree. I must admit, I was pushing a change
which changed as little as possible; I think, in hindsight,
it does *too* little.

 For file mapping object, mmap.resize() resizes underlying file too, but
 for anonymous mapping object, doesn't resize memory region itself. I
 cannot find the Win32API to resize memory region created by
 CreateFileMapping. I'm not sure this difference is intended by mmap
 module writer. Maybe is_resizeable(mmap_object *self) should return 0
 for anonymous mapping object on windows. (Of course, such  difference
 might be acceptable because mmap.size() already have such difference)

I have no strong opinion myself. In reality I rarely use mmaps;
I merely saw the call in the recent bug cleanup and thought I
might be of use. 

I'm not sure who's best placed to decide what
should happen, but my feeling is that altering the existing
interface by, eg, removing the ability of an anonymous Windows
mmap to resize is not a good idea. There may be code which
is already using it.

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



[issue5300] Distutils ignores file permissions

2009-02-18 Thread George Sakkis

George Sakkis george.sak...@gmail.com added the comment:

 what is your use case of having executable file here ?

 I'd use the 'scripts' metadata for that ?

For one thing they are external binaries, not python scripts, and second
they are used internally only (through Subprocess), they are not
supposed to be called directly by clients.

 But How do you handle the overwrite of a read-only file in your code 
 then ?

I didn't, all my files were writable (by me), but if I had to, I'd look
at tweaking the directory write permissions; as I mentioned, I don't
think file permissions affect whether you can delete the file.

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



[issue2733] mmap resize fails on anonymous memory (Windows)

2009-02-18 Thread Hirokazu Yamamoto

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


Added file: http://bugs.python.org/file13131/mmapmodule.patch

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



[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-18 Thread Mark Dickinson

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

Reviewers: Martin v. Löwis,

http://codereview.appspot.com/14105/diff/1/11
File Doc/library/sys.rst (right):

http://codereview.appspot.com/14105/diff/1/11#newcode418
Line 418: A struct sequence that holds information about Python's
Agreed.  All that's important here is the attribute access.

http://codereview.appspot.com/14105/diff/1/6
File Include/longintrepr.h (right):

http://codereview.appspot.com/14105/diff/1/6#newcode24
Line 24: Furthermore, NSMALLNEGINTS and NSMALLPOSINTS should fit in a
digit. */
On 2009/02/17 22:39:18, Martin v. Löwis wrote:
 Merge the comments into a single on. There is no need to preserve the
evolution
 of the code in the comment structure.

Done, along with a general rewrite of this set of comments.

http://codereview.appspot.com/14105/diff/1/9
File Objects/longobject.c (right):

http://codereview.appspot.com/14105/diff/1/9#newcode2872
Line 2872: /* XXX benchmark this! Is is worth keeping? */
On 2009/02/17 22:39:18, Martin v. Löwis wrote:
 Why not PyLong_FromLongLong if available (no special case if not)?

Yes, PyLong_FromLongLong would make sense.  If this is not available,
we still need to make sure that CHECK_SMALL_INT gets called.

http://codereview.appspot.com/14105/diff/1/10
File PC/pyconfig.h (right):

http://codereview.appspot.com/14105/diff/1/10#newcode318
Line 318: #define PY_UINT64_T unsigned __int64
On 2009/02/17 22:39:18, Martin v. Löwis wrote:
 I think this should use PY_LONG_LONG, to support MingW32; likewise,
__int32
 shouldn't be used, as it is MSC specific

Ok.  I'll use PY_LONG_LONG for 64-bit, and try int and long for 32-bit.

http://codereview.appspot.com/14105/diff/1/2
File Python/marshal.c (right):

http://codereview.appspot.com/14105/diff/1/2#newcode160
Line 160: w_long((long)(Py_SIZE(ob)  0 ? l : -l), p);
On 2009/02/17 22:39:18, Martin v. Löwis wrote:
 This needs to deal with overflow (sizeof(size_t)  sizeof(long))

Hmm.  It looks as though there are many places in this file,
particularly in w_object, that do w_long((long)n, p), where
n has type Py_ssize_t.  Presumably all of these should
be fixed.

http://codereview.appspot.com/14105/diff/1/2#newcode540
Line 540: if (n  -INT_MAX || n  INT_MAX)
On 2009/02/17 22:39:18, Martin v. Löwis wrote:
 I think this is obsolete now; longs can have up to ssize_t_max digits.

Agreed. Again, this needs to be fixed throughout marshal.c (many
occurrences in r_object).

http://codereview.appspot.com/14105/diff/1/8
File configure.in (right):

http://codereview.appspot.com/14105/diff/1/8#newcode3132
Line 3132: # determine what size digit to use for Python's longs
On 2009/02/17 22:39:18, Martin v. Löwis wrote:
 I'm skeptical (-0) that we really need to have such a configure
option.

I think it's potentially useful to be able to do --disable-big-digits
on platforms where the compiler isn't smart enough to translate
a 32-bit by 32-bit multiply into the appropriate CPU instruction,
so that using 30-bit digits might hurt performance.

I've also found it handy during debugging and testing.  But I guess
I'm only +0.5 on the configure option;  if others think that it's just
unnecessary clutter then I'll remove it.

http://codereview.appspot.com/14105/diff/1/14
File pyconfig.h.in (left):

http://codereview.appspot.com/14105/diff/1/14#oldcode9
Line 9: #undef AC_APPLE_UNIVERSAL_BUILD
On 2009/02/17 22:39:18, Martin v. Löwis wrote:
 We should find out why this is gone.

Looks like an autoconf 2.63/autoconf 2.61 difference.
Whoever previously ran autoconf and autoheader used 2.63;
I used 2.61. (Which explains the huge configure diff as well.)

Description:
This patchset makes it possible for Python to use base 2**30 instead
of base 2**15 for its internal representation of arbitrary-precision
integers.

The aim is both to improve performance of integer arithmetic, and to
make possible some additional optimizations (not currently included in
this patchset).

The patchset includes:

- a new configure option --enable-big-digits
- a new structseq sys.int_info giving information about the
internal representation

See http://bugs.python.org/issue4258 for the related tracker discussion.

Please review this at http://codereview.appspot.com/14105

Affected files:
   M Doc/library/sys.rst
   M Include/longintrepr.h
   M Include/longobject.h
   M Include/pyport.h
   M Lib/test/test_long.py
   M Lib/test/test_sys.py
   M Objects/longobject.c
   M PC/pyconfig.h
   M Python/marshal.c
   M Python/sysmodule.c
   M configure
   M configure.in
   M pyconfig.h.in

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



[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-18 Thread Antoine Pitrou

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

Le mercredi 18 février 2009 à 17:06 +, Mark Dickinson a écrit :
 Looks like an autoconf 2.63/autoconf 2.61 difference.
 Whoever previously ran autoconf and autoheader used 2.63;

Sorry, that was me. autoconf seems unable to maintain reasonably similar
output between two different versions...

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



[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-18 Thread Gregory P. Smith

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

On 32-bit x86 (1.4Ghz Efficeon) using gcc 4.3.2-1ubuntu12 I see the 
following perf with pidigits_noprint 2000:

py3k:
baseline   longdigit14longdigit13+optimizations
3709 ms3664ms 4545ms

Those were from the best of five runs after a warmup loop while the 
system was idle.  --enable-big-digits was passed to configure and 
sys.int_info confirmed it was 30bits on the longdigit versions.

baseline is entirely unpatched.

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



[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-18 Thread Mark Dickinson

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

Gregory, are you sure you didn't swap the 30-bit and 30-bit+opt results?  On OS 
X/Core 2 Duo my timings are the other way around:  30bit is 
significantly slower than unpatched, 30bit+opt is a little faster than 
unpatched.  Here are sample numbers:

Macintosh-3:py3k-30bit-opt dickinsm$ ./python.exe ../pidigits_noprint.py 
Time; 2181.3 ms
Macintosh-3:py3k-30bit dickinsm$ ./python.exe ../pidigits_noprint.py 2000
Time; 2987.9 ms
Macintosh-3:py3k dickinsm$ ./python.exe ../pidigits_noprint.py 2000
Time; 2216.2 ms

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



[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-18 Thread Mark Dickinson

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

And here are results from 64-bit builds on the same machine as above (OS X 
10.5.6/Core 2 Duo, gcc 4.0.1 from Apple).

./python.exe ../pidigits_noprint.py 2000 gives the following timings:

30-bit digits: Time; 1245.9 ms
30-bit digits + optimizations: Time; 1184.4 ms
unpatched py3k:Time; 2479.9 ms

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



[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-18 Thread Gregory P. Smith

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

hmm yes, ignore my 13+optimize result.  apparently that used 15bit 
digits despite --enable-big-digits on configure.  attempting to fix that 
now and rerun.

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



[issue5291] Windows upgrade to 2.6.1 requires 2.6 installer to be present

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

Changes by Martin v. Löwis mar...@v.loewis.de:


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

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



[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-18 Thread Mark Dickinson

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

 apparently that used 15bit 
 digits despite --enable-big-digits on configure

Maybe configure didn't get updated properly?  I'm almost sure I found a 
case where autoconf and autoheader just reused the stuff in the 
autom4te.cache directory even though configure.in had been changed.
I've been doing:  rm -fr autom4te.cache; autoconf; autoheader
each time.

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



[issue5289] ctypes.util.find_library does not work under Solaris

2009-02-18 Thread Laszlo (Laca) Peter

Changes by Laszlo (Laca) Peter l...@sun.com:


--
nosy: +laca

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



[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

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

Martin v. Löwis mar...@v.loewis.de added the comment:

On all other follow-ups I agree, so no further comments there.

http://codereview.appspot.com/14105/diff/1/2
File Python/marshal.c (right):

http://codereview.appspot.com/14105/diff/1/2#newcode160
Line 160: w_long((long)(Py_SIZE(ob)  0 ? l : -l), p);
 Presumably all of these should be fixed.

Ok, so I'd waive this for this patch; please do create a separate
report.

http://codereview.appspot.com/14105

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



[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

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

Martin v. Löwis mar...@v.loewis.de added the comment:

 Maybe configure didn't get updated properly?  I'm almost sure I found a 
 case where autoconf and autoheader just reused the stuff in the 
 autom4te.cache directory even though configure.in had been changed.
 I've been doing:  rm -fr autom4te.cache; autoconf; autoheader
 each time.

I think the docs say to run autoheader first, then autoconf.

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



[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-18 Thread Antoine Pitrou

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

 Maybe configure didn't get updated properly?  I'm almost sure I found a 
 case where autoconf and autoheader just reused the stuff in the 
 autom4te.cache directory even though configure.in had been changed.
 I've been doing:  rm -fr autom4te.cache; autoconf; autoheader
 each time.

Perhaps by doing autoreconf instead?

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



[issue5306] Python 3.1 won't compile under Visual Studio 2005

2009-02-18 Thread Raymond Hettinger

New submission from Raymond Hettinger rhettin...@users.sourceforge.net:

This started happening a few days ago, about when Benjamin forward
ported r69560 .  There is an #ifdef in fileobject.h that makes a header
for int _PyVerify_fd(int fd) but does not define it.  It is likely
related to r69495 .

_fileio.obj : error LNK2019: unresolved external symbol __PyVerify_fd
referenced in function _check_fd
C:\py31\PC\VS8.0\\python31_d.dll : fatal error LNK1120: 1 unresolved
externals

--
assignee: loewis
components: Interpreter Core
messages: 82435
nosy: loewis, rhettinger
priority: high
severity: normal
status: open
title: Python 3.1 won't compile under Visual Studio 2005
type: compile error
versions: Python 3.1

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



[issue5307] Python-3.0.1 install fails on Solaris

2009-02-18 Thread Peter Rowat

New submission from Peter Rowat pe...@pelican.ucsd.edu:

My sysadmin tried to install Python-3.0.1 on Solaris, 
using Python-3.0.1.tgz, and reports:
=
can't configure it, got an error, even before the compile...
probably buggy and won't work on solaris.
 
==
Any ideas?

Thanks.

--
components: Installation
messages: 82436
nosy: prowat
severity: normal
status: open
title: Python-3.0.1 install fails on Solaris
type: compile error
versions: Python 3.0

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



[issue5259] gmail smtp

2009-02-18 Thread bill

Changes by bill toastedro...@gmail.com:


--
title: smtplib is broken in Python3 - gmail smtp
type: crash - 
versions: +Python 3.1

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



[issue5308] cannot marshal objects with more than 2**31 elements

2009-02-18 Thread Mark Dickinson

New submission from Mark Dickinson dicki...@gmail.com:

Two closely related issues in Python/marshal.c, involving writing and 
reading of variable-length objects (lists, strings, long integers, ...)

(1) The w_object function in marshal contains many instances of code 
like the following:

else if (PyList_CheckExact(v)) {
w_byte(TYPE_LIST, p);
n = PyList_GET_SIZE(v);
w_long((long)n, p);
for (i = 0; i  n; i++) {
w_object(PyList_GET_ITEM(v, i), p);
}
}

On a 64-bit platform there's potential loss of information here
either in the cast (long)n (if sizeof(long) is 4), or in
w_long itself (if sizeof(long) is 8).  Note that w_long, despite
its name, always writes exactly 4 bytes.

There should at least be an exception raised here if n is not
in the range [-2**31, 2**31).  This would make marshalling of
large objects illegal (rather than just wrong).

A more involved fix would allow marshalling of objects of size = 2**31.  
This would obviously involve changing the marshal format, and would make 
it impossible to marshal a large object on a 64-bit platform and then 
unmarshal it on a 32-bit platform.  The latter may not really be a 
problem, since memory considerations ought to rule that out anyway.

(2) In r_object (and possibly elsewhere) there are corresponding checks 
of the form:

case TYPE_LIST:
n = r_long(p);
if (n  0 || n  INT_MAX) {
PyErr_SetString(PyExc_ValueError, bad marshal data);
retval = NULL;
break;
}

...

if we allow marshalling of objects with more than 2**31-1 elements then 
these error checks can be relaxed.  (And as a matter of principle, 
INT_MAX isn't really right here: an int might be only 16 bits long on 
some strange platforms...).

--
components: Interpreter Core
messages: 82437
nosy: marketdickinson
severity: normal
status: open
title: cannot marshal objects with more than 2**31 elements
type: behavior
versions: Python 2.7, Python 3.1

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



[issue5259] smtplib is broken in Python3

2009-02-18 Thread bill

bill toastedro...@gmail.com added the comment:

sorry, pressed the wrong button.

that solution does work. didn't find this until #python helped me get:

return encode_base64( (\0%s\0%s % (user, password) ).encode('ascii') )

--
nosy: +toastedrobot
title: gmail smtp - smtplib is broken in Python3
type:  - crash

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



[issue5283] setting __class__ in __del__ is bad. mmkay. negative ref count! kaboom!

2009-02-18 Thread Amaury Forgeot d'Arc

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

I carefully looked at all places that store -ob_type or Py_TYPE() in a 
local variable, and I could not find any exploit. Most places don't 
reuse the type once the method or the slot has been called.

Two places were harder to analyze: subtype_clear (but an attack would 
use __del__, and use a reference cycle: subtype_clear is never called in 
this case) and PyObject_Generic(Get|Set)Attr (the only escape path to 
python code could be through PyType_Ready; but it has already been 
called for heap types)

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



[issue5308] cannot marshal objects with more than 2**31 elements

2009-02-18 Thread Raymond Hettinger

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

Given that marshal is primarily about supporting pyc files, do we care?

--
nosy: +rhettinger

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



[issue5306] Python 3.1 won't compile under Visual Studio 2005

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

Martin v. Löwis mar...@v.loewis.de added the comment:

I don't feel responsible for VS2005 support. Unassigning myself.

--
assignee: loewis - 

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



[issue5307] Python-3.0.1 install fails on Solaris

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

Martin v. Löwis mar...@v.loewis.de added the comment:

No ideas. This is not a help forum.

--
nosy: +loewis
resolution:  - invalid
status: open - closed

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



[issue5306] Python 3.1 won't compile under Visual Studio 2005

2009-02-18 Thread Raymond Hettinger

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

Kristan, I think this is yours.

--
assignee:  - krisvale
nosy: +krisvale

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



[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-18 Thread Gregory P. Smith

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

new results after fixing my longdigit13 build to use 30 bits instead of 
15 (the configure script in longdigit13+optimizations didn't work right, 
i had to manually add the #define to pyconfig.h)

py3k:
baseline   longdigit14longdigit13+optimizations
3709 ms3664 ms3377 ms

thats much saner.

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



[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-18 Thread Gregory P. Smith

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

attaching an updated pidigits benchmark script that does a warmup run 
before reporting the best result of 5.

Added file: http://bugs.python.org/file13132/pidigits_bestof.py

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



[issue5283] setting __class__ in __del__ is bad. mmkay. negative ref count! kaboom!

2009-02-18 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

On Wed, Feb 18, 2009 at 4:51 PM, Amaury Forgeot d'Arc
rep...@bugs.python.org wrote:

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

 I carefully looked at all places that store -ob_type or Py_TYPE() in a
 local variable, and I could not find any exploit. Most places don't
 reuse the type once the method or the slot has been called.

Thanks for looking!


 Two places were harder to analyze: subtype_clear (but an attack would
 use __del__, and use a reference cycle: subtype_clear is never called in
 this case) and PyObject_Generic(Get|Set)Attr (the only escape path to
 python code could be through PyType_Ready; but it has already been
 called for heap types)

Well, I think we can deal with those if they are reported. Go ahead
and apply the patch.

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



[issue5309] setup.py doesn't parallelize extension module compilation

2009-02-18 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

When run with make -jN, the Python compilation process is able to
parallelize across N concurrent processes for the interpreter core, but
extension modules are still compiled sequentially.

--
assignee: tarek
components: Distutils
messages: 82447
nosy: pitrou, tarek
priority: low
severity: normal
status: open
title: setup.py doesn't parallelize extension module compilation
type: feature request
versions: Python 2.7, Python 3.1

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



[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2009-02-18 Thread Gregory P. Smith

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

Here are the results from 32-bit x86 on core2 duo gcc 4.0.1 using 
pydigits_bestof.py 4000:

30-bit digits (14):  15719 ms
30-bit digits + optimizations (13+ops):  12490 ms
unpatched py3k:  13289 ms

(again, i had to manually add #define PYLONG_DIGIT_SIZE 30 to pyconfig.h 
for the longdigit13+optimizations patch).

and pybench runs on the same builds vs unpatched:

30-bit digits (14):  -1.4% (slightly slower)
30-bit digits + optimizations (13+ops):  -0.2% (insignificant)


My votes:

Obviously use the optimized version (but fix the configure stuff).

+0  for enabling it by default on 32bit builds.
+10 for enabling it by default on 64bit builds.

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



[issue5289] ctypes.util.find_library does not work under Solaris

2009-02-18 Thread Ke Wang

Ke Wang ke.w...@sun.com added the comment:

Above patch failed in a TabError.
Attached a new one.

Added file: http://bugs.python.org/file13133/util.diff

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



[issue4565] Rewrite the IO stack in C

2009-02-18 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

This is basically going to be the killer feature in 3.1 ;). Therefore,
these are steps I think we need before we can merge the branch:

- Fix the dependencies. (#4967)
- Resolve all outstanding issues with the IO lib on the io-c branch.
- Rewrite the rest of StringIO in C?
- Anything else I forgot?

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



[issue5310] operator precedence table is wrong

2009-02-18 Thread Gabriel Genellina

New submission from Gabriel Genellina gagsl-...@yahoo.com.ar:

The operator precedence table is wrong.
http://docs.python.org/reference/
expressions.html#summary
shows in/not in having less priority than 
comparisons like ==, but that's not true:

py 2 in (1,2) == True
False

The .rst file is wrong, as well as all the 
generated .html files since version 2.1 at least.
But the original Latex source lists them in the 
same group.

Looks like the latex-html and latex-rst tools 
both had the same problem with this kind of 
table construct.

The attached patch is based on the ref5.tex file 
included in Python 2.5

--
assignee: georg.brandl
components: Documentation
messages: 82451
nosy: gagenellina, georg.brandl
severity: normal
status: open
title: operator precedence table is wrong
versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1

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



[issue5306] Python 3.1 won't compile under Visual Studio 2005

2009-02-18 Thread Hirokazu Yamamoto

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

I think change for posixmodule.c is missing from r69495. (I confirmed
other merges don't include posixmodule.c modification)

Attached patch will fix this. (I don't have VS2005 or later, so I cannot
test this on my machine)

--
keywords: +patch
nosy: +ocean-city
Added file: http://bugs.python.org/file13134/fix_posixmodule.patch

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



[issue5306] Python 3.1 won't compile under Visual Studio 2005

2009-02-18 Thread Hirokazu Yamamoto

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

And I think r69268 should be merged too.

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



[issue5306] Python 3.1 won't compile under Visual Studio 2005

2009-02-18 Thread Raymond Hettinger

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

Benjamin, please use this patch to complete the merge.

--
assignee: krisvale - benjamin.peterson
nosy: +benjamin.peterson

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



[issue5311] bdist_msi generates version number for pure Python packages

2009-02-18 Thread Steven Bethard

New submission from Steven Bethard steven.beth...@gmail.com:

I just ran setup.py bdist_msi with NLTK which is a pure Python
package. You can see the setup.py here:
http://code.google.com/p/nltk/source/browse/trunk/nltk/setup.py. Despite
the fact that NLTK is pure Python, the generated .msi's look like
nltk-0.9.8.win32-py2.5.msi and nltk-0.9.8.win32-py2.6.msi (built with
Python 2.5 and 2.6 respectively).

So, two questions: (1) are the version numbers supposed to be there? and
(2) if so, does that mean a .msi for a pure Python package built by
Python 2.6 won't work on any other version?

--
assignee: tarek
components: Distutils
messages: 82455
nosy: bethard, tarek
severity: normal
status: open
title: bdist_msi generates version number for pure Python packages
type: behavior
versions: Python 2.5, Python 2.6

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



[issue5312] errno not being set

2009-02-18 Thread Benjamin Peterson

New submission from Benjamin Peterson benja...@python.org:

def test_leaking_fds_on_error(self):
# see bug #5179: Popen leaks file descriptors to PIPEs if
# the child fails to execute; this will eventually exhaust
# the maximum number of open fds. 1024 seems a very common
# value for that limit, but Windows has 2048, so we loop
# 1024 times (each call leaked two fds).
for i in range(1024):
try:
subprocess.Popen(['nonexisting_i_hope'],
 stdout=subprocess.PIPE,
 stderr=subprocess.PIPE)
# Windows raises IOError
except (IOError, OSError) as err:
self.assertEqual(err.errno, 2) 


This test is failing in py3k because errno is not being set on the
exception and is None. I don't have time to investigate more at the moment.

--
messages: 82456
nosy: benjamin.peterson, georg.brandl
priority: high
severity: normal
status: open
title: errno not being set
versions: Python 3.0, Python 3.1

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



[issue5313] multiprocessing.process using os.close(sys.stdin.fileno) instead of sys.stdin.close()

2009-02-18 Thread Graham Dumpleton

New submission from Graham Dumpleton graham.dumple...@gmail.com:

In multiprocessing.process it contains the code:

def _bootstrap(self):
   
if sys.stdin is not None:
try:
os.close(sys.stdin.fileno())
except (OSError, ValueError):
pass

This code should probably be calling sys.stdin.close() and not 
os.close(sys.stdin.fileno()).

The code as is will fail if sys.stdin had been replaced with an alternate 
file like object, such as StringIO, which doesn't have a fileno() method.

--
messages: 82457
nosy: grahamd, jnoller
severity: normal
status: open
title: multiprocessing.process using os.close(sys.stdin.fileno) instead of 
sys.stdin.close()
versions: Python 2.6, Python 3.0

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



[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

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

Martin v. Löwis mar...@v.loewis.de added the comment:

 Obviously use the optimized version (but fix the configure stuff).

Before such a version gets committed, I'd like to see it on Rietveld
again.

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



[issue5310] operator precedence table is wrong

2009-02-18 Thread Gabriel Genellina

Changes by Gabriel Genellina gagsl-...@yahoo.com.ar:


--
keywords: +patch
Added file: http://bugs.python.org/file13135/expressions.diff

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



[issue5311] bdist_msi generates version number for pure Python packages

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

Martin v. Löwis mar...@v.loewis.de added the comment:

 So, two questions: (1) are the version numbers supposed to be there?

Yes.

 (2) if so, does that mean a .msi for a pure Python package built by
 Python 2.6 won't work on any other version?

Yes.

--
nosy: +loewis

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



[issue5311] bdist_msi generates version number for pure Python packages

2009-02-18 Thread Steven Bethard

Steven Bethard steven.beth...@gmail.com added the comment:

Mostly out of curiosity, why is that? With bdist_wininst, a pure Python
package would generate a version-less installer that could then be used
with any Python version.

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



[issue5311] bdist_msi generates version number for pure Python packages

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

Martin v. Löwis mar...@v.loewis.de added the comment:

 Mostly out of curiosity, why is that?

Primarily because it's not implemented. To implement it, you
would need to collect all Python installations on the system
from the registry, then create a UI to let the user select
a specific installation, then use that. Collecting all Python
versions is fairly difficult to do with standard MSI actions.

In addition, a common use case is that MSI installation works
unattended (no UI), in which case you would also have to make
a choice of default version to install to (e.g. with highest
version number).

Contributions are welcome.

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



[issue5311] bdist_msi generates version number for pure Python packages

2009-02-18 Thread Steven Bethard

Steven Bethard steven.beth...@gmail.com added the comment:

I'm certainly no Windows API expert, but if no one takes a stab at it
sooner, maybe I can spend some time looking at this during PyCon.

I'm switching the ticket type to a feature request.

--
type: behavior - feature request

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



[issue5283] setting __class__ in __del__ is bad. mmkay. negative ref count! kaboom!

2009-02-18 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc amaur...@gmail.com:


--
assignee:  - amaury.forgeotdarc
keywords:  -needs review
resolution:  - accepted
stage:  - commit review

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



[issue5306] Python 3.1 won't compile under Visual Studio 2005

2009-02-18 Thread Raymond Hettinger

Changes by Raymond Hettinger rhettin...@users.sourceforge.net:


--
priority: high - critical

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