[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  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 

___
___
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  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 

___
___
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 :


--
type:  -> behavior

___
Python tracker 

___
___
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 :


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

___
Python tracker 

___
___
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  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 

___
___
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  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 
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 

___
___
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 :

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 

___
___
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  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 

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



[issue6971] Add the SIO_KEEPALIVE_VALS option to socket.ioctl

2009-09-25 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Due to lack of comments, and the straight-forwardness of this change, I 
committed it to the trunk in revision 75054

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue6993] importing of "time" module is terribly slow

2009-09-25 Thread Nikolay Dyankov

New submission from Nikolay Dyankov :

The behaviour described below is not always reproduced.

The attached test script simply tries to import a couple of dns-python
modules, which in turn import other ones. No code is being executed.
You expect it to exit for less than a second but it does not. Instead,
it hangs when "time" module is being imported (eventually it exits after
a long time).

Attached are stdout log and system call log produced by strace with
timestamps.

I don't know what causes it but I'm getting it on at least two machines
(the second being virtual):


$ cat /etc/fedora-release 
Fedora release 10 (Cambridge)
$ uname -a
Linux kiki 2.6.27.30-170.2.82.fc10.i686.PAE #1 SMP Mon Aug 17 08:24:23
EDT 2009 i686 i686 i386 GNU/Linux
$ python -c "import sys; print sys.version"
2.5.2 (r252:60911, Sep 30 2008, 15:41:38) 
[GCC 4.3.2 20080917 (Red Hat 4.3.2-4)]


$ cat /etc/redhat-release 
CentOS release 5.3 (Final)
$ uname -a
Linux proxy.sc.com 2.6.18-128.el5 #1 SMP Wed Jan 21 10:44:23 EST 2009
i686 i686 i386 GNU/Linux
$ python -c "import sys; print sys.version"
2.4.3 (#1, Jan 21 2009, 01:10:13) 
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)]

I don't think it's related to dns-python(that's why I am posting it
here) but for reference the version used is 1.7.1.


The timestamps in stdout.log and strace.log clearly show the slowdown:

# strace.log
18:18:53 ioctl(6, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfac06b0) = -1 EINVAL
(Invalid argument)
18:18:53 mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e4f000
18:18:53 read(6, "F\t\262\276\261s\223I"..., 4096) = 8
18:19:01 read(6, ")v\244\36\v=U\336"..., 4096) = 8
18:19:11 close(6)   = 0
18:19:11 munmap(0xb7e4f000, 4096)   = 0
18:19:11 gettimeofday({1253891951, 431529}, NULL) = 0

# stdout.log
18:18:53  dns.entropy
18:18:53  time
18:19:11  hashlib
18:19:11  _hashlib

--
components: Library (Lib)
files: dns-test.tar.gz
messages: 93108
nosy: ndyankov
severity: normal
status: open
title: importing of "time" module is terribly slow
type: behavior
versions: Python 2.4, Python 2.5
Added file: http://bugs.python.org/file14972/dns-test.tar.gz

___
Python tracker 

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



[issue6994] enumerate dosctring has a typo

2009-09-25 Thread Natalia B. Bidart

New submission from Natalia B. Bidart :

Current docstring states:

Return an enumerate object.  iterable must be an other object that
supports iteration.

It should be:

Return an enumerate object. iterable must be another object that
supports iteration.

--
assignee: georg.brandl
components: Documentation
messages: 93109
nosy: georg.brandl, nessita
severity: normal
status: open
title: enumerate dosctring has a typo
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



[issue6994] enumerate dosctring has a typo

2009-09-25 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee: georg.brandl -> ezio.melotti
nosy: +ezio.melotti
priority:  -> low
resolution:  -> accepted

___
Python tracker 

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



[issue6993] importing of "time" module is terribly slow

2009-09-25 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

> "No code is being executed"

Hmm, in dns.entropy module (I found the code there:
http://www.dnspython.com/docs/1.7.1/html/dns.entropy-pysrc.html
) line 89 says "pool = EntropyPool()", and the __init__ function opens
and reads bytes from /dev/random.
This is the cause of the slowdown, as is shown by the strace file.

The time module is innocent here.

--
nosy: +amaury.forgeotdarc
resolution:  -> invalid
status: open -> pending

___
Python tracker 

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



[issue6994] enumerate dosctring has a typo

