[issue10932] distutils.core.setup - data_files misbehaviour ?

2011-04-23 Thread Prashant Kumar

Prashant Kumar  added the comment:

Certainly, a test is needed to check that ('config', ['cfg/data.cfg']) would 
create a file in config/data.cfg and not config/cfg/data.cfg.

Though, I've added a patch 'test_command_sdist.diff' for the changes made in 
'patch.diff'.

--
Added file: http://bugs.python.org/file21761/test_command_sdist.diff

___
Python tracker 

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



[issue11911] Interlink Python versions docs

2011-04-23 Thread anatoly techtonik

New submission from anatoly techtonik :

I want to be able to jump from latest Python 2 docs to the same page in stable 
Python 3 doc in one click. E.g. from http://docs.python.org/library/string.html 
to http://docs.python.org/py3k/library/strings.html

--
assignee: docs@python
components: Documentation
messages: 134296
nosy: docs@python, techtonik
priority: normal
severity: normal
status: open
title: Interlink Python versions docs
versions: Python 2.7, Python 3.2

___
Python tracker 

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



[issue11911] Interlink Python versions docs

2011-04-23 Thread anatoly techtonik

anatoly techtonik  added the comment:

sorry, to http://docs.python.org/py3k/library/string.html

--

___
Python tracker 

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



[issue11907] SysLogHandler can't send long messages

2011-04-23 Thread Vinay Sajip

Changes by Vinay Sajip :


--
assignee:  -> vinay.sajip
nosy: +vinay.sajip
versions: +Python 3.2, Python 3.3

___
Python tracker 

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



[issue11907] SysLogHandler can't send long messages

2011-04-23 Thread Vinay Sajip

Vinay Sajip  added the comment:

The entire part of emit() which sends to the socket is wrapped in an except: 
which should catch all except KeyboardInterrupt and SystemExit. The except 
clause calls the handleError method of the handler. See

http://hg.python.org/cpython/file/fa277cbd66bb/Lib/logging/handlers.py#l804

So I can't see exactly what's happening, and moreover I can't reproduce this on 
Linux even when sending messages of > 16384 on the Unix socket. I don't have 
access to a FreeBSD system.

Can you do a little more investigation, since I'm not sure what your source 
says? (The line nos. don't seem to match up exactly - in Mercurial, line 808 is 
an except socket.error clause).

--
components: +Library (Lib)
status: open -> pending
type: crash -> behavior
versions:  -Python 3.2, Python 3.3

___
Python tracker 

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



[issue11899] TarFile.gettarinfo modifies self.inodes

2011-04-23 Thread Michael Gold

Michael Gold  added the comment:

No, I don't have a working implementation.  (I basically reimplemented 
TarFile.inodes to work around this; I was using TarFile.dereference, so I 
already had to do the hard-linking manually.)

--
nosy: +mgold

___
Python tracker 

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



[issue11911] Interlink Python versions docs

2011-04-23 Thread Ezio Melotti

Ezio Melotti  added the comment:

This is a duplicated of #8040.

--
nosy: +ezio.melotti
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> It would be nice if documentation pages linked to other 
versions of the same document

___
Python tracker 

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



[issue11879] TarFile.chown: should use TarInfo.uid if user lookup fails

2011-04-23 Thread Michael Gold

Michael Gold  added the comment:

The tests passed on Linux (with Python 3.2 under fakeroot):
Ran 240 tests in 9.613s
OK

But I don't see any tests that check the uid/gid of extracted files.

--
nosy: +mgold

___
Python tracker 

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



[issue11889] 'enumerate' 'start' parameter documentation is confusing

2011-04-23 Thread Éric Araujo

Éric Araujo  added the comment:

+1 to what David says.

Terry’s patch is a good starting point; I think Raymond will commit something 
along its lines.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue11884] Argparse calls ngettext but doesn't import it

2011-04-23 Thread Éric Araujo

Éric Araujo  added the comment:

Confirmed.  It’s a Debian-specific problem, please use “reportbug python3.2” to 
report it to them.

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



[issue11382] some posix module functions unnecessarily release the GIL

