[issue7538] HP-UX 11.11 GCC build fails to build modules

2009-12-18 Thread River Tarnell

New submission from River Tarnell :

2.6.4 fails to build on HP-UX 11.11 using GCC, when linking modules:

building '_struct' extension
gcc -pthread -shared build/temp.hp-ux-B.11.11-9000-785-2.6/home/river/
Python-2.6.4/Modules/_struct.o -L/opt/rt/lib -L/usr/local/lib -
lpython2.6 -o build/lib.hp-ux-B.11.11-9000-785-2.6/_struct.sl
/usr/ccs/bin/ld: Can't find library: "python2.6"
collect2: ld returned 1 exit status

(This happens for all modules.)

The problem is that libpython2.6.sl is in the root directory, but -L. 
is not passed to gcc, so the linker can't find the library.

--
components: Build
messages: 96552
nosy: rtarnell
severity: normal
status: open
title: HP-UX 11.11 GCC build fails to build modules
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



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

2009-12-18 Thread flox

flox  added the comment:

I proposed a patch which solve this issue and improve performance of
str.rfind. See issue 7462.

--

___
Python tracker 

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



[issue7471] GZipFile.readline too slow

2009-12-18 Thread Nir Aides

Nir Aides  added the comment:

Submitted combined patch for Python 2.7. 
If its good i'll send one for Python 3.2.

--
Added file: http://bugs.python.org/file15589/gzip_7471_py27.diff

___
Python tracker 

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



[issue7535] logging: Filters on Loggers can't actually filter messages on lower levels of the logging hierarchy

2009-12-18 Thread Vinay Sajip

Vinay Sajip  added the comment:

> Leonardo Rochael Almeida  added the comment:

> 
> At the very least this is a documentation bug. By reading the std docs
> on the logging module [1] one gets the impression that if a log record
> gets to a certain logger, even if percolated from more specific loggers,
> then the filters to that logger should be involved and even get the
> chance to change the log record.
> 
> [1] http://docs.python.org/library/logging.html
> 
> This is reinforced by the documentation and the implementation of the
> logging.Filter class, which is supposed to filter-out messages of more
> specific loggers, but which would never actually filter out anything if
> applied to a Logger of the same "name" (as opposed to a Handler, since
> filter handlers do get called for log records of more specific loggers).
> 

Can you say more specifically which part of this document you think is 
misleading? For example, the Filter documentation says "Filters can be used by 
Handlers and Loggers for
more sophisticated filtering than is provided by levels." Now this 
documentation does also mention how the default Filter implementation works, 
which does refer to loggers and their children - but that's just a specific 
implementation of a Filter which allows through some part of the logger 
namespace hierarchy. (It just looks at the logger name to decide whether to let 
an event through or not.) It's not a statement about how Filters work in 
general.

If you can confirm which parts of the logging documentation you think need to 
be changed (feel free to suggest alternative wording or additional wording) 
I'll certainly try to make those parts clearer.

--

___
Python tracker 

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



[issue7442] decimal.py: format failure with locale specifier

2009-12-18 Thread Stefan Krah

Stefan Krah  added the comment:

Yes, it's a problem in _localemodule.c. This situation always
occurs when LC_NUMERIC is something like ISO8859-15, LC_CTYPE
is UTF-8 AND the decimal point or separator are in the range
128-255. Then mbstowcs tries to decode the character according
to LC_CTYPE and finds that the character is not valid UTF-8:


static PyObject*mbstowcs
str2uni(const char* s)
{
#ifdef HAVE_BROKEN_MBSTOWCS
size_t needed = strlen(s);
#else
size_t needed = mbstowcs(NULL, s, 0);
#endif


I can't see a portable way to fix this except:

block threads
set temporary LC_CTYPE
call mbstowcs
restore LC_CTYPE
unblock threads


I don't think this issue is important enough to do that. What
I do in cdecimal is raise an error "Invalid separator or
unsupported combination of LC_NUMERIC and LC_CTYPE".

--

___
Python tracker 

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



[issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE

2009-12-18 Thread Stefan Krah

Stefan Krah  added the comment:

Changed title (was: decimal.py: format failure with locale specifier)

--
title: decimal.py: format failure with locale specifier -> _localemodule.c: 
str2uni() with different LC_NUMERIC and LC_CTYPE

___
Python tracker 

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



[issue7537] test_format fails with -j combined with -v

2009-12-18 Thread R. David Murray

R. David Murray  added the comment:

This is because in -j mode stdout is a pipe, and so python defaults to
ascii for the output encoding.  I'm not sure what the best way is to fix
this.

--
nosy: +pitrou, r.david.murray
priority:  -> low
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue7526] tkinter menubutton underline behaviour varies between tkinter * and tkinter.ttk *

2009-12-18 Thread kurt

Changes by kurt :


--
type:  -> behavior

___
Python tracker 

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



[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module

2009-12-18 Thread R. David Murray

R. David Murray  added the comment:

It would be better to use test skipping: (eg: @unittest.SkipUnless
before the test class).

--
nosy: +r.david.murray
priority:  -> normal
stage:  -> patch review

___
Python tracker 

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



[issue7539] unicode exceptions terminate pdb.pm() loop

2009-12-18 Thread Marius Gedminas

New submission from Marius Gedminas :

$ python2.6
Python 2.6.4 (r264:75706, Dec  7 2009, 18:45:15) 
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> None()
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'NoneType' object is not callable
>>> import pdb; pdb.pm()
> (1)()
(Pdb) raise Exception(u'\xff')
*** Exception: Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.6/pdb.py", line 1239, in pm
post_mortem(sys.last_traceback)
  File "/usr/lib/python2.6/pdb.py", line 1236, in post_mortem
p.interaction(None, t)
  File "/usr/lib/python2.6/pdb.py", line 194, in interaction
self.cmdloop()
  File "/usr/lib/python2.6/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
  File "/usr/lib/python2.6/pdb.py", line 261, in onecmd
return cmd.Cmd.onecmd(self, line)
  File "/usr/lib/python2.6/cmd.py", line 218, in onecmd
return self.default(line)
  File "/usr/lib/python2.6/pdb.py", line 226, in default
print >>self.stdout, '***', exc_type_name + ':', v
UnicodeEncodeError: 'ascii' codec can't encode character u'\xff' in 
position 0: ordinal not in range(128)
>>> 

Note that the post-mortem loop is terminated (if you do pdb.set_trace() 
instead of pdb.pm(), that doesn't happen).

This is rather irritating then you're trying to post-mortem debug a 
failed test with expensive setup, when leaving the postmortem pdb 
session exits the process.

Python 3.1 is not affected.  I don't have 2.7 handy.

--
components: Library (Lib), Unicode
messages: 96560
nosy: mgedmin
severity: normal
status: open
title: unicode exceptions terminate pdb.pm() loop
type: behavior
versions: Python 2.5, Python 2.6

___
Python tracker 

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



[issue7539] unicode exceptions terminate pdb.pm() loop

2009-12-18 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
priority:  -> normal
stage:  -> test needed

___
Python tracker 

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



[issue7537] test_format fails with -j combined with -v

2009-12-18 Thread flox

flox  added the comment:

Maybe the "sys.stdout.write" method can be wrapped in a decorator or a
context manager?

See example of decorator attached.

--
keywords: +patch
nosy: +flox
Added file: http://bugs.python.org/file15590/issue7537_tolerant_stdout.diff

___
Python tracker 

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



[issue7394] sqlite3: some OperationalError exceptions should be ProgrammingError (PEP 249)

2009-12-18 Thread Gerhard Häring

Gerhard Häring  added the comment:

The error code SQLITE_ERROR from SQLite is used for "runtime errors".
These can either be caused by the programmer (table does not exist, SQL
contains errors) or they can be other problems like constraint
violations etc.

To differentiate these we would need to parse the error message returned
by sqlite3_errmsg(). This is a path I don't want to go: it's hard to get
this right across current and future SQLite versions.

So I'm closing this issue as wontfix.

--
assignee:  -> ghaering
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue7478] _sqlite3 doesn't catch PyDict_SetItem error

2009-12-18 Thread Gerhard Häring

Gerhard Häring  added the comment:

Thanks!

I've integrated this into pysqlite
(http://code.google.com/p/pysqlite/source/detail?r=6455981b3283b26c147d949a9031a0d74ea7ffe8)
and will soon push updates to the version in Python core.

In my opinion this changes is not critical enough to warrant pushing it
into Python 2.6. Do you agree?

--
assignee:  -> ghaering

___
Python tracker 

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



[issue7478] _sqlite3 doesn't catch PyDict_SetItem error

2009-12-18 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

It should be backported to Python 2.6, like any bug fix (and especially
when it's about a crasher).

--
nosy: +pitrou

___
Python tracker 

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



[issue7471] GZipFile.readline too slow

2009-12-18 Thread Brian Curtin

Brian Curtin  added the comment:

In the test, should you verify that the correct data comes back from
io.BufferedReader? After the r.close() on line 90 of test_gzip.py,
adding something like "self.assertEqual("".join(lines), data1*50)" would
do the trick. 
Looks good.

--

___
Python tracker 

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



[issue7471] GZipFile.readline too slow

2009-12-18 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Two things:
- since it implements common IO operations, the GzipFile class could
inherit io.BufferedIOBase. It would also alleviate the need to
reimplement readinto(): BufferedIOBase has a default implementation
which should be sufficient.
- rather than `type(data) is memoryview`, the preferred idiom is
`isinstance(data, memoryview)`.

--

___
Python tracker 

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



[issue7537] test_format fails with -j combined with -v

2009-12-18 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15590/issue7537_tolerant_stdout.diff

___
Python tracker 

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



[issue7537] test_format fails with -j combined with -v

2009-12-18 Thread flox

Changes by flox :


Added file: http://bugs.python.org/file15591/issue7537_tolerant_stdout.diff

___
Python tracker 

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



[issue7540] urllib2 request does not update content length after new add_data

2009-12-18 Thread Till Maas

New submission from Till Maas :

When I try to reuse a urllib2.Request object with different post data,
the data itself is updated, but the content length is not. Here is a
simple script to reproduce it on Python 2.5 on Fedora 10 and 2.6 on Arch
Linux:

#!/usr/bin/python
# vim: fileencoding=utf8 
# test with:  echo | socat - tcp4-listen:,fork
# Demonstrates bad content length of second request, which should be 2
import urllib2
req = urllib2.Request('http://localhost:')
req.add_data("1")
urllib2.urlopen(req)
req.add_data("10")
urllib2.urlopen(req)

--
components: Library (Lib)
messages: 96567
nosy: till
severity: normal
status: open
title: urllib2 request does not update content length after new add_data
type: behavior
versions: Python 2.5, Python 2.6

___
Python tracker 

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



[issue7342] str(datetime_obj) doesn't include microseconds if their value is 0

2009-12-18 Thread Ezio Melotti

Ezio Melotti  added the comment:

Done in r76874 (release26-maint), r76875 (py3k), r76876 (release31-maint).

--
resolution:  -> fixed
stage: commit review -> committed/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



[issue7541] python-config --ldflags doesn't pick up libpython2.5.a

2009-12-18 Thread Robin

New submission from Robin :

Using my python.org install:
robin-mbp:~ robince$ which python-config
/Library/Frameworks/Python.framework/Versions/2.5/bin/python-config
robin-mbp:~ robince$ python-config --ldflags
-L/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config
-ldl -lpython2.5

But if I build a C file with python embedded, the above linker flags
result it in it embedding the system python. Obviously the -lpython2.5
is picking up the system one in preference to the one on the -L path.

>From Ronald Oussoren on pythonmac-sig:

The easiest workaround is to open a terminal window and execute the 
following commands:

  cd 
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config
  ln -s libpython2.5.a libpython2.5.dylib

This will ensure that the OSX linker knows that libpython is a shared 
library and links to this library. By default the OSX linker searches 
for a .dylib on the entire linker path and only then looks for .a files.

--
assignee: ronaldoussoren
components: Macintosh
messages: 96569
nosy: robince, ronaldoussoren
severity: normal
status: open
title: python-config --ldflags doesn't pick up libpython2.5.a
versions: Python 2.5, Python 2.6, Python 2.7

___
Python tracker 

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



[issue7310] Unhelpful __repr__() in os.environ

2009-12-18 Thread Ezio Melotti

Changes by Ezio Melotti :


Removed file: http://bugs.python.org/file15348/issue7310.diff

___
Python tracker 

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



[issue7310] Unhelpful __repr__() in os.environ

2009-12-18 Thread Ezio Melotti

Ezio Melotti  added the comment:

New patch, I added the _Environ() around the dict in the repr and
improved the tests.

--
Added file: http://bugs.python.org/file15592/issue7310.diff

___
Python tracker 

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



[issue1087] py3k os.popen result is not iterable, patch attached

2009-12-18 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Does anybody know why _wrap_close wraps TextIOWrapper rather than
inherit it?

--
nosy: +pitrou

___
Python tracker 

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



[issue1087] py3k os.popen result is not iterable, patch attached

2009-12-18 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Oops, I hadn't seen this bug is closed. Sorry.

--

___
Python tracker 

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



[issue7493] doc: patch for py3k/Doc/faq/design.rst

2009-12-18 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee: georg.brandl -> ezio.melotti

___
Python tracker 

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



[issue7493] doc: patch for py3k/Doc/faq/design.rst

2009-12-18 Thread flox

Changes by flox :


Removed file: http://bugs.python.org/file15542/py3k_doc_faq_design.diff

___
Python tracker 

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



[issue7493] doc: patch for Doc/faq/design.rst

2009-12-18 Thread flox

flox  added the comment:

Updated patch with suggestions of Ezio.

--
title: doc: patch for py3k/Doc/faq/design.rst -> doc: patch for 
Doc/faq/design.rst
versions: +Python 2.6, Python 2.7
Added file: http://bugs.python.org/file15593/doc_faq_design.diff

___
Python tracker 

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



[issue7493] doc: patch for Doc/faq/design.rst

2009-12-18 Thread flox

Changes by flox :


Added file: http://bugs.python.org/file15594/doc_faq_design_py3k.diff

___
Python tracker 

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



[issue3588] sysconfig variable LINKFORSHARED has wrong value for MacOS X framework build

2009-12-18 Thread Tarek Ziadé

Changes by Tarek Ziadé :


--
status: open -> closed

___
Python tracker 

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



[issue7534] float('nan')**2 != nan. float('nan')**2 error 33 on windows

2009-12-18 Thread Marcos Donolo

Marcos Donolo  added the comment:

Ok, I have patch ready. how do we go about putting it in?
thanks.
marcos

On Thu, Dec 17, 2009 at 11:52 AM, Ezio Melotti wrote:

>
> Changes by Ezio Melotti :
>
>
> --
> nosy: +ezio.melotti
> versions: +Python 3.1
>
> ___
> Python tracker 
> 
> ___
>

--
Added file: http://bugs.python.org/file15595/unnamed

___
Python tracker 

___Ok, I have patch ready. how do we go about putting it 
in?thanks.marcosOn Thu, Dec 17, 2009 
at 11:52 AM, Ezio Melotti rep...@bugs.python.org> 
wrote:

Changes by Ezio Melotti ezio.melo...@gmail.com>:


--
nosy: +ezio.melotti
versions: +Python 3.1

___
Python tracker rep...@bugs.python.org>
http://bugs.python.org/issue7534>
___

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



[issue7511] msvc9compiler.py: ValueError: [u'path']

2009-12-18 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

OK so bin\vcvars64.bat would be an alternative location to look at for
win32-64.

Your diff says "amd64", shouldn't it be testing for "x86_64", "amd64"
and "x64" ?

--

___
Python tracker 

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



[issue7534] float('nan')**2 != nan. float('nan')**2 error 33 on windows

2009-12-18 Thread Ezio Melotti

Ezio Melotti  added the comment:

Just upload it here clicking on 'Browse' next to the 'File' field and
then click on 'Submit Changes'.

--

___
Python tracker 

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



[issue7440] distutils shows incorrect Python version in MSI installers

2009-12-18 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

The patch looks good to me. I am putting Martin on the noselist so he
can validate this.

Notice that this Dialog has been changed in trunk, so this need to be
fixed only in the 2.6 branch.

--
nosy: +loewis

___
Python tracker 

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



[issue4359] at runtime, distutils uses buildtime files

2009-12-18 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

I am closing this since Fedora has fixed the issue on their side.

On a side note: I am working on this new sysconfig module, in a branch
called tarek_sysconfig

--
status: open -> closed

___
Python tracker 

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



[issue7412] distutils install race condition

2009-12-18 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

As you said, this race condition can happen even if you copy the file in
some temp dir, then move them to python. That would reduce the window,
but not remove it.

The best way to avoid it is to stop any running Python process when 
updates occurs I guess, or work on some kind of protected import statement. 

Now I am not sure about potential breakages during installation at
Distutils' level since it just copies files to site-packages only once
everything is built. The only breakage I have in mind is when there's
some kind of I/O error when copying files on the disk.

So I agree that it would be better to save any file that is about to be
overriden when the install command starts to copy files, so it can
rollback if a problem occurs.

--
priority:  -> low
versions: +Python 2.7, Python 3.2

___
Python tracker 

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



[issue7542] segfault on cPickle.loads("0.")

2009-12-18 Thread Anthony Foglia

New submission from Anthony Foglia :

cPickle in Python 2.6.4 segfaults when trying to load the string "0.". 
pickle throws an error.  cPickle should at the least not segfault.

$ python
Python 2.6.4 (r264:75706, Nov  2 2009, 14:44:17) 
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pickle, cPickle
>>> pickle.loads("0.")
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.6/pickle.py", line 1374, in loads
return Unpickler(file).load()
  File "/usr/lib/python2.6/pickle.py", line 858, in load
dispatch[key](self)
  File "/usr/lib/python2.6/pickle.py", line 1138, in load_pop
del self.stack[-1]
IndexError: list assignment index out of range
>>> cPickle.loads("0.")
Segmentation fault (core dumped)

--
components: Library (Lib)
messages: 96580
nosy: afoglia
severity: normal
status: open
title: segfault on cPickle.loads("0.")
type: crash
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



[issue7542] segfault on cPickle.loads("0.")

2009-12-18 Thread flox

flox  added the comment:

On 3.1, 3.2 same issue:

>>> pickle.loads(b'0')
Segmentation fault

--
nosy: +flox
versions: +Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue7417] open builtin has no signature in docstring

2009-12-18 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Georg, I'm a bit lost in the different suggestions. Your take? Do you
have any preference? Or should we simply copy the docstring from _pyio's
open() function?

--

___
Python tracker 

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



[issue7542] segfault on cPickle.loads("0.")

2009-12-18 Thread Eric Smith

Eric Smith  added the comment:

This is a duplicate of issue 7455.

--
nosy: +eric.smith
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

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



[issue7392] cPickle test failure on release26-maint branch

2009-12-18 Thread Ezio Melotti

Ezio Melotti  added the comment:

Backported in r76877, thanks for the report.

--
assignee:  -> ezio.melotti
keywords: +26backport
nosy: +ezio.melotti
resolution:  -> fixed
stage: needs patch -> committed/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



[issue7455] cPickle: stack underflow in load_pop()

2009-12-18 Thread Florent Xicluna

Florent Xicluna  added the comment:

The patch works correctly on 2.7.

It should be applied on trunk, and backported to other branches, too.

(issue7542 is marked as duplicate of this one)

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

___
Python tracker 

___
___
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-18 Thread Florent Xicluna

Changes by Florent Xicluna :


--
type:  -> crash

___
Python tracker 

___
___
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-18 Thread Florent Xicluna

Changes by Florent Xicluna :


Added file: http://bugs.python.org/file15596/issue7455_silence_py3k_warning.diff

___
Python tracker 

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



[issue7534] float('nan')**2 != nan. float('nan')**2 error 33 on windows

2009-12-18 Thread Marcos Donolo

Changes by Marcos Donolo :


Added file: http://bugs.python.org/file15597/floatobject.c

___
Python tracker 

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



[issue7534] float('nan')**2 != nan. float('nan')**2 error 33 on windows

2009-12-18 Thread Marcos Donolo

Marcos Donolo  added the comment:

I had to handle nans and infs in different places.

--

___
Python tracker 

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



[issue7543] RFE: introduce "enum Py_Opcode"

2009-12-18 Thread Dave Malcolm

New submission from Dave Malcolm :

Currently, Python's opcodes are defined as preprocessor #defines.  This means 
that they are 
invisible to the debugger.

I'm attaching:
  (i) a simple script (fixup-opcode-header.py) which converts Include/opcode.h 
to use an 
anonymous enum for the values
  (ii) a diff containing the results of running the script on trunk's 
Include/opcode.h
  (iii) a patch that converts usage of "int opcode" to "enum Py_Opcode opcode" 
in a few 
places

(Is the usage of an anonymous enum acceptable on all compilers that Python 
supports?  Is it 
going to generate equal machinecode on all compilers, relative to an int?)

With this patch, if I break into PyEval_EvalFrameEx in gdb, the debugger is 
able to emit 
symbolic values for "opcode":
(gdb) p opcode
$2 = LOAD_CONST

--
components: Interpreter Core
messages: 96587
nosy: dmalcolm
severity: normal
status: open
title: RFE: introduce "enum Py_Opcode"
versions: Python 2.7, Python 3.2

___
Python tracker 

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



[issue1644818] Allow importing built-in submodules

2009-12-18 Thread Julien Danjou

Julien Danjou  added the comment:

Is there to chance to see this *bug* fixed someday?

--
nosy: +jd

___
Python tracker 

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



[issue7543] RFE: introduce "enum Py_Opcode"

2009-12-18 Thread Dave Malcolm

Changes by Dave Malcolm :


Added file: http://bugs.python.org/file15598/fixup-opcode-header.py

___
Python tracker 

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



[issue7543] RFE: introduce "enum Py_Opcode"

2009-12-18 Thread Dave Malcolm

Changes by Dave Malcolm :


Added file: http://bugs.python.org/file15599/opcode.h

___
Python tracker 

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



[issue7543] RFE: introduce "enum Py_Opcode"

2009-12-18 Thread Dave Malcolm

Changes by Dave Malcolm :


--
keywords: +patch
Added file: http://bugs.python.org/file15600/opcode.h.patch

___
Python tracker 

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



[issue7543] RFE: introduce "enum Py_Opcode"

2009-12-18 Thread Dave Malcolm

Changes by Dave Malcolm :


Added file: http://bugs.python.org/file15601/use-opcode-enum.patch

___
Python tracker 

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



[issue7543] RFE: introduce "enum Py_Opcode"

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

Martin v. Löwis  added the comment:

What do you mean with "anonymous enum"?

--
nosy: +loewis

___
Python tracker 

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



[issue1644818] Allow importing built-in submodules

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

Martin v. Löwis  added the comment:

> Is there to chance to see this *bug* fixed someday?

Please ask on python-dev. I may be willing to revive my five-for-one offer.

--

___
Python tracker 

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



[issue7543] RFE: introduce "enum Py_Opcode"

2009-12-18 Thread Dave Malcolm

Dave Malcolm  added the comment:

Ooops, sorry; in an earlier version of this work, I was generating an 
enum of the form:
  enum {
  };
i.e. without an identifier (an anonymous enum) 

which I later changed to:
  enum Py_Opcode {
  };

Mea culpa; I forgot to update the text for this bug when I made that 
change.
Sorry about being confusing.

--

___
Python tracker 

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



[issue7521] PyEval_GetRestricted should be removed from C API reference

2009-12-18 Thread John Millikin

John Millikin  added the comment:

Ditto Py_GetBuildNumber() <
http://docs.python.org/3.1/c-api/init.html#Py_GetBuildNumber > -- only
mentioned in docs and HISTORY, nothing in the headers or source. Appears
to have been removed.

--

___
Python tracker 

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



[issue7543] RFE: introduce "enum Py_Opcode"

2009-12-18 Thread Dave Malcolm

Changes by Dave Malcolm :


Added file: 
http://bugs.python.org/file15602/diff-in-generated-assembler-for-ceval.diff

___
Python tracker 

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



[issue1644818] Allow importing built-in submodules

2009-12-18 Thread Nick Coghlan

Changes by Nick Coghlan :


--
assignee:  -> ncoghlan
nosy: +ncoghlan

___
Python tracker 

___
___
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-18 Thread Florent Xicluna

Florent Xicluna  added the comment:

I moved the test to test.pickletester, so that it can be used for
all 3 tests:
 test_pickle
 test_cpickle
 test_xpickle

(and backported a test which was only on py3k)

--
Added file: http://bugs.python.org/file15603/issue7455_cpickle_load_pop.diff

___
Python tracker 

___
___
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-18 Thread Florent Xicluna

Changes by Florent Xicluna :


Added file: 
http://bugs.python.org/file15604/issue7455_cpickle_load_pop_py3k.diff

___
Python tracker 

___
___
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-18 Thread Florent Xicluna

Changes by Florent Xicluna :


Removed file: 
http://bugs.python.org/file15596/issue7455_silence_py3k_warning.diff

___
Python tracker 

___
___
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-18 Thread Florent Xicluna

Changes by Florent Xicluna :


Added file: http://bugs.python.org/file15605/issue7455_silence_py3k_warning.diff

___
Python tracker 

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



[issue4359] at runtime, distutils uses buildtime files

2009-12-18 Thread Toshio Kuratomi

Toshio Kuratomi  added the comment:

Hey tarek, the main thrust of this bug for me was storing the data in an
inappropriate format and not having an API to get at it; things that I
think the sysconfig branch will address.  Does it make sense to have a
bug to track that progress?  Does it make sense for that bug to be this
one or a new one?

--

___
Python tracker 

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