[issue16224] tokenize.untokenize() misbehaves when moved to compatiblity mode
New submission from Eric Snow: When tokenize.untokenize() encounters a 2-tuple, it moves to compatibility mode, where only the token type and string are used from that point forward. There are two closely related problems: * when the iterable is a sequence, the portion of the sequence prior to the 2-tuple is traversed a second time under compatibility mode. * when the iterable is an iterator, the first 2-tuple encountered is essentially gobbled up (see issue16221). Either an explicit iterable = iter(iterable) or iterable = list(iterable) should happen at the very beginning of Untokenizer.untokenize(). If the former, Untokenizer.compat() should be fixed to not treat that first token differently. If the latter, self.tokens should be cleared at the beginning of Untokenizer.compat(). I'll put up a patch with the second option when I get a chance. -- assignee: eric.snow components: Library (Lib) messages: 172851 nosy: eric.snow priority: normal severity: normal stage: test needed status: open title: tokenize.untokenize() misbehaves when moved to compatiblity mode type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16224 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16221] tokenize.untokenize() compat mode misses the encoding when using an iterator
Eric Snow added the comment: issue16224 _may_ supercede this ticket. -- components: +Library (Lib) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16221 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16224] tokenize.untokenize() misbehaves when moved to compatiblity mode
Eric Snow added the comment: Actually, here's a patch with the first option. It preserves iterators as iterators, rather than dumping them into a list. I've also rolled the tests from issue16221 into this patch. Consequently, if the patch is suitable, that issue can be closed. -- keywords: +patch stage: test needed - patch review Added file: http://bugs.python.org/file27560/untokenize_compat_force_iter.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16224 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16221] tokenize.untokenize() compat mode misses the encoding when using an iterator
Eric Snow added the comment: The patch that I have in #16224 takes care of this issue. If that issue goes in another direction however... -- status: open - pending superseder: - tokenize.untokenize() misbehaves when moved to compatiblity mode ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16221 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16225] list.remove in for loop
New submission from Ian Carr-de Avelon: I'm new to Python and I've hit what appears to me to be a bug, but may be a feature, so a tutorial bug. I tried to loop through the items in a list, test each and remove those which fail the test. Simplifying to illustrate: print test [1, 2, 3, 4, 5] for item in test: ... print item ... test.remove(item) ... 1 3 5 print test [2, 4] Whereas I would expect to see all items looped through and non left in the list. I have worked with languages where you are explicitly warned that you must not mess with the loop variable, or where the behaviour you will get is explained in detail, so you can use it. Not having anything flagged up in eg 5.6. Looping Techniques on http://docs.python.org/tutorial/datastructures.html I assumed that the behaviour would be safe and intuative. Yours Ian -- messages: 172855 nosy: Ian priority: normal severity: normal status: open title: list.remove in for loop versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16225 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16225] list.remove in for loop
Chris Jerdonek added the comment: I have worked with languages where you are explicitly warned that you must not mess with the loop variable There is a warning in this part of the tutorial: It is not safe to modify the sequence being iterated over in the loop... (from http://docs.python.org/dev/tutorial/controlflow.html#for-statements ) But it may be good to add a note to the section you reference as well. -- assignee: - docs@python components: +Documentation nosy: +chris.jerdonek, docs@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16225 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16212] mmap() dumps core upon resizing the underlying file
Charles-François Natali added the comment: You can't use longjmp from signal handlers. Well, you can, but 99% of the code that does it is broken, because you can only call async-safe functions from within a signal handler, and certainly can't run the intepreter. I don't see the reason to run the interpreter. But a quick look at the source shows that the current implementation already uses longjmps to handle SIGFPE (see pyfpe.h and fpectlmodule.c). It seems to be in use on many platforms. The only problem I see so far is the possibility that we have to protect too much. However, as I could guess from quickly browsing through the mmap() implementation, the address of the mmap()ed region never leaves the module, all accesses are done using exported methods. If it is really the case, we can wrap them into something similar to PyFPE_START_PROTECT() and PyFPE_END_PROTECT() (see comments in pyfpe.h). SIGFPE is not handled by default (it's not generated by default, you get NaN and friends). I don't think there a re many uses of the fpe module, because it's inherently unsafe. For example, in our case, let's say you want to protect mmap_item(): what do you in case of SIGBUS? Use longjmp to jump out of the signal handler and raise an exception? That won't work, because you'll still be running on behalf of the signal handler, so as soon as you call a non async safe function (or non reentrant code), you'll deadlock, crash, or suffer from all the consequences of undefined behavior, which is much more dangerous than crashing on a SIGBUS. The *only* thing you can do is exit. Please have a look at this: https://www.securecoding.cert.org/confluence/display/seccode/SIG35-C.+Do+not+return+from+SIGSEGV,+SIGILL,+or+SIGFPE+signal+handlers https://www.securecoding.cert.org/confluence/display/seccode/SIG32-C.+Do+not+call+longjmp%28%29+from+inside+a+signal+handler A pity Posix isn't smart enough to refuse truncate()ing when there's a mmap open on the affected pages. Python 3's buffer API is superior in that respect :-) Yes, but Python only cares about the current process. Here the exact same problem occurs if the file is truncated by another process: performing such checks for all the processes would be awfuly expensive (and probably impossible in a race-free way). Also, it's probably impossible to do on e.g. NFS mmaped files (the server is stateless). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16220] wsgiref does not call close() on iterable response
Brent Tubbs added the comment: Patch attached. I ran into this while trying to figure out why close() wasn't being called while running the Django dev server, which inherits from wsgiref's BaseHandler. So I'm also surprised that it's gone unnoticed so long. Thanks for the quick attention and encouragement on this! -- keywords: +patch Added file: http://bugs.python.org/file27561/wsgiref_close.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16220 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15819] Unable to build Python out-of-tree when source tree is readonly.
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15819 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16212] mmap() dumps core upon resizing the underlying file
STINNER Victor added the comment: I've found a few examples of handling non-restartable signals with longjmps, but not that familiar with the codebase to estimate how reliably it can be done on all supported platforms. I don't really know how this code would behave, say, on Windows. I proposed a generic signal handler for SIGSEGV (SIGFPE, SIGILL and SIGBUS) converting the fatal signal to a classic Python exception: issue issue #3999. The idea was rejected by most core developers because it's just impossible to guarantee that Python internal structures are still consistent. A signal can occur anywhere, the longjmp() will skip all cleanup instructions and so it's easy to get into a deadlock case. So I proposed to display a Python traceback on such signal and just exit. For your specific case, it would much better if the kernel handles the case. I thought that the possibility to crash the interpreter is something to be avoided at all costs. It's quite easy to crash Python using extensions implemented in C. A simple example: ctypes.string_at(0). For your specific case, you should develop an extension which sets a signal handler before reading the mmap and then restore the old signal handler after. It might be safe if the signal handler protects a single instruction, but it's very hard to develop a signal handler for such critical signals (SIGSEGV and friends). I suggest to just close this issue as wont fix. Python cannot do anything useful in a safe manner against this OS bug. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16212] mmap() dumps core upon resizing the underlying file
Vladimir Ushakov added the comment: SIGBUS as well as SIGFPE or SIGSEGV is a synchronous signal. It is delivered to the thread that caused the trouble and the stack contents is well defined. https://www.securecoding.cert.org/confluence/display/seccode/SIG35-C.+Do+not+return+from+SIGSEGV,+SIGILL,+or+SIGFPE+signal+handlers Does not apply here: longjmp is not a return. https://www.securecoding.cert.org/confluence/display/seccode/SIG32-C.+Do+not+call+longjmp%28%29+from+inside+a+signal+handler The grounds are weak. They refer to SIG30-C, which is based on ISO C standard. POSIX explicitly declares the fact that longjmp is allowed to exit signal handlers as an extension to ISO C standard. (See http://pubs.opengroup.org/onlinepubs/9699919799/) Besides, POSIX explicitly states that only async-signal-safe functions can be called from the handlers, which are invoked asynchronously with process execution. That's not out case as mentioned above, we are not in asynchronous context as it could be with, say, SIGINT. (See http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html) Glibc doesn't mind as well: http://www.gnu.org/software/libc/manual/html_node/Longjmp-in-Handler.html I can doubt about non-POSIX platforms, but with POSIX everything seems clean to me. Especially since the method is already in use with SIGFPE. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16225] list.remove in for loop
Chris Jerdonek added the comment: Attached is a simple way of addressing this (essentially copying the verbiage and example from the other page). If we want, we could make the sample code different so that the reader doesn't see the same thing twice. -- keywords: +patch stage: - patch review Added file: http://bugs.python.org/file27562/issue-16225-1-default.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16225 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16212] mmap() dumps core upon resizing the underlying file
Vladimir Ushakov added the comment: For your specific case, you should... There's nothing I should. As I said above, the bug doesn't trouble me. I just posted it as a generic contribution and don't really care whether it's going to be fixed or not. If decided so, I could help. Otherwise I'll just mind my business. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16226] IDLE crashes on *File / Path browser*
New submission from Francisco Gracia: The menu option *File / Path browser* (as well in the *Shell* window as in the *Editor* one) shows a new window with a tree structure rooted at *sys.path*. The available leaf nodes show the *plus* sign that usually implies that they can be expanded by clicking on the desired one. On the performance of this action IDLE disappears immediately. If one clicks just on the legend of the node, IDLE remains undisturbed but nothing more happens. Idle's help says: *File Menu: ... Path Browser -- Show sys.path directories, modules, classes and methods* so that apparently the expansion should also work. I suppose that this command would be mostly used at the initial phases of learning Python (at least I would have done it if I had noticed then its existence and function), but its present status does not favor such didactic purpose. Regards -- components: IDLE messages: 172863 nosy: fgracia priority: normal severity: normal status: open title: IDLE crashes on *File / Path browser* type: crash versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16226 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16212] mmap() dumps core upon resizing the underlying file
Vladimir Ushakov added the comment: ...it's just impossible to guarantee that Python internal structures are still consistent. In generic case, I completely agree. Here the things are much simpler (unless I missed something). We know perfectly well the code we need to protect (mmap accessors). We can make the protected sections small enough to ensure that no internal state gets corrupted. I just feel, I can do it simply and safely. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16227] Change unicode howtos as misleading
New submission from Mark Lawrence: For http://docs.python.org/howto/unicode.html (that's Python 2.7.3) and http://docs.python.org/release/3.1.5/howto/unicode.html the first paragraph states (This HOWTO has not yet been updated to cover the 3.x versions of Python.). I suggest this is changed to read something like Release 1.12 onwards of this document covers the 3.2 Python versions onwards. -- assignee: docs@python components: Documentation messages: 172865 nosy: BreamoreBoy, docs@python priority: normal severity: normal status: open title: Change unicode howtos as misleading type: enhancement versions: Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16212] mmap() dumps core upon resizing the underlying file
Vladimir Ushakov added the comment: Update: The correct link to the POSIX definition of longjmp exiting a signal handler as an ISO C extension is http://pubs.opengroup.org/onlinepubs/9699919799/functions/longjmp.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16228] JSON crashes during encoding resized lists
New submission from Serhiy Storchaka: JSON encoding crash if the source list resized in process of encoding. This can be happen unintentionally in multithreaded code. Simple crash code: import json a = [object()] * 10 def crasher(obj): del a[-1] json.dumps(a, default=crasher) -- components: Extension Modules messages: 172867 nosy: bob.ippolito, ezio.melotti, pitrou, rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: JSON crashes during encoding resized lists type: crash versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16228 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16229] Module *redemo.py* lacking in recent Python distributions
New submission from Francisco Gracia: Since Python 3.2 the module *redemo.py* is lacking in the official Python distributions. The excellent and extremely useful *Regular expressions HOWTO* of 3.2.x and 3.3 keep however referring to it (although referring to the wrong path *Tools/demo/* instead of *Tools/Scripts/*) and the same does the *README* file. I just copied the version of the module distributed with 3.1 and it keeps working as well with 3.2.x as with 3.3.0 without having experienced any problems. Is there any justification for this situation or is it just a slip? Regards -- components: Demos and Tools messages: 172868 nosy: fgracia priority: normal severity: normal status: open title: Module *redemo.py* lacking in recent Python distributions versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16229 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16228] JSON crashes during encoding resized lists
Serhiy Storchaka added the comment: Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file27563/json_encode_resized_list.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16228 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16227] Change unicode howtos as misleading
Chris Jerdonek added the comment: I wonder why the note must be there at all. None of the 2.x docs have been updated to cover the 3.x versions of Python. Otherwise, every 2.x page could use such a disclaimer. Here is where the note was added: http://hg.python.org/cpython/rev/bdef454f7212 -- nosy: +chris.jerdonek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14039] Add metavar argument to add_subparsers() in argparse
Changes by Berker Peksag berker.pek...@gmail.com: -- versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14039 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16230] select.select crashes on resized lists
New submission from Serhiy Storchaka: Simple crash code: import select a = [] class F: def fileno(self): del a[-1] return 1 a[:] = [F()] * 10 select.select([], a, []) -- components: Extension Modules messages: 172871 nosy: serhiy.storchaka priority: normal severity: normal status: open title: select.select crashes on resized lists type: crash versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16230 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16230] select.select crashes on resized lists
Serhiy Storchaka added the comment: Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file27564/select_resized_list.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16230 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16227] Change unicode howtos as misleading
Mark Lawrence added the comment: I'd happily settle on seeing this historical note removed from the 2.7.3 docs. I'm unsure about the best approach for 3.1.5. Who's done the most work on unicode to answer this one, someone working on #16061 possibly? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10050] urllib.request still has old 2.x urllib primitives
Nadeem Vawda added the comment: Hmm, OK. URLopener and FancyURLopener do each issue a DeprecationWarning when used, though. If they are not actually deprecated, perhaps we should remove the warnings for the moment? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10050 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16225] list.remove in for loop
Serhiy Storchaka added the comment: It is safe to modify a sequence during iteration if it's size not increased. words = ['cat', 'window', 'defenestrate'] for i, w in enumerate(words): ... if len(w) 6: ... words[i] = w[:5] + '…' ... words ['cat', 'window', 'defen…'] -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16225 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6559] add pass_fds paramter to subprocess.Popen()
Serhiy Storchaka added the comment: _posixsubprocess.fork_exec docstring was not updated. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6559 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14913] tokenize the source to manage Pdb breakpoints
Xavier de Gaye added the comment: Attached patch pdb_lnotab.patch uses lnotabs (see Objects/lnotab_notes.txt) to find the actual breakpoint line number and parses the module source with tokenize to find the set of function and fully qualified method names in a module. The patch fixes issues 6322, 14789, 14792, 14795, 14808. The local trace function is only set on functions where a breakpoint is set, this provides a significant performance improvement. -- Added file: http://bugs.python.org/file27565/pdb_lnotab.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14913 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6322] Pdb breakpoints don't work on lines without bytecode
Xavier de Gaye added the comment: This is fixed in the proposed patch named pdb_lnotab.patch attached to issue 14913. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6322 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10050] urllib.request still has old 2.x urllib primitives
Ezio Melotti added the comment: See also #12707. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10050 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16044] xml.etree.ElementTree.Element: append method iterator param is broken
Eli Bendersky added the comment: Closing, since this isn't a bug and append's behavior is properly documented. Regarding the error message, yes it could probably be better but you would need to enable input validation for that. Since Python is duck typed, often when arguments are not validated you get less-than-good error messages if things go wrong. In this case, append expect something Element-like that would have an iter method, and complains when that's not found. In 3.3 this whole thing was improved by always validating arguments in append/extend etc. and raising a TypeError when something is wrong. I don't think there's good enough reason to change this in 2.7 -- stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16044 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15381] Optimize BytesIO to do less reallocations when written, similarly to StringIO
Changes by Eli Bendersky eli...@gmail.com: -- title: Optimize BytesIO to so less reallocations when written, similarly to StringIO - Optimize BytesIO to do less reallocations when written, similarly to StringIO ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15381 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12321] documentation of ElementTree.find
Changes by Eli Bendersky eli...@gmail.com: Removed file: http://bugs.python.org/file22406/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12321] documentation of ElementTree.find
Changes by Eli Bendersky eli...@gmail.com: -- versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12321] documentation of ElementTree.find
Eli Bendersky added the comment: I think this may be intentional. Absolute searches on a ElementTree are discouraged with a warning: def find(self, path, namespaces=None): # assert self._root is not None if path[:1] == /: path = . + path warnings.warn( This search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %r % path, FutureWarning, stacklevel=2 ) return self._root.find(path, namespaces) See what happens when an absolute path is attemped? The code just hacks it into a relative path and prints a menacing warning. So, I would not change the documentation at this point. However, the problem should go away if and when the XPath support is improved to really support absolute paths. -- resolution: - wont fix stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16202] sys.path[0] security issues
Changes by hasufell julian.osp...@googlemail.com: -- nosy: +hasufell ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16202 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15442] Expand the list of default dirs filecmp.dircmp ignores
Eli Bendersky added the comment: moijes12, why are the added names raw ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15442 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15721] PEP 3121, 384 Refactoring applied to tkinter module
Roundup Robot added the comment: New changeset bf9d118779f5 by Andrew Svetlov in branch 'default': Issue #15721: make _tkinter module pep384 compatible. http://hg.python.org/cpython/rev/bf9d118779f5 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16227] Change unicode howtos as misleading
Martin v. Löwis added the comment: I don't think there is a need to update the 3.1.x version of the documentation in that respect. -- nosy: +loewis versions: +Python 3.3, Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16227] Change unicode howtos as misleading
Martin v. Löwis added the comment: Before the disclaimer can be removed, all statements of the document should be reviewed. From a shallow glance, the section on Python 2.x's support should be changed to Python's support. The reference to Marc-Andre Lemburg's presentation should be removed, as it's not current anymore. The 2.7 version of the document is fine as it stands; it indeed doesn't talk about 3.x. -- versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16227] Change unicode howtos as misleading
Mark Lawrence added the comment: See also #4153 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16227] Change unicode howtos as misleading
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Unicode nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16231] pickle persistent_id return value
New submission from PSchaafsma: The documentation of persistent_id prescribes that returning None will cause default pickling behavior. This makes sense. However, in the Pickler.save function in pickle.py, the return value of persistent_id checked as boolean, causing also return values like 0 and [] to indicate default pickling. This becomes a problem when unpickleable objects are identified by a simple index in some other list. -- components: Library (Lib) messages: 172887 nosy: pschaafsma priority: normal severity: normal status: open title: pickle persistent_id return value type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16231 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16232] curses.textpad.Textbox backtrace support
New submission from emeaudroid emeaudroid: python: 2.6.6 curses' revision: 61064 2008-02-25 16:29:58Z andrew.kuchling line 93 and 102 of curses/textpad.py could you replace the backspace's specific chars codes by using this dedicated curses' function retrieving the currently in-use char's code ? ord( curses.erasechar( )) this one would make specific erase char specified to term supported, unlike curses.ascii.BS, curses.KEY_BACKSPACE that are specifics to most configurations indeed. at least adding the curses.ascii.DEL char's code seems legit na ? -- components: Extension Modules messages: 172888 nosy: emeaudroid.emeaudroid priority: normal severity: normal status: open title: curses.textpad.Textbox backtrace support type: enhancement versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16232 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16212] mmap() dumps core upon resizing the underlying file
Charles-François Natali added the comment: SIGBUS as well as SIGFPE or SIGSEGV is a synchronous signal. It is delivered to the thread that caused the trouble and the stack contents is well defined. Except that signal handlers are per-process, not per thread. So if another thread (which could be running without the GIL, e.g. doing some lengthy computation) triggers a SIGBUS while the handler is setup, it's going to try to longjmp to the jmp_buf set by the other thread. And this will get really nasty. https://www.securecoding.cert.org/confluence/display/seccode/SIG35-C.+Do+not+return+from+SIGSEGV,+SIGILL,+or+SIGFPE+signal+handlers Does not apply here: longjmp is not a return. I still don't understand how you plan to handle the SIGBUS/SIGSEGV. Where will you longjmp to? If the idea is to dump a traceback and exit, then there's faulthandler for that. As for the stack content, variables with automatic storage class (i.e. local variables) modified should be declared volatile (which may or may not be an issue here). https://www.securecoding.cert.org/confluence/display/seccode/SIG32-C.+Do+not+call+longjmp%28%29+from+inside+a+signal+handler The grounds are weak. They refer to SIG30-C, which is based on ISO C standard. POSIX explicitly declares the fact that longjmp is allowed to exit signal handlers as an extension to ISO C standard. It is allowed, but as said earlier, 99% of use cases are just wrong. Besides, POSIX explicitly states that only async-signal-safe functions can be called from the handlers, which are invoked asynchronously with process execution. That's not out case as mentioned above, we are not in asynchronous context as it could be with, say, SIGINT. Well, nothing prevents kill -SEGV PID. Besides, setjmp() is expensive, and here we would be setting up a jmp_buf even for a single byte memory access. But I think we've talked enough :-) Honestly, if you manage to find a way to handle this, I'll be happy to commit it, so don't hesitate if you think you've found an approach that will work. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13454] crash when deleting one pair from tee()
Serhiy Storchaka added the comment: Here is a patch (tests included). Thank Pyry for report, Victor and Amaury for analysis. Maybe I picked up the poor names for iterators? May be exhausted and unexhausted would be better? Feel free to correct me. -- keywords: +patch nosy: +serhiy.storchaka stage: test needed - patch review versions: +Python 3.4 Added file: http://bugs.python.org/file27566/itertools_tee_nonrecursive_clear.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13454 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16233] IDLE: conceptual problems with *Class browser*
New submission from Francisco Gracia: The *File* option in the menu bar of both the Python shell and the program editor have an entry called *Class Browser*. If one selects it from the shell window, one gets always an error message with the title: No filename which says: This buffer has no associated filename. This happens whatever the previous history of the current interactive session. If one selects it from the editor window with a Python module loaded, then another window shows correctly the expected information about the classes defined in such a module, if any. The same previous error appears if the current contents of the editor are not recognised as a Python module (for instance by not having been yet saved), which is reasonable. IDLE's help says: Class Browser-- Show classes and methods in current file. This does not clarify things much (what does *current file* mean from the shell window?) and does not permit one to get a coherent idea of the purpose originally intended for the option (a module imported in the current interactive session could not be rightly understood as a *current file*?). I find this situation quite confuse and would suggest that some action could be taken in order to at least clarify it, if not improve it, as for instance (in order of desirability and --very likely-- difficulty): - Just make the error message less puzzling and more informative when coming from the shell window (what does *buffer* mean in this context?) and let the help file explain that this operation has only sense in connection with Python scripts being edited (if that is the case, as it seems). - Disable the option in the shell window. - Suppress the option in the shell window and keep it only in the editor window when the document it is handling is recognised as a Python module. - Keep the option also in the shell window and make it display information about the classes defined in the namespace of the current interactive session, if any. I think that this is what would be a real and useful *class browser*. Thank you in advance for your attention. -- components: IDLE messages: 172891 nosy: fgracia priority: normal severity: normal status: open title: IDLE: conceptual problems with *Class browser* type: enhancement versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16233 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16212] mmap() dumps core upon resizing the underlying file
Vladimir Ushakov added the comment: But I think we've talked enough... So do I. Let's go for it. I'll make a patch (which apparently takes some time) and post it here, we'll discuss it then. Thanks for your comments. Now I believe it's a bit harder than I thought initially, but still doable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16226] IDLE crashes on *File / Path browser*
Ned Deily added the comment: Thank you for the report. There does seem to be a regression in the 3.3 version of IDLE. Using the OS X version of bin/idle3.3 and selecting menu item File - Path Browser results in the following exception: Exception in Tkinter callback Traceback (most recent call last): File /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/tkinter/__init__.py, line 1442, in __call__ return self.func(*args) File /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/idlelib/TreeWidget.py, line 131, in expand self.update() File /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/idlelib/TreeWidget.py, line 164, in update self.parent.update() File /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/idlelib/TreeWidget.py, line 170, in update self.draw(7, 2) File /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/idlelib/TreeWidget.py, line 197, in draw cy = child.draw(cx, cy) File /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/idlelib/TreeWidget.py, line 184, in draw sublist = self.item._GetSubList() File /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/idlelib/TreeWidget.py, line 338, in _GetSubList sublist = self.GetSubList() File /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/idlelib/PathBrowser.py, line 61, in GetSubList for nn, name in self.listmodules(names): File /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/idlelib/PathBrowser.py, line 78, in listmodules for suff, mode, flag in suffixes: ValueError: too many values to unpack (expected 3) -- keywords: +3.3regression nosy: +ned.deily priority: normal - high stage: - needs patch versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16226 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16222] server-side clone not found by devguide's search box
Éric Araujo added the comment: Not sure this needs more exposure. New core developers will learn about that feature from other devs, and contributors (the primary audience of the devguide) can't use these repos. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16222 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16229] Module *redemo.py* lacking in recent Python distributions
Ned Deily added the comment: The demo scripts in the Tools directory were cleaned up earlier in Python 3 and moved. redemo.py is still included in the 3.2 and later source distributions in the Tools/demo directory. The builders of binary installers and third-party distributors of Python 3.x may make their own decisions about whether to include the Tools directory in their distros. For which platform and from what source are you installing Python 3.2? -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16229 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8425] a -= b should be fast if a is a small set and b is a large set
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8425 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16083] HTTPServer does not correctly handle bad headers
Terry J. Reedy added the comment: Is this really a security issue? If so, that should be explained. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16083 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16225] list.remove in for loop
Chris Jerdonek added the comment: It is safe to modify a sequence during iteration if it's size not increased. What do you mean by safe? The example given by the original commenter does not increase the size either. I believe safe is meant in the sense of avoiding possibly unexpected behavior. I can clarify the language if you feel it is ambiguous. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16225 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8786] Add support for IEEE 754 contexts to decimal module.
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8786 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16083] HTTPServer does not correctly handle bad headers
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16083 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16227] Change unicode howtos as misleading
Chris Jerdonek added the comment: I don't think there is a need to update the 3.1.x version of the documentation in that respect. versions: +Python 3.3, Python 3.4 -Python 3.1 This issue was just about the 2.7 version. 3.x doesn't contain the language mentioned by the original commenter. If 2.7 should not be changed, this issue should be closed. Or are you suggesting other updates to the 3.x docs? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16225] list.remove in for loop
Georg Brandl added the comment: Well, I guess Serhiy meant neither increase nor decrease. In the end, the exact behavior will never be clear if you don't state explicitly how it's implemented: a counter that starts at 0 and is increased on __next__ until it's equal to len(list) (as checked at every iteration step). But in general the advice should be: if you want to insert or remove elements during iteration, iterate over a copy. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16225 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16227] Change unicode howtos as misleading
Chris Jerdonek added the comment: 3.x doesn't contain the language mentioned by the original commenter. 3.2 onwards I mean. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16083] HTTPServer does not correctly handle bad headers
Michele Orrù added the comment: Well, it is a security issue IMO, but not particularly harmful. But certainly that's not a RFC violation, since I'm not sending rfc-compliant packets.[0] The best an attacker could do is to DDoS the server running HTTPServer: tracebacks may open file descriptors and/or send emails to the sysadmin, and hence the attacker could flood the server opening new file descriptors, or the email box.[0] At least, this is the worst thing that came to my mind discussing with exarkun. [0] https://twistedmatrix.com/trac/ticket/6029 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16083 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16222] server-side clone not found by devguide's search box
Chris Jerdonek added the comment: I filed this in case it signals some underlying issue with search that could use improving (and that may affect other search terms). I can change the title to remove the focus on those two terms. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16222 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16222] some terms not found by devguide's search box
Changes by Chris Jerdonek chris.jerdo...@gmail.com: -- title: server-side clone not found by devguide's search box - some terms not found by devguide's search box ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16222 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8786] Add support for IEEE 754 contexts to decimal module.
Terry J. Reedy added the comment: I do not think IEEEContext should not be made a class rather than a function until it really *is* a subclass with altered or added behavior. This means at least its own __str__ method and in this case, a __setattr__ that enforces the invariants. Here that means refusing to modify the context, or at least not prec and Emax (assuming that changes to any other context attributes (are there any?) are harmless. Something like def __setattr__(self, key, value): if key in ('prec', 'Emax'): raise AttributeError(cannot change {} of IEEEContext.format(key)) else: super(IEEEContext, self).__setattr__(key, name) -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8786 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16227] Change unicode howtos as misleading
Martin v. Löwis added the comment: Ah, I missed that. I'm skeptical that the proposed change is an improvement - how would the reader know how to find version 1.12 of the document? I'm also skeptical that removal of the note in 2.7 is useful: people finding the document in Google would misunderstand. My proposal: This version of the document talks about Unicode support in Python 2.x. See URL for the Python 3 version. -- versions: +Python 2.7 -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13454] crash when deleting one pair from tee()
Antoine Pitrou added the comment: Serhiy, I only see a test in your patch, no actual modification to itertools. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13454 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16225] list.remove in for loop
Chris Jerdonek added the comment: But in general the advice should be: if you want to insert or remove elements during iteration, iterate over a copy. I would expand this to cover changing the list in any way. I think the point being made is that iteration doesn't implicitly make a copy. There are cases where modifying the list in place can also yield unexpected results. For example (naive list reversal): words = ['cat', 'window', 'defenestrate'] for i, word in enumerate(words): ... words[-i-1] = word ... words ['cat', 'window', 'cat'] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16225 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16227] Change unicode howtos as misleading
Chris Jerdonek added the comment: That proposal sounds fine to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1
Kevin Walzer added the comment: editFont.config is causing the crash. The revised patch you suggest configures both the display font example and the highlight-text example. We can certainly amend my patch along those lines. I cannot reproduce the issue in simple Tcl/Tk using the equivalent [font create] and [font configure] calls. As noted, bugs involving the Tcl/Tk event loop on the Mac can be hard to reproduce. It is usually simpler, where possible, to work around the issue at the script level. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16227] Change unicode howtos as misleading
Mark Lawrence added the comment: The mvl proposal fine by me too, thanks guys. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16234] Implement correct block_size and tests for HMAC-SHA3
Roundup Robot added the comment: New changeset 40a1652349e9 by Christian Heimes in branch 'default': Issue #16234: Modify sha3's block_size method to return NotImplemented. http://hg.python.org/cpython/rev/40a1652349e9 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16234 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16083] HTTPServer does not correctly handle bad request line
Éric Araujo added the comment: This does not seem to qualify as a security issue. -- title: HTTPServer does not correctly handle bad headers - HTTPServer does not correctly handle bad request line type: security - behavior versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16083 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16234] Implement correct block_size and tests for HMAC-SHA3
New submission from Christian Heimes: HMAC-SHA3 hasn't been specified yet. Once an official RFC or NIST document is out I can implement the correct block_size attribute and add test vectors. In the mean time I'm disabling SHA3 by returning NotImplemented from block_size. This ticket a reminder for myself. -- assignee: christian.heimes components: Extension Modules, Library (Lib) messages: 172910 nosy: christian.heimes priority: normal severity: normal status: open title: Implement correct block_size and tests for HMAC-SHA3 type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16234 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords
Serhiy Storchaka added the comment: Here is a patch which get rid of all three PyArg_ParseTuple usage with parsing nested sequences. Thanks Evgeny for reproducers. -- nosy: +serhiy.storchaka Added file: http://bugs.python.org/file27567/PyArg_ParseTuple_refcount.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6083 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords
Changes by Serhiy Storchaka storch...@gmail.com: -- versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6083 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5256] rlcompleter adds builtins when custom dict is used
Changes by Éric Araujo mer...@netwok.org: -- keywords: +needs review versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5256 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5256] rlcompleter adds builtins when custom dict is used
Éric Araujo added the comment: Looks good to me. I wrote one comment on the doc patch review. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5256 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13454] crash when deleting one pair from tee()
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file27566/itertools_tee_nonrecursive_clear.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13454 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16106] antigravity tests
Éric Araujo added the comment: Agreed with Antoine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16106 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13454] crash when deleting one pair from tee()
Serhiy Storchaka added the comment: Oh, I worked on it in a different directory. Fortunately I found a temporary copy and I do not have to write all code again. Sorry. -- Added file: http://bugs.python.org/file27568/itertools_tee_nonrecursive_clear.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13454 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16227] Add link to 3.3 version in unicode howto
Changes by Éric Araujo mer...@netwok.org: -- keywords: +easy nosy: +eric.araujo stage: - needs patch title: Change unicode howtos as misleading - Add link to 3.3 version in unicode howto ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16229] File *redemo.py* lacking in recent Python distributions but still referenced
Changes by Éric Araujo mer...@netwok.org: -- assignee: - docs@python components: +Documentation -Demos and Tools keywords: +easy nosy: +docs@python stage: - needs patch title: Module *redemo.py* lacking in recent Python distributions - File *redemo.py* lacking in recent Python distributions but still referenced versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16229 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16229] File *redemo.py* lacking in recent Python distributions
Ned Deily added the comment: I don't think this is a documentation issue. I think it's more likely a Windows installer issue since I don't see the file installed in the current python.org 3.3 Windows distribution. But I was waiting for confirmation from the OP that he is using the Windows installer. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16229 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16229] File *redemo.py* lacking in recent Python distributions
Éric Araujo added the comment: Hm Tools/demo is actually the correct location in 3.2+. -- nosy: +eric.araujo stage: needs patch - title: File *redemo.py* lacking in recent Python distributions but still referenced - File *redemo.py* lacking in recent Python distributions ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16229 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8402] Add a way to escape metacharacters in glob/fnmatch
Éric Araujo added the comment: I have comments on the patch but a review link does not appear. Could you update your clone to latest default revision and regenerate the patch? Thanks. -- nosy: +eric.araujo title: glob returns empty list with [ character in the folder name - Add a way to escape metacharacters in glob/fnmatch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8402 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16218] Python launcher does not support non ascii characters
Changes by Éric Araujo mer...@netwok.org: -- nosy: +brian.curtin, tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16218 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14913] tokenize the source to manage Pdb breakpoints
Changes by Éric Araujo mer...@netwok.org: -- nosy: +georg.brandl versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14913 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15442] Expand the list of default dirs filecmp.dircmp ignores
Éric Araujo added the comment: ISTM the names should be regular names, not regular expression patterns. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15442 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5256] rlcompleter adds builtins when custom dict is used
Michele Orrù added the comment: Updated with tip, and merged with documentation. -- Added file: http://bugs.python.org/file27569/issue5256.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5256 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8402] Add a way to escape metacharacters in glob/fnmatch
Michele Orrù added the comment: Noblesse oblige :) -- Added file: http://bugs.python.org/file27570/issue8402.1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8402 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16227] Add link to 3.3 version in unicode howto
Chris Jerdonek added the comment: Attaching proposed patch. -- keywords: +patch Added file: http://bugs.python.org/file27571/issue-16227-1-27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16235] Add python-config.sh for use during cross compilation.
New submission from Ray Donnelly: Creates python-config.sh which aims to behave exactly the same as python-config except it doesn't depend on a Python interpreter on the build machine (only depends on a posixy shell, tested with bash, dash, MSYS-bash). I use this for cross compiling gdb with Python pretty printer support. -- components: Cross-Build files: -add-python-config-sh.patch keywords: patch messages: 172925 nosy: Ray.Donnelly priority: normal severity: normal status: open title: Add python-config.sh for use during cross compilation. type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file27572/-add-python-config-sh.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16235 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16225] list.remove in for loop
Chris Jerdonek added the comment: Attaching revised patch. -- Added file: http://bugs.python.org/file27573/issue-16225-2-default.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16225 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12457] type() returns incorrect type for nested classes
Serhiy Storchaka added the comment: There is no crash. I don't think this is a bug. It looks as feature request and this feature already implemented in 3.3 (PEP 3155). -- components: +Interpreter Core -None nosy: +serhiy.storchaka stage: - needs patch type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12457 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16227] Add link to 3.3 version in unicode howto
Éric Araujo added the comment: I would not rephrase the first two lines. Nice trick of using py3k in the link. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16154] Some minor doc fixes in Doc/library
Ravi Sinha added the comment: I've used the testsetup directive and the problem in http://hg.python.org/cpython/file/40a1652349e9/Doc/library/math.rst, line 79, is fixed; the test passes Added # doctest: +SKIP to lines 179 and 180 in http://hg.python.org/cpython/file/40a1652349e9/Doc/library/filecmp.rst, and it passes too For http://hg.python.org/cpython/file/40a1652349e9/Doc/library/string.rst, lines 612-624, used +NORMALIZE_WHITESPACE and the test passed, but since Terry preferred a code change, did that too; the test passes Put my name at the proper position in Misc/ACKS For the multiple versions, I needed to ask whether they'd all belong to this same patch or there would be different patches for each version? Sorry if it's a silly question; I haven't had the time to wrap my head around how to best work with all the versions together With the directives Chris and Terry suggested, it should be easy to make several other tests pass; I'll make a few more patches -- Added file: http://bugs.python.org/file27574/doc_lib_Oct14_2012.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16154 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16227] Add link to 3.3 version in unicode howto
Chris Jerdonek added the comment: I would not rephrase the first two lines. Why not? The current language focuses on the negative (explaining problems) while we prefer an affirmative tone: http://docs.python.org/devguide/documenting.html#affirmative-tone -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16225] list.remove in for loop
Chris Jerdonek added the comment: Reattaching. I duplicated a variable definition that was defined previously. -- Added file: http://bugs.python.org/file27575/issue-16225-3-default.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16225 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16236] Doc/Makefile should have $PYTHON=python2
New submission from Michele Orrù: On Arch/Linux, running `make html` fails with $ make html mkdir -p build/html build/doctrees python tools/sphinx-build.py -b html -d build/doctrees -D latex_paper_size= . build/html Traceback (most recent call last): File tools/sphinx-build.py, line 27, in module from sphinx import main File //cpython/Doc/tools/sphinx/__init__.py, line 44 except ImportError, err: ^ SyntaxError: invalid syntax make: *** [build] Error 1 That is because sphinx needs python version 2 to run; but `python` is symlinked to python3 on my platform. We should replace $PYTHON with python2, which AFAIS here[0], it would point to the correct version. [0] http://hg.python.org/cpython/file/5fc6f47974db/Makefile.pre.in#l808 -- components: Interpreter Core messages: 172931 nosy: maker priority: normal severity: normal status: open title: Doc/Makefile should have $PYTHON=python2 versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16236 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16236] Doc/Makefile should have $PYTHON=python2
Changes by Michele Orrù maker...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file27576/issue16236.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16236 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com