[issue7457] Adding a read_pkg_file to DistributionMetadata

2009-12-08 Thread Tarek Ziadé

New submission from Tarek Ziadé ziade.ta...@gmail.com:

This API will allow readong back static PKG-INFO files.

--
assignee: tarek
components: Distutils
messages: 96113
nosy: tarek
priority: normal
severity: normal
status: open
title: Adding a read_pkg_file to DistributionMetadata
versions: Python 2.7, Python 3.1, Python 3.2

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



[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

Works for me on 10.4.11 PPC (G3) machine rather than Intel (which 
shouldn't make a difference).  But from your config.log, the gcc version 
is older than what I have on 10.4 (build 5250 vs build 5370).  Suggest 
ensuring you have the most recent Xcode for 10.4 installed.

--
nosy: +ned.deily

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



[issue7456] rfc822.Message.getheaders undocumented

2009-12-08 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

Forget about this, I have realized this module is deprecated in python 3.

--
resolution:  - invalid
status: open - closed

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



[issue7457] Adding a read_pkg_file to DistributionMetadata

2009-12-08 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

done in r76702 + r76704 (2.7) and r76706 (3.2)

--
status: open - closed
versions:  -Python 3.1

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor

New submission from STINNER Victor victor.stin...@haypocalc.com:

str.find() and str.rfind() reads non initialized memory (using
memcmp()) if start is bigger than end.

Attached patch fixes the issue and includes a patch.

--
components: Interpreter Core
messages: 96117
nosy: haypo
severity: normal
status: open
title: crash in str.find() and str.rfind() with invalid start value
versions: Python 2.7

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
keywords: +patch
Added file: http://bugs.python.org/file15492/str_find.patch

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

In my test, start=6287518193 is an arbitrary value, it may crash or
not. The test might use any random integer  0.

--

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

The bug was introduced in Python 2.5 during the needforspeed sprint:
r46469 (May 27 2006).
http://wiki.python.org/moin/NeedForSpeed

Python  2.5 is not affected, Python 3.x is affected.

CRASH_rfind.py is more stable and should always crash if your Python
version has the bug.

--
Added file: http://bugs.python.org/file15493/CRASH_rfind.py

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread flox

flox la...@yahoo.fr added the comment:

This bug does not occur on Debian 64 bits.

 ~ $ uname -srvm
Linux 2.6.30-bpo.1-amd64 #1 SMP Mon Aug 17 08:42:50 UTC 2009 x86_64

Tested with variants:
from random import getrandbits
self.checkequal(-1, 'ab', 'find', 'xxx', getrandbits(64), 0)
self.checkequal(-1, 'ab', 'find', 'xxx', getrandbits(96), 0)
self.checkequal(-1, 'ab', 'rfind', 'xxx', getrandbits(64), 0)
self.checkequal(-1, 'ab', 'rfind', 'xxx', getrandbits(96), 0)

--
nosy: +flox

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



[issue7455] cPickle: stack underflow in load_pop()

2009-12-08 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 Can you add a test for this?

I wasn't sure of the right place to add the test. I tried
Lib/test/pickletester.py, but it doesn't work because UnpicklingError
is not defined there.

Well, here is a new version of my patch with an unit test.

--
Added file: http://bugs.python.org/file15494/cpickle_load_pop-2.patch

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 This bug does not occur on Debian 64 bits.

It does, sometime :-) Read uninitiliazed memory doesn't always crash.

   $ python -c 'ab'.rfind('xxx', (1  63) + 10, 0)
   Erreur de segmentation

Note: my 64 bits test in CRASH_rfind.py is wrong, ctypes.c_long should
be used instead of ctypes.c_int.

--

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

New patch with a more stable test. test_unicode does also fail (error
or crash) without the patch on find.h.

--
Added file: http://bugs.python.org/file15495/str_find-2.patch

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread flox

flox la...@yahoo.fr added the comment:

I got it to crash (2.7):

~ $ ./python Lib/test/regrtest.py string_tests test_unicode test_str
test_unicode
test test_unicode failed -- Traceback (most recent call last):
AssertionError: -1 != -8276732

test_str
test test_str failed -- Traceback (most recent call last):
AssertionError: -1 != -255833

2 tests failed:
test_unicode test_str
[56425 refs]
~ $ 

Thank you haypo :)

