[issue6444] multiline exception logging via syslog handler

2009-08-20 Thread Simon Litchfield

Simon Litchfield si...@s29.com.au added the comment:

From the manual for logging.handlers.SysLogHandler --

emit(record)
The record is formatted, and then sent to the syslog server. If
exception information is present, it is not sent to the server.

Ideal, for me, would be to have each traceback line logged as an
individual DEBUG message. Maybe that should be an option. For now I'm
using a custom handler to achieve this.

--
nosy: +s29
status: pending - open

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



[issue6738] Wrong doc strings in itertools

2009-08-20 Thread Hagen Fürstenau

New submission from Hagen Fürstenau hfuerste...@gmx.net:

The doc strings of itertools.combinations and
itertools.combinations_with_replacement are wrong: The parameter r is
not optional here (like it is for itertools.permutations).

Attached trivial patch.

--
components: Library (Lib)
files: docstring.patch
keywords: patch
messages: 91761
nosy: hagen
severity: normal
status: open
title: Wrong doc strings in itertools
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file14746/docstring.patch

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



[issue6739] IDLE window won't start or show up after assgining new key in options v2.5.2 and 3.1.1

2009-08-20 Thread CaribbeanCruise

New submission from CaribbeanCruise caribbeancruise...@gmail.com:

I tried to assign a new key(lctrl+lshift instead of lctrl+F5) for run-
mode in option in v.2.5.2. I tried the new key and it didn't work. And 
then I got lots of messages.
So I killed the IDLE and the rest of python. And run IDLE again, 
background process indicates some activity for 5secs. And then it was 
gone. No IDLE window showed up. 
So I uninstalled the 2.5.2. and installed the v.3.1.1. The installation 
process went ok, but when I starts IDLE. Nothing happens.
I tried and run idle.py in cmd, while I'm a vista user and got this:

Traceback (most recent call last):
  File C:\Python31\Lib\idlelib\idle.py, line 11, in module
idlelib.PyShell.main()
  File C:\Python31\Lib\idlelib\PyShell.py, line 1388, in main
shell = flist.open_shell()
  File C:\Python31\Lib\idlelib\PyShell.py, line 277, in open_shell
self.pyshell = PyShell(self)
  File C:\Python31\Lib\idlelib\PyShell.py, line 813, in __init__
OutputWindow.__init__(self, flist, None, None)
  File C:\Python31\Lib\idlelib\OutputWindow.py, line 16, in __init__
EditorWindow.__init__(self, *args)
  File C:\Python31\Lib\idlelib\EditorWindow.py, line 135, in __init__
self.apply_bindings()
  File C:\Python31\Lib\idlelib\EditorWindow.py, line 961, in 
apply_bindings
text.event_add(event, *keylist)
  File C:\Python31\Lib\idlelib\MultiCall.py, line 359, in event_add
widget.event_add(self, virtual, seq)
  File C:\Python31\Lib\tkinter\__init__.py, line 1353, in event_add
self.tk.call(args)
_tkinter.TclError: bad event type or keysym Shift

What do I do to get this up and running?

--
components: IDLE
messages: 91762
nosy: CaribbeanCruise
severity: normal
status: open
title: IDLE window won't start or show up after assgining new key in options 
v2.5.2 and 3.1.1
type: performance
versions: Python 3.1

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



[issue6641] strptime doesn't support %z format ?

2009-08-20 Thread Andrew Brown

Andrew Brown abr...@freemail.gr added the comment:

I think this bug is just a doc bug. If you check 

http://docs.python.org/library/datetime.html?highlight=strptime#strftime-behavior

and 

http://docs.python.org/library/time.html?highlight=strptime#time.strptime

You can see that the first link lists %z as a valid modifier, while in
the second link  (in footnote 1) it is mentioned as deprecated.

--
nosy: +abrown

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



[issue6444] multiline exception logging via syslog handler

2009-08-20 Thread Max Arnold

Max Arnold lwa...@gmail.com added the comment:

Sorry for long delay, I was on vacation.

I have installed sysklogd, metalog and syslog-ng on a virtual machine
and executed test script. First two daemons log exception as single
concatenated line.  Syslog-ng splits it as described in original report.

Do you suggest to file bug report to syslog-ng maintainer?

--

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



[issue6734] Imap lib implicit conversion from bytes to string

2009-08-20 Thread Eric

Eric surprisin...@gmail.com added the comment:

