[issue6759] zipfile.ZipExtFile.read() is missing universal newline support

2009-08-21 Thread Ryan Leslie
New submission from Ryan Leslie : The zipfile.ZipFile.open() behavior with mode 'U' or 'rU' is not quite as advertised in http://docs.python.org/library/zipfile.html#zipfile.ZipFile.open Here is an example: $ echo -ne "This is an example\r\nWhich demonstrates a problem\r\nwith ZipFile.open(...

[issue1170] shlex have problems with parsing unicode

2009-08-21 Thread Benjamin Peterson
Benjamin Peterson added the comment: The patch needs tests before it can be applied. Additionally, I'm not sure if having a "utf" option is helpful. Is there a reason not to have unicode support by default? -- nosy: +benjamin.peterson ___ Python trac

[issue6508] expose setresuid

2009-08-21 Thread Travis H.
Travis H. added the comment: Where would be the best place to put these non-POSIX calls? I looked at posixmodule.c and it's a mess; much conditional CPP logic governing what gets compiled, not clear where I should add something like this there - if I should at all, since these routines are not

[issue6758] implement new setuid-related calls and a standard way to drop all privileges

2009-08-21 Thread Travis H.
Travis H. added the comment: On Fri, Aug 21, 2009 at 08:42:43PM +, Martin v. L??wis wrote: > > Martin v. L??wis added the comment: > > > It would still be nice to have the currently unimplemented platform > > wrappers added to the standard library, though. For example, as solinym > > poi

[issue6518] Enable 'with' statement in ossaudiodev module

2009-08-21 Thread Art Gillespie
Art Gillespie added the comment: Diff attached * Added the __enter__ and __exit__ methods to the ossaudio object. * Updated tests so they pass (attempt to access ossaudio.closed throws AttributeError instead of TypeError) My first patch. Please let me know if I did anything terrifically stupi

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

2009-08-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Changing the signature of a well-used function is dangerous. Why not add a function named pprint.print, with the exact same signature as __builtin__.print? -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue1170] shlex have problems with parsing unicode

2009-08-21 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue6758] implement new setuid-related calls and a standard way to drop all privileges

2009-08-21 Thread Travis H.
Travis H. added the comment: This is my first stab at creating a "privilege" module that implements the API suggested in the second aforementioned paper. It is syntactically correct but has some TODO items in it that must be completed before it will work. Any suggestions on this code would be

[issue4010] configure options don't trickle down to distutils

2009-08-21 Thread John P. Speno
John P. Speno added the comment: Furthermore, there's another bug in setup.py When extensions are built and CPPFLAGS (or other arguments) has multiple arguments, the order of the arguments are reversed. This is the wrong behavior. The specified directories should be used in the given order.

[issue6748] test test_telnetlib failed

2009-08-21 Thread Rüdiger Blach
Changes by Rüdiger Blach : -- nosy: +rb09 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue5210] zlib does not indicate end of compressed stream properly

2009-08-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Hm, I tried a modified version of your first test, and I found another problem with the current zlib library; starting with the input: x = x1 + x2 + HAMLET_SCENE# both compressed and uncompressed data The following scenario is OK: dco.decompress(x) #

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

2009-08-21 Thread Demur Rumed
Demur Rumed added the comment: I've included a patched version. I went with using a function signature of def pprint(*object, stream=None, indent=1, width=80, depth=None) -- nosy: +serprex Added file: http://bugs.python.org/file14765/pprint.py ___ Py

[issue6508] expose setresuid

2009-08-21 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/o

[issue6508] expose setresuid

2009-08-21 Thread Martin v . Löwis
Martin v. Löwis added the comment: Would you like to work on a patch? -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mai

[issue6758] implement new setuid-related calls and a standard way to drop all privileges

2009-08-21 Thread Martin v . Löwis
Martin v. Löwis added the comment: > It would still be nice to have the currently unimplemented platform > wrappers added to the standard library, though. For example, as solinym > pointed out, getresuid and getresgid are not currently wrapped at all. > There may be other low-level APIs which

[issue6758] implement new setuid-related calls and a standard way to drop all privileges

2009-08-21 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: It would still be nice to have the currently unimplemented platform wrappers added to the standard library, though. For example, as solinym pointed out, getresuid and getresgid are not currently wrapped at all. There may be other low-level APIs which may

[issue6758] implement new setuid-related calls and a standard way to drop all privileges

