[issue4136] merge json library with latest simplejson 2.0.x
Martin v. Löwis mar...@v.loewis.de added the comment: The one thing that IMO needs to be decided before this can be accept is the version compatibility: what Python versions must this code stay compatible with? That decision then needs to be implemented. Apart from this (and the additional minor comments below), the patch looks fine. http://codereview.appspot.com/20095/diff/1/13 File Lib/json/decoder.py (right): http://codereview.appspot.com/20095/diff/1/13#newcode21 Line 21: nan, inf = struct.unpack('dd', _BYTES) I think this can be simplified as nan, inf = struct.unpack('dd', _BYTES) http://codereview.appspot.com/20095/diff/1/12 File Lib/json/encoder.py (right): http://codereview.appspot.com/20095/diff/1/12#newcode31 Line 31: INFINITY = float('1e6') Why not decoder.PosInf? http://codereview.appspot.com/20095/diff/1/14 File Modules/_json.c (right): http://codereview.appspot.com/20095/diff/1/14#newcode3 Line 3: #if PY_VERSION_HEX 0x0206 !defined(Py_TYPE) Is Python before 2.6 even supported anymore? ISTM that the usage of .format on strings outrules Python2.5 and earlier. http://codereview.appspot.com/20095 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon
Retro vinet...@gmail.com added the comment: I noticed this by installing the Python 2.5.4 and Python 2.6.1 and Python 3.0.1 binaries. Please fix these issues if you can. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5390 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon
Martin v. Löwis mar...@v.loewis.de added the comment: I did not backport the fix to 2.5.4, so that release doesn't have it fixed. Since the 2.5 branch is now closed, no changes will be made to it. For 2.6.1 and 3.0.1, it works fine for me. See the attached screenshot. Added file: http://bugs.python.org/file13209/arp.jpg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5390 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5378] adding --quiet to bdist_rpm
Tarek Ziadé ziade.ta...@gmail.com added the comment: done in r70049 and r70051 -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5378 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533164] Installed but not listed *.pyo break bdist_rpm
Tarek Ziadé ziade.ta...@gmail.com added the comment: Done in r70049 and r70051. Thanks for everyone's help ! ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533164 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533164] Installed but not listed *.pyo break bdist_rpm
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533164 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533164] Installed but not listed *.pyo break bdist_rpm
Changes by Tarek Ziadé ziade.ta...@gmail.com: ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533164 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5389] Uninitialized variable may be used in PyUnicode_DecodeUTF7Stateful()
Georg Brandl ge...@python.org added the comment: I can't see at the moment how the unicode_decode_call_errorhandler call can be made without startinpos being previously set to some value. Antoine, maybe you can verify? -- assignee: - pitrou nosy: +georg.brandl, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5389 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533164] Installed but not listed *.pyo break bdist_rpm
Martin v. Löwis mar...@v.loewis.de added the comment: See comment 1 in https://bugzilla.redhat.com/show_bug.cgi?id=236535 It might be that this patch still doesn't solve the problem, namely if there are non-library .py files in the distribution. They get compiled by brp-python-bytecompile, but the byte code files are not listed. Apparently, the solution is to either %define _unpackaged_files_terminate_build 0, or redefine %__os_install_post (to what value?). Not sure which one is better. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533164 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533164] Installed but not listed *.pyo break bdist_rpm
Martin v. Löwis mar...@v.loewis.de added the comment: Tarek, I think you committed too quickly. Please consider my comments. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533164 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4136] merge json library with latest simplejson 2.0.x
Martin v. Löwis mar...@v.loewis.de added the comment: simplejson maintains Python 2.4+ compatibility, but json maintains 2.6+. I could produce another patch that manually removes these few remaining nits if it's necessary. I don't quite understand this: isn't json/decoder.py and simplejson/decoder.py essentially the same? why fork the one and not the other? However, as long as the compatibility requirements are documented somewhere (e.g. PEP 291), it's fine with me. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5389] Uninitialized variable may be used in PyUnicode_DecodeUTF7Stateful()
Antoine Pitrou pit...@free.fr added the comment: Hmm, I know nothing about UTF7... Anyway, looking at the code, the utf7Error code path can be called from the following places (trunk line numbers): - line 1595, and startinpos was set three lines before - a bunch of places in the if (inShift) { ... } chunk between lines 1537 and 1578; inShift would have had previously been set to 1 and that's at line 1587, a couple of lines after setting startinpos So it seems things are fine, but perhaps I'm missing something. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5389 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5386] mmap can crash with write_byte
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Fixed in r70052(trunk), r70053(py3k). -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5386 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5391] mmap: read_byte/write_byte and object type
New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: On Python3000, mmap.read_byte returns str not bytes, and mmap.write_byte accepts str. Is this intended behavior? import mmap m = mmap.mmap(-1, 10) type(m.read_byte()) class 'str' m.write_byte(a) m.write_byte(ba) Maybe another possibility. read_byte() returns int which represents byte, write_byte accepts int which represents byte. (Like babc[0] returns int not 1-length bytes) -- components: Extension Modules messages: 82903 nosy: ocean-city severity: normal status: open title: mmap: read_byte/write_byte and object type type: behavior versions: Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5391 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5391] mmap: read_byte/write_byte and object type
Martin v. Löwis mar...@v.loewis.de added the comment: Indeed, I think it should use the b code, instead of the c code. Please discuss this on python-dev, though. It might not be ok to backport this to 3.0, since it may break existing code. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5391 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5391] mmap: read_byte/write_byte and object type
Martin v. Löwis mar...@v.loewis.de added the comment: Furthermore, all other uses of the c code might need to be reconsidered. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5391 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5392] stack overflow after hitting recursion limit twice
New submission from Gabriel Genellina gagsl-...@yahoo.com.ar: Set sys.setrecursionlimit to 50 or lower. Then, the second time the recursion limit is reached, the interpreter crashes with a stack overflow. This happens both with released 3.0.1 and the py3k branch, on Windows. At least on my PC, 51 appears to be the minimum acceptable value for sys.setrecursionlimit. Python 3.1a0 (py3k, Feb 28 2009, 04:16:04) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. p3 import sys p3 sys.setrecursionlimit(20) p3 def g(): g() ... p3 g() Traceback (most recent call last): ... RuntimeError: maximum recursion depth exceeded p3 g() Fatal Python error: Cannot recover from stack overflow. This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. C:\APPS\python\py3k\PCbuild -- components: Interpreter Core messages: 82906 nosy: gagenellina severity: normal status: open title: stack overflow after hitting recursion limit twice type: crash versions: Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5392 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533164] Installed but not listed *.pyo break bdist_rpm
Tarek Ziadé ziade.ta...@gmail.com added the comment: I've read the thread while working in the patch, and comment #28 explains that brp-python-bytecompile is called over the rpms and requires pyo files within the file list. plus: http://fedoraproject.org/wiki/Packaging/Python#Including_pyos Now, if some defines in the spec file will prevent any call of brp-python-bytecompile to break, it's better for sure. Digging in this, to see if there's a better fix then. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533164 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1733986] mmap.mmap can overrun buffer
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Fixed in r70056(trunk) and r70057(py3k). -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1733986 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5391] mmap: read_byte/write_byte and object type
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: -- versions: -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5391 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5392] stack overflow after hitting recursion limit twice
Changes by Benjamin Peterson benja...@python.org: -- nosy: +loewis, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5392 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5392] stack overflow after hitting recursion limit twice
Georg Brandl ge...@python.org added the comment: I can reproduce that (with the same limits) on Linux here. It doesn't happen with 2.6. (Although it is technically not a crash but a controlled abort().) -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5392 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5391] mmap: read_byte/write_byte and object type
STINNER Victor victor.stin...@haypocalc.com added the comment: loewis Furthermore, all other uses of the c code might loewis need to be reconsidered. $ grep 'BuildValue.*c' */*c Modules/_cursesmodule.c:return Py_BuildValue(c, rtn); Modules/mmapmodule.c: return Py_BuildValue(c, value); $ grep '_Parse[^]\+[^:;]*c' */*c Modules/mmapmodule.c: if (!PyArg_ParseTuple(args, c:write_byte, value)) PC/msvcrtmodule.c: if (!PyArg_ParseTuple(args, c:putch, ch)) PC/msvcrtmodule.c: if (!PyArg_ParseTuple(args, c:ungetch, ch)) So we have: * mmap.read_byte()-char, mmap.write_byte(char): should be fixed to use bytes * curses window.getkey()-char: it looks correct because the function uses also return PyUnicode_FromString(...); * msvcrt.putch(char), msvcrt.ungetch(char): msvcrt has also: - msvcrt.getch()-byte string of 1 byte - msvcrt.getwch()-unicode string of 1 character - msvcrt.putwch(unicode string of 1 character) - msvcrt_ungetwch(unicode string of 1 character) Hum, putch(), ungetch(), getch() use inconsistent types (unicode/bytes) and should be fixed. Another issue should be open for that. Notes: msvcrt.putwch() accepts string of length 1 and msvcrt.ungetwch() doesn't check string length (and so may crash with length=0 or length 1?). -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5391 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1
STINNER Victor victor.stin...@haypocalc.com added the comment: @tjreedy: Do you expect conversion to small int if __int__() result fits in a small int? class A: def __int__(self): return 1L x=int(A()) print repr(x), type(x) Result with Python 2.5.1: 1L type 'long' ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5377 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5391] mmap: read_byte/write_byte and object type
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I think more *bytes* cleanup is needed for mmap module documentation implementation. (and other modules?) Especially mmap.find() and its friends. import mmap m = mmap.mmap(-1, 10) m[:] = b0123456789 m.find(b'2') 2 m.find('2') # XXX: accepts unicode 2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5391 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1
Mark Dickinson dicki...@gmail.com added the comment: The behaviour doesn't contradict the documentation, as far as I can tell, so I agree with Terry that this is not a bug. If we want the result from the built-in int function to have type int whenever possible (that is, whenever the result is in the closed interval [-sys.maxint-1, sys.maxint], it doesn't seem right that the burden for ensuring this should lie with individual __int__ methods: instead, the general machinery for implementing the built-in int function should check any result of type long to see if it fits in an int, and convert if so. Is this desirable? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5377 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1
Changes by Mark Dickinson dicki...@gmail.com: -- type: behavior - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5377 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1975] signals not always delivered to main thread, since other threads have the signal unmasked
John Levon movem...@users.sourceforge.net added the comment: Surely readline is irrelevant anyway. The Python spec guarantees behaviour, and that guarantee is currently broken. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5393] cmath.cos and cmath.cosh have nResult typo in help
New submission from Michael Newman michael.b.new...@gmail.com: cmath.cos and cmath.cosh have nResult typo in their help text. Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import cmath help(cmath.cos) Help on built-in function cos in module cmath: cos(...) cos(x) nReturn the cosine of x. help(cmath.cosh) Help on built-in function cosh in module cmath: cosh(...) cosh(x) nReturn the hyperbolic cosine of x. Likewise in Py26, Py25, and Py24... Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import cmath help(cmath.cos) Help on built-in function cos in module cmath: cos(...) cos(x) nReturn the cosine of x. help(cmath.cosh) Help on built-in function cosh in module cmath: cosh(...) cosh(x) nReturn the hyperbolic cosine of x. Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import cmath help(cmath.cos) Help on built-in function cos in module cmath: cos(...) cos(x) nReturn the cosine of x. help(cmath.cosh) Help on built-in function cosh in module cmath: cosh(...) cosh(x) nReturn the hyperbolic cosine of x. Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import cmath help(cmath.cos) Help on built-in function cos in module cmath: cos(...) cos(x) nReturn the cosine of x. help(cmath.cosh) Help on built-in function cosh in module cmath: cosh(...) cosh(x) nReturn the hyperbolic cosine of x. -- assignee: georg.brandl components: Documentation messages: 82915 nosy: georg.brandl, mnewman severity: normal status: open title: cmath.cos and cmath.cosh have nResult typo in help versions: Python 2.4, Python 2.5, Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5393 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5392] stack overflow after hitting recursion limit twice
Antoine Pitrou pit...@free.fr added the comment: This is probably due to the recursion overflow recovery code in py3k, which has a hard-wired constant of 50 somewhere :-) (is setting the recursion limit so low a requirement for your application? or were you just experimenting with it? as Georg said, it's not a crash but a deliberate fatal error... although we can probably change the behaviour when the recursion limit is set to 50 or lower) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5392 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5393] cmath.cos and cmath.cosh have nResult typo in help
Mark Dickinson dicki...@gmail.com added the comment: Fixed in the trunk in r70062. Thanks for the report! -- nosy: +marketdickinson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5393 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1975] signals not always delivered to main thread, since other threads have the signal unmasked
Guido van Rossum gu...@python.org added the comment: Hm, I'm not sure why Adam brought up readline. The behavior is certainly guaranteed (I put that guarantee in myself long ago :-) and it should be fixed. I have no opinion about the proposed patch, since I cannot test this and have long lost sufficient understanding of this part of CPython to understand all the ramifications, sorry. -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4474] PyUnicode_FromWideChar incorrect for characters outside the BMP (unix only)
Mark Dickinson dicki...@gmail.com added the comment: Good catch! Added defined(SIZEOF_WCHAR) to the testcapi code as well, and removed the change to PC/pyconfig.h, since we don't need it any more... Added file: http://bugs.python.org/file13210/unicode_fromwidechar_surrogate-7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4474 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2848] Remove mimetools usage from the stdlib
Changes by Benjamin Peterson benja...@python.org: -- priority: critical - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2848 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5394] Distutils in trunk does not work with old Python (2.3 - 2.5)
New submission from Akira Kitada akit...@gmail.com: As written in its README, Distutils must remain compatible with 2.3, but it isn't. Attached patch fixes this. -- assignee: tarek components: Distutils files: python23_compat.diff keywords: patch messages: 82920 nosy: akitada, tarek severity: normal status: open title: Distutils in trunk does not work with old Python (2.3 - 2.5) type: compile error Added file: http://bugs.python.org/file13211/python23_compat.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5394 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4996] io.TextIOWrapper calls buffer.read1()
Benjamin Peterson benja...@python.org added the comment: In the io-c branch, read1() is now a member of BufferedIOBase. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4996 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4263] BufferedWriter non-blocking overage
Benjamin Peterson benja...@python.org added the comment: This has been cured in the io-c branch. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4263 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4565] Rewrite the IO stack in C
Benjamin Peterson benja...@python.org added the comment: I just fixed the last failing test_io. (I'm listing as dependencies issues we can close after the branch is merged.) -- dependencies: +BufferedWriter non-blocking overage, io.TextIOWrapper calls buffer.read1() ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4565] Rewrite the IO stack in C
Changes by Benjamin Peterson benja...@python.org: -- dependencies: +possible deadlock in IO library (Lib/io.py) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3618] possible deadlock in IO library (Lib/io.py)
Benjamin Peterson benja...@python.org added the comment: Yes, this is solved in the io-c branch. Antoine, do you think we should switch _pyio to use the RLock? -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3618 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4579] .read() and .readline() differ in failing
Benjamin Peterson benja...@python.org added the comment: I'm going to close this as a duplicate of #4996 (same fix), which will be fixed when we merge the io-c branch. -- nosy: +benjamin.peterson resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4579 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1407] [performance] Too many closed() checkings
Benjamin Peterson benja...@python.org added the comment: Does io in C help with this? -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1407 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4967] Bugs in _ssl object read() when a buffer is specified
Benjamin Peterson benja...@python.org added the comment: I'm no ssl expert either, but the patch looks fine to me. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4967 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4565] Rewrite the IO stack in C
Changes by Benjamin Peterson benja...@python.org: -- dependencies: +Duplicate UTF-16 BOM if a file is open in append mode, utf-16 BOM is not skipped after seek(0) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4565] Rewrite the IO stack in C
Benjamin Peterson benja...@python.org added the comment: These StringIO bugs should be dealt with: #5264 #5265 #5266 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1294959] Problems with /usr/lib64 builds.
Akira Kitada akit...@gmail.com added the comment: 3rd party C modules are put in site-packages, so just having importer of 64-bit python look at lib64-dynload is not enough for solving this. To work around this problem, I did some hacks on my local Python to look at lib and lib64. It worked, but just as belopolsky said, this is wasteful and ugly. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1294959 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat
Changes by Akira Kitada akit...@gmail.com: -- assignee: - tarek components: +Windows nosy: +tarek type: - compile error ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2698 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2941] Propagate define to resurce mingw32 compile
Changes by Akira Kitada akit...@gmail.com: -- assignee: - tarek components: +Windows nosy: +tarek type: - compile error ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2200] find_executable fails to find .bat files on win32
Changes by Akira Kitada akit...@gmail.com: -- assignee: - tarek components: +Windows nosy: +tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2200 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4010] configure options don't trickle down to distutils
Changes by Akira Kitada akit...@gmail.com: Removed file: http://bugs.python.org/file12954/issue4010.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4010 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4010] configure options don't trickle down to distutils
Akira Kitada akit...@gmail.com added the comment: Updated issue4010 to honor os.environ['CPPFLAGS']. Added file: http://bugs.python.org/file13212/issue4010.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4010 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5394] Distutils in trunk does not work with old Python (2.3 - 2.5)
Tarek Ziadé ziade.ta...@gmail.com added the comment: right, this code is not covered by tests. I'll apply your patch, and add a test case for that. -- priority: - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5394 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2385] run_setup can fail if the setup script uses __file__
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2385 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1407] [performance] Too many closed() checkings
Antoine Pitrou pit...@free.fr added the comment: Closing, as I don't think there's any point trying to micro-optimize the Python version. -- resolution: later - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1407 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3618] possible deadlock in IO library (Lib/io.py)
Antoine Pitrou pit...@free.fr added the comment: I don't know. The RLock is a lot slower than the normal non-recursive variation, on the other hand I'm not sure we care about performance of the Python version that much. Opinions welcome. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3618 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5238] ssl makefile never closes socket
Changes by Benjamin Peterson benja...@python.org: -- assignee: - janssen nosy: +janssen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5238 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3618] possible deadlock in IO library (Lib/io.py)
Benjamin Peterson benja...@python.org added the comment: 2009/2/28 Antoine Pitrou rep...@bugs.python.org: Antoine Pitrou pit...@free.fr added the comment: I don't know. The RLock is a lot slower than the normal non-recursive variation, on the other hand I'm not sure we care about performance of the Python version that much. Opinions welcome. I'm +0. The deadlock will only affect people specifically messing with the Python io implementation. It's low priority, so maybe we should just do it when RLock is rewritten in C. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3618 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533164] Installed but not listed *.pyo break bdist_rpm
Martin v. Löwis mar...@v.loewis.de added the comment: I've read the thread while working in the patch, and comment #28 explains that brp-python-bytecompile is called over the rpms and requires pyo files within the file list. Sure, I'm not objecting. I claim that the patch might be insufficient, and that brp-python-bytecompile produces bytecode files that bdist_rpm didn't mention. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533164 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5395] array.fromfile not checking I/O errors
New submission from Eduardo Aguiar agu...@users.sourceforge.net: At arraymodule.c (line 1258): nread = fread(item + (Py_SIZE(self) - n) * itemsize, itemsize, n, fp); if (nread (size_t)n) { Py_SIZE(self) -= (n - nread); PyMem_RESIZE(item, char, Py_SIZE(self)*itemsize); self-ob_item = item; self-allocated = Py_SIZE(self); PyErr_SetString(PyExc_EOFError, not enough items in file); return NULL; } When fread returns 0, ferror should be called to check if it was an EOF or an error condition. It is not handling OSErrors, such as I/O errors, raising always not enough items in file. -- components: Library (Lib) messages: 82936 nosy: aguiar severity: normal status: open title: array.fromfile not checking I/O errors type: behavior versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5395 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5396] os.read not handling O_DIRECT flag
New submission from Eduardo Aguiar agu...@users.sourceforge.net: At posixmodule.c (line 6306) static PyObject * posix_read(PyObject *self, PyObject *args) { int fd, size, n; PyObject *buffer; if (!PyArg_ParseTuple(args, ii:read, fd, size)) return NULL; if (size 0) { errno = EINVAL; return posix_error(); } buffer = PyString_FromStringAndSize((char *)NULL, size); if (buffer == NULL) return NULL; Py_BEGIN_ALLOW_THREADS n = read(fd, PyString_AsString(buffer), size); Py_END_ALLOW_THREADS if (n 0) { Py_DECREF(buffer); return posix_error(); } if (n != size) _PyString_Resize(buffer, n); return buffer; } os.read does not work with O_DIRECT flag. It fails with errno = EINVAL. From read(2) man page: EINVAL fd is attached to an object which is unsuitable for reading; or the file was opened with the O_DIRECT flag, and either the address specified in buf, the value specified in count, or the current file offset is not suitably aligned. if os.open is called with O_DIRECT flag enabled, the buffer used in read must be page aligned and size must be multiple of pagesize also. -- components: Library (Lib) messages: 82938 nosy: aguiar severity: normal status: open title: os.read not handling O_DIRECT flag type: behavior versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5396 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5373] TypeError when '\x00' in docstring
Alexandre Vassalotti alexan...@peadrop.com added the comment: The motivation behind the restriction was to prevent the tp_doc member to get truncated. Since tp_doc is a C string, it cannot contains embeded null bytes. However, it seems tp_doc is not used at all for heap types. So, I don't mind lifting the restriction. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5373 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5370] unpickling vs. __getattr__
Mike Meyer m...@users.sourceforge.net added the comment: The args attribute gets created by __init__ and nothing in the class removes it. I don't think it's unreasonable for the class to expect the attribute to not vanish on it. Possibly it should be spelled __args (or declared private :-), but neither of those would make a difference in this case. Any feature access can be made more robust by checking for it in __dict__ first, but such a practice is neither practical nor pragmatic. It may be different for __getargs__, in which case the bug is in the documentation for __getargs__, which should mention this issue. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5373] TypeError when '\x00' in docstring
Changes by Alexandre Vassalotti alexan...@peadrop.com: Added file: http://bugs.python.org/file13214/remove_null_restriction_on_classdoc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5373 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5373] TypeError when '\x00' in docstring
Changes by Alexandre Vassalotti alexan...@peadrop.com: Removed file: http://bugs.python.org/file13213/remove_null_restriction_on_classdoc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5373 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4967] Bugs in _ssl object read() when a buffer is specified
Benjamin Peterson benja...@python.org added the comment: Ok, will leave as is. -- versions: -Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4967 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5019] Specifying common controls DLL in manifest
Robin Dunn ro...@alldunn.com added the comment: Thanks for the code. I've verified your findings and I've also converted nested to an extension module and built it with distutils and was still able to make it correctly load the themed common controls when imported from Python, however I had to hack distutils a little bit to keep it working. In this case the code in msvc9compiler.py that runs mt.exe overwrites the manifest that is specified in the rc file with one that doesn't include the common controls assembly. I've still got to figure out what is the difference between this test and wxPython's build... It seems that none of the obvious things have any effect. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5019 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5373] TypeError when '\x00' in docstring
Georg Brandl ge...@python.org added the comment: Looks good. (Alternately, you could also set tp_doc to NULL in the embedded \0 case.) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5373 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5391] mmap: read_byte/write_byte and object type
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Patch attached. read_byte and write_byte use integer as byte, and other bytes related cleanup. -- keywords: +patch Added file: http://bugs.python.org/file13215/py3k_mmap_and_bytes.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5391 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4459] bdist_rpm assumes python
Akira Kitada akit...@gmail.com added the comment: There are two options for that in bdist_rpm. --python path to Python interpreter to hard-code in the .spec file (default: python) --fix-python hard-code the exact path to the current Python interpreter in the .spec file -- nosy: +akitada, tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4214] no extension debug info with msvc9compiler.py
Changes by Akira Kitada akit...@gmail.com: -- assignee: - tarek components: +Windows nosy: +tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4214 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5067] Error msg from using wrong quotes in JSON is unhelpful
Cherniavsky Beni c...@users.sf.net added the comment: Perhaps it should not be an error at all? The default should probably stay strict to the spec, but IMHO the module should provide an optional lenient parsing mode that also accepts single quotes. Why support single quotes and not any other imaginable deviation from the spec? Because single quotes are the only way (AFAIK) in which Python's repr() produces invalid JSON (from JSONable combinations of types). -- nosy: +cben ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Regexp 2.7 (modifications to current re 2.2.2)
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: issue2636-features-5.diff includes: Bugfixes Added \G anchor (from Perl). \G is the anchor at the start of a search, so re.search(r'\G(\w)') is the same as re.match(r'(\w)'). re.findall normally performs a series of searches, each starting where the previous one finished, but if the pattern starts with \G then it's like a series of matches: re.findall(r'\w', 'abc def') ['a', 'b', 'c', 'd', 'e', 'f'] re.findall(r'\G\w', 'abc def') ['a', 'b', 'c'] Notice how it failed to match at the space, so no more results. Added file: http://bugs.python.org/file13216/issue2636-features-5.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5067] Error msg from using wrong quotes in JSON is unhelpful
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: +1 on Steven's request for a better error message. +1 on Beni's request for looser input requirements for better interoperability with Python's repr. OTOH, I've never found it hard to write: s.replace(', ''). -- assignee: - bob.ippolito nosy: +bob.ippolito, rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533164] Installed but not listed *.pyo break bdist_rpm
Mads Kiilerich m...@kiilerich.com added the comment: Martin, What is the goal of bdist_rpm? I haven't seen that stated explicitly anywhere, but I assume the goal is to make a fair attempt to easily create usable RPMs for some software already using distutil, acknowledging that it might not work in all cases (because some projects do strange (buggy?) things) and that the RPMs probably can't be used in distributions directly (because they probably have their own rules and requirements). The applied patch makes it possible for bdist_rpm to work in _some_ situations on Fedora. IMHO that is +1. Yes, this patch might not be enough to make it work with *.py __main__ files. IMHO that is a less critical issue. Personally I have never seen bdist_rpm fail for this reason. (But often for other reasons.) An advantage of this patch is that it just fixes the existing approach to work in more situations. Disabling _unpackaged_files_terminate_build would IMHO be a bad solution. That would cause successful RPM builds which doesn't include all the files distutil installed. And FWIW I don't understand how __os_install_post could solve the problem. If you want another approach: Why use a filelist at all? Yes, it is needed if the RPM is built in place, but these days (at least on Fedora) RPMs are always built in an empty RPM_BUILD_ROOT. So everything found in RPM_BUILD_ROOT has been installed by distutils, and that includes all the files and directories the RPM should contain. For 2.5 a simplified patch for this is: # files section spec_file.extend([ '', -'%files -f INSTALLED_FILES', +'%files', '%defattr(-,root,root)', +'/', ]) That will also make the RPM own all directories in the path to its files. That is bad in a distribution but might be OK for bdist_rpm. To avoid that we could continue to use -f INSTALLED_FILES but generate the file list with a simple find command in the %install section and remove well-known paths such as /usr/lib/python*/site-packages, /usr/bin, /etc and whatever we could come up with from the list. This approach might work for almost all (sufficiently wellformed) packages using distutil and will redefine bdist_rpm to put all files in a an RPM instead of installing them directly, so that they can be removed by uninstalling the RPM. For example it works for logilab.astng and logilab.pylint which didn't work before. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533164 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4843] make distutils use shutil
Akira Kitada akit...@gmail.com added the comment: 'ignore' was introduced in Python 2.6 but distutils has to keep Python 2.3 compatible. See: http://bugs.python.org/issue5052 So I guess you have to wait some more years before dropping distutils.dir_util and distutils.file_util. -- nosy: +akitada ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1355826] shutil.move() does not preserve ownership
Changes by Akira Kitada akit...@gmail.com: -- type: - feature request versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1355826 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533164] Installed but not listed *.pyo break bdist_rpm
Martin v. Löwis mar...@v.loewis.de added the comment: What is the goal of bdist_rpm? I haven't seen that stated explicitly anywhere, but I assume the goal is to make a fair attempt to easily create usable RPMs for some software already using distutil, acknowledging that it might not work in all cases (because some projects do strange (buggy?) things) and that the RPMs probably can't be used in distributions directly (because they probably have their own rules and requirements). Correct. The applied patch makes it possible for bdist_rpm to work in _some_ situations on Fedora. IMHO that is +1. I agree. I had another complaint about that patch, though, which is the addition of an option for not including .pyo files. I still like to see addition of this option reverted. Disabling _unpackaged_files_terminate_build would IMHO be a bad solution. That would cause successful RPM builds which doesn't include all the files distutil installed. And FWIW I don't understand how __os_install_post could solve the problem. IIUC, setting %define __os_install_post %{___build_post} should prevent invocation of brp-python-bytecompile. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533164 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com