[issue2889] curses for windows (alternative patch)

2010-10-09 Thread Christoph Gohlke
Changes by Christoph Gohlke cgoh...@uci.edu: -- nosy: +cgohlke ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2889 ___ ___ Python-bugs-list mailing

[issue10052] Python/dtoa.c:158: #error Failed to find an exact-width 32-bit integer type (FreeBSD 4.11 + gcc 2.95.4)

2010-10-09 Thread Akira Kitada
New submission from Akira Kitada akit...@gmail.com: Building Python 2.7 fails on FreeBSD 4.11 with gcc 2.95.4 as below: gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/dtoa.o Python/dtoa.c

[issue7771] dict view comparison methods are not documented

2010-10-09 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: gaah, sorry about that. I've prepared another patch that removes the '^' part and adds an example about that. About the reference to Collections.Set to be a link to the Collections page, do you think it's acceptable to define all the

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I noticed fd must be dup-ed before passing to io.open. And I noticed direct test run like py3k -m test.test_time still produces unicode error. (Maybe this is reasonable limitation) I can confirm we can suppress the unicode error in

[issue10053] Probably fd should not be closed when FileIO#__init__ failed

2010-10-09 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: I suppose when _io.FileIO(fd) failed, passed fd should not be closed. Otherwise, we cannot write the code like this. fd = os.open(path, os.O_RDONLY) try: buf = io.open(fd, wb) except: os.close(fd)

[issue10053] Probably fd should not be closed when FileIO#__init__ failed

2010-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Here is the test script also run on py2.7. -- Added file: http://bugs.python.org/file19172/test_ensure_fd_not_closed_after_fileio_init_failed.py ___ Python tracker

[issue10054] select extension does not build on platforms where uintptr_t is provided in inttypes.h

2010-10-09 Thread Akira Kitada
New submission from Akira Kitada akit...@gmail.com: Some platforms have uintptr_t in inttypes.h but Python bulid system assumes it's defined in stdint.h and it causes build failure: building 'select' extension gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -O3 -Wall

[issue10054] select extension does not build on platforms where uintptr_t is provided in inttypes.h

2010-10-09 Thread Akira Kitada
Akira Kitada akit...@gmail.com added the comment: This patch fixes this. -- keywords: +patch Added file: http://bugs.python.org/file19173/issue10054.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10054

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-10-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: py3k_also_no_unicode_error_on_direct_test_run.patch comes a little bit too late: $ LANG= ./python Lib/test/regrtest.py -v test_time == CPython 3.2a2+ (py3k, Oct 8 2010, 01:40:20) [GCC 4.4.5 20100909 (prerelease)] ==

[issue4388] test_cmd_line fails on MacOS X

2010-10-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: For the record, this can be now reproduced under Linux by forcing different locale and filesystem encodings: $ PYTHONFSENCODING=utf8 LANG=ISO-8859-1 ./python -m test.regrtest test_cmd_line I opened a separated issue for Linux,

[issue10055] C99 code in _json.c

2010-10-09 Thread Akira Kitada
New submission from Akira Kitada akit...@gmail.com: I found some C99 code in _json.c. Attached patch makes it C89. The C99 part is only used for ucs4 Python. That's probably the reason it's overlooked. -- components: Build files: _json.c.diff keywords: patch messages: 118255 nosy:

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Oops, sorry. I'll withdraw my last patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8533 ___

[issue8533] regrtest: use backslashreplace error handler for stdout

2010-10-09 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Removed file: http://bugs.python.org/file19170/py3k_also_no_unicode_error_on_direct_test_run.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8533

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-10-09 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Antoine: Python cannot possibly know whether a command line argument is meant as a file name or as some other text, and what encoding the receiving application will apply to it (if any). I agree it's best to have all IO encodings being the

[issue10053] Don’t close fd when FileIO.__ini t__ fails

2010-10-09 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +pitrou title: Probably fd should not be closed when FileIO#__init__ failed - Don’t close fd when FileIO.__init__ fails ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10053

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Antoine: Python cannot possibly know whether a command line argument is meant as a file name or as some other text, and what encoding the receiving application will apply to it (if any). I understand. But practicality seems to suggest that,

