[issue6783] Add a builtin method to 'int' for base/radix conversion

2009-08-27 Thread Yuv Gre
Yuv Gre ubershme...@gmail.com added the comment: Use case - 'hashing' a counter for example like video ID's in youtube. One could use a regular int internally and publish a shorter 62-base id for links. Guido said on http://mail.python.org/pipermail/python-dev/2006- January/059923.html I

[issue6789] ftplib storelines does not honor strings returned in fp.readline

2009-08-27 Thread Ayman
New submission from Ayman ayman.alsair...@gmail.com: in ftplibs.storlines, a call is done on what should be a Text stream: fp.readline() This would work in pre 3.x as it returns bytes but now that readlines returns a string, the call at lines 477 would fail: File C:\Python31\lib\ftplib.py,

[issue6784] byte/unicode pickle incompatibilities between python2 and and python3

2009-08-27 Thread RonnyPfannschmidt
RonnyPfannschmidt ronny.pfannschm...@gmx.de added the comment: its even worse python3: import pickle pickle.dumps(b'', protocol=2) b'\x80\x02c__builtin__\nbytes\nq\x00]q\x01\x85q\x02Rq\x03.' python2.6: import pickle pickle.loads('\x80\x02c__builtin__\nbytes\nq\x00]q\x01\x85q\x02Rq\x03.')

[issue6788] codecs.open on Win32 does not force binary mode

2009-08-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Ryan McGuire wrote: New submission from Ryan McGuire python@enigmacurry.com: Opening a UTF-8 encoded file with unix newlines (\n) on Win32: codecs.open(whatever.txt,r,utf-8).read() replaces the newlines (\n) with CR+LF (\r\n).

[issue6733] curses line wrap broken when mixing full- and half-width unicode characters

2009-08-27 Thread fugounashi
fugounashi fugounashi+pyt...@gmail.com added the comment: thanks for looking into it this should do it: #! /usr/bin/python import locale locale.setlocale(locale.LC_ALL, '') code = locale.getpreferredencoding() import curses def main(stdscr): stdscr.erase() stdscr.move(0, 0) for i

[issue6788] codecs.open on Win32 does not force binary mode

2009-08-27 Thread Ryan McGuire
Ryan McGuire python@enigmacurry.com added the comment: Uploading a doctest for this. The tests are successful on Linux using Python 2.6 They fail on Win32 with Python 2.6 -- Added file: http://bugs.python.org/file14788/codecs_bug.py ___ Python

[issue6784] byte/unicode pickle incompatibilities between python2 and and python3

2009-08-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The problem with trying to solve the following issue: a bytes instance from python3 is pickled as custom class in protocols 3 is that if we pickle bytes from Python 3 as a 2.x str in protocol = 2, unpickling it using Python 3 will yield a str

[issue6784] byte/unicode pickle incompatibilities between python2 and and python3

2009-08-27 Thread RonnyPfannschmidt
RonnyPfannschmidt ronny.pfannschm...@gmx.de added the comment: unpickle of any non-ascii string from python2 will break the only way out would be to ensure text strings and a single defined encoding (at that point storing unicode strings in any case seems more practical) also byte-strings

[issue3143] development docs waste a lot of horizontal space on left nav bar

