[issue6051] smtplib docs should link to email module examples

2009-05-18 Thread Thomas Guettler

New submission from Thomas Guettler :

On "smtplib example":
http://docs.python.org/library/smtplib.html#smtp-example
should be a link to:
http://docs.python.org/library/email-examples.html

I think the smtplib example is bad, since the email gets created with a
string. That's not solid. Using the email module is better.

--
assignee: georg.brandl
components: Documentation
messages: 88020
nosy: georg.brandl, guettli
severity: normal
status: open
title: smtplib docs should link to email module examples
type: feature request

___
Python tracker 

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



[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2009-05-18 Thread engelbert gruber

engelbert gruber  added the comment:

testing with 2.6 and numpy 1.3 already ::

   timedelta(seconds = int32(36)) 
   TypeError: unsupported type for timedelta seconds component: 
numpy.int32

But not if I apply a change to numpy to fix issue2263
then ``timedelta(days = int32(36))`` and ``timedelta(minutes = 
int32(36))`` result in wrong timedeltas.

--
nosy: +grubert
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



[issue3949] curses' sigwinch handler isn't visible from python

2009-05-18 Thread Shish

Shish  added the comment:

in its simplest form, this shows the bug -- signal.getsignal does not 
return the original signal handler (the "tell the app to resize itself" 
one that curses installs), and so, the original signal handler cannot 
be re-activated after being temporarily disabled

~~

import curses
import signal

curses.initscr()
old_winch = signal.getsignal(signal.SIGWINCH)
curses.endwin()
print old_winch

--

___
Python tracker 

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



[issue6052] for-loop doesn't work with -c

2009-05-18 Thread Kandalintsev Alexandre

New submission from Kandalintsev Alexandre :

Hello!

I found this problem:

$ python3 -c 'import sys; for line in sys.stdout: pass'
  File "", line 1
import sys; for line in sys.stdout: pass
  ^
SyntaxError: invalid syntax

Without import-statement this work great. Also code 'import sys; pass' 
works too.

--
components: Interpreter Core
messages: 88024
nosy: exe
severity: normal
status: open
title: for-loop doesn't work with -c
versions: Python 2.5, Python 2.6, Python 2.7, 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



[issue6053] distutils error on windows

2009-05-18 Thread Hirokazu Yamamoto

New submission from Hirokazu Yamamoto :

I found two distutils error on windows.

1. If the implementation of ensure_relative is correct, test should be
fixed like attached patch.

2. I got tar error. This happens because tar command I'm using cannot
recognize path with drive letter. For example, "tar -cf r:/foo ." fails
with error. I'm using http://gnuwin32.sourceforge.net/packages/gtar.htm

E:\python-dev\trunk\Lib\distutils\tests>py test_archive_util.py
..tar: Cannot open
c:\docume~1\whiter~1\locals~1\temp\tmprd9lcc\archive.tar: Fun
ction not implemented
tar: Error is not recoverable: exiting now
E.
==
ERROR: test_make_tarball (__main__.ArchiveUtilTestCase)
--
Traceback (most recent call last):
  File "test_archive_util.py", line 35, in test_make_tarball
make_tarball(base_name, '.')
  File "e:\python-dev\trunk\lib\distutils\archive_util.py", line 47, in
make_tar
ball
spawn(cmd, dry_run=dry_run)
  File "e:\python-dev\trunk\lib\distutils\spawn.py", line 37, in spawn
_spawn_nt(cmd, search_path, dry_run=dry_run)
  File "e:\python-dev\trunk\lib\distutils\spawn.py", line 86, in _spawn_nt
"command '%s' failed with exit status %d" % (cmd[0], rc)
DistutilsExecError: command 'tar' failed with exit status 2

--
Ran 4 tests in 0.591s

FAILED (errors=1)
[32258 refs]

--
assignee: tarek
components: Distutils
messages: 88025
nosy: ocean-city, tarek
severity: normal
status: open
title: distutils error on windows
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



[issue6053] distutils error on windows

2009-05-18 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

Here is workaround for second issue. If there is tar command for windows
which supports drive letter, I think I should use it instead of
workaround or fix, though.

--
keywords: +patch
Added file: http://bugs.python.org/file14007/workaround_tar_problem.patch

___
Python tracker 

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



[issue6053] distutils error on windows

2009-05-18 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto :


Added file: http://bugs.python.org/file14008/fix_distutils_ensure_relative.patch

___
Python tracker 

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



[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-05-18 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

I've improved the symlink support in jaraco.windows (SVN).  It now
implements the symlink check based on the technique suggested by the
MSDN docs.

I've begun to port this functionality to CPython.  I'm attaching a patch
against /branches/py3k that I believe will expose the a symlink function
on Windows systems.  I don't have an environment set up to compile
Python, so the patch hasn't even been checked for valid syntax.

I would appreciate if someone could review the patch and comment on the
technique.  I'm looking for confirmation that this is a reasonable
approach, or suggestions.

Implementing os.link will probably follow the same technique.

The implementation for ntpath.symlink will be incongruent to the posix
implementation, because it can't use lstat (which doesn't appear to
reflect the symlink flag).  Can ntpath call back into the os module
(where a islink could be defined for Windows systems)?

--
keywords: +patch
Added file: http://bugs.python.org/file14009/windows symlink draft 1.patch

___
Python tracker 

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



[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-05-18 Thread Jason R. Coombs

Changes by Jason R. Coombs :


Removed file: http://bugs.python.org/file13948/smime.p7s

___
Python tracker 

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



[issue6037] MutableSequence.__iadd__ should return self

2009-05-18 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Fixed in r72772 et al.  Thanks for the report

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



[issue3023] Problem with invalidly-encoded command-line arguments (Unix)

2009-05-18 Thread R. David Murray

R. David Murray  added the comment:

I believe the title problem is solved by PEP 383 in py3k trunk.

--
nosy: +r.david.murray
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> pending

___
Python tracker 

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



[issue6054] tarfile normalizes arcname

2009-05-18 Thread mkv

New submission from mkv :

When creating tar archives using the tarfile module, requested arc names
are not respected. 

It is currently impossible to create a tar which when listing contents
would give:
$tar tvf test.tar
./
./control
./prerm
./postinst

The actual result will be
$tar tvf test.tar
./
control
prerm
postinst

This is caused by TarInfo's tobuf method calling normpath() on all file
names, even when the user has explicitly specified a certain name.

--
components: Library (Lib)
messages: 88033
nosy: mkv
severity: normal
status: open
title: tarfile normalizes arcname
type: behavior
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



[issue2263] struct.pack() + numpy int raises SystemError

2009-05-18 Thread engelbert gruber

engelbert gruber  added the comment:

issue5476 has a problem with timedelta(microseconds = int32(36))

interestingly 0 to 35 work , if the patch for this issue2263 is applied.

--

___
Python tracker 

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



[issue6052] for-loop doesn't work with -c

2009-05-18 Thread R. David Murray

R. David Murray  added the comment:

The error message is correct: your example is invalid python code.  Try
it in a file and you will get the same error message.  Check the
documentation of the '-c' option to learn how to correctly code your
example.

--
nosy: +r.david.murray
resolution:  -> invalid
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



[issue5337] Scanner class in re module undocumented

2009-05-18 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

This is very old code, without a mature API.  Will take a look at
competing recipes to see if this is still the best way of doing this. 
Maybe it should return a generator instead of a list.  Perhaps there
should be some checking for re's that don't combine well.  Also, would
like to see it exercised on a number of common parsing tasks to see how
well it holds up.  Better to do this work than to expose what is there
now and get hit with bug reports, feature requests, deprecations, and
cases where is it almost the right tool for the job.

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

___
Python tracker 

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



[issue6055] References to "pysqlite" in documentation of sqlite3 should be changed.

2009-05-18 Thread Mitchell Model

New submission from Mitchell Model :

Why are there references to "pysqlite" in the documentation and examples
for the sqlite3 module. Was sqlite3 derived from the earlier pysqlite
module? Seems to me that all the references to "pysqlite" should read
"sqlite3", except maybe in a reworded attribution to the developer.

--
assignee: georg.brandl
components: Documentation
messages: 88037
nosy: MLModel, georg.brandl
severity: normal
status: open
title: References to "pysqlite" in documentation of sqlite3 should be changed.
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1

___
Python tracker 

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



[issue5219] IDLE/Tkinter: edit win stops updating when tooltip is active

2009-05-18 Thread Kurt B. Kaiser

Kurt B. Kaiser  added the comment:

Not issue 1529353.  Edit window stops updating after about 60 
keystrokes when a tooltip window is active.

1. Strings not necessary.  Only occurs when a tooltip is active.  For 
example, if rz is undefined, entering rz( followed by a long key 
sequence won't raise the bug.

2. When the tooltip window closes, the hidden keystrokes appear.  This 
can be triggered by moving the edit window or clicking somewhere. Once 
the tooltip window has closed, things act normally again.

3. Remarkably, one can autorepeat, say, five lines of 'i' with no 
problem.  Then enter another 50 - 60 'i' individually, and the bug 
exhibits.  I thought that typematic processing took place at the 
keyboard driver level, so that Tk would get passed the equivalent of 
single keystrokes.

This bug would be annnoying when entering long parameter tuples, e.g. 
when doing GUI coding.

I'm running Tk 8.5 on WinXP at the moment.   I'm guessing that this is 
a Tk bug.

--
assignee:  -> kbk
components: +Tkinter
nosy: +kbk
priority: normal -> high
stage:  -> needs patch
status: pending -> open
title: IDLE: slowness, pauses enter long strings -> IDLE/Tkinter: edit win 
stops updating when tooltip is active
type: performance -> 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



[issue920573] http libraries throw errors internally in BitTorrent

2009-05-18 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

It looks like both pieces of offending code were changed long ago.  No
new bug reports have surfaced since then.

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



[issue966625] Documentation for Descriptors in the main docs

2009-05-18 Thread Raymond Hettinger

Changes by Raymond Hettinger :


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



[issue6056] socket.setdefaulttimeout affecting multiprocessing Manager

2009-05-18 Thread Ryan Leslie

New submission from Ryan Leslie :

Terminal 1:
Python 2.6.1 (r261:67515, Apr  2 2009, 18:25:55)
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from multiprocessing.managers import SyncManager
>>> manager = SyncManager(authkey="mykey")
>>> manager.start()
>>> queue = manager.Queue()
>>> import pickle
>>> pickle.dump(queue, open("myqueue.pkl", "w"))
>>>

Terminal 2:
Python 2.6.1 (r261:67515, Apr  2 2009, 18:25:55)
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.setdefaulttimeout(30)
>>> import multiprocessing, pickle
>>> multiprocessing.current_process().authkey = "mykey"
>>> queue = pickle.load(open("myqueue.pkl"))
Traceback (most recent call last):
  File "", line 1, in 
  File "python2.6/pickle.py", line 1370, in load
return Unpickler(file).load()
  File "python2.6/pickle.py", line 858, in load
dispatch[key](self)
  File "python2.6/pickle.py", line 1133, in load_reduce
value = func(*args)
  File "python2.6/multiprocessing/managers.py", line 845, in RebuildProxy
return func(token, serializer, incref=incref, **kwds)
  File "python2.6/multiprocessing/managers.py", line 894, in AutoProxy
incref=incref)
  File "python2.6/multiprocessing/managers.py", line 700, in __init__
self._incref()
  File "python2.6/multiprocessing/managers.py", line 749, in _incref
conn = self._Client(self._token.address, authkey=self._authkey)
  File "python2.6/multiprocessing/connection.py", line 140, in Client
answer_challenge(c, authkey)
  File "python2.6/multiprocessing/connection.py", line 376, in
answer_challenge
response = connection.recv_bytes(256)# reject large message
IOError: [Errno 11] Resource temporarily unavailable
>>> 

This works as expected without socket.setdefaulttimeout(). However, the
timeout is useful since if the listening process on terminal 1 goes to
sleep, e.g. ^Z, it would avoid blocking.

I suspect the cause is similar to http://bugs.python.org/issue976613

--
components: Library (Lib)
messages: 88040
nosy: ryles
severity: normal
status: open
title: socket.setdefaulttimeout affecting multiprocessing Manager
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



[issue5219] IDLE/Tkinter: edit win stops updating when tooltip is active

2009-05-18 Thread Kurt B. Kaiser

Kurt B. Kaiser  added the comment:

As a workaround, if you need the tooltip, select Edit / Show Calltip 
from the menu or use the hotkey to 'reopen' the tooltip.  That will get 
you another 60 characters.  Otherwise, just hit esc to close the 
tooltip and your keystrokes will appear.

--

___
Python tracker 

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



[issue3023] Problem with invalidly-encoded command-line arguments (Unix)

2009-05-18 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
status: pending -> closed

___
Python tracker 

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



[issue6056] socket.setdefaulttimeout affecting multiprocessing Manager

2009-05-18 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
assignee:  -> jnoller
nosy: +jnoller

___
Python tracker 

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



[issue1689458] pdb unable to jump to first statement

2009-05-18 Thread Jeffrey Yasskin

Jeffrey Yasskin  added the comment:

The attached patch fixes this problem and adds a test. I'll wait a day
for any comments before committing it. Review at
http://codereview.appspot.com/67063.

--
keywords: +needs review, patch
nosy: +jyasskin
stage: test needed -> patch review
versions: +Python 2.7 -Python 2.6
Added file: http://bugs.python.org/file14010/jump_to_firstlineno.patch

___
Python tracker 

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



[issue6055] References to "pysqlite" in documentation of sqlite3 should be changed.

2009-05-18 Thread Mitchell Model

Mitchell Model  added the comment:

I see that the _sqlite .h and .c files, and the sqlite3/dbapi2.py file,
all use "pysqlite" instead of "sqlite3" internally. Should that be
changed too, or is there just no point? My main concern is that people
relatively new to Python who wouldn't be aware of the long history some
modules have and their migration from external packages into the
distribution (often with a name change) will be confused by mentions of
pysqlite in the documentation.

--

___
Python tracker 

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



[issue6057] sqlite3 error classes should be documented

2009-05-18 Thread Mitchell Model

New submission from Mitchell Model :

I can't find any documentation of the exception classes defined in the
sqlite3 module. There are quite a few, and some inheritance. The
examples in the sqlite3 module documentation have a few exception
clauses, but the errors they catch are not explained.

I would expect every module that defines exception classes to document
them, including inheritance. For a module like sqlite3 it is
particularly important because it is just an interface to C code.
Expecting someone to figure out exception classes from a module's Python
code is one thing, but asking them to go into the C code, which they
might not even have, is another.

--
assignee: georg.brandl
components: Documentation
messages: 88044
nosy: MLModel, georg.brandl
severity: normal
status: open
title: sqlite3 error classes should be documented
versions: Python 2.6, Python 2.7, 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



[issue6056] socket.setdefaulttimeout affecting multiprocessing Manager

2009-05-18 Thread Jesse Noller

Jesse Noller  added the comment:

Pickling the queue and then unpickling it in a new process is something I 
never thought of. That's interesting in and of itself ;)

--

___
Python tracker 

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



[issue2281] Enhanced cPython profiler with high-resolution timer

2009-05-18 Thread Jean Brouwers

Jean Brouwers  added the comment:

Both the hires_lsprof4.tgz and hpTime.c files have been updated with a 
change in the PowerPC asm code.

The previous implementation used a loop: label and that may cause 
duplicate symbols when compiled at optimization levels of -O3 and above 
with older GNU C compilers.

--
Added file: http://bugs.python.org/file14011/hires_lsprof4.tgz

___
Python tracker 

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



[issue2281] Enhanced cPython profiler with high-resolution timer

2009-05-18 Thread Jean Brouwers

Jean Brouwers  added the comment:

Another test build and result has been added to the hpTime.c comment.

--
Added file: http://bugs.python.org/file14012/hpTime.c

___
Python tracker 

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



[issue2281] Enhanced cPython profiler with high-resolution timer

2009-05-18 Thread Jean Brouwers

Changes by Jean Brouwers :


Removed file: http://bugs.python.org/file14004/hires_lsprof4.tgz

___
Python tracker 

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



[issue2281] Enhanced cPython profiler with high-resolution timer

2009-05-18 Thread Jean Brouwers

Changes by Jean Brouwers :


Removed file: http://bugs.python.org/file14006/hpTime.c

___
Python tracker 

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



[issue6032] Fix refleaks in test_urllib2_localnet

2009-05-18 Thread Collin Winter

Collin Winter  added the comment:

Daniel, did you have any comments on this patch? If not, I'll go ahead
and commit it and close both of these issues.

--

___
Python tracker 

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



[issue6002] test_urllib2_localnet DigestAuthHandler leaks nonces

2009-05-18 Thread Collin Winter

Collin Winter  added the comment:

I've posted a patch in issue 6032 (didn't see this one); I'd be
interested in any comments on the approach taken there.

--
nosy: +collinwinter

___
Python tracker 

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



[issue6032] Fix refleaks in test_urllib2_localnet

2009-05-18 Thread Daniel Diniz

Daniel Diniz  added the comment:

LGTM :)