2009-09-25 Thread Ezio Melotti

Ezio Melotti  added the comment:

Fixed in r75055 (trunk), r75056 (release26-maint), r75057 (py3k) and
r75058 (release31-maint), thanks!

--
resolution: accepted -> fixed
stage:  -> 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



[issue6991] logging encoding failes some situation

2009-09-25 Thread Naoki INADA

Naoki INADA  added the comment:

Another sample.

Traceback (most recent call last):
  File "C:\usr\Python2.6\lib\logging\__init__.py", line 790, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xaa in position 0:
ordinal not in range(128)

This is because logging.FileHandler uses codecs.open internally.

--
status: pending -> open
Added file: http://bugs.python.org/file14973/logging_error.py

___
Python tracker 

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



[issue6606] csv.Sniffer.sniff on data with doublequotes doesn't set up the dialect properly

2009-09-25 Thread Skip Montanaro

Skip Montanaro  added the comment:

Thanks.  I don't know how to use Reitveld.  What am I supposed to
do with that?

S

--

___
Python tracker 

___
___
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  added the comment:

Your second example (logging_error.py) fails for the same reason -
you're writing a byte-string to a stream which is expecting Unicode. The
error occurs in logging only it tries encoding as UTF-8 as a last-ditch
attempt - and that only happens because of an earlier exception caused
by you not writing a Unicode string.

In summary: If you open a stream via codecs.open, whether directly or
through the logging module, you are expecting the stream to do encoding
for you. Therefore, you only write Unicode to the stream - never a
byte-string. If you have a byte-string in your application which you
have obtained from somewhere else, convert it to Unicode using whatever
encoding applies to the source. Then, send the resulting Unicode to the
encoding stream (or logger).

--
status: open -> pending

___
Python tracker 

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



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

2009-09-25 Thread Philip Jenvey

Philip Jenvey  added the comment:

Great, though I think it still needs to deallocated:

Index: Modules/threadmodule.c
===
--- Modules/threadmodule.c  (revision 75050)
+++ Modules/threadmodule.c  (working copy)
@@ -244,7 +244,6 @@
 static int
 local_clear(localobject *self)
 {
-   Py_CLEAR(self->key);
Py_CLEAR(self->args);
Py_CLEAR(self->kw);
Py_CLEAR(self->dict);
@@ -266,6 +265,7 @@
PyDict_DelItem(tstate->dict, self->key);
}
 
+   Py_XDECREF(self->key);
local_clear(self);
Py_TYPE(self)->tp_free((PyObject*)self);
 }

--

___
Python tracker 

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



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

2009-09-25 Thread Philip Jenvey

Philip Jenvey  added the comment:

Also I've tagged this as a (potential) security issue. E.g. if a web app 
were affected, one user could potentially access another's data.

I actually noticed it in the Beaker sessioning/caching middleware (used by 
Pylons and other web frameworks). Though it only manifested itself as an 
exception in Beaker, others may not be so lucky

So I'd like to apply the ultimate fix all the way down to at least the 2.5 
branch

--

___
Python tracker 

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



[issue6995] Python 3.1 interpreter crashes on windows

2009-09-25 Thread bahaelaila7

New submission from bahaelaila7 :

python3.1 (both amd64 and 32-bit edition) crash whenever i try to start
python.exe.
i've tried that on many windows editions, XP, Vista, Seven,,, for  each,
64 and 32 bits editions , virtually and normally...always get
the same error, as shown in 
http://img33.imageshack.us/img33/7498/screenshot1za.png

--
files: Screenshot-1.png
messages: 93117
nosy: bahaelaila7
severity: normal
status: open
title: Python 3.1 interpreter crashes on windows
type: crash
versions: Python 3.1
Added file: http://bugs.python.org/file14974/Screenshot-1.png

___
Python tracker 

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



[issue6996] Python 2.6.2 & 3.1.1 Installer

2009-09-25 Thread Deepak Parashar

New submission from Deepak Parashar :

Need Python 2.6.2 & 3.1.1 Installer for Windows 64 Bit (for Pentium / 
Intel CPU)

--
components: Installation, Windows
messages: 93118
nosy: deepakp
severity: normal
status: open
title: Python 2.6.2 & 3.1.1 Installer
type: resource usage
versions: Python 2.6, Python 3.1

___
Python tracker 

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