[issue812369] module shutdown procedure based on GC

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patch is obviously against 2.x (there are some PyString_Check's on module names, for example). It should be regenerated against 3.x. Also, it would be nice if a test could be devised to check that the shutdown procedure works as expected

[issue10056] Can't build tkinter with libtk 8.6

2010-10-09 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: This is only with 3.1. Following patch allows building: Index: setup.py === --- setup.py(révision 85336) +++ setup.py(copie de travail) @@ -1450,7 +1450,7 @@ # The

[issue10056] Can't build tkinter with libtk 8.6

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Fixed in r85337. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10056 ___

[issue8445] buildbot: test_ttk_guionly failures (test_traversal, test_tab_identifiers, test_identify, test_heading_callback)

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I backported the patch to 2.7 (r85335) and to 3.1 (r85338). Hopefully things will be ok now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8445

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-10-09 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: The most likely values to be non-ASCII are, therefore, file paths. So it would make sense to also use the filesystem encoding for environment variables (so as to satisfy the common case). -1. Environment variables are typically set in a

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: -1. Environment variables are typically set in a text editor or on the command line, so they will typically have the locale's encoding. Fair enough. If the mere existence of the fsname encoding leads to that much confusion, I think I also

[issue9951] introduce bytes.hex method

2010-10-09 Thread Arnon Yaari
Changes by Arnon Yaari wiggi...@gmail.com: Added file: http://bugs.python.org/file19175/bytes.hex.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9951 ___

[issue9951] introduce bytes.hex method

2010-10-09 Thread Arnon Yaari
Changes by Arnon Yaari wiggi...@gmail.com: Removed file: http://bugs.python.org/file19018/bytes.hex.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9951 ___

[issue1553375] Add traceback.print_full_exception()

2010-10-09 Thread Pascal Chambon
Pascal Chambon chambon.pas...@gmail.com added the comment: Indeed I don't understand the following part : +Traceback (most recent call last): + File testmod.py, line 16, in module +{exception_action} + File testmod.py, line

[issue10052] Python/dtoa.c:158: #error Failed to find an exact-width 32-bit integer type (FreeBSD 4.11 + gcc 2.95.4)

2010-10-09 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith, mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10052 ___ ___

[issue1553375] Add traceback.print_full_exception()

2010-10-09 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: The regression tests are failing for me, see http://gist.github.com/618117 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1553375

[issue1553375] Add traceback.print_full_exception()

2010-10-09 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Also, fullstack remains in one place in the docs. Should now say allframes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1553375

[issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent

2010-10-09 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: If the mere existence of the fsname encoding leads to that much confusion, I think I also support its removal. Well, the fsname encoding has a hardwired value under OS X (regardless of the locale), which kind of justifies its existence,

[issue9992] Command line arguments are not correctly decodediflocale and fileystem encodingsaredifferent

2010-10-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Perhaps. We could also declare that command line arguments and environment variables are always UTF-8-encoded on OSX (which I think would be fairly accurate) Python uses the filesystem encoding to encode/decode environment

[issue9992] Command line arguments are not correctly decodediflocale and fileystem encodingsaredifferent

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: For the command line, it would mean that we introduced a new encoding: command line encoding, which will be utf-8 on OSX. Or more generally environment encoding, if it's also used for env vars. This could solve the subprocess issue neatly.

[issue9992] Command line arguments are not correctly decodediflocale and fileystem encodingsaredifferent

2010-10-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: So perhaps it would be best if Python had two external default encodings: the IO one (command line arguments, environment variables, text files), and the file name encoding (defaulting to the IO encoding if not set) Hum, I prefer

[issue9951] introduce bytes.hex method

2010-10-09 Thread Arnon Yaari
Arnon Yaari wiggi...@gmail.com added the comment: fixed to Py_UNICODE -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9951 ___ ___

[issue8445] buildbot: test_ttk_guionly failures (test_traversal, test_tab_identifiers, test_identify, test_heading_callback)

2010-10-09 Thread Stephen Hansen
Stephen Hansen me+pyt...@ixokai.io added the comment: For the record, everything (2.7, 3.1, and 3.x) runs this test successfully now. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8445

[issue10049] Add a no-op (null) context manager to contextlib

2010-10-09 Thread Hrvoje Nikšić
Hrvoje Nikšić hnik...@gmail.com added the comment: Here is a more complete patch that includes input from Nick, as well as the patch to test_contextlib.py and the documentation. For now I've retained the function-returning-singleton approach for consistency and future extensibility.

[issue1553375] Add traceback.print_full_exception()

2010-10-09 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Pascal: my question exactly. The question is whether the code is accurately reflecting the state of the python stack at exception time (which it seems like it ought to), in which case I don't understand how Python handles the chained

[issue9003] urllib.request and http.client should allow certificate checking

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is another patch for http.client containing more tests, including with a mismatching cert. Comments welcome. -- Added file: http://bugs.python.org/file19178/httpcli2.patch ___ Python tracker

[issue10055] C99 code in _json.c

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Fixed in 3.2 (r85342), 3.1 (r85343) and 2.7 (r85344). Thank you! -- nosy: +pitrou resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 3.1, Python 3.2 ___ Python

[issue9951] introduce bytes.hex method

2010-10-09 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- Removed message: http://bugs.python.org/msg117862 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9951 ___

[issue9992] Command line arguments are not correctly decodediflocale and fileystem encodingsaredifferent

2010-10-09 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Am 09.10.2010 14:07, schrieb Antoine Pitrou: Antoine Pitrou pit...@free.fr added the comment: For the command line, it would mean that we introduced a new encoding: command line encoding, which will be utf-8 on OSX. Or more

[issue9992] Command line arguments are not correctly decodediflocale and fileystem encodingsaredifferent

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Please no. We run into problems because we have two inconsistent encodings, and now you propose to introduce another one, allowing for even more inconsistencies??? It would not really be a third encoding, since it would replace the locale

[issue10008] Two links point to same place

2010-10-09 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: *Your initial post* only lists one index entry, and *does not* describe a problem. Thread module is in the file you have pointed to twice, in its alphabetical position. I have no idea what you think is wrong with the z section.

[issue10057] Unclear if exception should be set

2010-10-09 Thread Jan Kratochvil
New submission from Jan Kratochvil jan.kratoch...@redhat.com: http://docs.python.org/py3k/c-api/object.html PyObject_GetItem Return element [...] or NULL on failure. Found element = return its pointer. Found no element = return NULL (with no exception set). But it is unclear whether the

[issue10057] Unclear if exception should be set

2010-10-09 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I find it quite clear. failure not only means that no item was found, but also that the operation failed, i.e. raised an exception. In general, a NULL pointer returned from a function that returns PyObject* *always* means that there is an

[issue10057] Unclear if exception should be set

2010-10-09 Thread Jan Kratochvil
Jan Kratochvil jan.kratoch...@redhat.com added the comment: OK, I am not used to Python, thanks. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10057

[issue1553375] Add traceback.print_full_exception()

2010-10-09 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: After giving this some thought, I'm sure that the observed results are not what we want, so I've changed the test to be the result that we want. I haven't been able to figure out what is causing it, and am starting to wonder if it

[issue1553375] Add traceback.print_full_exception()

2010-10-09 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: It's still failing - the existing gist has been updated with the output from the new run: http://gist.github.com/618117 -- ___ Python tracker rep...@bugs.python.org

[issue1553375] Add traceback.print_full_exception()

2010-10-09 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: vinay: duh. I'm using a debug build and my test is slicing off the refount line. I think there's a helping in test.support for that... -- ___ Python tracker rep...@bugs.python.org

[issue1553375] Add traceback.print_full_exception()

2010-10-09 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: David, I don't think it's that - I think it's the subprocess comms. This works: def _do_test(self, program, exc_text): with open(self.testfn, 'w') as testmod: testmod.writelines(program.format(

[issue1553375] Add traceback.print_full_exception()

2010-10-09 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Also, the use of literal 'testmod.py' in _do_test should probably be replaced by self.testfn. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1553375

[issue1553375] Add traceback.print_full_exception()

2010-10-09 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: On reflection, perhaps we should use sys.stdin.encoding to decode the value received from the subprocess. What do you think? -- ___ Python tracker rep...@bugs.python.org

[issue1553375] Add traceback.print_full_exception()

2010-10-09 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Attached a patch which works on my machine. -- Added file: http://bugs.python.org/file19180/full_traceback5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1553375

[issue9003] urllib.request and http.client should allow certificate checking

2010-10-09 Thread geremy condra
geremy condra debat...@gmail.com added the comment: Any chance on folding the HTTPSServer class into http.server? Geremy Condra -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9003 ___

[issue9003] urllib.request and http.client should allow certificate checking

2010-10-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Any chance on folding the HTTPSServer class into http.server? Its API and implementation would first have to be cleaned up. I'd prefer if it were the subject of a separate issue. -- ___ Python

[issue10052] Python/dtoa.c:158: #error Failed to find an exact-width 32-bit integer type (FreeBSD 4.11 + gcc 2.95.4)

2010-10-09 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks for the report. Some questions: 1. Have you tested this with Python 3.x at all? I'd expect the same issues to show up for Python 3.1 and 3.2. 2. Also, do you have the relevant configure output to hand? On my machine, the output

[issue10058] Unclear PyString_AsStringAndSize return value

2010-10-09 Thread Nikolaus Rath
New submission from Nikolaus Rath nikol...@rath.org: http://docs.python.org/c-api/string.html says about the return value of AsStringAndSize: If length is NULL, the resulting buffer may not contain NUL characters; if it does, the function returns -1 and a TypeError is raised. If string is

[issue10008] Two links point to same place

2010-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Well, please see r85262 (10/6). This issue seems to be recently solved in release27-maint. And http://docs.python.org/ was updated after that, so when I posted this issue, the issue was actually there, but when you saw that site,

[issue10059] add the method `index` to collections.deque

2010-10-09 Thread Simon Liedtke
New submission from Simon Liedtke liedtke.si...@googlemail.com: I'd like to have the method `index` not only for list, but also for collections.deque. Here is my attempt: http://bitbucket.org/derdon/hodgepodge/src/tip/extended_deque.py I'm looking forward to see this method implemented in

[issue10059] add the method `index` to collections.deque

2010-10-09 Thread Ned Deily
Ned Deily n...@acm.org added the comment: Since you are requesting adding a method to an existing data type, you should probably raise this issue first on the python-ideas mailing list and be prepared to justify use cases for it. http://mail.python.org/mailman/listinfo/python-ideas

[issue10060] python.exe crashes or hangs on help() modules when bad modules found

2010-10-09 Thread Dev Player
New submission from Dev Player devpla...@gmail.com: 2010-10-10 python.exe crashes or hangs on help() modules when bad modules found ### SUMMARY The python.exe command line interpreter crashes or hangs when typing first help()

[issue10052] Python/dtoa.c:158: #error Failed to find an exact-width 32-bit integer type (FreeBSD 4.11 + gcc 2.95.4)

2010-10-09 Thread Akira Kitada
Akira Kitada akit...@gmail.com added the comment: 1. Have you tested this with Python 3.x at all? I'd expect the same issues to show up for Python 3.1 and 3.2. Yes, I can reproduce this in 2.7, 3.1 and 3.2. 2. Also, do you have the relevant configure output to hand? On my machine, the

Re: [issue10029] Equivalent to code for zip is wrong in Python 3

2010-10-09 Thread Senthil Kumaran
On Fri, Oct 08, 2010 at 06:25:26PM +, Alexander Belopolsky wrote: In this case, I wonder if equivalent to code should be added to the section for enumerate() and map(). Also since any() and all() have equivalent to code, I think min(), max() and sum() deserve it as well. I think, you are

[issue10049] Add a no-op (null) context manager to contextlib

2010-10-09 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- assignee: - ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10049 ___ ___ Python-bugs-list

[issue10060] python.exe crashes or hangs on help() modules when bad modules found

2010-10-09 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: There isn't much that Python can do if there is a sufficiently broken C-based module in sys.path. All you report about the problematic module is that it is 'bad' or 'corrupt'. Can you give more information about what makes it bad?

[issue10054] select extension does not build on platforms where uintptr_t is provided in inttypes.h

2010-10-09 Thread Akira Kitada
Akira Kitada akit...@gmail.com added the comment: It seems this problem was introduced by a patch in issue7211. 3.1 branch does not have this problem because that patch was not applied to release31-maint. Is this intentional? -- versions: +Python 3.2

[issue10008] Two links point to same place

2010-10-09 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: If I understand, the issue you were concerned about has been fixed. If so, please close this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10008

[issue10059] add the method `index` to collections.deque

2010-10-09 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: The absence of index() from collections deque wasn't an oversight. Deques are not really about indexed access, they are about appending and popping from the ends. I'm curious about your use case and whether it is a good

[issue10059] add the method `index` to collections.deque

2010-10-09 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: Hello Simon, Accessing an arbitrary element of a deque takes O(n) time, making your .index implementation O(n**2). If you describe the kinds of operations that you need to perform efficiently, we may be able to suggest a

[issue10029] Equivalent to code for zip is wrong in Python 3

2010-10-09 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Max, thanks for reporting this. I've replaced the sample code, making it work correctly and more clearly showing the logic. See r85345 and r85346. Daniel, we need to sync-up on the meaning of marking a report as accepted.

[issue10029] Equivalent to code for zip is wrong in Python 3

2010-10-09 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10029 ___