This part changes the output in verbose mode, not sure it's necessary
(but not a real problem either):

-test_support.run_unittest(ProxyAuthTests)
-test_support.run_unittest(TestUrlopen)
+test_support.run_unittest(ProxyAuthTests, TestUrlopen)

--

___
Python tracker 

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



[issue3541] bsddb memory leak on ubuntu

2009-05-18 Thread Daniel Diniz

Daniel Diniz  added the comment:

I can confirm it in trunk and release26-maint on Ubuntu 8.04.

For trunk:
bsddb.__version__ : '4.7.3'
libdb4.6-dev: 4.6.21-6ubuntu1
_bsddb.version(): (4, 6, 21)
bsddb._bsddb.cvsid: '$Id: _bsddb.c 66568 2008-09-23 18:54:08Z jesus.cea $'

--
resolution: out of date -> 
status: closed -> open
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



[issue5964] WeakSet cmp methods

2009-05-18 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
resolution: accepted -> fixed

___
Python tracker 

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



[issue6002] test_urllib2_localnet DigestAuthHandler leaks nonces

2009-05-18 Thread Collin Winter

Collin Winter  added the comment:

Daniel Diniz reviewed in the other issue.

Fixed in r72777 (trunk), r72778 (py3k).

--
assignee:  -> collinwinter
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