[issue6996] Python 2.6.2 & 3.1.1 Installer

2009-09-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Installers (including 64-bit Windows, aka AMD64) are available on
http://python.org/download/.
If your platform isn't supported, please be more specific about it.

--
nosy: +pitrou
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue6996] Python 2.6.2 & 3.1.1 Installer

2009-09-25 Thread Deepak Parashar

Deepak Parashar  added the comment:

Actually i was looking forward to install the Python on Xeon CPU based 
Windows 64 BIt Machine , any idea of the link if the installer i can 
download.

--

___
Python tracker 

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



[issue6996] Python 2.6.2 & 3.1.1 Installer

2009-09-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Actually i was looking forward to install the Python on Xeon CPU based 
> Windows 64 BIt Machine , any idea of the link if the installer i can 
> download.

Actually, the AMD64 version should work perfectly on 64-bit Intel CPUs.
(it's also known as x86-64)

--

___
Python tracker 

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



[issue6996] Python 2.6.2 & 3.1.1 Installer

2009-09-25 Thread Deepak Parashar

Deepak Parashar  added the comment:

Thanks , let me give a try , will keep you posted for the status.

Again Thanks ,

--

___
Python tracker 

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



[issue6995] Python 3.1 interpreter Fatal Error on windows with unknown encoding cp720

2009-09-25 Thread R. David Murray

R. David Murray  added the comment:

This is a duplicate of Issue1616979, which has been accepted and applied.

--
nosy: +r.david.murray
priority:  -> normal
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
title: Python 3.1 interpreter crashes on windows -> Python 3.1 interpreter 
Fatal Error on windows with unknown encoding cp720
type: crash -> behavior

___
Python tracker 

___
___
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  added the comment:

OK, you're right.
But logging is very basic feature and used very wide modules.
"All logging code should use unicode string" is right but difficult.

And logging may be used for debbuging usually. So I think
logging should write log as safe as possible.
When log.error(...) called, no-one wants UnicodeDecodeError
from logging in their log.

--
status: pending -> open

___
Python tracker 

___
___
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  added the comment:

It's not about logging - your first example (foo.py) didn't have any
logging code in it.

The problem is caused only when someone doesn't understand how Unicode
and codecs.open works, and logging can't fix this.

The rule is: If you use a stream without encoding and byte strings under
Python 2.x, you'll be OK - fine if you're using ASCII or Latin-1.
However, users of systems outside this (e.g. CJK or Cyrillic) will not
be covered.

For use anywhere, you really have to work in Unicode internally, decode
stuff on the way in and encode stuff on the way out. That's what the
codecs module is for.

If third-party libraries which you are using don't use Unicode properly,
then they are broken, and logging can't fix that. Any attempt to "paper
over the cracks" will fail sooner or later. It's better to identify the
problem exactly where it occurs: Python's Zen says "Errors should never
pass silently."

I'm closing this issue, as it's not really logging-related. Hope that's OK.

--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

___
___
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  added the comment:

OK, I agree.
Thank you for your answer.

--

___
Python tracker 

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



[issue6993] importing of "time" module is terribly slow

2009-09-25 Thread Nikolay Dyankov

Nikolay Dyankov  added the comment:

Stupid me :))
I must have really missed that.

Still I don't understand why the read call takes 10 seconds to complete.

--
status: pending -> open

___
Python tracker 

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



[issue6997] python26 compiled on snow leopard x86_64

2009-09-25 Thread Dylan

New submission from Dylan :

Hi guys, 

I consider myself self-taught average geek. after a long time trying
many things to get python2.6.2 to build with macports it fails every
time until i used this specific argument in the work folder below

cd
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/Python-2.6.2

configure and make as followed (this is what i know works, i know there
is possibly a shorter more proficient way to do this so don't blame me i
just got this thing to compile is all.)

sudo DEFAULT_ARCH=x86_64 MACOSX_DEPLOYMENT_TARGET=10.6 ./configure
--with-universal-archs=64-bit

Please share this among devs at macports Thought I'd mention my success
here first.

- Dylan Mahoney

--
components: Build
messages: 93128
nosy: monway
severity: normal
status: open
title: python26 compiled on snow leopard x86_64
type: feature request
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



[issue6993] importing of "time" module is terribly slow

2009-09-25 Thread Nikolay Dyankov