2009-08-21 Thread Martin v . Löwis
Martin v. Löwis added the comment: If the logic is going to be built on top of the APIs that are already there, I agree that it would be best to implement this as a separate module, and upload it to pypi.python.org. Closing as "won't fix". -- nosy: +loewis resolution: -> wont fix stat

[issue5210] zlib does not indicate end of compressed stream properly

2009-08-21 Thread Travis H.
Travis H. added the comment: Figured out how to test is_finished attribute of the zlib module properly. -- Added file: http://bugs.python.org/file14764/test_zlib.py.diff ___ Python tracker _

[issue4010] configure options don't trickle down to distutils

2009-08-21 Thread John P. Speno
John P. Speno added the comment: Hi. We encountered this issue on a Solaris 10 while building python 2.6.2. There's a problem with reptrov's patch from 2009-01-04. The LDFLAGS in the Makefile.pre.in patch need to be quoted also. Like so: LDFLAGS='$(LDFLAGS)' This allows for multiple flags. O

[issue6758] implement new setuid-related calls and a standard way to drop all privileges

2009-08-21 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Maybe this should just be a third-party module for the time being? That removes the question of which stdlib module to add it to for now. Plus, since it's not just a straightforward platform API wrapper, it probably merits separate distribution to see wha

[issue6758] implement new setuid-related calls and a standard way to drop all privileges

2009-08-21 Thread Travis H.
Travis H. added the comment: The routines necessary for implementing Wagner's API for dropping privileges are: sysconf function: available in os module _SC_NGROUPS_MAX constant: unsure abort function: available in os module getresuid function: needs implementing[1] getresgid function: needs imp

[issue2516] Instance methods are misreporting the number of arguments

2009-08-21 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue6758] implement new setuid-related calls and a standard way to drop all privileges

2009-08-21 Thread Travis H.
Travis H. added the comment: The posixmodule.c seems to have a lot of really complex CPP logic about what chunks to compile. If the target is to put the code there, I would have to be guessing - next to the HAVE_GETEUID looks promising. But wouldn't it be better to have the configure script ch

[issue6758] implement new setuid-related calls and a standard way to drop all privileges

2009-08-21 Thread Travis H.
New submission from Travis H. : It should be easier to write network servers and setuid programs in python. One of the troublesome issues is that the semantics of the setuid/getuid-related calls are quite complicated. There are two papers on this subject that form the background of this feature

[issue6090] zipfile DeprecationWarning Python 2.6.2

2009-08-21 Thread Cédric Krier
Changes by Cédric Krier : -- nosy: +ced ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/m

[issue6757] Marshal's documentation incomplete (Bools)

2009-08-21 Thread Martin v . Löwis
Martin v. Löwis added the comment: A number of other things are also missing. types:complex,frozenset singletons:StopIteration, Ellipsis -- nosy: +loewis ___ Python tracker ___

[issue5210] zlib does not indicate end of compressed stream properly

2009-08-21 Thread Travis H.
Travis H. added the comment: Diff to tests Implements all suggested changes save one: I wasn't sure how to test that is_finished is clear one byte before the end of the compressed section. Instead, I test that it is clear before I call the compression routine. -- Added file: http://b

[issue5210] zlib does not indicate end of compressed stream properly

2009-08-21 Thread Travis H.
Travis H. added the comment: zlibmodule.c.diff Implements all the suggested features, but I'm not exactly sure whether it handles reference counts properly. -- Added file: http://bugs.python.org/file14762/zlibmodule.c.diff ___ Python tracker

[issue6133] LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_CONST

2009-08-21 Thread Demur Rumed
Changes by Demur Rumed : -- title: LOAD_CONST followed by LOAD_ATTR can be optimized to justbe a LOAD_COST -> LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_CONST ___ Python tracker

[issue6757] Marshal's documentation incomplete (Bools)

2009-08-21 Thread Demur Rumed
Changes by Demur Rumed : -- title: Marshal's documentation incomplete -> Marshal's documentation incomplete (Bools) ___ Python tracker ___ ___

[issue6757] Marshal's documentation incomplete

2009-08-21 Thread Demur Rumed
New submission from Demur Rumed : "The following types are supported: None, integers, floating point numbers, strings, bytes, bytearrays, tuples, lists, sets, dictionaries, and code objects" It fails to list bools: True and False While it states "Not all Python object types are supported; in ge

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