2011-04-23 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset eb7297fd5840 by Antoine Pitrou in branch 'default':
Issue #11382: Trivial system calls, such as dup() or pipe(), needn't
http://hg.python.org/cpython/rev/eb7297fd5840

--
nosy: +python-dev

___
Python tracker 

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



[issue11382] some posix module functions unnecessarily release the GIL

2011-04-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Sorry for the delay, I had forgotten about this issue. Thank you for the patch!

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



[issue444582] Finding programs in PATH, adding shutil.which

2011-04-23 Thread Éric Araujo

Éric Araujo  added the comment:

Can someone remove obsolete files from the file list and post an up-to-date 
patch?

--
keywords:  -easy

___
Python tracker 

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



[issue482531] python directory not added to PATH

2011-04-23 Thread Éric Araujo

Changes by Éric Araujo :


--
superseder:  -> Windows installer should add Python and Scripts directories to 
the PATH environment variable

___
Python tracker 

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



[issue9325] Add an option to pdb/trace/profile to run library module as a script

2011-04-23 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue10154] locale.normalize strips "-" from UTF-8, which fails on Mac

2011-04-23 Thread Éric Araujo

Changes by Éric Araujo :


--
stage:  -> needs patch
title: locale.normalize strips "-" from UTF-8,  which fails on Mac -> 
locale.normalize strips "-" from UTF-8, which fails on Mac
versions: +Python 3.3 -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



[issue9228] Make changes in the PATH and PATHEXT on installation

2011-04-23 Thread Éric Araujo

Éric Araujo  added the comment:

This is rejected every few months by Martin.

--
nosy: +eric.araujo
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> Windows installer should add Python and Scripts directories to 
the PATH environment variable
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



[issue11340] test_distutils fails because of borked compress program

2011-04-23 Thread Éric Araujo

Éric Araujo  added the comment:

Okay.  It’s not a very beautiful check, but it will do.  Do you want to make a 
patch to disable compress if it’s a fake compress program?

--

___
Python tracker 

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



