[issue3831] Multiprocessing: Expose underlying pipe in queues
Andres Freund and...@anarazel.de added the comment: As soon as some bytes are signalled as being available one can simply do a normal get(). I don't really see the problem here? Sure, the get() might not be completely non-blocking (especially if the transferred event is more than the size of a pipe-buffer) but I have a hard time seing that as a problem as that should be both rare and only last a short time. My personal use-case is being able to efficiently wait for evens from different queues - using the standard api one currently can only do that by busy looping... The biggest thing I see where you have to be careful here is some stomping herd phenomenon you will get into if you have multiple readers doing a poll(). Namely *all* off those processes will awake and run into .get() which isnt exactly nice, but thats hardly solvable on python level. -- nosy: +andresfreund ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3831 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8932] test_capi fails --without-threads
Changes by Stefan Krah stefan-use...@bytereef.org: -- keywords: +patch Added file: http://bugs.python.org/file17594/issue8932.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8932 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8832] automate minidom.unlink() with a context manager
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Thank you all. I updated the unittest, and committed this in: revision: 81856 -- stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8832 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8838] Remove codecs.readbuffer_encode() and codecs.charbuffer_encode()
Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: STINNER Victor victor.stin...@haypocalc.com added the comment: r81854 removes codecs.charbuffer_encode() (and t# parsing format) from Python 3.2 (blocked in 3.1: r81855). -- My problem with codecs.readbuffer_encode() is that it does accept byte *and* character strings. If you want to get a byte string, just use bytes(input). If you want to convert a character string to a byte string, use input.encode(utf-8). But accepting both types may lead to mojibake as we had in Python2. The point is to have an interface to the s# parser marker from Python. This accepts bytes, objects with a buffer interface and Unicode objects (via the default encoding). It does not accept e.g. lists, tuples or plain integers like bytes() does. MAL That's a common misunderstanding. The codec system does not MAL mandate a specific type combination. Only the helper methods MAL .encode() and .decode() on bytes and str objects in Python3 do. This is related to #7475: we have to decide if we drop completly this (currently unused) feature (eg. remove codecs.readbuffer_encode()), or if we reenable this feature again (reintroduce hex, bz2, rot13, ... codecs). This discussion should occur on the mailing list. We are not going to drop this design feature of the codec system and we've already had the discussion in 2008. The statement that it is an unused feature is plain wrong. Please don't forget that people are actually using these things in their applications, many of which have not been ported to Python3. We're not just talking about code that you find in CPython or the stdlib. The removed codecs will go back into 3.2. -- title: Remove codecs.readbuffer_encode()and codecs.charbuffer_encode() - Removecodecs.readbuffer_encode() and codecs.charbuffer_encode() ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8838 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8939] Use C type names (PyUnicode etc;) in the C API docs
Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: STINNER Victor victor.stin...@haypocalc.com added the comment: Big patch: - replace Python types by C Python types (eg. str = PyUnicodeObject* and None = Py_None) I was thinking of e.g. PyUnicode, not PyUnicodeObject*. - add quotes to the formats, eg. s = s Why do you put the parser codes in double quotes ? - use :ctype: to add links to some terms (eg. Py_BEGIN_ALLOW_THREADS) and use a fixed width font - replace the default encoding by 'utf-8' encoding - replace true by 1, and false by 0 (C API of Python doesn't use stdbool.h but classic int) That's not necessarily correct: true in C means non-zero. Only false equates to 0. You can however, make that change if the function actually does always return 1. In general, most C functions in Python use these integer return values: 1 - success 0 - no success -1 - error Some of them also return a positive integer 1 for success or a negative integer -1 for error, but those are exceptions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8939 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8932] test_capi fails --without-threads
Stefan Krah stefan-use...@bytereef.org added the comment: Committed in r81857. Blocked for release31-maint (requires additional fixes). -- resolution: - accepted stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8932 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8939] Use C type names (PyUnicode etc;) in the C API docs
STINNER Victor victor.stin...@haypocalc.com added the comment: Le mercredi 09 juin 2010 11:06:25, vous avez écrit : - replace Python types by C Python types (eg. str = PyUnicodeObject* and None = Py_None) I was thinking of e.g. PyUnicode, not PyUnicodeObject*. I don't know PyUnicode, only unicode (Python type) or PyUnicodeObject* (C Python type). :ctype:`PyUnicodeObject*` creates a link in the HTML documentation. - add quotes to the formats, eg. s = s Why do you put the parser codes in double quotes ? It's easier to search a format: try to search s or b format in the current documentation, you will see :-) I think that it's also more readable and closer to the real source code (eg. a call to PyArg_ParseTuple() uses quotes). - replace true by 1, and false by 0 (C API of Python doesn't use stdbool.h but classic int) That's not necessarily correct: true in C means non-zero. Only false equates to 0. You can however, make that change if the function actually does always return 1. There are only 2 possible results: 0 or 1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8939 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8904] quick example how to fix docs
Tal Einat talei...@users.sourceforge.net added the comment: AFAIK submitting patches in general is covered well enough in several places. What I'm missing specifically regarding patches for documentation is instructions on how to preview them before submitting them. Editing reST is easy, but making sure you've done it correctly without knowing how to run it through Sphinx is impossible. I spent quite some time and couldn't figure this one out, and ended up submitting a doc patch without previewing it. To be specific, http://www.python.org/dev/contributing/ points to http://docs.python.org/dev/documenting/index.html which has quite a bit of information on reST but no information on Sphinx, despite the main page clearly stating: This document describes the style guide for our documentation, the custom reStructuredText markup introduced to support Python documentation and how it should be used, as well as the Sphinx build system. Finally, a simple how-to with concrete, technical steps on how to write, preview and submit a doc patch would really help, especially for those who have never before submitted a patch. A simple video example (e.g. on ShowMeDo) would be fantastic, but even just updated detailed textual instructions would be a great step forward. -- nosy: +taleinat status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8904 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8832] automate minidom.unlink() with a context manager
Éric Araujo mer...@netwok.org added the comment: You forgot to close the bug :) Note that if you write “r” or “revision ”, Roundup will make a link out of it. -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8832 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8952] Doc/c-api/arg.rst: fix documentation of number formats
New submission from STINNER Victor victor.stin...@haypocalc.com: The documentation of PyArg_Parse*() number formats specify that only int / float / complex are accepted, whereas any int / float / complex compatible object is accepted. compatible means that it has an __int__() / __float__() / __complex__() method, or nb_int / nb_float of Py_TYPE(obj)-tp_as_number-nb_int is defined (tp_as_number has no nb_complex). I suppose that the following paragraph is also outdated: It is possible to pass long integers (integers whose value exceeds the platform's :const:`LONG_MAX`) however no proper range checking is done --- the most significant bits are silently truncated when the receiving field is too small to receive the value (actually, the semantics are inherited from downcasts in C --- your mileage may vary). Moreover, without overflow checking should be explained (Mark told me that the number is truncated to a power of 2). -- assignee: d...@python components: Documentation, Interpreter Core messages: 107379 nosy: d...@python, haypo, mark.dickinson priority: normal severity: normal status: open title: Doc/c-api/arg.rst: fix documentation of number formats versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8949] PyArg_Parse*(): z should not accept bytes
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8949 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8923] Remove unused errors argument from _PyUnicode_AsDefaultEncodedString()
STINNER Victor victor.stin...@haypocalc.com added the comment: Since Python3 fixes the UTF-8 default encoding, it's better to enhance PyUnicode_AsUTF8String() to cache the UTF-8 string in the Unicode object Right, that sounds like a great idea. Attached patch implements that: patch PyUnicode_AsUTF8String() and PyUnicode_AsEncodedString(). Does it look ok? replace all uses of _PyUnicode_AsDefaultEncodedString() with PyUnicode_AsUTF8String() I'm waiting for your approval of the first patch before working on the second part. -- Added file: http://bugs.python.org/file17595/utf8_defenc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8923 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8952] Doc/c-api/arg.rst: fix documentation of number formats
Mark Dickinson dicki...@gmail.com added the comment: Yes, most of that paragraph is outdated. We should check exactly what does happen when the receiving field is too small (both in practice and in theory). In C, downcasting to an unsigned type is well-defined and will always reduce modulo 2**width_of_type. The result of downcasting to a signed type is implementation-defined, however; do we actually do that anywhere? If so, it would be nice to fix it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8939] Use C type names (PyUnicode etc;) in the C API docs
Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: STINNER Victor victor.stin...@haypocalc.com added the comment: Le mercredi 09 juin 2010 11:06:25, vous avez écrit : - replace Python types by C Python types (eg. str = PyUnicodeObject* and None = Py_None) I was thinking of e.g. PyUnicode, not PyUnicodeObject*. I don't know PyUnicode, only unicode (Python type) or PyUnicodeObject* (C Python type). :ctype:`PyUnicodeObject*` creates a link in the HTML documentation. The PyUnicode style is just an abbreviated version of the longer PyUnicodeObject, that we sometimes use, since writing Pass a PyUnicodeObject object to this function looks a bit silly. I don't have a strong opinion about this, though. The longer version is fine as well. - add quotes to the formats, eg. s = s Why do you put the parser codes in double quotes ? It's easier to search a format: try to search s or b format in the current documentation, you will see :-) I think that it's also more readable and closer to the real source code (eg. a call to PyArg_ParseTuple() uses quotes). It could lead developers into thinking that they have to use those quotes in their code. Perhaps you should add a note about this typographic addition to docs. - replace true by 1, and false by 0 (C API of Python doesn't use stdbool.h but classic int) That's not necessarily correct: true in C means non-zero. Only false equates to 0. You can however, make that change if the function actually does always return 1. There are only 2 possible results: 0 or 1. I wouldn't count on this. It may be the case now, but it's both hard to check by reading the code and knowing that only 1 can be returned doesn't buy a developer much. In fact, this has bitten us before with the cmp() function: users starting writing code like this because we documented the return codes as -1, 0, 1: a = b + z * cmp(x, y) Please use non-zero instead. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8939 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8949] PyArg_Parse*(): z should not accept bytes
Marc-Andre Lemburg m...@egenix.com added the comment: z should not accept bytes... why not ? z is the same as s with the addition that passing None as parameter will result in the pointer to get set to NULL. s accepts bytes via the buffer interface, so why should z behave differently ? If a function should only accept Unicode or None, then Z should be used instead. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8949 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8923] Remove unused errors argument from _PyUnicode_AsDefaultEncodedString()
Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: STINNER Victor victor.stin...@haypocalc.com added the comment: Since Python3 fixes the UTF-8 default encoding, it's better to enhance PyUnicode_AsUTF8String() to cache the UTF-8 string in the Unicode object Right, that sounds like a great idea. Attached patch implements that: patch PyUnicode_AsUTF8String() and PyUnicode_AsEncodedString(). Does it look ok? Looks good. replace all uses of _PyUnicode_AsDefaultEncodedString() with PyUnicode_AsUTF8String() I'm waiting for your approval of the first patch before working on the second part. When replacing uses of _PyUnicode_AsDefaultEncodedString() with PyUnicode_AsUTF8String() you have to take great care to decref the object returned by the latter. Otherwise, we get huge memory leaks. -- title: Remove unused errors argument from _PyUnicode_AsDefaultEncodedString() - Remove unused errors argument from _PyUnicode_AsDefaultEncodedString() ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8923 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value
Antoine Pitrou pit...@free.fr added the comment: Also witnessed on 2.x (UCS-2 build): unicode(b'\x00\x01\x00\x00', 'utf-32be') u'\ud800\u0773' unicode(b'\x00\x00\x01\x00', 'utf-32le') u'\U0001' -- nosy: +haypo, lemburg, pitrou priority: normal - high title: utf-32be codec failing on 16-bit python build for 32-bit value - utf-32be codec failing on UCS-2 python build for 32-bit value versions: +Python 2.6, Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value
Antoine Pitrou pit...@free.fr added the comment: The following code at the beginning of PyUnicode_DecodeUTF32Stateful is buggy when codec endianness doesn't match the native endianness (not to mention it could also crash if the underlying CPU arch doesn't support unaligned access to 4-byte integers): #ifndef Py_UNICODE_WIDE for (i = pairs = 0; i size/4; i++) if (((Py_UCS4 *)s)[i] = 0x1) pairs++; #endif As a result, the preallocated unicode object isn't long enough and Python writes into memory it shouldn't write into. It can produce hard crashes, such as: l = unicode(b'\x00\x01\x00\x00' * 1024, 'utf-32be') Debug memory block at address p=0xf2b310: 2050 bytes originally requested The 8 pad bytes at p-8 are FORBIDDENBYTE, as expected. The 8 pad bytes at tail=0xf2bb12 are not all FORBIDDENBYTE (0xfb): at tail+0: 0x00 *** OUCH at tail+1: 0xdc *** OUCH at tail+2: 0x00 *** OUCH at tail+3: 0xd8 *** OUCH at tail+4: 0x00 *** OUCH at tail+5: 0xdc *** OUCH at tail+6: 0x00 *** OUCH at tail+7: 0xd8 *** OUCH The block was made by call #61925422603698392 to debug malloc/realloc. Data at p: 00 d8 00 dc 00 d8 00 dc ... 00 dc 00 d8 00 dc 00 d8 Fatal Python error: bad trailing pad byte Abandon -- priority: high - critical type: behavior - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +doerwalter ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8949] PyArg_Parse*(): z should not accept bytes
STINNER Victor victor.stin...@haypocalc.com added the comment: Le mercredi 09 juin 2010 13:06:53, vous avez écrit : s accepts bytes via the buffer interface No. s* and s# do accept any buffer compatible object (including bytes and bytearray), but s doesn't. I fixed recently the documentation about that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8949 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value
Antoine Pitrou pit...@free.fr added the comment: Here is a simple patch. A test should be added, though. -- keywords: +patch Added file: http://bugs.python.org/file17596/utf32.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8939] Use C type names (PyUnicode etc;) in the C API docs
Éric Araujo mer...@netwok.org added the comment: 1 and 0 were formatted with ``1`` and ``0``. I don't understand why, so I removed the italic style. This reST construct marks up code. Please revert this change. :) -- nosy: +merwok ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8939 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value
Marc-Andre Lemburg m...@egenix.com added the comment: Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: The following code at the beginning of PyUnicode_DecodeUTF32Stateful is buggy when codec endianness doesn't match the native endianness (not to mention it could also crash if the underlying CPU arch doesn't support unaligned access to 4-byte integers): #ifndef Py_UNICODE_WIDE for (i = pairs = 0; i size/4; i++) if (((Py_UCS4 *)s)[i] = 0x1) pairs++; #endif Good catch ! I wonder whether it wouldn't be better to preallocate a Unicode object with size of e.g. size/4 + 16 and then resize the object as necessary in case a surrogate pair needs to be created (won't happen that often in practice). The extra scan for pairs can take long depending on how much data you have to decode and likely doesn't go down well with CPU caches. -- title: utf-32be codec failing on UCS-2 python build for 32-bit value - utf-32be codec failing on UCS-2 python build for 32-bit value ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8950] In getargs.c, make 'L' code raise TypeError for float arguments.
Mark Dickinson dicki...@gmail.com added the comment: Here's a patch. Victor, are you interested in reviewing? -- keywords: +patch Added file: http://bugs.python.org/file17597/issue8950.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8950 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - unit test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8948] cleanup functions are not executed with unittest.TestCase.debug()
Michael Foord mich...@voidspace.org.uk added the comment: Typo correction in revision 81859. Also needs merging onto py3k. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8948 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8950] In getargs.c, make 'L' code raise TypeError for float arguments.
STINNER Victor victor.stin...@haypocalc.com added the comment: Le mercredi 09 juin 2010 14:24:01, vous avez écrit : Here's a patch. Victor, are you interested in reviewing? I ran the whole test suite: there is no error. The patch is ok, please commit it in Python 3.2. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8950 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8953] Syntax error in http://docs.python.org/library/decimal.html#recipes
New submission from Jean Jordaan jean.jord...@gmail.com: http://docs.python.org/library/decimal.html#recipes has this code: for i in range(places): build(next() if digits else '0') Mismatched parenthesis. -- assignee: d...@python components: Documentation messages: 107396 nosy: Jean.Jordaan, d...@python priority: normal severity: normal status: open title: Syntax error in http://docs.python.org/library/decimal.html#recipes versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8953 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8953] Syntax error in http://docs.python.org/library/decimal.html#recipes
Jean Jordaan jean.jord...@gmail.com added the comment: Aargh, sorry, sent too quick :-( -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8953 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8953] Syntax error in http://docs.python.org/library/decimal.html#recipes
Changes by Brian Curtin cur...@acm.org: -- resolution: - invalid ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8953 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8954] wininst regression: errors when building on linux
anatoly techtonik techto...@gmail.com added the comment: At least is was reported that compiled binaries contains wrong platform name, i.e. 'linux' and there are errors about inability to look up some compiler options in windows registry while building. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8954 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8954] wininst regression: errors when building on linux
Brian Curtin cur...@acm.org added the comment: Where was that reported? -- nosy: +brian.curtin stage: - unit test needed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8954 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value
Antoine Pitrou pit...@free.fr added the comment: Here is a new patch with tests. I wonder whether it wouldn't be better to preallocate a Unicode object with size of e.g. size/4 + 16 and then resize the object as necessary in case a surrogate pair needs to be created (won't happen that often in practice). The extra scan for pairs can take long depending on how much data you have to decode and likely doesn't go down well with CPU caches. Perhaps, but I think this should measured and be the target of a separate issue. We're in rc phase and we should probably minimize potential disruption. -- Added file: http://bugs.python.org/file17598/utf32-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1100942] Add datetime.time.strptime and datetime.date.strptime
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I have updated Amaury's patch for py3k. I simplified the test for default date values and fixed a documentation nit. (Time fileds are [4:7], not [4:6]). The result is attached as issue1100942.diff. Note that date.strptime accepts some time specs and time.strptime accepts some date specs: time.strptime('1900', '%Y') datetime.time(0, 0) date.strptime('00', '%H') datetime.date(1900, 1, 1) This matches the proposed documentation, but I am not sure is desirable. I am about +0 for making the test more robust by scanning the format string and rejecting date format codes in time.strptime and time format codes in date. This will also allow better diagnostic messages. For example, instead of date.strptime('01', '%M') Traceback (most recent call last): .. ValueError: date.strptime value cannot have a time part we can produce '%M' is not valid in date format specification. -- keywords: +easy, patch Added file: http://bugs.python.org/file17599/issue1100942.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1100942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8947] Provide as_integer_ratio() method to Decimal
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8947 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8955] import doesn't notice changes to working directory
New submission from James purplei...@gmail.com: Attempting to change the working directory and then import based on that change has no effect. Import seems impossible. Attached is tarball example. As seen below, bar1.py can import foo from src, however bar2.py bar3.py and bar4.py cannot, despite their respective scripts changing their cwd. Below is results of a terminal session. Thanks in advance. ja...@hostname:~$ tree import_bug/ import_bug/ |-- bar1.py |-- __init__.py |-- src | |-- foo.py | `-- __init__.py `-- test |-- bar2.py |-- bar3.py |-- bar4.py |-- bar5.py `-- __init__.py 2 directories, 9 files ja...@hostname:~$ cat import_bug/src/foo.py # this is foo.py print('this is foo.py') ja...@hostname:~$ cat import_bug/bar1.py # this is bar1.py import os print(os.getcwd()) from src import foo print('this is bar1.py') ja...@hostname:~$ cat import_bug/test/bar2.py # this is bar2.py import os os.chdir(os.path.join(os.path.dirname(__file__), os.pardir)) print(os.getcwd()) from src import foo print('this is bar2.py') ja...@hostname:~$ python import_bug/bar1.py /home/james this is foo.py this is bar1.py ja...@hostname:~$ python import_bug/test/bar2.py /home/james/import_bug Traceback (most recent call last): File import_bug/test/bar2.py, line 7, in module from src import foo ImportError: No module named src ja...@hostname:~$ -- components: Library (Lib) files: import_bug.tar messages: 107403 nosy: purpleidea priority: normal severity: normal status: open title: import doesn't notice changes to working directory versions: Python 2.6, Python 3.1 Added file: http://bugs.python.org/file17600/import_bug.tar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8955 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value
Marc-Andre Lemburg m...@egenix.com added the comment: Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: Here is a new patch with tests. I wonder whether it wouldn't be better to preallocate a Unicode object with size of e.g. size/4 + 16 and then resize the object as necessary in case a surrogate pair needs to be created (won't happen that often in practice). The extra scan for pairs can take long depending on how much data you have to decode and likely doesn't go down well with CPU caches. Perhaps, but I think this should measured and be the target of a separate issue. We're in rc phase and we should probably minimize potential disruption. Fair enough. Here's a little optimization: -if (qq[iorder[3]] != 0 || qq[iorder[2]] != 0) +if (qq[iorder[2]] != 0 || qq[iorder[3]] != 0) For non-BMP code points, it's more likely that byte 2 will be non-zero. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8077] cgi handling of POSTed files is broken
Guido van Rossum gu...@python.org added the comment: The example works for me if I make this change: --- Lib/cgi.py (revision 81862) +++ Lib/cgi.py (working copy) @@ -608,7 +608,7 @@ parser = email.parser.FeedParser() # Create bogus content-type header for proper multipart parsing parser.feed('Content-Type: %s; boundary=%s\r\n\r\n' % (self.type, ib)) -parser.feed(self.fp.read()) +parser.feed(self.fp.read(self.length)) full_msg = parser.close() # Get subparts msgs = full_msg.get_payload() However this seems iffy to me because the content length presumably counts bytes whereas self.fp seems to be a text file, but since most HTTP clients don't close the connection, without some kind of boundary on the read() call it just hangs forever. Also someone pointed out to me offline that this change may be needed, separately (though I haven't confirmed this yet): --- Lib/cgi.py (revision 81862) +++ Lib/cgi.py (working copy) @@ -233,6 +233,7 @@ lines = [] while 1: line = fp.readline() +line = line.decode() if not line: terminator = lastpart # End outer loop break -- components: -Documentation nosy: +gvanrossum ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8077 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8930] messed up formatting after reindenting
Antoine Pitrou pit...@free.fr added the comment: I've fixed some in r81860. If you see others, please signal them here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8930 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8949] PyArg_Parse*(): z should not accept bytes
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8949 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8955] import doesn't notice changes to working directory
R. David Murray rdmur...@bitdance.com added the comment: This is working as designed. Try printing sys.path in your scripts. It is what's in sys.path that matters, not the cwd. (The cwd is put in the path as in the specific case of running the python interactive shell...and in certain applications that embed Python because of a bug in those applications.) -- nosy: +r.david.murray resolution: - invalid stage: - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8955 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5115] Extend subprocess.kill to be able to kill process groups
Changes by Giampaolo Rodola' g.rod...@gmail.com: ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5115 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8956] Incorrect ValueError message for subprocess.Popen.send_signal() on Windows
New submission from Giampaolo Rodola' g.rod...@gmail.com: def send_signal(self, sig): Send a signal to the process if sig == signal.SIGTERM: self.terminate() elif sig == signal.CTRL_C_EVENT: os.kill(self.pid, signal.CTRL_C_EVENT) elif sig == signal.CTRL_BREAK_EVENT: os.kill(self.pid, signal.CTRL_BREAK_EVENT) else: raise ValueError(Only SIGTERM is supported on Windows) Just noticed right now while I was reading subprocess source code. I guess that should be Only SIGTERM, CTRL_C_EVENT or CTRL_BREAK_EVENT are supported on Windows. -- components: Library (Lib) messages: 107408 nosy: astrand, giampaolo.rodola priority: normal severity: normal status: open title: Incorrect ValueError message for subprocess.Popen.send_signal() on Windows versions: Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8956 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8956] Incorrect ValueError message for subprocess.Popen.send_signal() on Windows
Brian Curtin cur...@acm.org added the comment: Good catch, I forgot to update that message when adding the other signal support. Would you rather see something more generic like Unsupported signal rather than start listing all of the signals? Another alternative is to allow any signal through including integers, which are then just passed to os.kill (ints passed to kill get set as the proc exit code). However, we can't do that with 2.7, but could with 3.2. -- assignee: - brian.curtin components: +Windows nosy: +brian.curtin stage: - needs patch type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8956 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7839 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2267] datetime.datetime operator methods are not subclass-friendly
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I would like to take another shot at this. The link in Amaury's closing comment no longer works, so here is the relevant post: Returning same type as self for arithmetic in subclasses Tim Peters tim.peters at gmail.com Sat Jan 8 02:09:27 CET 2005 [Max M] I subclass datetime and timedelta dt = myDatetime(1970,1,1) type(dt) class 'dtime.myDatetime' td = myTimedelta(hours=1) type(td) class 'dtime.myTimedelta' But when I do arithmetic with these classes, they return datetime and timedelta, ... new_time = dt + td new_time datetime.datetime(1970, 1, 1, 1, 0) type(new_time) type 'datetime.datetime' Yes, and all builtin Python types work that way. For example, int.__add__ or float.__add__ applied to a subclass of int or float will return an int or float; similarly for a subclass of str. This was Guido's decision, based on that an implementation of any method in a base class has no idea what requirements may exist for invoking a subclass's constructor. For example, a subclass may restrict the values of constructor arguments, or require more arguments than a base class constructor; it may permute the order of positional arguments in the base class constructor; it may even be a feature that a subclass constructor gives a different meaning to an argument it shares with the base class constructor. Since there isn't a way to guess, Python does a safe thing instead. where I want them to return myDatetime and myTimedelta So I wondered if there was a simlpler way to coerce the result into my desired types rather than overwriting the __add__, __sub__ etc. methods? Generally speaking, no. But I'm sure someone will torture you with a framework that purports to make it easy wink. http://mail.python.org/pipermail/python-list/2005-January/925838.html As I explained in my previous post, the same argument, base class has no idea what requirements may exist for invoking a subclass's constructor, applies to class methods, but they nevertheless consistently construct subclass instances: class d(datetime): pass d.utcfromtimestamp(0) d(1970, 1, 1, 0, 0) d.fromtimestamp(0) d(1969, 12, 31, 19, 0) d.combine(date(1,1,1), time(1,1)) d(1, 1, 1, 1, 1) Similar example for the date class: class Date(date): pass Date.fromordinal(1) Date(1, 1, 1) In my view it is hard to justify that for a Date instance d, and integer days, Date.fromordinal(d.toordinal() + days) happily produces a Date instance, but d + timedelta(days) returns a basic date instance. -- assignee: - belopolsky components: +Extension Modules -Library (Lib) nosy: +mark.dickinson resolution: wont fix - status: closed - open versions: +Python 3.2 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2267 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated
Giampaolo Rodola' g.rod...@gmail.com added the comment: I totally agree this should be fixed (there was a similar issue for psutil: http://code.google.com/p/psutil/issues/detail?id=58) but communicate() and wait() should be affected in the same manner. Probably it would make sense to add an is_running() method and decorate send_signal(), kill(), communicate() and wait() methods with a function which makes sure that the process is still running, otherwise raises an exception instead. Maybe it would also makes sense to provide a brand new NoSuchProcess exception class. -- nosy: +astrand, brian.curtin, giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6973 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1578643] various datetime methods fail in restricted mode
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I would like to remove datetime module dependency on time module altogether. For example getting timestamp as a float and later break it into sec/usec just to satisfy time module API looks rather inefficient. -- assignee: - belopolsky nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1578643 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8957] strptime('%c', ..) fails to parse output of strftime('%c', ..) in non-English locale
New submission from Alexander Belopolsky belopol...@users.sourceforge.net: The following code: import locale, time locale.setlocale(locale.LC_ALL, fr_FR.UTF-8) t = time.localtime() s = time.strftime('%c', t) time.strptime('%c', s) Raises ValueError: time data '%c' does not match format 'Mer 9 jui 16:14:46 2010' in any locale where month follows day in '%c' format. Note that attached C code works as expected on my OSX laptop. I wonder it it would make sense to call platform strptime where available? I wonder if platform support for strptime has improved since 2002 when _strptime.py was introduced. -- assignee: belopolsky components: Extension Modules files: strptime-locale-bug.c messages: 107413 nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: strptime('%c', ..) fails to parse output of strftime('%c', ..) in non-English locale type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file17601/strptime-locale-bug.c ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8957 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8957] strptime('%c', ..) fails to parse output of strftime('%c', ..) in non-English locale
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Added file: http://bugs.python.org/file17602/strptime-locale-bug.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8957 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2267] datetime.datetime operator methods are not subclass-friendly
Mark Dickinson dicki...@gmail.com added the comment: If you want to challenge Guido's design decision, I think python-dev would be the place to do it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2267 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7739] time.strftime may hung while trying to open /etc/localtime but does not release GIL
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Victor, I understand your last comment as wanting to keep the GIL while calling tzset(), but release it around the strftime() call. You still want to apply your patch, right? I think the problem is not with a concurrent tzset() call, but with another thread changing TZ environment variable. See http://sourceware.org/bugzilla/show_bug.cgi?id=4350 -- assignee: - belopolsky nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7739 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2267] datetime.datetime operator methods are not subclass-friendly
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: If you want to challenge Guido's design decision, I think python-dev would be the place to do it. Do you have a link supporting that it was Guido's design decision? This decision must have been made around class/type unification, but I don't remember reading about it in Guido's essays. I don't want to make a fool of myself by coming to python-dev with this unprepared. :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2267 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2267] datetime.datetime operator methods are not subclass-friendly
Mark Dickinson dicki...@gmail.com added the comment: Do you have a link [...] Nope. Just going on Tim's description of it as Guido's decision. I've no idea of the history, and I don't particularly recall any recent relevant python-dev discussions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2267 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3297] Python interpreter uses Unicode surrogate pairs only before the pyc is created
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 2.4, Python 2.5, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1193610] Expat Parser to supply document locator in incremental parse
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.2 -Python 2.5, Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1193610 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1193610] Expat Parser to supply document locator in incremental parse
Changes by Terry J. Reedy tjre...@udel.edu: -- priority: high - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1193610 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8958] 2.7rc1 tarfile.py: `bltn_open(targetpath, wb)` - IOError: Is a directory
New submission from Sridhar Ratnakumar sridh...@activestate.com: 1. Find an OSX 10.5.8 machine 2. wget http://hntool.googlecode.com/files/hntool-0.1.1.tar.gz 3. $ python2.7 -c import tarfile as T; t=T.open('hntool-0.1.1.tar.gz'); t.extractall() Traceback (most recent call last): File string, line 1, in module File /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py, line 2046, in extractall self.extract(tarinfo, path) File /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py, line 2083, in extract self._extract_member(tarinfo, os.path.join(path, tarinfo.name)) File /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py, line 2159, in _extract_member self.makefile(tarinfo, targetpath) File /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py, line 2198, in makefile target = bltn_open(targetpath, wb) IOError: [Errno 21] Is a directory: './hntool-0.1.1/hntool' ... Note that, when extracted open via other tools, hntool-0.1.1.tar.gz contains within it ... both a directory named HnTool (note the case) and a file called hntool. -- components: Library (Lib) messages: 107419 nosy: srid priority: normal severity: normal status: open title: 2.7rc1 tarfile.py: `bltn_open(targetpath, wb)` - IOError: Is a directory type: crash versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8958 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4947] sys.stdout fails to use default encoding as advertised
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 2.4, Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4947 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1856] shutdown (exit) can hang or segfault with daemon threads running
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 2.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1856 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5302] Allow package_data globs match directories
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5302 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3710] Reference leak in thread._local
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3710 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2620] Multiple buffer overflows in unicode processing
Terry J. Reedy tjre...@udel.edu added the comment: Brett, open and fixed are contradictory? for what version did you reopen this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2620 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1753718] base64 legacy functions violate RFC 3548
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1753718 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1767511] SocketServer.DatagramRequestHandler
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1767511 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2020] _sha256 module missing if openssl is not in a normal directory.
Terry J. Reedy tjre...@udel.edu added the comment: Does this 2.5 issue apply to anything current? -- nosy: +tjreedy status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2020 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1739842] xmlrpclib can no longer marshal Fault objects
Changes by Terry J. Reedy tjre...@udel.edu: -- resolution: - fixed status: open - closed versions: +Python 2.6 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1739842 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5302] Allow package_data globs match directories
Éric Araujo mer...@netwok.org added the comment: Terry, I’m undoing your changes. Tarek told me to set these versions, since Distutils2 will be compatible from 2.4 to 3.2. Triaging-ly y’rs ;) -- versions: +Python 2.5, Python 2.6, Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5302 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2401] Solaris: ctypes tests being skipped despite following #1516
Terry J. Reedy tjre...@udel.edu added the comment: Does this apply to any current version? -- nosy: +tjreedy resolution: - out of date status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2401 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2148] nis module not supporting group aliases
Terry J. Reedy tjre...@udel.edu added the comment: Is this really a bug (discrepancy between nis.cat doc and behavior) or a feature request? -- nosy: +tjreedy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2148 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2174] xml.sax.xmlreader does not support the InputSource protocol
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2174 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2175] Expat sax parser silently ignores the InputSource protocol
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2175 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1483] xml.sax.saxutils.prepare_input_source ignores character stream in InputSource
Terry J. Reedy tjre...@udel.edu added the comment: Are this and the other issues still problems in 2.7 (rc out now) and 3.1? -- nosy: +tjreedy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1483 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2209] mailbox module doesn't support compressed mbox
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.2 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2209 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2212] Cookie.BaseCookie has ambiguous unicode handling
Terry J. Reedy tjre...@udel.edu added the comment: Sean, I don't understand 'inline' in this context. -- nosy: +tjreedy versions: -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2126] BaseHTTPServer.py fails long POST from IE
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 2.7 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2126 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2604] doctest.DocTestCase fails when run repeatedly
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.4, Python 2.5, Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2604 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1738] filecmp.dircmp does exact match only
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1738 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1738] filecmp.dircmp does exact match only
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 2.6, Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1738 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1874] email parser does not register a defect for invalid Content-Transfer-Encoding on multipart messages
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1874 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2818] pulldom cannot handle xml file with large external entity properly
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2818 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2840] Expat parser locks XML source file if ContentHandler raises an exception
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2840 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8604] Adding an atomic FS write API
STINNER Victor victor.stin...@haypocalc.com added the comment: Trac has an AtomicFile class which copies file mode, owner, etc. http://trac.edgewall.org/browser/trunk/trac/util/__init__.py?#L145 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8604 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2892] improve cElementTree iterparse error handling
Changes by Terry J. Reedy tjre...@udel.edu: -- type: behavior - feature request versions: +Python 3.2 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2892 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1257] atexit errors should result in nonzero exit code
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.4, Python 2.5, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1257 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2901] error: can't allocate region from mmap() when receiving big chunk of data
Terry J. Reedy tjre...@udel.edu added the comment: Please test on 2.6 or better, 2.7 (rc already out) and 3.1 to verify there still is a problem. -- nosy: +tjreedy status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2901 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1730136] tkFont.__eq__ gives type error
Terry J. Reedy tjre...@udel.edu added the comment: I agree that this change is sensible and verified that it is needed for 3.1 as well. I think it should be applied. -- nosy: +tjreedy stage: - commit review versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1730136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1738] filecmp.dircmp does exact match only
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: The patch does not apply to py3k branch. -- assignee: - belopolsky stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1738 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3053] test_shutil fails under AIX
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3053 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2657] Curses sometimes fails to initialize terminal
Terry J. Reedy tjre...@udel.edu added the comment: Is this an issue with 2.7 or 3.1? -- nosy: +tjreedy status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2657 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8954] wininst regression: errors when building on linux
anatoly techtonik techto...@gmail.com added the comment: In this SCons thread http://scons.tigris.org/ds/viewMessage.do?dsForumId=1268dsMessageId=2617686 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8954 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8828] Atomic function to rename a file
STINNER Victor victor.stin...@haypocalc.com added the comment: About the function names: - shutil.atomic_move_file(): only available on some OS - shutil.move_file(): use shutil.atomic_move_file() if available, or fall back to a best effort implementation Implement an atomic function to rename a directory is more complex and should be done in another issue. That's why I added _file suffix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8828 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8784] tarfile/Windows: Don't use mbcs as the default encoding
STINNER Victor victor.stin...@haypocalc.com added the comment: I created a TAR archive with the 7-zip archiver of file with diacritics in their name (eg. é and à). Then I opened the archive with WinRAR: the file names were not displayed correctly :-/ 7-zip encodes à (U+00e0) as 0x85 (1 byte), and é (U+00e9) as 0x82 (1 byte). I don't know this encoding. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8784 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue665194] datetime-RFC2822 roundtripping
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: -1 on adding more formatting/parsing methods to datetime. +1 on adding functions to email.utils that work with datetime objects. Adding #5094 as a dependency because RFC 2822 requires timezone information for proper formatting. -- dependencies: +datetime lacks concrete tzinfo impl. for UTC stage: patch review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue665194 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3129] struct allows repeat spec. without a format specifier
Terry J. Reedy tjre...@udel.edu added the comment: I verified that 3.1 has same behavior. Doc says format strings are built up from format characters which may be preceded by an integral repeat count. So I agree that such formats are bugs that should be reported and that ignoring repeat counts of nothing is a bug. While I cannot apply and test the (trivial) patch, I read it and it looks sensible. Pending independent test, I would say apply. I am not familiar with whether it needs to be rebuilt against current code or not. -- keywords: +patch nosy: +tjreedy stage: - commit review versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3129 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3213] pydoc -p should listen to [::] if IPv6 is supported
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3213 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8784] tarfile/Windows: Don't use mbcs as the default encoding
Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: STINNER Victor victor.stin...@haypocalc.com added the comment: I created a TAR archive with the 7-zip archiver of file with diacritics in their name (eg. é and à). Then I opened the archive with WinRAR: the file names were not displayed correctly :-/ 7-zip encodes à (U+00e0) as 0x85 (1 byte), and é (U+00e9) as 0x82 (1 byte). I don't know this encoding. That's an old DOS code paged used in Europe: CP850 http://en.wikipedia.org/wiki/Code_page_850 -- nosy: +lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8784 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3276] httplib.HTTPConnection._send_request should not blindly assume dicts for headers
Terry J. Reedy tjre...@udel.edu added the comment: This is a feature request for now old versions. It would have to be reformulated as a feature request for a 3.2 module. I do not see the dict (mapping now?) requirement being changed. -- nosy: +tjreedy resolution: - out of date status: open - pending type: - feature request versions: -Python 2.1.1, Python 2.1.2, Python 2.2, Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3276 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8784] tarfile/Windows: Don't use mbcs as the default encoding
Marc-Andre Lemburg m...@egenix.com added the comment: Marc-Andre Lemburg wrote: Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: STINNER Victor victor.stin...@haypocalc.com added the comment: I created a TAR archive with the 7-zip archiver of file with diacritics in their name (eg. é and à). Then I opened the archive with WinRAR: the file names were not displayed correctly :-/ 7-zip encodes à (U+00e0) as 0x85 (1 byte), and é (U+00e9) as 0x82 (1 byte). I don't know this encoding. That's an old DOS code paged used in Europe: CP850 http://en.wikipedia.org/wiki/Code_page_850 Looks like the cmd.exe on WinXP still uses it. At least on my German WinXP it does for Python 2.3 and older. Starting with Python 2.4, the behavior changed to use CP1252 instead: D:\Python26python Python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on wi 32 Type help, copyright, credits or license for more information. u'àé' u'\xe0\xe9' D:\Python25python Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. u'áé' u'\xe1\xe9' D:\Python24python Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. u'àé' u'\xe0\xe9' D:\Python23python Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. u'àé' u'\x85\x82' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8784 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3423] DeprecationWarning message applies to wrong context with exec()
Terry J. Reedy tjre...@udel.edu added the comment: In 3.1, I get exec(1/0) Traceback (most recent call last): File pyshell#5, line 1, in module exec(1/0) File string, line 1, in module ZeroDivisionError: int division or modulo by zero In your example, would you really prefer that the warning message start with string1 (or the 2.x equivalent) instead of t.py1? If I were running a multi-file app with warnings turned on, I would prefer the latter. The message DeprecationWarning: raising a string exception is deprecated is certainly enough to suggest that one search the file for 'raise'. In any case, this would only be a bug if it disagreed with docs or if this were different from the usual behavior with deprecation warnings. It is too late for new features in 2.x and this does not apply to 3.x. -- nosy: +tjreedy resolution: - rejected status: open - closed type: - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3423 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com