[issue2636] Regexp 2.7 (modifications to current re 2.2.2)
Georg Brandl ge...@python.org added the comment: (?flags) are still scoping by default... a new flag to activate that behavior would really by helpful :) -- ___ 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
[issue8746] os.chflags() and os.lchflags() are not built when they should be be
Ned Deily n...@acm.org added the comment: Actually the flags do already exist: note (as defined in the stat module) (http://docs.python.org/py3k/library/os.html#os.chflags). Other than the new UF_HIDDEN, it looks like they are all hardwired there in Lib/stat.py. There is something to be said for the approach in your patch in that it guarantees that the flags match the build OS definitions; the downside is some lack of portability and cross-testing. Considering that there are other stat flags in there and have been for a long time, I'd be inclined to not change things other than throwing in UF_HIDDEN. Regarding testing, perhaps the single most important thing would be to add a test that os.chflags is in fact present on systems where it is expected (to catch any future build problems like the one in this issue). As you say, these are relatively transparent wrappers and we have to accept the OS's implementation. Testing for the presence of os.lchflags is a bit trickier in that on OS X it should only be present if Python was built with a MACOSX_DEPLOYMENT_TARGET of 10.5 or higher. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8746 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8589] test_warnings.CEnvironmentVariableTests.test_nonascii fails under an ascii terminal
STINNER Victor victor.stin...@haypocalc.com added the comment: Still happens with r84709 on PPC Tiger 3.x It's not the same error, PYTHONWARNINGS is decoded from the wrong encoding: locale encodind instead of utf-8. r84731 should fix this bug (at least, it restores the encoding used because my last commit, r84694). With r84731, Python decodes PYTHONWARNINGS with strict error handler on Mac OS X, instead of surrogateescape error handler. I don't think that it matters because PYTHONWARNINGS is not supposed to contain raw bytes, and anyway, Mac OS X rejects invalid utf-8 filenames. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9751] _PyInstance_Lookup() defeats its purpose
Armin Rigo ar...@users.sourceforge.net added the comment: I propose that we first attempt to fix the crasher; depending on the solution we might then either fix the doc or the code for _PyInstance_Lookup(). If no-one is willing to fix this bug I am fine to let it go. But somehow I am sure that there is code *somewhere* that sticks non-string keys in old-style classes or instances, and whose __eq__ has side-effects, like caching. This would create hard-to-reproduce and hard-to-diagnose segfaults. That's mainly the reason why I think that it should be fixed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9751 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9750] sqlite3 iterdump fails on column with reserved name
Changes by Marko Kohtala marko.koht...@gmail.com: Removed file: http://bugs.python.org/file18721/sqlite3bug.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9750 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9750] sqlite3 iterdump fails on column with reserved name
Changes by Marko Kohtala marko.koht...@gmail.com: Removed file: http://bugs.python.org/file18722/sqlite3ident.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9750 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9750] sqlite3 iterdump fails on column with reserved name
Marko Kohtala marko.koht...@gmail.com added the comment: Thank you for the review. I have very limited time to use on this. So even when I'd like to make everything easy for you, have the time you give to python be as productive as possible, I can not. But I'll respond to your comments on the patch. a) I added the quotes to every identifier based on a comment in sqlite documentation SQLite adds new keywords from time to time when it takes on new features. So to prevent your code from being broken by future enhancements, you should normally quote any identifier that is an English language word, even if you do not have to. While fixing one place, I fixed it to follow this recommendation in other places as well. b) I added quotes using backslashes because it was consistent. The table name was already quoted like that. I agree it could be clearer. c) I know. I only tried to make minimal changes targeted only to the issues at hand. I did not want to hide the fixes in middlde of changes to style. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9750 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9832] test_unicodedata fails on MacOSX 10.6
Ned Deily n...@acm.org added the comment: On a similar systems (10.6, HFS+ case-sensitive), I was able to reproduce this failure when using those non-standard ./configure params. The test does not fail after removing --with-wctype-functions. As noted, --with-wctype-functions is planned to be removed before 3.2 releases. The solution is to not use it. -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9832 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9832] test_unicodedata fails on MacOSX 10.6
Changes by Ned Deily n...@acm.org: -- stage: unit test needed - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9832 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9831] test_distutils fails on MacOSX 10.6
Ned Deily n...@acm.org added the comment: I am not able to reproduce that failure running on 10.6 (case-sensitive HFS+) using your ./configure options and running the tests in the build directory (make test). How are you running the tests? Could there be a file or directory permissions issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9831 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9837] ZipFileExt.read() reads more data than requested
New submission from Black Dew black...@gmail.com: ZipFileExt.read() can return more data than requested, unlike file and other file-like objects. This function calls read1() in a loop, passing the original requested size even if part of the data was already read thus reading and returning more than the caller requested. This should be fixed by requesting n-len(buf) or something similar, or at least properly documented. -- components: Library (Lib) messages: 116158 nosy: Black.Dew priority: normal severity: normal status: open title: ZipFileExt.read() reads more data than requested versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9837 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9831] test_distutils fails on MacOSX 10.6
Ismail Donmez ism...@namtrac.org added the comment: Problem is I set PYTHONDONTWRITEBYTECODE to 1, tests should disable this environmental variable before testing for *.pyc files. Closing as invalid. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9831 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9836] Refleak in PyUnicode_FormatV
STINNER Victor victor.stin...@haypocalc.com added the comment: Fixed by r84730, thanks for the issue. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9836 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9837] ZipFileExt.read() reads more data than requested
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9837 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8746] os.chflags() and os.lchflags() are not built when they should be be
Nick Dowell nickdow...@gmail.com added the comment: Why should it only be available on OS X if built with MACOSX_DEPLOYMENT_TARGET of 10.5 or higher? chflags() should be available in earlier versions of the OS: http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/10.3/man2/chflags.2.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8746 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue903339] OpenVMS file system and UNIVERSAL_NEWLINES support
Mark Lawrence breamore...@yahoo.co.uk added the comment: No reply to msg114328. -- resolution: - out of date status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue903339 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1379804] HP-UX thread stack size needs to be increased
Mark Lawrence breamore...@yahoo.co.uk added the comment: No reply to msg114998. -- resolution: - out of date status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1379804 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1172011] BaseCookie should call value_decode from __getitem__
Mark Lawrence breamore...@yahoo.co.uk added the comment: Nor reply to msg114679. -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1172011 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1076515] shutil.move clobbers read-only files.
Mark Lawrence breamore...@yahoo.co.uk added the comment: No reply to msg114985. -- resolution: - invalid status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1076515 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9806] no need to try loading posix extensions without SOABI
Martin v. Löwis mar...@v.loewis.de added the comment: I agree with msg115992. People do use make to build extension modules, with hard-coded file names in the make targets. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9806 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9806] no need to try loading posix extensions without SOABI
Matthias Klose d...@debian.org added the comment: however we should expose the name of the SOABI string/extension in python-config, so that people can build with this name if they want to. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9806 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1520831] urrlib2 max_redirections=0 disables redirects
Mark Lawrence breamore...@yahoo.co.uk added the comment: Senthil/John has this simply slipped under the radar? -- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1520831 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9828] Repeated Py_Initialize and Py_Finalize usage brings fatal error?
Changes by Georg Brandl ge...@python.org: -- assignee: - pitrou nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9828 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9817] expat copyright/license file is missing
Georg Brandl ge...@python.org added the comment: Same here. We also have sections Licenses and Acknowledgements for incorporated software, e.g. in Doc/license.rst; the text should be added there too. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9817 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1521051] Extra configurability for doctest TestCases
Mark Lawrence breamore...@yahoo.co.uk added the comment: The patch appears to be way out of date. Is there any interest in the concept of this patch, has something similar already been done or what? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1521051 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9806] no need to try loading posix extensions without SOABI
Georg Brandl ge...@python.org added the comment: It is available via sysconfig, so that would not be a problem. Patch is attached; I'm not sure if the option name --so is the best one though. -- Added file: http://bugs.python.org/file18856/pc-so.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9806 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8652] Minor improvements to the Handling Exceptions part of the tutorial
Marien Zwart m_zw...@123mail.org added the comment: Sorry for forgetting about this for so long. The attached patch makes the following changes: Removes the two instances I noticed of treating exception instances as sequences. This no longer works in python 3 and is not very useful in python 2, so best avoided. Adds a warning explaining ``except FooException, BarException:`` does not do what you might think. I think this is a good warning to have (because you *can* omit those parens in many other places) and it mentions the pre-python 2.6 syntax for as by side effect. There are two things I'm not entirely happy about: I initially wrote ``print I/O error({0.errno}): {0.strerror}.format(e)``, but then noticed this string formatting trick is not mentioned in the previous chapter of the tutorial. Dict access (``{0[foo]}.format(d)``) is, but attribute access is not. Is this worth adding to that chapter, so it can be used here? Binding an exception instance to a variable (using as) is explained near the bottom of the section on catching exceptions, well before it is used. Perhaps this could do with a bit of reordering? I felt it better to keep my initial patch more minimal though. Comments? :) -- keywords: +patch Added file: http://bugs.python.org/file18857/errors.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8652 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9782] _multiprocessing.c warnings under 64-bit Windows
Martin v. Löwis mar...@v.loewis.de added the comment: It seems that multiprocessing is fairly conservative wrt. 64-bit support. For example, conn_send_string has a string limit of 0x7fff. Therefore, several of the warnings are harmless; the respective lengths fit into int just fine. I recommend that the size_t parameters are converted to int in the places where this is actually known to be correct from control flow (e.g. both cases of conn_send_string), along with an assert() that the value being cast is = INT_MAX. IIUC, _conn_recvall can legitimately return int, no need to return Py_ssize_t: it will only return error codes (possibly MP_SUCCESS). Also, it might be sufficient to restrict the length of _conn_recvall to MAX_INT. The alternate route would be to actually widen socket_connection to support 64 bit transmits (*); this would be Jesse's call. It's probably acceptable to defer this until somebody needs this enough to contribute a patch. Copying 2GiB over a pipe takes 1.5s on my system. (*) My protocol proposal would be this: a length with the highest bit set (i.e. = 0x8000) indicates a huge message, where another four bytes of of length follow, for a total of 63 bits of length (MSB is unavailable as it serves as the length-of-length indicator). This would not waste bytes for small messages, and be backwards compatible. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9782 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9828] Repeated Py_Initialize and Py_Finalize usage brings fatal error?
Antoine Pitrou pit...@free.fr added the comment: I can't reproduce under Linux. Is 3.1 also affected? Can you try the following patch: Index: Python/pythonrun.c === --- Python/pythonrun.c (révision 84718) +++ Python/pythonrun.c (copie de travail) @@ -219,6 +219,8 @@ /* auto-thread-state API, if available */ #ifdef WITH_THREAD +if (PyEval_ThreadsInitialized()) +PyEval_ReInitThreads(); _PyGILState_Init(interp, tstate); #endif /* WITH_THREAD */ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9828 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9783] _elementtree.c warnings under 64-bit Windows
Martin v. Löwis mar...@v.loewis.de added the comment: Instead of PyLong_FromLong((Py_uintptr_t) self); use PyLong_FromVoidPtr(self); For the others, I suggest making length and allocated Py_ssize_t; this is likely a pervasive change. Of course, very few people will currently run into XML documents where some element has more than 2**31 children... You would need several TiB of main memory to represent it using ElementTree. Fredrik, please indicate whether it is ok to make this kind of change, or whether it would need your explicit approval. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9783 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9827] Clarify LogRecord documentation
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: @Chris: I just thought that as the list was so long, alphabetic might be easier for people when they remember the attribute name but don't remember exactly what it is. @Eric: Fair comment, I usually do but sometimes I forget. I have now also updated release31-maint, see r84732. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9827 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9827] Clarify LogRecord documentation
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- Removed message: http://bugs.python.org/msg116176 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9827 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9827] Clarify LogRecord documentation
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: @Chris: I just thought that as the list was so long, alphabetic might be easier for people when they remember the attribute name but don't remember exactly what it is. @Eric: Fair comment, I usually do but sometimes I forget. I have now also updated release31-maint, see r84733. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9827 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses
Martin v. Löwis mar...@v.loewis.de added the comment: I see. Looking at net/unix/af_unix.c:unix_mkname of Linux 2.6, there is a comment that says Check unix socket name: [...] - if started by not zero, should be NULL terminated (FS object) However, the code then just does /* * This may look like an off by one error but it is a bit more * subtle. 108 is the longest valid AF_UNIX path for a binding. * sun_path[108] doesnt as such exist. However in kernel space * we are guaranteed that it is a valid memory location in our * kernel address buffer. */ ((char *)sunaddr)[len] = 0; len = strlen(sunaddr-sun_path)+1+sizeof(short); return len; So it doesn't actually check that it's null-terminated, but always sets the null termination in kernel based on the address length. Interesting. With all the effort that went into the patch, I recommend to get it right: if there is space for the \0, include it. If the string size is exactly 108, and it's linux, write it unterminated. Else fail. As for testing: we should then definitely have a test that, if you can create an 108 byte unix socket that its socket name is what we said it should be. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8372 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9786] Native TLS support for pthreads
Martin v. Löwis mar...@v.loewis.de added the comment: The ifdef should go; pthreads always support TLS (since XPG5, 1997). -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9786 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1576120] Support spawnvp[e] + use native execvp[e] on win32
Mark Lawrence breamore...@yahoo.co.uk added the comment: Brian/Tim any comments on this, the patch contains C code that I'm not qualified to comment on. -- nosy: +BreamoreBoy, brian.curtin, tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1576120 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9787] Release the TLS lock during allocations
Martin v. Löwis mar...@v.loewis.de added the comment: What is appMalloc, and what does it have to do with some Python lock? You seem to suggest that some malloc implementations make use of Python interpreter internals. I would call that a bug in the malloc implementation (it violates standard layering assumptions), and so I'm -1 on inclusion of this patch. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9787 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1595365] Urllib2 user-agent header added by an opener is frozen
Mark Lawrence breamore...@yahoo.co.uk added the comment: What is the status of this issue? -- nosy: +BreamoreBoy title: User-agent header added by an opener is frozen - Urllib2 user-agent header added by an opener is frozen versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1595365 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9802] Document 'stability' of builtin min() and max()
Matthew Woodcraft matt...@woodcraft.me.uk added the comment: (1) Shouldn't 'reverse=True' be omitted in the second doc addition? Yes, of course, sorry. (2) I'd also suggest adding a brief comment about what this means for distinct, but equal, objects; otherwise it's not really obvious what the point of the doc addition is. (3) As a matter of clarity, perhaps replace this is with max(iterable, key=key) is, and similarly for min. I've attached a new patch incorporating these suggestions. -- Added file: http://bugs.python.org/file18858/functions.rst.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9802 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9837] ZipFileExt.read() reads more data than requested
Antoine Pitrou pit...@free.fr added the comment: Indeed. In most cases, though, read1(n) will return exactly n bytes and the loop will therefore end immediately with the right buf size. Do you have a simple test case? -- versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9837 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1599254] mailbox: other programs' messages can vanish without trace
Mark Lawrence breamore...@yahoo.co.uk added the comment: Does any core committer fancy reviewing the 18 attached patches? :) -- nosy: +BreamoreBoy versions: +Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1599254 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9802] Document 'stability' of builtin min() and max()
Antoine Pitrou pit...@free.fr added the comment: As an aside, I still like Jeffrey Yasskin's suggestion on the python-dev mailing list that the sensible definition for max would maintain the invariant that max(iterable) be equivalent to sorted(iterable)[-1] What's interesting is the practical consequence that: x, y = min(x, y), max(x, y) cannot give you twice the same object. Of course, there are subtle implications of how it will be implemented (especially with objects which have a partial order relationship to each other). Since max() is supposed to work on any iterator, we probably don't want to build an intermediate sequence and fetch elements in reverse order; instead perhaps use (not Py_LT) instead of Py_GT. -- nosy: +pitrou versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9802 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4733] Add a decode to declared encoding version of urlopen to urllib
Mark Lawrence breamore...@yahoo.co.uk added the comment: Senthil: could you review the attached patch please? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4733 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9838] Inadequate C-API to Python 3 I/O objects
New submission from Pauli Virtanen p...@iki.fi: The C-API exposed by the `io` module on Python 3.1/3.2 is very limited, and makes interfacing with Python file objects in extension modules difficult. In more detail: 1) Because the Python layer has buffering etc., the file handle returned by `PyObject_AsFileDescriptor` is not usable as-is. It requires flush and seek before use, every time there is a chance that the file object has been accessed on the Python side. 2) There are no C-API functions such as the minimal set of `PyFile_Write(buf, length)`, `PyFile_Read(buf, length)`, `PyFile_Seek(pos, whence)`, `PyFile_Tell()`. Instead, every call must go through PyObject_CallMethod, and the file objects only handle `PyBytes` and `PyByteArray` which are cumbersome and inefficient to use in extension modules. -- components: Extension Modules messages: 116188 nosy: pv priority: normal severity: normal status: open title: Inadequate C-API to Python 3 I/O objects type: feature request versions: Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9838 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9839] Test issue
New submission from Martin v. Löwis mar...@v.loewis.de: Will this have two patch keywords? -- files: rss.xml.diff keywords: patch messages: 116189 nosy: loewis priority: normal severity: normal status: open title: Test issue Added file: http://bugs.python.org/file18859/rss.xml.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9839 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9839] Test issue
Martin v. Löwis mar...@v.loewis.de added the comment: No. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9839 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9784] _msi.c warnings under 64-bit Windows
Martin v. Löwis mar...@v.loewis.de added the comment: It's probably best to rewrite these functions in the way the SDK Example section works (i.e. CreateFile/ReadFile) instead of _open/_read (*). As Amaury says, the warnings are harmless: the file numbers will always be in range, as _open created them that way (in fact, they will most likely be below 20 or so). (*) They must have changed the SDK docs over time; IIRC, I already copied the current text (using _open) from the SDK docs back then. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9784 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9838] Inadequate C-API to Python 3 I/O objects
Antoine Pitrou pit...@free.fr added the comment: Instead, every call must go through PyObject_CallMethod, and the file objects only handle `PyBytes` and `PyByteArray` which are cumbersome and inefficient to use in extension modules. Because of the generic nature of the 3.x I/O stack, even shortcuts such as the proposed PyFile_Write will still have to use PyObject_CallMethod(obj, write, ...) under the hood. As for the types handled by file objects, you should be able to use a PyMemoryViewObject, which allows you to create a memory buffer without copying it (if that's what you're after). You can also pass your own objects provided they support the new buffer API: http://docs.python.org/dev/c-api/buffer.html#bufferobjects (I agree this documentation is not very well written, though) So, bottom line, we could create a set of PyFile_* wrappers (or, rather, PyStream_*), but they wouldn't be much more efficient that what you can write by hand. Do you still think it's worth it? If so, I think you should float the idea on python-dev (the mailing-list). -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9838 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3402] test_nis is hanging on Solaris
Martin v. Löwis mar...@v.loewis.de added the comment: It should not hang anymore, since r84172/r84198. The issue was a GIL-based deadlock: the GIL was acquired and then not released in a callback function, so the next callback caused a deadlock. The actual cause was a non-ASCII character in the NIS database which caused Unicode creation to fail in the callback. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3402 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9828] Repeated Py_Initialize and Py_Finalize usage brings fatal error?
Antoine Pitrou pit...@free.fr added the comment: It should be noted that repeatedly calling Py_Initialize / Py_Finalize leaks a lot (even without the import _ctypes): --- 0 --- [34543 refs] --- 1 --- [37540 refs] --- 2 --- [40504 refs] --- 3 --- [43468 refs] --- 4 --- [46432 refs] --- 5 --- [49396 refs] --- 6 --- [52360 refs] --- 7 --- [55324 refs] --- 8 --- [58288 refs] --- 9 --- [61252 refs] --- 10 --- [64216 refs] And it also translates into memory consumption... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9828 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3402] test_nis is hanging on Solaris
Benjamin Peterson benja...@python.org added the comment: Thank you, Martin. Reenabled the test in r84735. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3402 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9793] Typo fix in What's New for 3.2: dynmaic - dynamic
Martin v. Löwis mar...@v.loewis.de added the comment: Dag: thanks again for the patch. You did everything correctly; Eric's remarks were just in case you plan to submit contributions in an ongoing manner. Raymond: that it makes users go through the hoops of getting a tracker account, doing a checkout and creating a patch is an indication that spell-editing should *not* be postponed until much later. Some people are very sensitive to typos (I know I am, for German), so we will continue to get reports about that whenever we release stuff with typos. If you can, it would be good if you could do a spell-check before every alpha/beta release (if you can't, we just have to wait for the users to tell us). -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9793 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9837] ZipFileExt.read() reads more data than requested
Black Dew black...@gmail.com added the comment: If i follow the logic in read1() correctly it will do that only for files with very low compression ratios (the original sample where i noticed that problem was actually a chunk of encrypted data inside the zip). From the comments referring to with at most one read() system call I would also assume it's OS-specific. Anyway, I've attached a small file that reproduces this behavior on my system (win xp 32bit). When i run it i get AssertionError: Read returned 4097 bytes (4096 requested) -- Added file: http://bugs.python.org/file18860/a.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9837 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9042] Gettext cache and classes
Martin v. Löwis mar...@v.loewis.de added the comment: +1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9042 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9799] Compilation error for branch py3k on AIX 6
Martin v. Löwis mar...@v.loewis.de added the comment: I know this is closed, but traditionally, we have put stuff like this into README (not sure whether Sébastien read the README :-). So if anybody feel like adding some text, go ahead. In return, feel also free to take out some text that talks about very old problems. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9799 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9042] Gettext cache and classes
Antoine Pitrou pit...@free.fr added the comment: Unfortunately, 2.6 and 3.1 are stable releases, they only get security and documentation fixes. 2.7 is nearly in the same state Well, that's false. 2.7 and 3.1 both receive bug fixes (and this looks like a bug to me :-)). -- nosy: +pitrou versions: +Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9042 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9799] Compilation error for branch py3k on AIX 6
Antoine Pitrou pit...@free.fr added the comment: Actually, there's a Misc/AIX-NOTES file which needs updating. Sébastien, do you want to do that? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9799 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9807] deriving configuration information for different builds with the same prefix
Martin v. Löwis mar...@v.loewis.de added the comment: If the feature to be provided is multiple Python installations with the same prefix, then I suggest to generalize this beyond the debug build. One approach would be: 1. add a --bin-suffix configure option (Debian: set this to _d when creating the debug build) 2. expose this as sys.bin_suffix 3. use this in many more places than this patch does, e.g. for python3-config (python3_d-config?), python3.pc, idle3, pydoc3, 2to3, and anything else that either is a binary or refers to one. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9807 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9837] ZipFileExt.read() reads more data than requested
Antoine Pitrou pit...@free.fr added the comment: Ok, thank you. I've fixed the issue and added a test in r84737 (3.x) and r84739 (2.7). -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9837 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9759] GzipFile object should raise ValueError on .read() after .close()
Changes by Antoine Pitrou pit...@free.fr: -- versions: +Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9759 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9809] Wrong Registery Entries on win64
Martin v. Löwis mar...@v.loewis.de added the comment: As Brian explains: if you want the Wow6432 entries, install the 32-bit Python - which will install just fine on your 64-bit system, and is, in many cases, the better choice. -- nosy: +loewis status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9809 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8746] os.chflags() and os.lchflags() are not built when they should be be
Ned Deily n...@acm.org added the comment: Nick: lchflags. lchflags is only available in 10.5 or higher, unlike chflags which has been around for much longer. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8746 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9806] no need to try loading posix extensions without SOABI
Matthias Klose d...@debian.org added the comment: --extension-suffix ? doesn't use the `so', which you don't see on MacOs, HpUX and Windows. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9806 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9817] expat copyright/license file is missing
Changes by Martin v. Löwis mar...@v.loewis.de: -- resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9817 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9817] expat copyright/license file is missing
Matthias Klose d...@debian.org added the comment: the .rst file is missing the zlib and libffi licenses too. will add them. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9817 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9828] Repeated Py_Initialize and Py_Finalize usage brings fatal error?
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Is 3.1 also affected? Sorry, 3.1 is not affected. Can you try the following patch: Your patch works. :-) E:\python-dev\py3k\PC\VC6ctypes_crash.exe --- 0 --- [36242 refs] --- 1 --- [39140 refs] --- 2 --- [41538 refs] --- 3 --- [43930 refs] --- 4 --- [46322 refs] --- 5 --- [48714 refs] --- 6 --- [51106 refs] --- 7 --- [53498 refs] --- 8 --- [55890 refs] --- 9 --- [58282 refs] -- versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9828 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9820] Windows : os.listdir(b'.') doesn't raise an error for unencodable filenames
Martin v. Löwis mar...@v.loewis.de added the comment: What do you gain with this patch? (i.e. what is its advantage?) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9820 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9820] Windows : os.listdir(b'.') doesn't raise an error for unencodable filenames
STINNER Victor victor.stin...@haypocalc.com added the comment: What do you gain with this patch? (i.e. what is its advantage?) You know directly that os.listdir(bytes) is unable to encode the filename, instead of manipulate an invalid filename (b'?') and get the error later (when you use the filename: open, copy, delete, ... the file). It's the same idea than str+bytes raises an error on Python3: get the error earlier instead of store invalid data and get the error to late. Anywy, on Windows, it's not a good idea to manipulate bytes filenames. So it's also a way to encourage people to migrate their applications to unicode on Windows. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9820 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6869] Embedded python crashed on 4th run, if ctypes is used
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I found another refcount bug in Python3.x. Fixed in r84741(py3k), r84742(release31-maint). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6869 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9822] windows batch files are dependent on cmd current directory
Martin v. Löwis mar...@v.loewis.de added the comment: I did not realize the build instructions recommended using the buildbot tool. It is clearly past time I got around to doing windows build myself. I'd rather prefer a different setup, also: it would be better if the batch files to get the sources lived in PC (or perhaps PCbuild), with Tools/buildbot just referring to them. Please regenerate the diffs from the top level of the checkout, and we'll see if one of the windows devs feels like checking it in. If the buildbots continue to work, it's fine with me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9822 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8445] buildbot: test_ttk_guionly failures (test_traversal, test_tab_identifiers, test_identify, test_heading_callback)
Ismail Donmez ism...@namtrac.org added the comment: Also reproduced on Snow Leopard. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8445 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue767645] incorrect os.path.supports_unicode_filenames
Martin v. Löwis mar...@v.loewis.de added the comment: About Windows: supports_unicode_filenames is False if sys.getwindowsversion().platform 2: win32s (0) or Windows 9x/ME (1). I don't know win32s, but I know that Windows 9x/ME is not more supported. Win32s is long gone. It was an emulation layer to support Win32 on Windows 3.1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue767645 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue767645] incorrect os.path.supports_unicode_filenames
Martin v. Löwis mar...@v.loewis.de added the comment: I think that supports_unicode_filenames is still useful to check if the filesystem API uses bytes (Linux, FreeBSD, Solaris, ...) or characters (Mac OS X, Windows). Mac OS X is a special case because the C API uses char* (byte string), but the filesystem encoding is fixed to utf-8 and it doesn't accept invalid utf-8 filenames. So I would like to say that supports_unicode_filenames should be True on Mac OS X (which was the initial request). Sounds reasonable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue767645 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9818] build files to build Lib/distutils/command/wininst-9.0* are missing
Martin v. Löwis mar...@v.loewis.de added the comment: Use PCbuild/bdist_wininst.vcproj. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9818 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9828] Repeated Py_Initialize and Py_Finalize usage brings fatal error?
Antoine Pitrou pit...@free.fr added the comment: Ok. How about this patch now? (I'm trying to solve this in a clean way :)) -- keywords: +patch Added file: http://bugs.python.org/file18861/gildestroy.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9828 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9817] expat copyright/license file is missing
Matthias Klose d...@debian.org added the comment: fixed in r84743, r84745 and r84746 -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9817 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9818] build files to build Lib/distutils/command/wininst-9.0* are missing
Matthias Klose d...@debian.org added the comment: my bad -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9818 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9820] Windows : os.listdir(b'.') doesn't raise an error for unencodable filenames
Martin v. Löwis mar...@v.loewis.de added the comment: You know directly that os.listdir(bytes) is unable to encode the filename, instead of manipulate an invalid filename (b'?') and get the error later (when you use the filename: open, copy, delete, ... the file). Ok. Then I'm -1 on the patch: you can't know whether the application actually wants to open the file. Perhaps it only wants to display the file names, or perhaps it only wants to open some of the files, or only traverse into subdirectories. For backwards compatibility, I recommend to leave things as they are. FindFirst/NextFileA will also do some other interesting conversions, such as the best-fit conversion (which the mbcs code doesn't do (anymore?)). Windows has explicit A and W versions, and Python has explicit A and W types, so it's IMO best to pair them in the natural way (even if that means code duplication). Anywy, on Windows, it's not a good idea to manipulate bytes filenames. So it's also a way to encourage people to migrate their applications to unicode on Windows. Only if people run into the issue (which few people will). People which *do* run into the issue will likely get an error either way, which will teach them their lesson :-) -- title: Windows : os.listdir(b'.') doesn't raise an error for unencodable filenames - Windows : os.listdir(b'.') doesn't raise an error for unencodable filenames ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9820 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9806] no need to try loading posix extensions without SOABI
Georg Brandl ge...@python.org added the comment: Windows isn't relevant here, but for the others, extension-suffix sounds much better. Added in r84747. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9806 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8445] buildbot: test_ttk_guionly failures (test_traversal, test_tab_identifiers, test_identify, test_heading_callback)
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +janssen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8445 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1521051] Extra configurability for doctest TestCases
Russell Keith-Magee freakboy3...@gmail.com added the comment: It's still a problem AFAICT. Level of interest is a different matter. Django has needed this since 2006, so we've always shipped a locally modified copy of the doctest module. That said, Django is in the process of moving away from using and recommending doctests, so there's a good chance that we'll be deprecating our local copy in the near future. There's still value in the idea -- it provides configuration points that are consistent and reasonable -- but Django's need for this set of changes is waning. -- nosy: +freakboy3742 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1521051 ___ ___ 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: Another flag? Hmm. How about this instead: if a scoped flag appears at the end of a regex (and would therefore normally have no effect) then it's treated as though it's at the start of the regex. Thus: foo(?i) is treated like: (?i)foo -- ___ 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
[issue2889] curses for windows (alternative patch)
anatoly techtonik techto...@gmail.com added the comment: PDCurses is not updated, because it is considered stable and mature library that has been tested on Windows platform by many roguelikes. I doubt that ncurses hackers care about Windows compatibility more than just to make it run. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9788] atexit and execution order
Meador Inge mead...@gmail.com added the comment: I agree with Antoine's LIFO comment. Also, FWIW, the C standard library behaves in a LIFO manner as well (C99 spec - 7.20.4.3 clause 3): First, all functions registered by the atexit function are called, in the reverse order of their registration,253) except that a function is called after any previously registered functions that had already been called at the time it was registered. If, during the call to any such function, a call to the longjmp function is made that would terminate the call to the registered function, the behavior is undefined. -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9788 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses
David Watson bai...@users.sourceforge.net added the comment: With all the effort that went into the patch, I recommend to get it right: if there is space for the \0, include it. If the string size is exactly 108, and it's linux, write it unterminated. Else fail. As for testing: we should then definitely have a test that, if you can create an 108 byte unix socket that its socket name is what we said it should be. The attached patches do those things, if I understand you correctly (the test patches add such a test for Linux, and linux-pass-unterminated uses memset() to zero out the area between the end of the actual path and the end of the sun_path array). If you're talking about including the null in the address passed to the system call, that does no harm on Linux, but I think the more common practice is not to include it. The FreeBSD SUN_LEN macro, for instance, is provided to calculate the address length and does not include the null. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8372 ___ ___ 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)
Vlastimil Brom vlastimil.b...@gmail.com added the comment: Not that my opinion matters, but for what is it worth, I find it rather unusual to have to use special flags to get normal (for some definition of normal) behaviour, while retaining the defaults buggy in some way (like ZEROWIDTH). I would think, the backwards compatibility would not be needed under these circumstances - in such probably marginal cases (or is setting global flags at the end or otherwhere than on beginning oof the pattern that frequent?). It seems, that with many new features and enhancements for previously impossible patterns, chances are, that the code using regular expressions in a more advanced way might benefit from reviewing the patterns (where also the flags for historical behaviour could be adjusted if really needed). Anyway, thanks for further improvements! (although it broke my custom function previously misusing the internal data of the regex module for getting the unicode script property (currently unavailable via unicodedata) :-). Best regards, vbr -- ___ 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
[issue9820] Windows : os.listdir(b'.') doesn't raise an errorfor unencodablefilenames
STINNER Victor victor.stin...@haypocalc.com added the comment: FindFirst/NextFileA will also do some other interesting conversions, such as the best-fit conversion (which the mbcs code doesn't do (anymore?)). About mbcs, mbcs codec of Python 3.1 is like .encode('mbcs', 'replace') and .decode('mbcs', 'ignore') of Python 3.2 (see issue #850997). By default (strict error handler), it now raises errors on undecodable byte sequence and unencodable character, whereas Python 3.1 just ignores the error handler. PyUnicode_EncodeFSDefault / PyUnicode_DecodeFSDefault uses the strict error handler. I just added a note about mbcs in Doc/whatsnew/3.2.rst: r84750. -- title: Windows : os.listdir(b'.') doesn't raise an error forunencodable filenames - Windows : os.listdir(b'.') doesn't raise an errorfor unencodablefilenames ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9820 ___ ___ 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: The tests for re include these regexes: a.b(?s) a.*(?s)b I understand what Georg said previously about some people preferring to put them at the end, but I personally wouldn't do that because some regex implementations support scoped inline flags, although others, like re, don't. I think that second regex is a bit perverse, though! :-) On the other matter, I could make the Unicode script and block available through a couple of functions if you need them, eg: # Using Python 3 here regex.script(A) 'Latin' regex.block(A) 'BasicLatin' -- ___ 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
[issue9820] Windows : os.listdir(b'.') doesn't raise an errorfor unencodablefilenames
STINNER Victor victor.stin...@haypocalc.com added the comment: It remembers me the discussion of the issue #3187. About unencodable filenames, Guido proposed to ignore them or to use errors=replace, and wrote Failing the entire os.listdir() call is not acceptable. (... long discussion ...) And finally, os.listdir() ignored undecodable filenames on UNIX/BSD. Then you introduced the genious PEP 383 (utf8b then renamed surrogateescape) and os.listdir() now raises an error if the PyUnicode_FromEncodedObject(v, Py_FileSystemDefaultEncoding, surrogateescape) fails... which doesn't occur because of undecodable byte sequence, but for other reasons like a memory error. About Windows, os.listdir(str) never fails, but my question is about os.listdir(bytes). Should os.listdir(bytes) returns invalid filenames (encoded with mbcs+replace, filenames not usable to open, rename or delete the file) or just ignore them? Ok. Then I'm -1 on the patch: you can't know whether the application actually wants to open the file. Perhaps it only wants to display the file names, or perhaps it only wants to open some of the files, or only traverse into subdirectories. For backwards compatibility, I recommend to leave things as they are. FindFirst/NextFileA will also do some other interesting conversions, such as the best-fit conversion (which the mbcs code doesn't do (anymore?)). it only wants to open some of the files is the typical reason for which I hate Python2 and its implicit conversion between bytes and characters: it works in most cases, but it fails sometimes. The problem is to define (and explain) sometimes. The typical use case of listing a directory is a file chooser. On Windows using the bytes API, it works in most cases, but it fails if the user picks the wrong file (name with ?). That's the problem I would like to address. -- Ignore unencodable filenames solution is compatible with the traverse into subdirectories case. And it does also keep backward compatibility (except that unencodable files are hidden, which is a least problem I think). -- I proposed to raise an error on unencodable filename. I changed my mind after reading your answer and the discussion on #3187. My patch breaks compatibility and users don't bother to unencodable filenames. Eg. glob(*.mp3) should not fail if the directory contains a temporary unencodable filename (xxx.tmp). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9820 ___ ___ 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)
Georg Brandl ge...@python.org added the comment: Matthew, I understand why you want to have these flags scoped, and if you designed a regex dialect from scratch, that would be the way to go. However, if we want to integrate this in Python 3.2 or 3.3, this is an absolute killer if it's not backwards compatible. I can live with behavior changes that really are bug fixes, and of course with new features that were invalid syntax before, but this is changing an aspect that was designed that way (as the test case shows), and that really is not going to happen without an explicit new flag. Special-casing the flags at the end case is too magical to be of any help. It will be hard enough to get your code into Python -- it is a huge new codebase for an absolutely essential module. I'm nevertheless optimistic that it is going to happen at some point or other. Of course, you would have to commit to maintaining it within Python for the forseeable future. The script and block functions really belong into unicodedata; you'll have to coordinate that with Marc-Andre. @Vlastimil: backwards compatibility is needed very much here. Nobody wants to review all their regexes when switching from Python 3.1 to Python 3.2. Many people will not care about the improved engine, they just expect their regexes to work as before, and that is a perfectly fine attitude. -- ___ 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
[issue9820] Windows : os.listdir(b'.') doesn't raise an errorfor unencodablefilenames
STINNER Victor victor.stin...@haypocalc.com added the comment: FindFirst/NextFileA will also do some other interesting conversions, such as the best-fit conversion (which the mbcs code doesn't do (anymore?)). If we choose to keep this behaviour, I will have to revert my commit on mbcs codec to be consistent with os.listdir(). Or at least patch PyUnicode_EncodeFSDefault and os.fsencode() (use replace error handler) and PyUnicode_DecodeFSDefault and os.fsdecode() (use igrore error handler). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9820 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9820] Windows : os.listdir(b'.') doesn't raise an errorfor unencodablefilenames
Martin v. Löwis mar...@v.loewis.de added the comment: About Windows, os.listdir(str) never fails, but my question is about os.listdir(bytes). Should os.listdir(bytes) returns invalid filenames (encoded with mbcs+replace, filenames not usable to open, rename or delete the file) or just ignore them? I see nothing wrong with returning incorrect file names. it only wants to open some of the files is the typical reason for which I hate Python2 and its implicit conversion between bytes and characters: it works in most cases, but it fails sometimes. The problem is to define (and explain) sometimes. Notice that this doesn't change with the patch. It will *still* work sometimes, and fail sometimes. In fact, for most users and most applications, it will never fail - *even with your patch applied*. Ignore unencodable filenames solution is compatible with the traverse into subdirectories case. And it does also keep backward compatibility (except that unencodable files are hidden, which is a least problem I think). I fail to see why removing incorrect file names from the result list is any better than keeping them. The result list will be incorrect either way. In one case (files skipped), the user will not see the file in the selection dialog, even though he knows its there and explorer shows it just fine. So he thinks there must be a bug. In the other case, it displays a non-sensical file name. Again, the user thinks there is a bug - plus if you click on the file, you get some error message (hopefully, the application will catch the exception - the directory may also have changed in-between, so a missing file error must be recovered from). So it's a user-visible bug in either case, but if the incorrect file name is included, it's slightly more obvious that something is wrong. -- title: Windows : os.listdir(b'.') doesn't raise an errorfor unencodablefilenames - Windows : os.listdir(b'.') doesn't raise an errorfor unencodablefilenames ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9820 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses
David Watson bai...@users.sourceforge.net added the comment: I meant to say that FreeBSD provides the SUN_LEN macro, but it turns out that Linux does as well, and its version behaves the same as FreeBSD's. The FreeBSD man pages state that the terminating null is not part of the address: http://www.freebsd.org/cgi/man.cgi?query=unixapropos=0sektion=0manpath=FreeBSD+8.1-RELEASEformat=html The examples in Stevens/Rago's Advanced Programming in the Unix Environment also pass address lengths to bind(), etc. that do not include the null. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8372 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9820] Windows : os.listdir(b'.') doesn't raise an errorfor unencodablefilenames
Martin v. Löwis mar...@v.loewis.de added the comment: If we choose to keep this behaviour, I will have to revert my commit on mbcs codec to be consistent with os.listdir(). Or at least patch PyUnicode_EncodeFSDefault and os.fsencode() (use replace error handler) and PyUnicode_DecodeFSDefault and os.fsdecode() (use igrore error handler). I think trying to emulate, in Python, what the *A functions do is futile. IIUC, disables WC_NO_BEST_FIT_CHARS, and may do other stuff which apparently is undocumented. However, I fail to see the relationship to this issue. Having the MBCS codec support strict mode is a good thing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9820 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses
Martin v. Löwis mar...@v.loewis.de added the comment: The examples in Stevens/Rago's Advanced Programming in the Unix Environment also pass address lengths to bind(), etc. that do not include the null. I didn't (mean to) suggest that the null must be included in the length - only that it must be included in the path. -- title: socket: Buffer overrun while reading unterminated AF_UNIX addresses - socket: Buffer overrun while reading unterminated AF_UNIX addresses ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8372 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9210] remove --with-wctype-functions configure option
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- assignee: - amaury.forgeotdarc resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9210 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1076515] shutil.move clobbers read-only files.
Brian Curtin cur...@acm.org added the comment: I haven't had time to investigate but it shouldn't be closed just yet. Someone will get to it. -- resolution: invalid - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1076515 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2889] curses for windows (alternative patch)
Changes by Brian Curtin cur...@acm.org: -- nosy: -brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9840] Recursive Repr
New submission from Raymond Hettinger rhettin...@users.sourceforge.net: Add a recursive_repr() decorator to provide a solution to the problem of creating a container __repr__ method that doesn't fail for recursive calls. -- files: recursive_repr.patch keywords: patch messages: 116239 nosy: rhettinger priority: normal severity: normal status: open title: Recursive Repr type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file18862/recursive_repr.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9840 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9838] Inadequate C-API to Python 3 I/O objects
Changes by Éric Araujo mer...@netwok.org: -- versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9838 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com