[issue6990] threading.local subclasses don't cleanup their state and it gets recycled

2009-09-25 Thread Amaury Forgeot d'Arc

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

Thanks for the excellent test case!
Is seems enough to remove the statement Py_CLEAR(self-key); from
local_clear(). self-key is a string which cannot cause cycles (and is
not visited in local_traverse()); now local_dealloc() does its job.

Index: threadmodule.c
===
--- threadmodule.c  (revision 74229)
+++ threadmodule.c  (working copy)
@@ -239,7 +239,6 @@
 static int
 local_clear(localobject *self)
 {
-   Py_CLEAR(self-key);
Py_CLEAR(self-args);
Py_CLEAR(self-kw);
Py_CLEAR(self-dict);

--
keywords: +needs review
stage:  - patch review

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



[issue4434] Embedding into a shared library fails

2009-09-25 Thread Amaury Forgeot d'Arc

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

Does it help if you add the --whole-archive option when linking with the
static library? As explained there:
http://www.lysium.de/blog/index.php?/archives/222-Lost-static-objects-in-static-libraries-with-GNU-linker-ld.html
This way your main program will contain the whole python interpreter,
and all symbols used by time.so co will be resolved.

--
nosy: +amaury.forgeotdarc

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



[issue6991] logging encoding failes some situation

2009-09-25 Thread Naoki INADA

Changes by Naoki INADA songofaca...@gmail.com:


--
type:  - behavior

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



[issue6991] logging encoding failes some situation

2009-09-25 Thread Benjamin Peterson

Changes by Benjamin Peterson benja...@python.org:


--
assignee:  - vinay.sajip
nosy: +vinay.sajip

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



[issue6991] logging encoding failes some situation

2009-09-25 Thread Vinay Sajip

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

Thanks, but I'm not sure I understand the reasoning.
stream.write(unicode_string) should not do decode() internally, though
of course it would do encode(). Can you explain a little more (with an
illustrative example) what problem you are trying to solve, and attach a
small script which shows the problem? Thanks.

--
status: open - pending

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



[issue6991] logging encoding failes some situation

2009-09-25 Thread Naoki INADA

Naoki INADA songofaca...@gmail.com added the comment:

Please see and execute an attached foo.py.

In Python 2.6.2, this cause following error:
python foo.py
Traceback (most recent call last):
  File foo.py, line 3, in module
f.write('\xaa')
  File C:\usr\Python2.6\lib\codecs.py, line 686, in write
return self.writer.write(data)
  File C:\usr\Python2.6\lib\codecs.py, line 351, in write
data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xaa in position 0:
ordinal not in ran
ge(128)

--
status: pending - open
Added file: http://bugs.python.org/file14971/foo.py

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



[issue6992] multiple authors in setup.by

2009-09-25 Thread anatoly techtonik

New submission from anatoly techtonik techto...@gmail.com:

setup.py should allow to specify multiple authors in package description.

--
assignee: tarek
components: Distutils
messages: 93105
nosy: tarek, techtonik
severity: normal
status: open
title: multiple authors in setup.by

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



[issue6991] logging encoding failes some situation

2009-09-25 Thread Vinay Sajip

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

There seems to be a problem with your foo.py. In it, you are writing a
byte-string to a stream returned from codecs.open. I don't think this is
correct: you should be writing a Unicode string to that stream, which
will convert to bytes using the stream's encoding, and write those bytes
to file. The following snippet illustrates:

 import codecs
 f = codecs.open('foo.txt', 'w', encoding='utf-8')
 f.write(u'\u76F4\u6A39\u7A32\u7530')
 f.close()
 f = open('foo.txt', 'r')
 f.read()
'\xe7\x9b\xb4\xe6\xa8\xb9\xe7\xa8\xb2\xe7\x94\xb0'

As you can see, the Unicode has been converted using UTF-8.

--
status: open - pending

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



[issue6998] Bug in Tutorial (introduction.rst)

2009-09-25 Thread Michael Markert

New submission from Michael Markert markert.mich...@gmail.com:

There is a `print` statement in line 225 of introduction.rst instead of
a print function, rendering the snippet buggy in Python3.

--
assignee: georg.brandl
components: Documentation
messages: 93132
nosy: cofi, georg.brandl
severity: normal
status: open
title: Bug in Tutorial (introduction.rst)
versions: Python 3.1

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



[issue3890] ssl.SSLSocket.recv() implementation may not work with non-blocking sockets

2009-09-25 Thread Barry A. Warsaw

Barry A. Warsaw ba...@python.org added the comment:

I'll make this a release blocker, but I agree a test would be useful to
have.  Let's try to get this in for 2.6.3.

--
nosy: +barry
priority:  - release blocker

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