I checked the latest documentation for 3.1.1
(http://docs.python.org/3.1/library/imaplib.html), but I can't find any
reference to needing to encode information myself for the login
procedure. Is there some other documentation you are referring to?

In any case, the error wasn't returned by the server, but by imaplib. If
the arg needs to be encoded for the whole process, then the arg should
be checked for the appropriate type (I think the doc even says plain
text password), or an optional encoding argument for the relevant
functions (or a catchall used when connecting to the server?) with a
default encoding attempted.

--

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



[issue6740] Compounded expressions with lambda functions are evaluated incorrectly

2009-08-20 Thread Michal Vyskocil

New submission from Michal Vyskocil mvysko...@suse.cz:

The compounded expressions with lambda functions are evaluated
incorrectly. The simple expressions, or a named functions are evaluated
good. The problem is only in the evaluation of compounded expressions.
It seems that after evaluate of the first lambda function the
evaluation of whole expression is stopped and not continue (see
cond_error, which may raises the exception during evaluation).

Python 3.1 (r31:73572, Aug 15 2009, 22:04:19)
[GCC 4.4.1 [gcc-4_4-branch revision 149935]] on linux2
Type help, copyright, credits or license for more information.
 cond = (lambda x : x == 'foo') or (lambda x : x == 'bar')
 cond('foo')
True
 cond('bar')
False
 c1 = lambda x : x == 'foo'
 c1('foo')
True
 c2 = lambda x : x == 'bar'
 c2('bar')
True
 def ham(x): return x == 'foo'
...
 def spam(x): return x == 'bar'
...
 cond2 = lambda x : ham(x) or spam(x)
 cond2('foo')
True
 cond2('bar')
True
 cond2('ham')
False
 cond_error = (lambda x : x == 'foo') or (lambda x : y == 'bar')
 cond_error('d')
False

BTW: the same problem exists in Python 2.6.2
Python 2.6.2 (r262:71600, Aug 15 2009, 18:37:04)
[GCC 4.4.1 [gcc-4_4-branch revision 149935]] on linux2
Type help, copyright, credits or license for more information.

--
messages: 91766
nosy: mvyskocil
severity: normal
status: open
title: Compounded expressions with lambda functions are evaluated incorrectly
versions: Python 3.1

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



[issue6734] Imap lib implicit conversion from bytes to string

2009-08-20 Thread STINNER Victor

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

 I can't find any reference to needing to encode information 
 myself for the login procedure. Is there some other 
 documentation you are referring to?

Exactly, the Python imaplib documentation should be fixed (the doc, not
the code).

--

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



[issue6734] Imap lib implicit conversion from bytes to string

2009-08-20 Thread Marcin Bachry

Marcin Bachry hegel...@gmail.com added the comment:

It seems most IMAP4 methods accept str as arguments right now (I
checked: list, lsub, myrights, select, status, search, fetch) and
login() is a sole exception. I know the protocol is mostly ascii only,
but still having possibility of using str in the API feels convenient
and reasonable to me. Can't we convert str parameters to login() to
ascii too? It already done in other methods (the _command() method
iterates over args and converts them).

--
nosy: +marcin.bachry

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



[issue1294959] Problems with /usr/lib64 builds.

2009-08-20 Thread Matthias Klose

Matthias Klose d...@debian.org added the comment:

both patches assume that everybody uses lib64 for 64bit libs, which is
not true for Debian/Ubuntu. Even the FHS doesn't mandate the use of lib64.

--
nosy: +doko

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



[issue6722] collections.namedtuple: confusing example

2009-08-20 Thread Alexey Shamrin

Alexey Shamrin sham...@gmail.com added the comment:

Raymond, sorry if I wasn't clear. I'm fine with the API (haven't used it
yet though, because I was stuck after skimming through its documentation).

I suggest to make *first* example simple (without verbose=True) and to
move an example with verbose=True little furthere. I think it should be
something like this:

Example:

.. doctest::
   :options: +NORMALIZE_WHITESPACE

Point = namedtuple('Point', 'x y')
p = Point(11, y=22) # instantiate with positional or keyword
arguments
p[0] + p[1] # indexable like the plain tuple (11, 22)
   33
x, y = p# unpack like a regular tuple
x, y
   (11, 22)
p.x + p.y   # fields also accessible by name
   33
p   # readable __repr__ with a name=value style
   Point(x=11, y=22)
namedtuple('Point', 'x y', verbose=True) # print class definition
   class Point(tuple):
   'Point(x, y)'
   BLANKLINE
   __slots__ = ()
   BLANKLINE
   _fields = ('x', 'y')
   BLANKLINE
   def __new__(_cls, x, y):
   return _tuple.__new__(_cls, (x, y))
   BLANKLINE
   @classmethod
   def _make(cls, iterable, new=tuple.__new__, len=len):
   'Make a new Point object from a sequence or iterable'
   result = new(cls, iterable)
   if len(result) != 2:
   raise TypeError('Expected 2 arguments, got %d' %
len(result))
   return result
   BLANKLINE
   def __repr__(self):
   return 'Point(x=%r, y=%r)' % self
   BLANKLINE
   def _asdict(t):
   'Return a new dict which maps field names to their values'
   return {'x': t[0], 'y': t[1]}
   BLANKLINE
   def _replace(_self, **kwds):
   'Return a new Point object replacing specified fields
with new values'
   result = _self._make(map(kwds.pop, ('x', 'y'), _self))
   if kwds:
   raise ValueError('Got unexpected field names: %r' %
kwds.keys())
   return result
   BLANKLINE
   def __getnewargs__(self):
   return tuple(self)
   BLANKLINE
   x = _property(_itemgetter(0))
   y = _property(_itemgetter(1))

--

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



[issue6722] collections.namedtuple: confusing example

2009-08-20 Thread Alexey Shamrin

Alexey Shamrin sham...@gmail.com added the comment:

Roundup broke formatting... I've attached a text file with the proposed
example.

--
Added file: http://bugs.python.org/file14747/namedtuple_doc_example.txt

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



[issue6741] Garbage collector release method

2009-08-20 Thread Lev

New submission from Lev lgards...@gmail.com:

WinCRT debug detects several memory leaks after calling py_Initialize
(); py_Finalize(); functions. Most of them are garbage collector 
visible python's objects. I suggest to create release method in 
garbage collector which will distruct all objects in GC list without 
reference count checking, and call this method at the end of py_Finalize
() function. I think, that it will help to avoid memory leaks after 
calling py_Finalize() function.

--
components: Interpreter Core
messages: 91772
nosy: gardster
severity: normal
status: open
title: Garbage collector release method
type: feature request
versions: Python 2.6

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



[issue6742] Embedding python into shared library crash on AIX

2009-08-20 Thread damahay123

New submission from damahay123 hong@algorithmics.com:

Hi there,
I'm trying to embedding my python code into a .so on AIX and load it
with my main application. Since there is no libpython2.6.so available on
AIX, I have to link my .so with libpython2.6.a. I have to make some
twist to make it compile. And so far so good until I run my main. My
embedding python .so give me error like the following
Fatal Python error: Interpreter not initialized (version mismatch?)
I check the initialization status by calling Py_IsInitialized and it
said yes. So I'm wondering if this embedding python into .so ever work
on AIX.
I have no problem to do the same thing on linux, solaris since python
has libpython2.6.so on both system. But our system needs the supoort on
AIX. My embedding python is very simple like the following

#include Python.h
#include iostream

extern C
void allocate()
{
std::cout   am i ok =   Py_IsInitialized()  std::endl;

Py_InitializeEx(0);
std::cout   am i ok 1 =   Py_IsInitialized()  std::endl;

PyRun_SimpleString(from time import time, datetime, ctime\n
   print 'Today is',ctime(time())\n);
Py_Finalize();
}

my main application is also very simple
#include iostream
#include iomanip
#include dlfcn.h
//#include link.h
#include Python.h

typedef  void (*ALLOCATE)();

int main (int argc, char ** argv)
{
// parse params to load shared object
if (argc  2)
{
std::cerr  Usage:   argv[0]   sharedObject(s)  std::endl;
return 0;
}

//Py_Initialize();

for (int i = 1; i  argc; ++i)
{
void * handle = ::dlopen(argv[i], RTLD_LAZY);
if (!handle)
{
std::cerr  dlerror()  argv[i]  std::endl;

return 0;
}

// Use that handle to locate the symbol.  The symbol must be 
// demangled so it has to be compiled with extern C.
ALLOCATE dlmAllocate = (ALLOCATE) ::dlsym(handle, allocate);
if (!dlmAllocate)
{
std::cerr  dlerror()  std::endl;
return 0;
}

dlmAllocate();
}


return 0;
}

here is my makefile

CXX := g++

default: DLOpenTest mypython.so

DLOpenTest: DLOpen.C
$(CXX) -o DLOpenTest DLOpen.C -ldl
-Wl,-bE:/mnts/cdstools/Python-2.6.2/aix-ppc-5.3/lib/python2.6/config/python.exp
-lld -I/mnts/cdstools/Python-2.6.2/aix-ppc-5.3/include/python2.6
-L/mnts/cdstools/Python-2.6.2/aix-ppc-5.3/lib/ -lpython2.6 -lpthread

mypython.so: mypython.C
$(CXX) -shared -nostartfiles
-I/mnts/cdstools/Python-2.6.2/aix-ppc-5.3/include/python2.6
-L/mnts/cdstools/Python-2.6.2/aix-ppc-5.3/lib/ -lpython2.6 -lpthread -o
mypython.so mypython.C


clean:
rm *.o DLOpenTest mypython.so

Can someone help me out? Or has anyone even tried same thing on AIX?

NOTE, the issue is not like issue 4434 or 1332869. Please don't reply
this issue with those two number. I've seen them already. It's not helpful

Thanks a log

--
components: Interpreter Core
messages: 91773
nosy: damahay123
severity: normal
status: open
title: Embedding python into shared library crash on AIX
type: crash
versions: Python 2.6

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



[issue6743] pprint.pprint should support no objects to print blank lines allow args

2009-08-20 Thread Mary Stern

New submission from Mary Stern maryst...@yahoo.com:

Using print in python 3 I would like to simple replace print with
pprint.pprint. However pprint cannot be called with no arguments, so
this cannot currently be done (the error is TypeError: pprint() takes
at least 1 positional argument (0 given)).

A simple improvement is to allow no object to be passed in and pprint
would then print a newline rather than fail.

Another problem is that if you try this:

 print('hello', True)

and replace print with print, the second arg gets interpreted as the
stream parameter.


Both of the above can be fixed (I think) by changing pprint.py as follows:

instead of the current code:
def pprint(object, stream=None, indent=1, width=80, depth=None):

change to this:
def pprint(object='\n', *args, stream=None, indent=1, width=80, depth=None)

--
messages: 91774
nosy: marystern
severity: normal
status: open
title: pprint.pprint should support no objects to print blank lines  allow args
type: feature request
versions: Python 3.1

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



[issue6734] Imap lib implicit conversion from bytes to string

2009-08-20 Thread STINNER Victor

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

 It seems most IMAP4 methods accept str as arguments right now (I
 checked: list, lsub, myrights, select, status, search, fetch) and
 login() is a sole exception. I know the protocol is mostly ascii only,
 but still having possibility of using str in the API feels convenient
 and reasonable to me.

Ok, that sounds like a good compromise. Can you write a patch?

--

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



[issue6743] pprint.pprint should support no objects to print blank lines allow args

2009-08-20 Thread Mary Stern

Mary Stern maryst...@yahoo.com added the comment:

Sorry: you also need to print out the args! :) .. like this:

def pprint(object='\n', *args, stream=None, indent=1, width=80, depth=None):
Pretty-print a Python object to a stream [default is sys.stdout].
printer = PrettyPrinter(
stream=stream, indent=indent, width=width, depth=depth)
printer.pprint(object)
for arg in args:
printer.pprint(arg)

--

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



[issue1424148] urllib.FancyURLopener.redirect_internal looses data on POST!

2009-08-20 Thread Senthil

Senthil orsent...@gmail.com added the comment:

I agree with John on this ticket. At the outset, this is Not a bug.
And reading through the referenced ticket indicates the design decision
for the behavior.
In summary:
quote
This suggests to me that *no* automatic repeat of POST
requests should ever be done, and that in the case of a 302
or 303 response, a POST should be replaced by a GET; this
may also be done for a 301 response -- even though the
standard calls that an error, it admits that it is done by
old clients.
/quote
That was Guido's point at that time.

The least that could be done is take a call on 301 response, but this
would break the other clients which rely on 'earlier standard behavior
though not compliant with RFC'. 

At the moment, this wont be necessary as it just break clients using
urllib. 

Giorgio's point in rekindling this issue, is not related to urllib
module and specifically w.r.t to redirect_request implementation. So, an
alternate behavior is desired on urllib2's redirects (if they are
observed by existing clients), it could be handled by another request.