2009-08-27 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I just did a quick test about making the sidebar collapsible. Add these lines at the end of default.css to see how the page might look like with the sidebar collapsed: /* collapse the sidebar */ div.sphinxsidebar { /* border: 3px solid

[issue3143] development docs waste a lot of horizontal space on left nav bar

2009-08-27 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Attached a screenshot of the result. I also made the top bar fixed as described in #4965, so it's always visible even if the user scrolled till the middle of the page (this is not related to this issue and will be addressed in #4965 though).

[issue3143] development docs waste a lot of horizontal space on left nav bar

2009-08-27 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Another screenshot that shows the page with and without the sidebar, with a photoshopped / button. -- Added file: http://bugs.python.org/file14790/visible-vs-hidden.gif ___ Python tracker

[issue5148] gzip.open breaks with 'U' flag

2009-08-27 Thread Art Gillespie
Art Gillespie agill...@gmail.com added the comment: The problem appears to be that the gzip module simply doesn't support universal newlines yet. I'm currently working on the zipfile module's universal newline support (issue6759) so if nobody else is working on this, I'll do it. I'm not sure

[issue5329] os.popen2 and os.popen3 in python 2.6 incompatible with os.popen* in python 2.5

2009-08-27 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone exar...@divmod.com: Added file: http://bugs.python.org/file14791/os-popen-list.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5329 ___

[issue5329] os.popen2 and os.popen3 in python 2.6 incompatible with os.popen* in python 2.5

2009-08-27 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com added the comment: Attached os-popen-list.patch which includes all of the earlier os-popen.diff and adds tests which fail without this patch and pass with it. They also pass on Python 2.5. The patch is against the Python 2.6 maintenance branch, but

[issue6499] Can't import xmlrpclib, DocXMLRPCServer and SimpleXMLRPCServer when zlib is not available

2009-08-27 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Not yet, the machine I was using to work on this is currently broken and I couldn't test the new test_docxmlrpc yet. Once I've fixed the machine and tried it I'll let you know. -- ___ Python

[issue6787] thread docs contain an incorrect link in a reference to the 'exit' method

2009-08-27 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Fixed in r74555, thanks! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6787 ___

[issue6784] byte/unicode pickle incompatibilities between python2 and and python3

2009-08-27 Thread RonnyPfannschmidt
RonnyPfannschmidt ronny.pfannschm...@gmx.de added the comment: in case the actual behavior is not supposed to change how about a way to declare one wants exact 1:1 mapping between py2py3, so strbytes and unicodestr will work for sure something like load/dump(..., encoding=bytes) just crossed

[issue6783] Add a builtin method to 'int' for base/radix conversion

2009-08-27 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I'm hoping 182 weeks of clarity could help iron this issue out. :-) I really think should bring this up on the python-ideas mailing list[1]; it's much more likely to get resolved one way or the other if you do. [1]

[issue6508] expose setresuid

2009-08-27 Thread Gregory P. Smith
Changes by Gregory P. Smith g...@krypto.org: -- nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6508 ___ ___ Python-bugs-list

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

2009-08-27 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Andrew - do you still feel responsible for curses? -- assignee: - akuchling nosy: +akuchling, georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6243

[issue6784] byte/unicode pickle incompatibilities between python2 and and python3

2009-08-27 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: how about a way to declare one wants exact 1:1 mapping between py2py3, so strbytes and unicodestr will work for sure In a sense, that's already possible. Inherit from _Pickler/_Unpickler, and replace the dispatch dict with a different

[issue6790] httplib and array do not play together well

2009-08-27 Thread Jake McGuire
New submission from Jake McGuire j...@youtube.com: As of Python 2.6 you can no longer pass an array to httplib.HTTPConnection.send. Issue1065257 added code to httplib to attempt to determine whether a file-like object was passed to certain methods (e.g. send), and to stream the data if so.

[issue3058] Let SimpleXMLRPCServer pass client_address to called functions.

2009-08-27 Thread andrew cooke
andrew cooke and...@acooke.org added the comment: Came here wondering how best to solve this myself. I already subclass the request handler to do client validation (password etc) and it stuck me that a simpler solution would be to use thread local storage. This avoids having to modify

[issue6790] httplib and array do not play together well

2009-08-27 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: That method of array.array has been deprecated since 1.5.1 according to the docs. Too bad nobody finished the job and removed it. Perhaps array.array could be special cased in the relevant code until the method can actually be removed.

[issue6275] let unittest.assertRaises() return the exception object caught

2009-08-27 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Committed this much more harmless patch to the trunk as revision 74556 -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6275

[issue6745] (curses) addstr() takes str in Python 3

2009-08-27 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See also issue #4787 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6745 ___ ___

[issue6745] (curses) addstr() takes str in Python 3

2009-08-27 Thread Trundle
Trundle andy-pyt...@hammerhartes.de added the comment: Yes, it uses a version of ncurses which supports wide characters, I checked that. I agree that using bytes instead may not be the preferred solution in Python 3. The point is, currently, it is broken if the user does not use an utf-8

[issue6654] Add path to the xmrlpc dispatcher method

2009-08-27 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: After a short discussion on python-dev (http://mail.python.org/pipermail/python-dev/2009-August/091069.html) there were no objections. On python-ideas there were no responses. Commited as revision 74558 -- resolution:

[issue6745] (curses) addstr() takes str in Python 3

2009-08-27 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I don't really understand because your example, umlaut3x.py, works correctly on my computer (py3k, ubunty jaunty). The point is, currently, it is broken if the user does not use an utf-8 environment. So the problem is that the

[issue6745] (curses) addstr() takes str in Python 3

2009-08-27 Thread Trundle
Trundle andy-pyt...@hammerhartes.de added the comment: Of course it works for you. As you stated in issue #4787, your locale is 'fr_FR.UTF-8'. And I don't want Python to guess my terminal's encoding. I want Python to respect my locale. Which is 'de...@euro', and not utf-8. --

[issue6745] (curses) addstr() takes str in Python 3

2009-08-27 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Here is a first patch to add a method setcharset() to the window class. Using my patch, you can fix your example by adding the line: screen.setcharset(your charset) before addstr(). It's an initial hack to fix the issue. Next

[issue3143] Make the left sidebar in the doc collapsible

2009-08-27 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- title: development docs waste a lot of horizontal space on left nav bar - Make the left sidebar in the doc collapsible Added file: http://bugs.python.org/file14793/sidebar.js ___ Python tracker

[issue3143] Make the left sidebar in the doc collapsible

2009-08-27 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Attached a first attempt to make the sidebar collapsible. The sidebar.js file is the JS script I did, the sidebar.zip file contains a couple of pages taken from the doc with the sidebar scripts already included in a script. If you want to