[issue6032] Fix refleaks in test_urllib2_localnet

2009-05-18 Thread Collin Winter

Collin Winter  added the comment:

Applied as r72777 (trunk), r72778 (py3k).

--
assignee:  -> collinwinter
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



[issue1983] Return from fork() is pid_t, not int

2009-05-18 Thread Ryan Stutsman

Ryan Stutsman  added the comment:

No, I don't think this is actually fixed in any version of Python at the
moment.  The title may be a bit misleading, because all the versions now
store the result of fork in a pid_t and return it as a PyLong.  However,
posix_waitpid is still pulling pid's as a PyInt.  Changing this to
PyLong would probably work for our purposes, but I guess the hangup was
that in reality pid_t is supposed to be an opaque datatype and
implementing it in CPython is non-trivial and has little benefit.

Perhaps we close this as won't fix or I can create a patch to at least
give a hack for 64-bit pid's but still treated as a long.

--
nosy: +rstutsman

___
Python tracker 

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



[issue6058] Add cp65001 to encodings/aliases.py

2009-05-18 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue6059] uuid.uuid4 cause segfault in emesene

2009-05-18 Thread Yu Yuwei

New submission from Yu Yuwei :

I'm on Gentoo Linux with glibc-2.9_20081201-r2, python-2.6.2,
e2fsprogs-libs-1.41.3-r1
When Emesene send offline message to another msn user, it call uuid4()
in uuid module in python, which call get_random_fd()
in gen_uuid.c(e2fsprogs-libs).
After this, the program got signal SIGSEGV.