[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-04-23 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 19d9f0a177de by Antoine Pitrou in branch 'default':
Issue #11258: Speed up ctypes.util.find_library() under Linux by a factor
http://hg.python.org/cpython/rev/19d9f0a177de

--
nosy: +python-dev

___
Python tracker 

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



[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-04-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I committed a modified patch. Hopefully the buildbots won't break this time :)

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



[issue11889] 'enumerate' 'start' parameter documentation is confusing

2011-04-23 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I've got it from here.  Thanks.

--

___
Python tracker 

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



[issue11907] SysLogHandler can't send long messages

2011-04-23 Thread Lukáš Lalinský

Lukáš Lalinský  added the comment:

It seems that I was wrong, the exception is indeed not propagated to the 
application, but handled by the handleError() method. I was confused by seeing 
the traceback in my uWSGI log file.

I'm unable to find a way to determine the maximum allowed syslog message size, 
otherwise the proper behavior would be probably to truncate the message. 
Specifically on FreeBSD, the clib source code seems to be using a buffer with 
2048 bytes for the whole syslog line and 1024 bytes for the message formatting, 
so they are just arbitrary numbers. :(

There probably isn't a way to solve this cleanly. Truncating the message would 
be much preferable to dropping it, but I really don't know what would be the 
right size. 

I'll write a LocalSysLogHandler for me that uses the syslog module.

Regarding the line numbers, this is the version corresponding to the 2.7.1 
release - 
http://hg.python.org/cpython/file/5395f96588d4/Lib/logging/handlers.py#l808

--
status: pending -> open

___
Python tracker 

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



[issue11907] SysLogHandler can't send long messages

2011-04-23 Thread Vinay Sajip

Vinay Sajip  added the comment:

I've managed to get access to a FreeBSD system and done some investigation. The 
system is working as designed, and the error message is being printed by the 
handleError() method of the handler. To handle the exception differently, you 
either set logging.raiseExceptions to False (which will cause logging to 
swallow the exception) or you need to implement your own handler which takes 
appropriate action (e.g truncates the message).

Closing as invalid.

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



[issue11912] Python shouldn't use the mprotect() system call

2011-04-23 Thread Nils Breunese

New submission from Nils Breunese :

When I try to run iotop [0] on CentOS 5.6 on a kernel with grsecurity [1] then 
iotop won't start because grsecurity is blocking Python because of its use of 
the mprotect() system call.

Please see 
http://www.atomicorp.com/wiki/index.php/ASL_FAQ#grsec:_denied_RWX_mprotect for 
more information. The authors of this hardened Linux kernel suggested to file a 
bug with Python because using mprotect() is apparently a very bad thing to do.

[0] http://guichaz.free.fr/iotop/
[1] http://grsecurity.net/

--
messages: 134314
nosy: breun
priority: normal
severity: normal
status: open
title: Python shouldn't use the mprotect() system call
type: security
versions: 3rd party

___
Python tracker 

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



[issue11912] Python shouldn't use the mprotect() system call

2011-04-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Where have you seen that Python is calling mprotect()? There's no sign of it in 
the whole source tree.

--
nosy: +neologix, pitrou

___
Python tracker 

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



[issue11912] Python shouldn't use the mprotect() system call

2011-04-23 Thread Nils Breunese

Nils Breunese  added the comment:

I got this error message in /var/log/messages when trying to start iotop:


Apr 13 08:49:37 hostname kernel: grsec: From xxx.xxx.xxx.xxx: denied RWX 
mprotect of /lib64/ld-2.5.so by /usr/bin/iotop[iotop:9836] uid/euid:0/0 
gid/egid:0/0, parent /bin/bash[bash:9351] uid/euid:0/0 gid/egid:0/0
Apr 13 08:49:37 hostname kernel: iotop[9836]: segfault at 6248c405dda0 ip 
6248c3e489ec sp 7fffa52e8410 error 7 in ld-2.5.so[6248c3e42000+1c000]


/usr/bin/iotop is a Python script and according to that log message grsecurity 
detected a call to mprotect().

--

___
Python tracker 

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



[issue11912] Python shouldn't use the mprotect() system call

2011-04-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> /usr/bin/iotop is a Python script and according to that log message
> grsecurity detected a call to mprotect().

Well, does Python itself run ok? That Python script could use
third-party extension modules which issue the offending mprotect() call.

--

___
Python tracker 

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



[issue11912] Python shouldn't use the mprotect() system call

2011-04-23 Thread Nils Breunese

Nils Breunese  added the comment:

I haven't had any problems with other Python applications like this, Python 
seems fine otherwise.

I just noticed that iotop has a dependency on python-ctypes, which sounds like 
it could be iotop doing the mprotect() calls via ctypes. Does that make sense?

--

___
Python tracker 

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



[issue4608] urllib.request.urlopen does not return an iterable object

2011-04-23 Thread Rafael Zanella

Rafael Zanella  added the comment:

The patch that makes addinfourl() iterable was not commited due to the change 
to HTTP request see: msg86365 (http://bugs.python.org/issue4608#msg86365).

Since urllib is protocol agnostic it should behave the same with FTP, right?

So, where to fix? Change the addinfourl() to become itrable or change the 
FTPHandler return?

--
nosy: +zanella

___
Python tracker 

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



[issue11912] Python shouldn't use the mprotect() system call

2011-04-23 Thread Andreas Stührk

Andreas Stührk  added the comment:

glibc's `dlopen()` can call `mprotect()`, which is used for loading C 
extensions.

--
nosy: +Trundle

___
Python tracker 

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



[issue6780] startswith error message is incomplete

2011-04-23 Thread Ezio Melotti

Ezio Melotti  added the comment:

Attached an updated patch for 2.7 with tests that check that UnicodeErrors are 
still raised and that the error message mentions 'str', 'unicode' and 'tuple'.

--
Added file: http://bugs.python.org/file21762/issue6780-2.diff

___
Python tracker 

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



[issue11913] sdist should allow for README.rst

2011-04-23 Thread Ingy dot Net

New submission from Ingy dot Net :

When I upload modules to PyPI, distutils is clucking about a missing README, 
even though PyPI accepts README.rst, and I am providing that.

Registering pyplay to http://pypi.python.org/pypi
Server response (200): OK
python setup.py sdist upload
running sdist
warning: sdist: standard file not found: should have one of README, README.txt

--
assignee: tarek
components: Distutils
messages: 134322
nosy: eric.araujo, ingy, tarek
priority: normal
severity: normal
status: open
title: sdist should allow for README.rst
type: behavior

___
Python tracker 

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



[issue11914] pydoc modules/help('modules') crash in dirs with unreadable subdirs

2011-04-23 Thread Ben Okopnik

New submission from Ben Okopnik :

Long-standing problem (happens in every Python version I've tested). The usual 
situation is when invoking Python (and then "help('modules')") or "pydoc 
modules" in /tmp, but also happens when located anywhere with unreadable 
subdirs:

ben@Jotunheim:~$ mkdir /tmp/foo; cd /tmp/foo
ben@Jotunheim:/tmp/foo$ mkdir bar; sudo chmod 000 bar
[sudo] password for ben: 
ben@Jotunheim:/tmp/foo$ pydoc modules

Please wait a moment while I gather a list of all available modules...

Traceback (most recent call last):
  File "/usr/bin/pydoc2.6", line 5, in 
pydoc.cli()
  File "/usr/lib/python2.6/pydoc.py", line 2309, in cli
help.help(arg)
  File "/usr/lib/python2.6/pydoc.py", line 1765, in help
elif request == 'modules': self.listmodules()
  File "/usr/lib/python2.6/pydoc.py", line 1886, in listmodules
ModuleScanner().run(callback, onerror=onerror)
  File "/usr/lib/python2.6/pydoc.py", line 1937, in run
for importer, modname, ispkg in pkgutil.walk_packages(onerror=onerror):
  File "/usr/lib/python2.6/pkgutil.py", line 105, in walk_packages
for importer, name, ispkg in iter_modules(path, prefix):
  File "/usr/lib/python2.6/pkgutil.py", line 147, in iter_modules
for name, ispkg in iter_importer_modules(i, prefix):
  File "/usr/lib/python2.6/pkgutil.py", line 211, in iter_modules
for fn in os.listdir(path):
OSError: [Errno 13] Permission denied: './bar'

Proposed patch:

Seems like an easy fix. In Python 3.1.2, change line 206 in 
/usr/lib/python3.1/pkgutil.py from

if not modname and os.path.isdir(path) and '.' not in fn:

to

if not modname and os.path.isdir(path) and '.' not in fn and os.access(path, 
os.R_OK):

Other versions much the same (although the specified line number will probably 
be different.)


Best regards,
Ben Okopnik

--
components: Demos and Tools
messages: 134323
nosy: okopnik
priority: normal
severity: normal
status: open
title: pydoc modules/help('modules') crash in dirs with unreadable subdirs
type: crash
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 
3.3, Python 3.4

___
Python tracker 

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



[issue9269] Cannot pickle self-referencing sets

2011-04-23 Thread Alex Gaynor

Changes by Alex Gaynor :


--
nosy: +alex

___
Python tracker 

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



[issue11907] SysLogHandler can't send long messages

2011-04-23 Thread Vinay Sajip

Vinay Sajip  added the comment:

> I'll write a LocalSysLogHandler for me  that uses the syslog module.

Sure, but bear in mind that on some Linux systems at least, the syslog module 
has thread safety issues because the underlying C APIs are not thread-safe. 
(I'm 
not sure of the situation on FreeBSD.) This shouldn't be a problem if the only 
calls to the module are from the handler, since logging has handler locks - but 
it could be a problem if other code in your process calls syslog APIs directly.

--

___
Python tracker 

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



[issue11907] SysLogHandler can't send long messages

2011-04-23 Thread Lukáš Lalinský

Lukáš Lalinský  added the comment:

It will be called only from the handler, so I think it should be fine. The 
reason why I started using syslog was that I need to log into a single file 
from multiple processes, but it seems to be showing up as too much trouble.

--

___
Python tracker 

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