2009-08-21 Thread Guilherme Polo
Guilherme Polo added the comment: Here is a patch that changes IDLE to refuse invalid key bindings. -- keywords: +patch nosy: +gpolo versions: +Python 2.6, Python 2.7, Python 3.2 Added file: http://bugs.python.org/file14761/tcl_validation.diff ___ Py

[issue6556] "HOME" is not a standard environment variable on Windows

2009-08-21 Thread Tarek Ziadé
Tarek Ziadé added the comment: Fixed, thanks for the feedback all ! -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-l

[issue6753] Python 3.1.1 test_cmd_line fails on Fedora 11

2009-08-21 Thread Guillaume Delcourt-Petetin
Guillaume Delcourt-Petetin added the comment: Nope. 2009/8/21 Amaury Forgeot d'Arc > > Amaury Forgeot d'Arc added the comment: > > Does it happen if you build python from a directory with no accented > letters? > > -- > nosy: +amaury.forgeotdarc > > __

[issue6753] Python 3.1.1 test_cmd_line fails on Fedora 11

2009-08-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Does it happen if you build python from a directory with no accented letters? -- nosy: +amaury.forgeotdarc ___ Python tracker ___

[issue2516] Instance methods are misreporting the number of arguments

2009-08-21 Thread gungor
gungor added the comment: I don't understand your message.You only send me my error message's xml version 2009/8/21 Benjamin Peterson > > Changes by Benjamin Peterson : > > > Removed file: http://bugs.python.org/file14758/unnamed > > ___ > Python tracker >

[issue2516] Instance methods are misreporting the number of arguments

2009-08-21 Thread Benjamin Peterson
Changes by Benjamin Peterson : Removed file: http://bugs.python.org/file14758/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue2516] Instance methods are misreporting the number of arguments

2009-08-21 Thread gungor
gungor added the comment: TypeError at /admin/rt/randevu/add/ cagir() takes exactly 1 argument (2 given) Request Method: GET Request URL: http://127.0.0.1:8000/admin/rt/randevu/add/ Exception Type: TypeError Exception Value: cagir() takes exactly 1 argument (2 given) Exception Location:

[issue2516] Instance methods are misreporting the number of arguments

2009-08-21 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- type: compile error -> feature request ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue2516] Instance methods are misreporting the number of arguments

2009-08-21 Thread gungor
gungor added the comment: I am using Django with python to develope a web application.While I am trying to syncronize and running the localserver, I get this issue(2516). problem function is cagri() Source Code: from django.db import models from datetime import datetime from sets import Immutabl

[issue6750] threading issue in __builtins__.print

2009-08-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The TextIOWrapper class is not thread-safe, because it calls [the equivalent of] self.buffer.write(self.pending_bytes) before clearing self.pending_bytes. Of course the write() function will release the GIL, and another thread may send the same pending_byt

[issue6756] ftplib documentation does not document what the acct parameter is used for

2009-08-21 Thread Tarjei Huse
New submission from Tarjei Huse : Check: http://docs.python.org/library/ftplib.html The ftplib package does not document what the acct parameter is and how it should be used. Also: few methods document their return values of exceptions they raise. -- _

[issue6756] ftplib documentation does not document what the acct parameter is used for

2009-08-21 Thread Tarjei Huse
Changes by Tarjei Huse : -- assignee: georg.brandl components: Documentation nosy: georg.brandl, tarjei severity: normal status: open title: ftplib documentation does not document what the acct parameter is used for type: feature request versions: Python 2.6 ___