When I used gdb attach to the python process, I got these:
##
(gdb) c
Continuing.
[New Thread 0xb1c09b90 (LWP 6445)]
[Thread 0xb1c09b90 (LWP 6445) exited]
[New Thread 0xb1c09b90 (LWP 6446)]
[New Thread 0xb118cb90 (LWP 6447)]
[New Thread 0xb098bb90 (LWP 6448)]
[New Thread 0xb018ab90 (LWP 6449)]
[Thread 0xb018ab90 (LWP 6449) exited]
[Thread 0xb098bb90 (LWP 6448) exited]
[Thread 0xb1c09b90 (LWP 6446) exited]
[Thread 0xb118cb90 (LWP 6447) exited]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7d126c0 (LWP 6423)]
0xb6f0745e in get_random_fd () at gen_uuid.c:153
153 gen_uuid.c: No such file or directory.
in gen_uuid.c


(gdb) bt
#0 0xb6f0745e in get_random_fd () at gen_uuid.c:153
#1 0xb6f07509 in get_random_bytes (buf=0xbfe3fc70, nbytes=16)
at gen_uuid.c:172
#2 0xb6f086ee in uuid__generate_random (out=0x9f62fc8 "", num=0xbfe3fcb4)
at gen_uuid.c:591
#3 0xb6f08780 in uuid_generate_random (out=0x9f62fc8 "") at
gen_uuid.c:607
#4 0xb666e3db in ffi_call_SYSV ()
from /usr/lib/python2.6/lib-dynload/_ctypes.so
#5 0xb666e159 in ffi_call () from
/usr/lib/python2.6/lib-dynload/_ctypes.so
#6 0xb6668ebb in _CallProc () from
/usr/lib/python2.6/lib-dynload/_ctypes.so
#7 0xb66620eb in ?? () from /usr/lib/python2.6/lib-dynload/_ctypes.so
#8 0xb6f08755 in uuid__generate_random (out=0x9f4950c "\005",
num=0xa7fdb2c)
at gen_uuid.c:600
#9 0xb7ed0dba in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#10 0xb7f679b0 in PyEval_EvalFrameEx () from /usr/lib/libpython2.6.so.1.0
#11 0xb7f6ae49 in PyEval_EvalFrameEx () from /usr/lib/libpython2.6.so.1.0
#12 0xb7f6ae49 in PyEval_EvalFrameEx () from /usr/lib/libpython2.6.so.1.0
#13 0xb7f6b72e in PyEval_EvalCodeEx () from /usr/lib/libpython2.6.so.1.0
#14 0xb7efb774 in ?? () from /usr/lib/libpython2.6.so.1.0
#15 0x0a23ce30 in ?? ()
#16 0x0a14d02c in ?? ()
#17 0x in ?? ()
###