Nikolay Dyankov  added the comment:

OK, I found the reason and it is the very fact of using /dev/random
which would block if there aren't enough random numbers in queue.
Maybe dns-python should be using /dev/urandom instead (though there
might be reasons for not doing so).

The mystery is revealed.
I am closing the bug.
:)

--
status: open -> closed

___
Python tracker 

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



[issue6997] python26 compiled on snow leopard x86_64

2009-09-25 Thread Dylan

Dylan  added the comment:

oops forgot to mention i realized it was defaulted to /usr/local so i
tried compiling the same configuration except adding --prefix=/opt/local 

built fine

try using

sudo DEFAULT_ARCH=x86_64 MACOSX_DEPLOYMENT_TARGET=10.6 ./configure
--with-universal-archs=64-bit --prefix=/opt/local

--

___
Python tracker 

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



[issue6997] python26 compiled on snow leopard x86_64

2009-09-25 Thread Mark Dickinson

Mark Dickinson  added the comment:

Thanks for this.  Fixes to allow Python to build on Snow Leopard have 
already been applied to the svn repository, and will be included in the 
soon-to-appear Python 2.6.3 release.

If you have time, please do check out the svn source and verify that it 
builds for you.  The URL is:

http://svn.python.org/projects/python/branches/release26-maint

Instructions for working with Python svn are at:

http://www.python.org/dev/faq/

--
nosy: +mark.dickinson
resolution:  -> out of date
status: open -> closed

___
Python tracker 

___
___
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 :

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 

___
___
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 Ezio Melotti

Changes by Ezio Melotti :


--
assignee: georg.brandl -> ezio.melotti
nosy: +ezio.melotti
priority:  -> low
resolution:  -> accepted

___
Python tracker 

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



[issue6997] python26 compiled on snow leopard x86_64

2009-09-25 Thread Dylan

Dylan  added the comment:

Thanks!
compiled cleanly @/opt/local
build is active.

--

___
Python tracker 

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



[issue6999] TypeError in pathfix.py

2009-09-25 Thread Andrew McNabb

New submission from Andrew McNabb :

Tools/scripts/pathfix.py crashes with a TypeError:

Traceback (most recent call last):
  File "Tools/scripts/pathfix.py", line 149, in 
main()
  File "Tools/scripts/pathfix.py", line 54, in main
if recursedown(arg): bad = 1
  File "Tools/scripts/pathfix.py", line 82, in recursedown
elif ispython(name):
  File "Tools/scripts/pathfix.py", line 64, in ispython
return ispythonprog.match(name) >= 0
TypeError: unorderable types: NoneType() >= int()

It looks like an easy fix would be to change line 64 from:

return ispythonprog.match(name) >= 0

to:

return bool(ispythonprog.match(name))

After making this change, I got another crash, this time due to a
UnicodeDecodeError.  Apparently, the file
(Demo/distutils/test2to3/setup.py) has a character encoded in ISO-8859.
 Since pathfix.py is only concerned with ASCII text in the first line of
a file, it seems that it should probably operate on bytes instead of
unicode strings.

By the way, it's a little odd (but not technically invalid) that the
format string on line 146 is: '#! %s\n'.  I would normally expect to see
no whitespace: '#!%s\n'.

Anyway, I'm attaching a patch that fixes addresses all of the above
issues and which seems to make pathfix.py work for all files in the
Python 3.1.1 source tree.

--
components: Demos and Tools
files: python-3.1.1-pathfix.patch
keywords: patch
messages: 93134
nosy: amcnabb
severity: normal
status: open
title: TypeError in pathfix.py
type: crash
versions: Python 3.1
Added file: http://bugs.python.org/file14975/python-3.1.1-pathfix.patch

___
Python tracker 

___
___
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  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 

___
___
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 Ezio Melotti

Ezio Melotti  added the comment:

Fixed in r75059 (py3k) and r75060 (release31-maint), thanks!

--
resolution: accepted -> fixed
stage:  -> 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



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

2009-09-25 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
priority:  -> release blocker

___
Python tracker 

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



[issue6999] TypeError in pathfix.py

2009-09-25 Thread Andrew McNabb

Changes by Andrew McNabb :


--
type: crash -> behavior

___
Python tracker 

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



[issue6071] no longer possible to hash arrays