--
versions: +Python 2.6, Python 3.1, Python 3.2

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



[issue6986] _json crash on scanner/encoder initialization error

2009-12-08 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

I wrote new patches to:
 - implement the alternate method
 - add unit tests
 - and finally to move the tests in the right file

Is the patch now correct? Can you apply it? It doesn't still crash
Python trunk and it generates a lot of noise in my fuzzer :-)

--

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



[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
nosy: +mark.dickinson

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



[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Mark Dickinson

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

Do you get the same problem with py3k?

--

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



[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

Could you also post the generated pyconfig.h?

--

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread Antoine Pitrou

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

You shouldn't harcode 1  63 and 1  64, but calculate them based on
sys.maxsize instead.

--
nosy: +pitrou

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



[issue1495089] sys.getfilesystemencoding

2009-12-08 Thread R. David Murray

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

This is surprisingly non-transparent.  However, it works as documented
in py3.

It sorta works as documented in p2, except that there's a bit left out
of the docs.

In py2, the code that results in getfilesystemencoding's value sets the
locale based on the environment, does the nl_langinfo(CODESET), and then
restores the locale to the default (C).

In py3, python initialization sets LC_CTYPE to the enviroment, and uses
that to determine getsystemfilencoding's default value.  LC_CTYPE is
left set to the environment.

This means that in py2, using locale.nl_langinfo doesn't get you the
same value that is used to set getfilesystemencoding until after you've
done a call to set the locale to the environment.  In py3, however,
locale.nl_langinfo(locale.CODESET) will by default return the value that
is used to set getfilesystemencoding's value.

If you'd like to submit a doc patch for p2, please feel free, and I'll
apply it.

--
nosy: +r.david.murray

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



[issue7437] OS X 2.6.4 installer fails on 10.3 with two corrupted file names, ignored on 10.4

2009-12-08 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

The problem shouldn't be present in 3.1 and 2.7, both trees no longer 
contain the ancient documentation files.

IMHO the best fix is to remove 
Mac/Resources/app/Resources/English.lproj/Documentation/ide/ (and the 
link to ide/index.html in .../Documentation/index.html).

Is anyone on the nosy list capable of testing such a patch? I can 
provide a 2.6.4+ installer with this fix, but cannot test the fix myself 
because I don't have access to a machine that's capable of running 10.3.

--

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



[issue6986] _json crash on scanner/encoder initialization error

2009-12-08 Thread Antoine Pitrou

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

The patch looks good to me.

--
priority:  - high
resolution:  - accepted
stage:  - commit review
type:  - crash
versions: +Python 2.7, Python 3.1, Python 3.2

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

pitrou You shouldn't harcode 1  63 and 1  64, but calculate 
pitrou them based on sys.maxsize instead.

(sys.maxint) Yes, you're right. Does str_find-3.patch looks better?
It's not easy to always detect an Heisenbug :-)

--
Added file: http://bugs.python.org/file15496/str_find-3.patch

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

sys.maxint/sys.maxsize: oops, sys.maxsize *does* exist (in Python =
2.6), sorry. Here is a new patch using sys.maxsize.

Anyway, sys.maxsize sounds better because the integer overflow occurs
in a Py_ssize_t variable (j).

--
Added file: http://bugs.python.org/file15497/str_find-4.patch

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file15496/str_find-3.patch

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file15492/str_find.patch

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file15493/CRASH_rfind.py

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file15495/str_find-2.patch

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



[issue6986] _json crash on scanner/encoder initialization error

2009-12-08 Thread Antoine Pitrou

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

This has been committed in r76708, r76710, r76711. Thank you!

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

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



[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

This is due to a block starting at '#ifdef HAVE_GCC_ASM_FOR_X87' in 
Python/pymath.c.

A simple patch to pymacconfig.h fixes the issue, I'll commit it once I've 
fully tested the result.

--

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



[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

Fixed in r76712 (trunk), r76713 (3.2), r76714 (3.1).

The python3 branches contained about half of the fix, I merged the trunk 
version into python3 anyway to keep all 3 branches in sync.

The issue does not affect the 2.6 branch.

--
resolution:  - fixed
stage:  - committed/rejected
status: open - pending

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



[issue7437] OS X 2.6.4 installer fails on 10.3 with two corrupted file names, ignored on 10.4

2009-12-08 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

This should be fixed in r76715, I've removed the documentation that caused 
the installer issues in the first place.

--
resolution:  - fixed
stage:  - test needed
status: open - pending
type:  - behavior

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



[issue6800] os.exec* raises OSError: [Errno 45] Operation not supported in a multithreaded application

2009-12-08 Thread Ronald Oussoren

Changes by Ronald Oussoren ronaldousso...@mac.com:


--
assignee: ronaldoussoren - 

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



[issue7459] Magic word incorrect in Python 3

2009-12-08 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis 
arfrever@gmail.com:

Python/import.c defines magic word which is used in the beginning of
.pyc files to verify if .pyc files have been generated by compatible
version of Python.

Python 2 supports undocumented -U option increases magic word by 1.
Python 3 uses unicode strings by default and doesn't support -U option,
but seemingly incorrect change was committed in r55013, which causes
that magic word is always increased by 1 in Python 3 in contrary to
documentation, which says that it could only happen with some command
line options.

This problem cannot be fixed in Python 3.1.2 for compatibility with
e.g. 3.1.1, but it can be fixed in 3.2. Additionally documentation in
3.1.2 can be fixed.

--
components: Interpreter Core
files: python-3.2-fix_magic_word.patch
keywords: patch
messages: 96138
nosy: Arfrever, gvanrossum
severity: normal
status: open
title: Magic word incorrect in Python 3
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file15498/python-3.2-fix_magic_word.patch

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



[issue3432] Mac, 2.6 framework install error

2009-12-08 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

Is this issue still relevant? I cannot reproduce this on my machines.

--
nosy: +ronaldoussoren

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



[issue7190] Problems running threaded Tkinter program under OS X IDLE

2009-12-08 Thread Ronald Oussoren

Changes by Ronald Oussoren ronaldousso...@mac.com:


--
status: pending - closed

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



[issue7459] Magic word incorrect in Python 3

2009-12-08 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


Added file: 
http://bugs.python.org/file15499/python-3.1-fix_documentation_of_magic_word.patch

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



[issue7184] build failures on Snow Leopard

2009-12-08 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

richard: could you please elaborate on what you think is wrong?

readline doesn't get build because OSX' libedit isn't good enough
for the readline module in 2.6, this is fixed in 2.7.

On my machine the other ones do get build, although I had to move 
/Library/Frameworks/Python.framework to the side to avoid picking up 
bits from the already installed 32-bit tree to get the curses bits to 
build.

As Ned noted the compiler on 10.6 creates 64-bit binaries by default. 
You may have 32-bit OSS libraries on your machine that cause problems 
during a 64-bit build.  If you want a 32-bit build rather than 64-bit 
one you can build a universal binary using --enable-universal-sdk=/

--

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



[issue7460] extended slicing not sufficiently covered in docs

2009-12-08 Thread Lorenz Quack

New submission from Lorenz Quack d...@amberfisharts.com:

I find the documentation regarding extended slicing to be lacking.
To be honest I couldn't find any documentation about it.
The only - and quite good - source of information I found was [1].
Maybe I didn't search enough. If so I would appreciate a link to the
relevant section.

In fact I didn't really know about extended slicing (except for the
start, stop, step notation) until I implemented a C extension and got a
TypeError in Python 3 because I was only supporting simple slicing. And
this is despite the fact that I don't consider myself a python n00b.

As I am still learning about this protocol at the time of writing. I
might have some things backwards and I don't feel qualified to improve
the docs myself. Instead I would like to point out where I would have
expected some information about this topic:

To begin improvement a hint around PySequence_GetSlice that this is a
more or less deprecated API and tp_as_mapping-mp_subscript should be
used instead would be useful. 
In addition PyObject_GetItem/tp_as_mapping-mp_subscript could say
that a slice object is passed when extended slicing is used.

sincerely yours
//Lorenz

PS: I marked this Python 3.x even though the documentation of 2.x lacks
as well because I only got the TypeError in 3.x whereas in 2.x
everything works fine with simple slicing.

[1] http://mail.python.org/pipermail/python-3000/2007-August/009851.html

--
assignee: georg.brandl
components: Documentation
messages: 96141
nosy: donlorenzo, georg.brandl
severity: normal
status: open
title: extended slicing not sufficiently covered in docs
type: feature request
versions: Python 3.0, Python 3.1, Python 3.2

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



[issue7458] crash in str.find() and str.rfind() with invalid start value

2009-12-08 Thread flox

flox la...@yahoo.fr added the comment:

I reviewed the patch, and it seems partially redundant.

Actually the find method was not broken.
There is already a test if (str_len  0) return -1; for this one.

See attached patch.

--
Added file: http://bugs.python.org/file15501/issue7458_rfind.diff

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



[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Sridhar Ratnakumar

Sridhar Ratnakumar sridh...@activestate.com added the comment:

 Do you get the same problem with py3k?

Not in 3.1.1 at least.

 Fixed in r76712 (trunk)

That fixes the issue. Thanks! Let me know if you still need pyconfig.h.

--
status: pending - open

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



[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

PPC (G3) machine rather than Intel (which shouldn't make a difference) 
... but did in this case. Perhaps it's too early in the morning yet but I 
don't see why that error doesn't show up for me when building trunk on an 
Intel machine under 10.6, i.e. this gives no error:
/usr/bin/gcc-4.0 -c -arch ppc -arch i386 -isysroot 
/Developer/SDKs/MacOSX10.4u.sdk  -fno-common -dynamic -DNDEBUG -g -fwrapv 
-O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include   -DPy_BUILD_CORE 
-o Python/pymath.o Python/pymath.c
(This is with one patch to configure to fix the test for Darwin 10)

--

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



[issue7459] Magic word incorrect in Python 3

2009-12-08 Thread Guido van Rossum

Guido van Rossum gu...@python.org added the comment:

I don't see a bug here. The value returned by imp.get_magic() matches the 
first bytes of a bytecode file. That's all that matters.

Of course, we could remove the global variable and just use the defined 
constant; but that's just an optimization, not a bugfix.

PS. The two uploaded patches look about the same?

--

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



[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Mark Dickinson

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

Ned:  maybe your pyconfig.h isn't defining HAVE_GCC_ASM_FOR_X87 in the first 
place, for some reason?

I *do* get that error for trunk / 10.6 (with the 10.5 SDK;  I don't have the 
10.4 SDK installed):

Mark-Dickinsons-MacBook-Pro:trunk dickinsm$ /usr/bin/gcc-4.0 -c -arch ppc -arch 
i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk/ -I. 
-IInclude -o Python/pymath.o Python/pymath.c
/var/folders/nH/nHvjwWGlGMWNLkYlpsol8U+++TI/-Tmp-//ccq7GcaH.s:11:Invalid 
mnemonic 'fnstcw'
/var/folders/nH/nHvjwWGlGMWNLkYlpsol8U+++TI/-Tmp-//ccq7GcaH.s:26:Invalid 
mnemonic 'fldcw'
lipo: can't open input file: 
/var/folders/nH/nHvjwWGlGMWNLkYlpsol8U+++TI/-Tmp-//ccDS89Qs.out (No such file 
or directory)

--

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



[issue7458] crash in str.rfind() with an invalid start value

2009-12-08 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

flox Actually the find method was not broken.

Oh, you're right, str.find() was already fixed by r66631 (related to
issue #3967). I prefer your patch flox ;-)

I fixed this issue title.

--
title: crash in str.find() and str.rfind() with invalid start value - crash in 
str.rfind() with an invalid start value

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



[issue7437] OS X 2.6.4 installer fails on 10.3 with two corrupted file names, ignored on 10.4

2009-12-08 Thread GD

GD downgeo...@hotmail.com added the comment:

Point me in the direction of a binary to download and I can test it for you.

GD
_
Get gifts for them and cashback for you. Try Bing now.
http://www.bing.com/shopping/search?q=xbox+gamesscope=cashbackform=MSHYCBpubl=WLHMTAGcrea=TEXT_MSHYCB_Shopping_Giftsforthem_cashback_1x1

--
status: pending - open
title: OS X 2.6.4 installer fails on 10.3 with two corrupted file names, 
ignored on 10.4 - OS X 2.6.4 installer fails on 10.3 with two corrupted   
file names, ignored on 10.4
Added file: http://bugs.python.org/file15502/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7437
___html
head
style!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--/style
/head
body class='hmmessage'
brPoint me in the direction of a binary to download and I can test it for 
you.brbrGDbr /hr /Get gifts for 
them and cashback for you. a 
href='http://www.bing.com/shopping/search?q=xbox+gamesscope=cashbackform=MSHYCBpubl=WLHMTAGcrea=TEXT_MSHYCB_Shopping_Giftsforthem_cashback_1x1'
 target='_new'Try Bing now./a/body
/html___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5596] memory leaks in py3k

2009-12-08 Thread Antoine Pitrou

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

I've committed fixes to test_urllib and test_zipimport_support similar
to the ones you proposed. Thank you!

--

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



[issue7461] os.popen() objects don't support the context manager protocol

2009-12-08 Thread Antoine Pitrou

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

This works under trunk but fails under py3k:

 import os
 with os.popen(ls, r) as f:
...  print(f.read())
... 
Traceback (most recent call last):
  File stdin, line 1, in module
AttributeError: __exit__

--
components: Library (Lib)
messages: 96151
nosy: pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: os.popen() objects don't support the context manager protocol
type: behavior
versions: Python 3.1, Python 3.2

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



[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

Ned: which version of Python do you build? The issue was only in the 
trunk (2.7), the other branches were fine (although the code in 3.1 and 
3.2 was suboptimal). BTW. The issue affected universal builds on all OSX 
versions.

The trunk should be fine now as well, as of r76712.

Sridhar: I don't need pyconfig.h. I was thinking of a configure issue 
where your machine behaved differently from what I'd expect. I turned 
out to be a universal-binary related issue.

Mark: what's the output of svnversion? I committed a fix in r76712, that 
fixed the issue for me on 10.6.

--

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



[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

Ronald, it's a more complicated configure issue. I'm in the middle of 
pinning down the details.  More shortly ...

--

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



[issue4111] Add Systemtap/DTrace probes

2009-12-08 Thread Mark Wielaard

Mark Wielaard m...@redhat.com added the comment:

I took the patch and tweaked it a little so that it works with systemtap
(at least for the function entry/exit probes). It is against 2.6.2 since
that was what was in the Fedora 12 src package I was using. Cleaned up
the configure checks a little, but otherwise it is almost exactly as is.

Also tracked in Fedora as 
https://bugzilla.redhat.com/show_bug.cgi?id=545179

--
components:  -Installation
title: Add DTrace probes - Add Systemtap/DTrace probes
Added file: http://bugs.python.org/file15503/stap-python.patch

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



[issue7452] Invalid mnemonic 'fnstcw'

2009-12-08 Thread Mark Dickinson

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

Ronald:  sorry, I wasn't clear.  I only get that failure before your fix;  
afterwards, it's fine.

--

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



[issue7461] os.popen() objects don't support the context manager protocol

2009-12-08 Thread Amaury Forgeot d'Arc

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

Here is a patch+test

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

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



[issue7462] Implement fastsearch algorithm for rfind/rindex

2009-12-08 Thread flox

New submission from flox la...@yahoo.fr:

While looking at issue7458 I stopped on:

  /* XXX - create reversefastsearch helper! */

Here is the patch which is just the translation of the same algorithm
already implemented for find/index.
http://effbot.org/zone/stringlib.htm

Note: it supersedes patch for 7458.

--
components: Interpreter Core
files: fastsearch_rfind.patch
keywords: patch
messages: 96157
nosy: flox
severity: normal
status: open
title: Implement fastsearch algorithm for rfind/rindex
type: performance
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file15505/fastsearch_rfind.patch

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



[issue7454] Solaris SPARC: _multiprocessing.so: symbol sem_timedwait: referenced symbol not found

2009-12-08 Thread Sridhar Ratnakumar

Changes by Sridhar Ratnakumar sridh...@activestate.com:


Added file: http://bugs.python.org/file15506/pyconfig.h

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



[issue7461] os.popen() objects don't support the context manager protocol

2009-12-08 Thread Antoine Pitrou

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

We should also proxy other special methods. There is __iter__, __next__,
what else?

--

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



[issue5596] memory leaks in py3k

2009-12-08 Thread Antoine Pitrou

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

No leaks anymore!
http://mail.python.org/pipermail/python-checkins/2009-December/088162.html
Thanks flox!

--

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



[issue7461] os.popen() objects don't support the context manager protocol

2009-12-08 Thread Antoine Pitrou

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

Ah, iterating already works. Sorry for the noise.

--

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



[issue7461] os.popen() objects don't support the context manager protocol

2009-12-08 Thread Antoine Pitrou

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

I added a test for iterating and committed the patch in r76723 and
r76724. Thanks!

--
resolution:  - fixed
status: open - closed

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



[issue7454] Solaris SPARC: _multiprocessing.so: symbol sem_timedwait: referenced symbol not found

2009-12-08 Thread Sridhar Ratnakumar

Sridhar Ratnakumar sridh...@activestate.com added the comment:

After ./configure step, I made the following changes to pyconfig.h in 
order to fix this issue:

$ diff  pyconfig.h.orig pyconfig.h
561c561
 /* #undef HAVE_SEM_TIMEDWAIT */
---
 #undef HAVE_SEM_TIMEDWAIT

Ideally, something needs to be changed in configure.in I believe. 

It seems that this bug was introduced in r71009. Any idea Jesse/Martin?

--
nosy: +loewis

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



[issue7462] Implement fastsearch algorithm for rfind/rindex

2009-12-08 Thread flox

flox la...@yahoo.fr added the comment:

(removed comment which should not be copied)

--
Added file: http://bugs.python.org/file15507/fastsearch_rfind.patch

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



[issue7462] Implement fastsearch algorithm for rfind/rindex

2009-12-08 Thread flox

Changes by flox la...@yahoo.fr:


Removed file: http://bugs.python.org/file15505/fastsearch_rfind.patch

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



[issue7114] HTMLParser doesn't handle ![CDATA[ ... ]]

2009-12-08 Thread Denis

Denis pyt...@sokolov.cc added the comment:

The CDATA sections are part of XML specification.
http://www.w3.org/TR/REC-xml/#sec-cdata-sect

HTML is not XML, so HTMLParser does the right thing here.

--
nosy: +Denis

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