the line 153 in get_uuid.c is
" jrand_seed[0] = getpid() ^ (tv.tv_sec & 0x);"
so in gdb I type:
(gdb) p jrand_seed[0]
Cannot access memory at address 0x30
###

So this cause the segfault. But I don't know why.
May be related to the THREAD_LOCAL keywords :

#if defined(__linux__) && defined(__NR_gettid) && defined(HAVE_JRAND48)
#define DO_JRAND_MIX
THREAD_LOCAL unsigned short jrand_seed[3];
#endif

I try emesene with another gentoo box with same glibc and same
e2fsprogs-libs, but with python-2.5, everything is fine.

So this seems a bug in python-2.6.

--
messages: 88061
nosy: acevery
severity: normal
status: open
title: uuid.uuid4 cause segfault in emesene
type: crash
versions: Python 2.6

___
Python tracker 

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



[issue1722344] Thread shutdown exception in Thread.notify()

2009-05-18 Thread Aren Olson

Changes by Aren Olson :


--
nosy: +reacocard

___
Python tracker 

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



[issue5219] IDLE/Tkinter: edit win stops updating when tooltip is active

2009-05-18 Thread Kurt B. Kaiser

Kurt B. Kaiser  added the comment:

Occurs with and w/o the subprocess, but sooner (fewer char) with the 
subprocess.