2009-09-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I tried to implement the new buffer API, but as soon as I add 
> bf_getbuffer/bf_releasebuffer to PyBufferProcs writing an array to a file 
> breaks:

You should take a look at the array module in py3k, it supports the new
buffer API. With a bit of luck, the two relevant functions shouldn't be
too difficult to backport to the trunk.

By the way, to signal that it supports the new buffer API, you must add
Py_TPFLAGS_HAVE_NEWBUFFER to the type flags.

--

___
Python tracker 

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



[issue6968] numpy extensions to distutils... are a source of improvements for distutils

2009-09-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Closing since the main purpose has been accomplished and there is
otherwise no particular endpoint.

--
nosy: +tjreedy
status: open -> closed

___
Python tracker 

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



[issue7000] optional second argument of string.keywords not documented

2009-09-25 Thread Mitchell Model

New submission from Mitchell Model :

string.capwords has an optional second argument, sep, which is not
documented

--
assignee: georg.brandl
components: Documentation
messages: 93139
nosy: MLModel, georg.brandl
severity: normal
status: open
title: optional second argument of string.keywords not documented
versions: Python 3.0, 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



[issue5023] Segfault in datetime.time.strftime("%z")

2009-09-25 Thread Philipp Gortan

Philipp Gortan  added the comment:

I can reproduce this problem with Gentoo Hardened and 
gcc version 3.4.6 (Gentoo Hardened 3.4.6-r2 p1.6, ssp-3.4.6-1.0, pie-8.7.10)

when gdb-ing through the datetimemodule.c, and displaying the "tuple"
variable in time_strftime, I can see that the pointer gets modified by
the wrap_strftime call, resulting in Py_DECREF causing the segfault:
before wrap_strftime:
(gdb) x tuple
0xa8938f2c: 0x0001
after wrap_strftime:
(gdb) x tuple
0x938f2c:   Cannot access memory at address 0x938f2c
thus executing
Py_DECREF(tuple)
results in the segfault.

--
nosy: +mephinet

___
Python tracker 

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



[issue6999] TypeError in pathfix.py

2009-09-25 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Thanks for the patch! Fixed in r75062.

--
nosy: +benjamin.peterson
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue7001] turtle.py bug-fixes, backported from 3.1 [issue5923]

2009-09-25 Thread Gregor Lingl

New submission from Gregor Lingl :

Among the changes of turtle.py from Python 3.0 to Python 3.1 there were
three bugfixes. Those bugs appear also in the Python 2.6 version of
turtle.py

imho these should be fixed for Python 2.6.3

The appended diffs contain the (backported) fixes of these bugs,
(1) in TurtleScreen.update()
(2) in TurtleScreen.onkey()
(3) in _Screen.__init__ and _Screen.setup

The last one entails the need of adding one line into turtleDemo.py.
This change does not affect the correct working of turtleDemo with the
Python 2.6.2 turtle and demos.

--
files: turtle_262_263.diff
keywords: patch
messages: 93142
nosy: gregorlingl
severity: normal
status: open
title: turtle.py bug-fixes, backported from 3.1 [issue5923]
versions: Python 2.6
Added file: http://bugs.python.org/file14976/turtle_262_263.diff

___
Python tracker 

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



[issue7001] turtle.py bug-fixes, backported from 3.1 [issue5923]

2009-09-25 Thread Gregor Lingl

Gregor Lingl  added the comment:

!! This patch should be applied if and only if the corresponding one of
turtle.py is applied !!

--
nosy: +georg.brandl, loewis
Added file: http://bugs.python.org/file14977/turtleDemo_262_263.diff

___
Python tracker 

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



[issue7000] optional second argument of string.capwords not documented

2009-09-25 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee: georg.brandl -> ezio.melotti
nosy: +ezio.melotti
priority:  -> low
resolution:  -> accepted
title: optional second argument of string.keywords not documented -> optional 
second argument of string.capwords not documented

___
Python tracker 

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



[issue6971] Add the SIO_KEEPALIVE_VALS option to socket.ioctl

2009-09-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Will you merge to py3k?

--
nosy: +pitrou

___
Python tracker 

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



[issue6790] httplib and array do not play together well

2009-09-25 Thread Kirk McDonald

Kirk McDonald  added the comment:

And here is a patch removing the array.array.read and .write methods in 
2.7.

--
Added file: http://bugs.python.org/file14979/issue6790-python2.7.diff