So, effectively closing this request.

--
resolution:  - invalid
status: open - closed

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



[issue6711] macurl2path has typos that raise AttributeError

2009-08-20 Thread Senthil

Changes by Senthil orsent...@gmail.com:


--
status: open - closed

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



[issue2637] urllib.quote() escapes characters unnecessarily and contrary to docs

2009-08-20 Thread Senthil

Senthil orsent...@gmail.com added the comment:

I see adding this information to the docs, might clarify a bit.

By default, this   function is intended for quoting the path section of
the URL.

This is already present in the function docstring.

If there is no objection, I shall commit the attached patch and close
this issue.

--
keywords: +patch
Added file: http://bugs.python.org/file14748/issue2637.diff

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



[issue6740] Compounded expressions with lambda functions are evaluated incorrectly

2009-08-20 Thread Eric Smith

Eric Smith e...@trueblade.com added the comment:

This isn't the right forum to ask for help. You should try
comp.lang.python, where someone would be happy to explain this to you.

Having said that, here's the explanation:

This is not a bug.

Disregarding side effects, the expression:
a = b or c

is essentially the same as:
if b:
 a = b
else:
 a = c

So your code is:
if (lambda x : x == 'foo'):
 cond = (lambda x : x == 'foo')
else:
 cond = (lambda x : x == 'bar')