If the MultiCall wrapper on the EditorWindow Text widget is disabled, 
the bug disappears.

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

___
Python tracker 

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



[issue5219] IDLE/Tkinter: edit win stops updating when tooltip is active

2009-05-18 Thread Kurt B. Kaiser

Kurt B. Kaiser  added the comment:

Bug exhibits on Linux with Tk 8.4, but requires a couple hundred 
characters to show up.  Also goes away if MultiCall is disabled.

--

___
Python tracker 

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



[issue6056] socket.setdefaulttimeout affecting multiprocessing Manager

2009-05-18 Thread Ryan Leslie

Ryan Leslie  added the comment:

Yeah, storing pickled queues in the file system makes for some easy IPC
:) It wasn't a very original idea, I took the pickling comments in the
documentation at face value:
http://docs.python.org/library/multiprocessing.html#proxy-objects

So, from what I can tell this issue is related to the mixing of standard
python socket I/O with multiprocessing socket I/O, with state not being
carried from the former to the latter.

In multiprocessing/connection.py, SocketClient() creates a familiar
python socket object which, when a default timeout has been set in the
module, will be made non-blocking. In addition, the timeout is
remembered in the socket object, and when calling socket.recv(), the
function internal_select() will use this to perform the expected poll()
or select().

However, after a connection is established, SocketClient() will not use
python's socket implementation any further, and instead pass its
low-level socket descriptor to a multiprocessing Connection object. This
object has its own specialized socket I/O implementation, which is not
at all aware of the timeout previously associated with the socket. As a
result no select/poll occurs and, due to the socket's non-blocking
status, recv() may return EAGAIN immediately. I suspect this is what's
happening.