[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2009-08-21 Thread Iñigo Serna
Iñigo Serna added the comment: Added patch against Python v3.1.1. NOT TESTED! -- versions: +Python 3.1, Python 3.2 Added file: http://bugs.python.org/file14756/_cursesmodule.311.get_wch.patch ___ Python tracker __

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

2009-08-21 Thread Jason R. Coombs
Jason R. Coombs added the comment: In that case, what needs to be done to integrate it into 3.2? -- title: Add os.link() and os.symlink() and os.path.islink() support for Windows -> Add os.link() and os.symlink() and os.path.islink() support for Windows

[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2009-08-21 Thread Iñigo Serna
Iñigo Serna added the comment: Added missing file: patch against Python v2.6.2 -- Added file: http://bugs.python.org/file14755/_cursesmodule.get_wch.patch ___ Python tracker ___

[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2009-08-21 Thread Iñigo Serna
Iñigo Serna added the comment: Added test example -- Added file: http://bugs.python.org/file14754/test_get_wch.py ___ Python tracker ___ _

[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2009-08-21 Thread Iñigo Serna
Iñigo Serna added the comment: Added patch for the documentation -- keywords: +patch Added file: http://bugs.python.org/file14753/curses.get_wch.patch ___ Python tracker ___

[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2009-08-21 Thread Iñigo Serna
New submission from Iñigo Serna : Currently,there is no a simple way in curses bindings to get the code associated with a key press of non ascii keystroke (f.e. ç) in terminals configured with UTF-8 encoding. getch returns the code for a wide character byte a byte. But ncurses library has a pro

[issue6734] Imap lib implicit conversion from bytes to string

2009-08-21 Thread Marcin Bachry
Marcin Bachry added the comment: Ok, it think it's good to leave internal _quote() function operating on bytes and convert password argument in login(). The method now works with both str and bytes as arguments. -- keywords: +patch Added file: http://bugs.python.org/file14752/imaplib-lo

[issue6754] Non-existent member 'nb_inplace_divide' in PyNumberMethods

2009-08-21 Thread KAJIYAMA, Tamito
New submission from KAJIYAMA, Tamito : In the "Python/C API Reference Manual", Section "Object Implementation Support", Subsection "Number Object Structures" (http://docs.python.org/3.1/c-api/typeobj.html#number-object- structures), the definition of the PyNumberMethods structure has a non- exi

[issue6753] Python 3.1.1 test_cmd_line fails on Fedora 11

2009-08-21 Thread Guillaume Delcourt-Petetin
New submission from Guillaume Delcourt-Petetin : Just what it says on the label : [...] Traceback (most recent call last): File "./Lib/test/regrtest.py", line 618, in runtest_inner indirect_test() File "/home/Pif/Téléchargement/Python-3.1.1/Python-3.1.1/Lib/test/test_cmd_l test.suppo

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

2009-08-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: - find your .idlerc directory (probably in %USERPROFILE%) - edit config-extensions.cfg - remove the binding - write a patch that refuses invalid keysims. -- nosy: +amaury.forgeotdarc stage: -> needs patch __

[issue6752] -1**2=-1

2009-08-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This very example is in the documentation: http://docs.python.org/reference/expressions.html#the-power-operator -- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed ___ Python tracker

[issue6752] -1**2=-1

2009-08-21 Thread rahul
rahul added the comment: >>>-1**2 >>>-1 ??? what is reason for this -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue6752] -1**2=-1

2009-08-21 Thread rahul
New submission from rahul : what is the reason for this -- components: 2to3 (2.x to 3.0 conversion tool) messages: 91809 nosy: rahul1618 severity: normal status: open title: -1**2=-1 type: compile error versions: Python 2.5 ___ Python tracker

[issue6751] Default return value in ConfigParser

2009-08-21 Thread Juan Javier
New submission from Juan Javier : I think it is useful, at least for me, to add an argument, default, to [Safe,Raw]ConfigParser.get that, if present, will be returned if the methid fails to return the value. That is, instead of rasing an exception, return default, if present. It could be done o

[issue6750] threading issue in __builtins__.print

2009-08-21 Thread Jackson Yang
New submission from Jackson Yang : # Bug Description In a multi-threaded environment, the Win32 Python3000 built-in function "print" may give the output several times. # How to Reproduce: import threading event = threading.Event() class Test(threading.Thread): def __init__(self, ord):

[issue6667] logging config - using of FileHandler's delay argument?

2009-08-21 Thread Vinay Sajip
Changes by Vinay Sajip : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue6444] multiline exception logging via syslog handler

2009-08-21 Thread Vinay Sajip
Vinay Sajip added the comment: > Do you suggest to file bug report to syslog-ng maintainer? Yes, I do. Otherwise you can't use it as a drop-in replacement, which people would expect to be possible. -- status: open -> closed ___ Python tracker

[issue6239] c_char_p return value returns string, not bytes

2009-08-21 Thread kai zhu
kai zhu added the comment: i just found this bug independently, but yes its a bug, which i hope gets fixed for sake of extension community: // test.c beg char s[4] = "ab\xff"; char *foo() { return s; } // test.c end $ gcc -fPIC -g -c -Wall test.c $ gcc -shared test.o -o test.so $ python3.1 -c