And since (lambda x : x == 'foo') evaluates to True (it's a lambda, so
it's not None), you're really saying:
cond = (lambda x : x == 'foo')

And your examples follow from that.

You can further verify this with your c1 and c2:
 cond = c1 or c2
 cond
function lambda at 0x00B3EA30
 cond is c1
True

So, you're just setting cond to the first of the 2 lambdas.

--
nosy: +eric.smith
resolution:  - invalid
stage:  - committed/rejected
status: open - closed
type:  - behavior

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



[issue6641] strptime doesn't support %z format ?

2009-08-20 Thread David House

David House dmho...@gmail.com added the comment:

Yes and no.

Firstly, %z isn't listed as deprecated in the documentation of the time
module's strftime -- although %Z is (note differing case).

Secondly, I still think the bug is invalid, because the documentation of
datetime.datetime.strptime says it behaves like time.strptime, whose
documentation says only the directives specified in the documentation
[of strftime()] are supported. Since we're in the time module, that
reference to strftime() means time.strftime(), which doesn't list %z as
a directive.

Finally, there *is* a confusing docs issue, however: the strftime()
behaviour section in the datetime module documentation lists %z as a
valid directive, whereas it's not listed in time.strftime. Although
these functions have in theory nothing to do with one another, you would
in practice expect them to support the same directives.

Since in fact the footnote in the documentation of time.strftime() says
%z isn't supported by all ANSI C platforms (despite apparently being
required by the standard), I suggest that %z be removed from the list of
allowed modifiers in the strftime() behaviour section in the datetime
module documentation.

--

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



[issue1294959] Problems with /usr/lib64 builds.

2009-08-20 Thread jan matejek

jan matejek jmate...@suse.cz added the comment:

well in our patch, at least, the directory is governed by sys.lib which
is defined through configure.
i don't understand the configure language well enough, but i'd assume
that making it parametrized isn't too hard?

--

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



[issue6744] calling kevent repr raises a TypeError

2009-08-20 Thread Jessica McKellar

New submission from Jessica McKellar jessica.mckel...@gmail.com:

kqueue_event_repr uses PyBytes_FromString when every other repr uses
PyUnicode_FromString, and this gets you a TypeError: __repr__ returned
non-string (type bytes). The patch swaps in PyUnicode_FromString and
adds a very simple unittest to test_kqueue.

--
components: Extension Modules
files: kqueue-event-repr.patch
keywords: patch
messages: 91782
nosy: jesstess
severity: normal
status: open
title: calling kevent repr raises a TypeError
type: behavior
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file14749/kqueue-event-repr.patch

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



[issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed

2009-08-20 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment:

When building of an extension has failed due to external reasons (e.g.
headers from too old version of a Python dependency), user might prefer
to be forced to fix these reasons, than to have Python built without an
extension. If `make` doesn't fail, user might not notice the problem
during building of Python, but some time later during trying to import
some modules. Such behavior is also especially desired in distributions
(like Gentoo) in which packages are automatically built on users'
systems.

Maybe the option could be named --enable-strict-building-of-extensions?

--

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



[issue6693] New functions in site.py to get user/global site packages paths

2009-08-20 Thread Tarek Ziadé

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

applied in r74526 and r74529

--
status: open - closed

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



[issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed

2009-08-20 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

Wouldn't be more interesting to add an option where you tell exactly
which modules aren't expected to be compiled successfully ? If any
modules besides those specified are not built, then setup.py returns 1.

I, for instance, don't care if the _bsddb extension doesn't get built
but I do care that some others get compiled successfully.

--

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



[issue6745] (curses) addstr() takes str in Python 3

2009-08-20 Thread Trundle

New submission from Trundle andy-pyt...@hammerhartes.de:

In Python 3, curses requires a str for addstr() where I think it should
take bytes instead. Otherwise it is impossible to output anything other
than ASCII (which is even more or less stated on top of curses'
documentation).

See the attached script umlaut2x.py for Python 2.6: Outputting
umlauts works fine, both in single-byte and multi-byte environments.

The attached script umlaut3x.py is the same script translated to
Python 3. Note that the output here always seems to be utf-8, which is
plain wrong.

A quick test where I changed addstr() to take bytes instead of str
confirmed that outputting other characters than ASCII would work then
in Python 3, too. There are perhaps more places where the types are
wrong. If someone confirms this issue and it is desired, I could
provide a patch.

--
components: Library (Lib)
files: umlaut2x.py
messages: 91786
nosy: Trundle
severity: normal
status: open
title: (curses) addstr() takes str in Python 3
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file14750/umlaut2x.py

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



[issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed

2009-08-20 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment:

 Wouldn't be more interesting to add an option where you tell
 exactly which modules aren't expected to be compiled successfully ?
 If any modules besides those specified are not built, then setup.py
 returns 1.

It's good idea. The option of `configure` could be named
--enable-extensions=ext1,ext2,...

--enable-extensions=all could be also supported and it would mean that
all non-skipped extensions are requested.

--

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



[issue6745] (curses) addstr() takes str in Python 3

2009-08-20 Thread Trundle

Changes by Trundle andy-pyt...@hammerhartes.de:


Added file: http://bugs.python.org/file14751/umlaut3x.py

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



[issue6741] Garbage collector release method

2009-08-20 Thread Martin v . Löwis

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

Can you propose a patch?

--
nosy: +loewis

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



[issue6742] Embedding python into shared library crash on AIX

2009-08-20 Thread Martin v . Löwis

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

If you get differing results from Py_IsInitialized, my guess is that you
managed to link two different copies of the Python VM into your
application, each with its own set of global variables.

An AIX expert would be required to diagnose this in more detail;
unfortunately, we are not aware of any such expert.

--
nosy: +loewis

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



[issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed

2009-08-20 Thread Martin v . Löwis

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

 When building of an extension has failed due to external reasons (e.g.
 headers from too old version of a Python dependency), user might prefer
 to be forced to fix these reasons, than to have Python built without an
 extension.

Ok - but your patch does not implement that. If the extension fails to
compile because the header files are not installed at all, even with
your patch, there is no error indication. So according to your
requirements, your patch is incorrect.

--

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



[issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed

2009-08-20 Thread Martin v . Löwis

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

 Wouldn't be more interesting to add an option where you tell
 exactly which modules aren't expected to be compiled successfully ?
 If any modules besides those specified are not built, then setup.py
 returns 1.
 
 It's good idea. The option of `configure` could be named
 --enable-extensions=ext1,ext2,...
 
 --enable-extensions=all could be also supported and it would mean that
 all non-skipped extensions are requested.

I also thought of such a solution, and could accept it.

However, it is really trivial to implement for anybody invoking an
automatic build of Python: after the build completes, do

python -c 'import ext1,ext2,...' 2/dev/null

and check the return status - and voila, you know whether your required
modules were built successfully.

--

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



[issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed

2009-08-20 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment:

 Ok - but your patch does not implement that. If the extension
 fails to compile because the header files are not installed at all,
 even with your patch, there is no error indication.

`make` will return error:

$ cat Makefile
x:
false
all: x
$ make
false
make: *** [x] Error 1
$ 

Also note that my original patch was created before I slightly changed
my suggestion :) .

--

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



[issue6746] ValueError raised by IDLE during tooltip open on 64-bit Centos 5.3

2009-08-20 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar sridh...@activestate.com:

Linux (Centos 5.3) 32-bit with Python 2.5.4

1. Start an idle session.
2. enter help( at the prompt

The open bracket triggers a traceback in the console:

Exception in Tkinter callback
Traceback (most recent call last):
  File /home/qatest/APyE/lib/python2.5/lib-tk/Tkinter.py, line 1414, 
in
__call__
return self.func(*args)
  File /home/qatest/APyE/lib/python2.5/idlelib/MultiCall.py, line 
151, in
handler
r = l[i](event)
  File /home/qatest/APyE/lib/python2.5/idlelib/CallTips.py, line 55, 
in
try_open_calltip_event
self.open_calltip(False)
  File /home/qatest/APyE/lib/python2.5/idlelib/CallTips.py, line 79, 
in
open_calltip
self.calltip.showtip(arg_text, sur_paren[0], sur_paren[1])
  File /home/qatest/APyE/lib/python2.5/idlelib/CallTipWindow.py, line 
66, in
showtip
self.position_window()
  File /home/qatest/APyE/lib/python2.5/idlelib/CallTipWindow.py, line 
35, in
position_window
self.parencol))
  File /home/qatest/APyE/lib/python2.5/lib-tk/Tkinter.py, line 2857, 
in bbox
self.tk.call((self._w, 'bbox') + args)) or None
  File /home/qatest/APyE/lib/python2.5/lib-tk/Tkinter.py, line 1030, 
in
_getints
return tuple(map(getint, self.tk.splitlist(string)))
ValueError: invalid literal for int() with base 10: '(71,'

Upon closing the bracket, another exception is thrown:

Exception in Tkinter callback
Traceback (most recent call last):
  File /home/qatest/APy/lib/python2.5/lib-tk/Tkinter.py, line 1414, 
in __call__
return self.func(*args)
  File /home/qatest/APy/lib/python2.5/idlelib/MultiCall.py, line 151, 
in handler
r = l[i](event)
  File /home/qatest/APy/lib/python2.5/idlelib/CallTips.py, line 55, 
in try_open_calltip_event
self.open_calltip(False)
  File /home/qatest/APy/lib/python2.5/idlelib/CallTips.py, line 65, 
in open_calltip
self._remove_calltip_window()
  File /home/qatest/APy/lib/python2.5/idlelib/CallTips.py, line 41, 
in _remove_calltip_window
self.calltip.hidetip()
  File /home/qatest/APy/lib/python2.5/idlelib/CallTipWindow.py, line 
126, in hidetip
self.label.destroy()
AttributeError: 'NoneType' object has no attribute 'destroy'
Exception in Tkinter callback
Traceback (most recent call last):
  File /home/qatest/APy/lib/python2.5/lib-tk/Tkinter.py, line 1414, 
in __call__
return self.func(*args)
  File /home/qatest/APy/lib/python2.5/idlelib/MultiCall.py, line 151, 
in handler
r = l[i](event)
  File /home/qatest/APy/lib/python2.5/idlelib/CallTips.py, line 62, 
in refresh_calltip_event
self.open_calltip(False)
  File /home/qatest/APy/lib/python2.5/idlelib/CallTips.py, line 65, 
in open_calltip
self._remove_calltip_window()
  File /home/qatest/APy/lib/python2.5/idlelib/CallTips.py, line 41, 
in _remove_calltip_window
self.calltip.hidetip()
  File /home/qatest/APy/lib/python2.5/idlelib/CallTipWindow.py, line 
126, in hidetip
self.label.destroy()
AttributeError: 'NoneType' object has no attribute 'destroy'


Tix version = 8.4.3
Tcl/Tk version = 8.5.7

This happens only on 64-bit (not 32-bit).

--
components: IDLE
messages: 91793
nosy: srid
severity: normal
status: open
title: ValueError raised by IDLE during tooltip open on 64-bit Centos 5.3
versions: Python 2.5

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



[issue6746] ValueError raised by IDLE during tooltip open on 64-bit Centos 5.3

2009-08-20 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

I can reproduce it here, unfortunately Tcl/Tk 8.5 isn't really supported
by Python 2.5 and the changes required to get this fixed won't be
backported. It was suggested backporting before and it was rejected.

--
nosy: +gpolo
resolution:  - wont fix
status: open - closed

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



[issue6746] ValueError raised by IDLE during tooltip open on 64-bit Centos 5.3

2009-08-20 Thread Guilherme Polo

Changes by Guilherme Polo ggp...@gmail.com:


--
components: +Tkinter -IDLE

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



[issue6746] ValueError raised by IDLE during tooltip open on 64-bit Centos 5.3

2009-08-20 Thread Sridhar Ratnakumar

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

On Thu, 20 Aug 2009 16:52:12 -0700, Guilherme Polo  
rep...@bugs.python.org wrote:

 I can reproduce it here, unfortunately Tcl/Tk 8.5 isn't really supported
 by Python 2.5 and the changes required to get this fixed won't be
 backported. It was suggested backporting before and it was rejected.

Thank you for giving an update. Was it reported as a bug in this tracker?  
Do you know the bug number?

-srid

--

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



[issue6746] ValueError raised by IDLE during tooltip open on 64-bit Centos 5.3

2009-08-20 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

 I can reproduce it here, unfortunately Tcl/Tk 8.5 isn't really supported
 by Python 2.5 and the changes required to get this fixed won't be
 backported. It was suggested backporting before and it was rejected.

 Thank you for giving an update. Was it reported as a bug in this tracker?
 Do you know the bug number?

It was reported here, yes. I was able to find issue4342 which talks
about this, from what I remember it is r59653 which needed to be
backported but wasn't. There was another issue where I pointed out the
fixes that should be applied if someone wanted to use Tcl/Tk 8.5, with
fewer issues, together with Python 2.5 but right now I don't remember
on which issue I wrote this.

--

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



[issue6747] test test_multiprocessing failed

2009-08-20 Thread Thomas Kowaliczek

New submission from Thomas Kowaliczek linuxdon...@linuxdonald.de:

test test_multiprocessing failed -- Traceback (most recent call last):
  File
/home/LinuxDonald/Downloads/Python-3.1.1/Lib/test/test_multiprocessing.py,
line 1077, in test_number_of_objects
self.assertEqual(refs, EXPECTED_NUMBER)
AssertionError: 4 != 1

--
components: Tests
messages: 91797
nosy: LinuxDonald
severity: normal
status: open
title: test test_multiprocessing failed
versions: Python 3.1

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



[issue6748] test test_telnetlib failed

2009-08-20 Thread Thomas Kowaliczek

New submission from Thomas Kowaliczek linuxdon...@linuxdonald.de:

test test_telnetlib failed -- Traceback (most recent call last):
  File
/home/LinuxDonald/Downloads/Python-3.1.1/Lib/test/test_telnetlib.py,
line 409, in test_debuglevel
self._test_debuglevel([a, EOF_sigil], b)
  File
/home/LinuxDonald/Downloads/Python-3.1.1/Lib/test/test_telnetlib.py,
line 389, in _test_debuglevel
txt = telnet.read_all()
  File /home/LinuxDonald/Downloads/Python-3.1.1/Lib/telnetlib.py, line
325, in read_all
self.fill_rawq()
  File /home/LinuxDonald/Downloads/Python-3.1.1/Lib/telnetlib.py, line
516, in fill_rawq
buf = self.sock.recv(50)
socket.error: [Errno 104] Connection reset by peer

--
components: Tests
messages: 91798
nosy: LinuxDonald
severity: normal
status: open
title: test test_telnetlib failed
versions: Python 3.1

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



[issue6747] test test_multiprocessing failed

2009-08-20 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
assignee:  - jnoller
nosy: +jnoller

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



[issue6747] test test_multiprocessing failed

2009-08-20 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
components: +Extension Modules -Tests
stage:  - test needed
type:  - behavior

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



[issue6747] test test_multiprocessing failed

2009-08-20 Thread Thomas Kowaliczek

Thomas Kowaliczek linuxdon...@linuxdonald.de added the comment:

On my Netbook Fedora 11 32 Bit the test works but not on my NoteBook
Fedora 11 64Bit

--

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



[issue1755841] Patch for [ 735515 ] urllib2 should cache 301 redir

2009-08-20 Thread Senthil

Changes by Senthil orsent...@gmail.com:


--
assignee:  - orsenthil

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



[issue735515] urllib / urllib2 should cache 301 redirections

2009-08-20 Thread Senthil

Changes by Senthil orsent...@gmail.com:


--
assignee:  - orsenthil

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



[issue6749] Support for encrypted zipfiles when interpreting zipfile as script

2009-08-20 Thread Peter Manis

New submission from Peter Manis peter.ma...@gmail.com:

The zipfile support in 2.6 that allows you pass a zipfile(with __main__.py 
inside) as the script, does not support encrypted zipfiles.  I view this 
as being a feature that could be useful to some.

--
components: Library (Lib)
messages: 91800
nosy: manis
severity: normal
status: open
title: Support for encrypted zipfiles when interpreting zipfile as script
type: feature request
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2

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



[issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed

2009-08-20 Thread Martin v . Löwis

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

 `make` will return error:

No it will not. I just tested it: on my Linux system, _bsddb
was not built, yet make reported success even after installing
your patch.

--

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