There might be a number of ways to make SocketClient() more timeout
friendly, but possibility could be to simply check if the python socket
has a timeout associated, and if so, use connection.poll() in addition
to connection.recv(). There may be other places in the code where
similar changes would occur.

You obviously have more experience with this code base so I'll be
curious to see the outcome.

--
type:  -> behavior

___
Python tracker 

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



[issue858809] Use directories from configure rather than hardcoded

2009-05-18 Thread soundmurderer

soundmurderer  added the comment:

OK, I am now convinced that even with this patch, the Python build
process still won't work correctly because --libdir (post-patch) will
not correctly set the default PYTHONHOME.  Moreover, the very way that
PYTHONHOME gets used needs to change.  PYTHONHOME specifies "prefix"
and/or "exec_prefix", but the problem is that to find the lib dir,
Python tacks "lib/pythonX.X" onto the ends of these paths!  More info here:

http://docs.python.org/using/unix.html#python-related-paths-and-files
http://docs.python.org/using/cmdline.html#envvar-PYTHONHOME

So, even with this patch, I still can't install, for example, to:
/home/soundmurderer/lib/x86_64/python2.6

I am forced to install to a location that ends with "lib/python2.6", e.g.:

/home/soundmurderer/x86_64/lib/python2.6

or else hack some stuff together with symlinks to make PYTHONHOME go to
the right place.

This seems to be a problem more fundamental than just incomplete
"./configure" in the build process and I think it warrants another
ticket, which I'm about to open.

Now, in regards to --libdir, even though the patch makes the
installation put the files in the expected location, Python will
probably not find it.