___
Python tracker 

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



[issue6790] httplib and array do not play together well

2009-09-25 Thread Kirk McDonald

Kirk McDonald  added the comment:

Here is a patch special-casing array.array in httplib.HTTPConnection.send 
in Python 2.6.

--
keywords: +patch
nosy: +KirkMcDonald
Added file: http://bugs.python.org/file14978/issue6790-python2.6.diff

___
Python tracker 

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



[issue6243] getkey() can segfault in combination with curses.ungetch()

2009-09-25 Thread A.M. Kuchling

A.M. Kuchling  added the comment:

Thanks for the bug report and for the fix; 
committed to trunk in rev. 75066.  I modified the patch
slightly to declare the 'knp' variable in the 'else'
block, and both the unctrl()/keyname() sections use the variable.

--

___
Python tracker 

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



[issue6071] no longer possible to hash arrays

2009-09-25 Thread Jan Hosang

Jan Hosang  added the comment:

I added the two functions for the new buffer API. Having an exported 
memory view needs some handling elsewhere, so the array does not change. I 
also added tests for checking that behaviour.

Mainly I copypasted code from py3k which involved redirecting to 
array_resize() instead of doing it manually and doing the checking there.

--
keywords: +patch
Added file: http://bugs.python.org/file14980/array_new_buffer.patch

___
Python tracker 

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



[issue6071] no longer possible to hash arrays

2009-09-25 Thread Jan Hosang

Jan Hosang  added the comment:

The patch breaks five unit tests from other modules, I'll look into it.

--

___
Python tracker 

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



[issue6989] Compile error for Python-2.6.2 on Solaris

2009-09-25 Thread Ashish

Ashish  added the comment:

Issue seems to be resolved. Please close the issue.

Thanks a lot Mark for your cooperation, support and Guideline.

:-)

--
status: open -> closed

___
Python tracker 

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



[issue7002] help me to set variables - 64 bit

2009-09-25 Thread Ashish

New submission from Ashish :

Hello,

I am compiling python 2.6.2 and 3.1.

I tried to compile 64 bit ( ELF 64-bit )python but it gets 32 bit ( ELF
32-bit ).

bash-3.00$ sudo file /usr/local/Python-2.6.2/bin/python
/usr/local/Python-2.6.2/bin/python: ELF 32-bit MSB executable, PowerPC
or cisco 4500, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked
(uses shared libs), not stripped

Will you please help me to set variables and parameters to compile
python for 64 bit on following architect

1. Linux - OS - Red Hat Enterprise Linux AS release 4 (Nahant Update 6)
   Arch - ppc64

2. HP-UX - OS - HP-UX hpi64qa B.11.23 U ia64 (tb)

3. AIX 5 - AIX 5300-07

Thanks 
Ashish

--
components: Build
messages: 93151
nosy: ashish
severity: normal
status: open
title: help me to set variables - 64 bit
type: compile error
versions: Python 2.6, Python 3.1

___
Python tracker 

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



[issue7002] help me to set variables - 64 bit

2009-09-25 Thread Brett Cannon

Brett Cannon  added the comment:

You probably need to set the -arch value in your CPPFLAGS. But this is not 
a Python bug. If you need further help please ask at 
comp.lang.python/python-list.

--
nosy: +brett.cannon
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue7003] finish documentation of user local paths

2009-09-25 Thread Benjamin Peterson

New submission from Benjamin Peterson :

This appears at the end of the site documentation:

XXX Update documentation XXX document python -m site –user-base –user-site

It should be remedied.

--
assignee: christian.heimes
messages: 93153
nosy: benjamin.peterson, christian.heimes
severity: normal
status: open
title: finish documentation of user local paths

___
Python tracker 

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



[issue7003] finish documentation of user local paths

2009-09-25 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
components: +Documentation

___
Python tracker 

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



[issue7001] turtle.py bug-fixes, backported from 3.1 [issue5923]

2009-09-25 Thread R. David Murray

R. David Murray  added the comment:

Gregor, just to make sure I understand, these patches need to be applied
to trunk (2.7) as well as 2.6, correct?

--
assignee:  -> r.david.murray
nosy: +r.david.murray
priority:  -> normal
stage:  -> commit review
type:  -> behavior
versions: +Python 2.7

___
Python tracker 

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