--

___
Python tracker 

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



[issue6060] PYTHONHOME should be more flexible (and controllable by --libdir)

2009-05-18 Thread soundmurderer

New submission from soundmurderer :

The PYTHONHOME variable does not allow complete control over making a
Python installation find its own libs because "lib/pythonX.Y" gets
appended to it, see:
http://docs.python.org/using/cmdline.html#envvar-PYTHONHOME

For example, let's say my Python installation is here:
/home/soundmurderer/lib/x86_64/python2.6

I cannot set PYTHONHOME to point to this, because my path does not end
in "lib/pythonX.Y".  Of course, you could say that I should just move
the Python libs, but it may create inconsistencies on how stuff is
organized on some systems.  PYTHONHOME should point to the Python
installation root, period.  Please give the admin complete control.

Also, the --libdir flag to ./configure should work and set PYTHONHOME
correctly.  The fact that it does nothing has its own ticket, see:
http://bugs.python.org/issue858809

It is, however, my humble opinion that fixing that other ticket properly
also necessitates fixing how PYTHONHOME works (because --libdir should
set the default PYTHONHOME during build/install), so they should really
be one issue.

Thanks!

--
components: Build, Installation
messages: 88066
nosy: soundmurderer
severity: normal
status: open
title: PYTHONHOME should be more flexible (and controllable by --libdir)
type: feature request
versions: Python 2.5, Python 2.6

___
Python tracker 

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



[issue858809] Use directories from configure rather than hardcoded

2009-05-18 Thread soundmurderer

soundmurderer  added the comment:

OK done, opened a feature request for this pet peeve of mine. ;-)  Maybe
someday I'll complain about something substantial...

See: http://bugs.python.org/issue6060

--

___
Python tracker 

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



[issue1309352] Make fcntl work properly on AMD64

2009-05-18 Thread R. David Murray

R. David Murray  added the comment:

@AP: ran patched test on Freebsd (6.2) as requested.  Result is:

test_fcntl_64_bit (test.test_fcntl.TestFcntl) ... skipped 'F_NOTIFY or
DN_MULTISHOT unavailable'

--
nosy: +r.david.murray

___
Python tracker 

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



[issue6061] time.clock(): overflow in programs that run for very long

2009-05-18 Thread Thomas Reiter

New submission from Thomas Reiter :

On a 64-bit Linux machine the attached program generates the following
(shortened) output:

$ python bug.py
...
after 2145.49s: 
after 2145.82s: 
after 2146.14s: 
after 2146.47s: 
after 2146.80s: 
after 2147.13s: 
after 2147.45s: 
after -2147.19s: 
Here's your bug

-
$ uname -a
Linux  2.6.18-92.1.22.el5 #1 SMP Tue Dec 16 06:45:03 EST 2008 x86_64
x86_64 x86_64 GNU/Linux

$ python -V
Python 2.6

--
components: Library (Lib)
files: bug.py
messages: 88069
nosy: tom65536
severity: normal
status: open
title: time.clock(): overflow in programs that run for very long
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file14015/bug.py

___
Python tracker 

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



[issue6061] time.clock(): overflow in programs that run for very long

2009-05-18 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

time.clock() is a simple wrapper around the C stdlib clock() function.
As the clock() man page says:

« Note that the time can wrap around.  On a 32-bit system where
CLOCKS_PER_SEC equals 100 this function will return the same value
approximately every 72 minutes. »

Is it a 32-bit or 64-bit Python build? (you might have a 32-bit build on
a 64-bit system)
If it is a 64-bit build, what are sizeof(clock_t) and CLOCKS_PER_SEC on
a your system? You can compile the following small C program to get the
answer.

#include 
#include 

int main(int argc, char **argv)
{
printf("sizeof(clock_t)=%d, CLOCKS_PER_SEC=%d\n",
   sizeof(clock_t), CLOCKS_PER_SEC);
return 0;
}

--
nosy: +pitrou

___
Python tracker 

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