[issue6649] idlelib/rpc.py missing exit status on exithook
Roundup Robot added the comment: New changeset e044d22d2f61 by Roger Serwy in branch '2.7': #6649: Fixed missing exit status in IDLE. Patch by Guilherme Polo. http://hg.python.org/cpython/rev/e044d22d2f61 New changeset cd2c613527ed by Roger Serwy in branch '3.3': #6649: Fixed missing exit status in IDLE. Patch by Guilherme Polo. http://hg.python.org/cpython/rev/cd2c613527ed New changeset abbbe1f90635 by Roger Serwy in branch 'default': #6649: merge with 3.3. http://hg.python.org/cpython/rev/abbbe1f90635 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6649 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6649] idlelib/rpc.py missing exit status on exithook
Roger Serwy added the comment: Thanks for the patch, Guilherme! -- resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 3.3, Python 3.4 -Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6649 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15494] Move test/support.py into a test.support subpackage
Nick Coghlan added the comment: Yeah, it was only when we went to add test.pkg_helper (so that test_runpy and test_pkgutil could share it) that we put the brakes on and decided to stop making a bad situation worse and do something different. There are probably some other helpers we could spin out over time (like those for creating test servers). It becomes much easier to do that kind of refactoring once there's an obvious place to put them without bloating the test/support.py to crazy levels. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17585] IDLE - regression with exit() and quit()
New submission from Roger Serwy: This issue is a split from #5492, where Terry noticed a serious regression that quit() and exit() no longer work in IDLE. Before #9290, the PyShell object itself was stdin and it didn't have a fileno method. The code in site.py would skip over the call to fileno, leaving fd == -1, which then called close() on stdin, effectively the close() method of PyShell. The application of #9290 introduced PseudoFile as a subclass of io.TextIOBase which has a fileno method. The site.py code find it, calls it, but an error gets raised so that the close() method doesn't get called. Even if you subclass fileno(), you still need to subclass close() so that it calls the original close function in PyShell. The attached patch, fileno_close.patch, fixes that issue. I would argue that this patch should be applied to all the release candidates as it corrects a serious regression. I would like to hear your thoughts before applying the patch. -- assignee: roger.serwy components: IDLE files: fileno_close.patch keywords: patch messages: 185619 nosy: roger.serwy, terry.reedy priority: critical severity: normal stage: patch review status: open title: IDLE - regression with exit() and quit() type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29618/fileno_close.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17585] IDLE - regression with exit() and quit()
Terry J. Reedy added the comment: I thought of this exact patch, but then decided against it. 1. The bug is in site.py -- see thread [Python-Dev] Idle, site.py, and the release candidates for a better explanation and solution. 2. The Idle behavior, inherited from io.IOBase is correct. 3. The consequence on *other* Python code of a fake fileno is unknown. The solution I gave for site.py is to begin .__call__ with if sys.stdin.__name__ == 'PseudoInputFile': sys.stdin.close() This should be safe to do without another release candidate. The name as seen by the user process should be checked but I cannot do so at the moment (on substitute substitute computer). This would only be done in the release by the file managers. The exact decision is up to them. So I would replace IDLE with site.py in the title. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17585] IDLE - regression with exit() and quit()
Roger Serwy added the comment: I agree that site.py's Quitter exception logic has a flaw as described on the email from python-dev. But I disagree that the problem of IDLE not exiting is due to site.py. Even if you fix site.py (which I did), calling sys.stdin.close() won't close IDLE since PseudoInputFile's close method doesn't call PyShell's close method. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15494] Move test/support.py into a test.support subpackage
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16887] IDLE - tabify/untabify applied when clicking Cancel
Roger Serwy added the comment: If there are no objections, I will apply this patch after 2013-04-05. -- assignee: - roger.serwy versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16887 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17546] Document the circumstances where the locals() dict get updated
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17546 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17586] fix typo in contextlib.rst
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- assignee: docs@python components: Documentation files: typo.diff keywords: patch nosy: docs@python, tshepang priority: normal severity: normal status: open title: fix typo in contextlib.rst versions: Python 3.4 Added file: http://bugs.python.org/file29619/typo.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17586 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17206] Py_XDECREF() expands its argument multiple times
Mark Dickinson added the comment: Amaury, why do you mention -R flag He's talking about the -R argument to regrtest: -R runs each test several times and examines sys.gettotalrefcount() to see if the test appears to be leaking references. The argument should be of the form stab:run:fname where 'stab' is the number of times the test is run to let gettotalrefcount settle down, 'run' is the number of times further it is run and 'fname' is the name of the file the reports are written to. These parameters all have defaults (5, 4 and reflog.txt respectively), and the minimal invocation is '-R :'. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17206 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17583] IDLE HOWTO
Amit Saha added the comment: Hi Todd, I just signed the Python contributor agreement electronically. You probably missed the link to the rSt source in my original report. Here it is [1]. I would want this HOWTO to cover all aspects of IDLE from an user's perspective. I have some ideas about what to add, but I would like to hear from you as well. Thanks. [1] http://amitsaha.github.com/site/notes/_sources/articles/idle/article.txt -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17583 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17206] Py_XDECREF() expands its argument multiple times
Mark Dickinson added the comment: Thanks for the updated patch. Some comments: - In the tests, your functions should have return type PyObject* rather than void; you can use Py_RETURN_NONE as a convenient way to return something of the correct type. E.g.: static PyObject * test_decref_doesnt_leak(PyObject* self) { Py_DECREF(PyLong_FromLong(0)); Py_RETURN_NONE; } - Unfortunately, the test above *will* leak: even though your patch fixes Py_XDECREF, Py_DECREF will still evaluate the argument multiple times. So we get, for example: iwasawa:cpython mdickinson$ ./python.exe -m test -R:: test_capi [1/1] test_capi beginning 9 repetitions 123456789 . test_capi leaked [1, 1, 1, 1] references, sum=4 1 test failed: test_capi - It would be great to have tests for Py_INCREF and Py_XINCREF, too. - The patch introduces two extra blank lines before Py_CLEAR. - Not specifically about the patch, but: there's a comment in object.h that reads: *** WARNING*** The Py_DECREF macro must have a side-effect-free argument since it may evaluate its argument multiple times. (The alternative would be to mace it a proper function or assign it to a global temporary variable first, both of which are slower; and in a multi-threaded environment the global variable trick is not safe.) I don't understand why the author of that comment ruled out the possibility of a local temporary variable. Anyone have any ideas? A constraint of some flavours of pre-ANSI C, perhaps? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17206 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10044] small int optimization
Mark Dickinson added the comment: Do we need to keep this issue open while this research is being carried out? I'd say not. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10044 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17206] Py_XDECREF() expands its argument multiple times
Mark Shannon added the comment: Mark, it was written 20 years ago. Who knows (or cares) why it was written that way? Let's just write it correctly this time. Py_INCREF, Py_DECREF, Py_XDECREF and Py_XINCREF should all expand their argument exactly once. Py_CLEAR should expand its argument exactly twice, once as an rvalue, then once as an lvalue. So could we fix Py_DECREF and Py_CLEAR as well, please? -- nosy: +Mark.Shannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17206 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17585] IDLE - regression with exit() and quit()
Terry J. Reedy added the comment: I see that now. Then both files should be fixed. I still object to introducing a buggy .fileno ;-). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17583] IDLE HOWTO
Todd Rovito added the comment: Yes I missed the link sorry. Can you add the rst file to Doc/faq in the tip of the repository then do a hg diff and post the patch as an attachment to this issue? At that point I will review and send any changes or edits with the review system. Others can suggest changes as well. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17583 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17587] Have all core library modules imported by default
New submission from Daniel Ellis: The other day I was trying to make a script to import a CSV file but for the life of me couldn't remember what the name of the csv library was (turns out it was csv). So I started thinking hey, what if all the standard library were just *there* by default? We all know doing imports is really boring, so why don't we deal with the elephant in the room? This is what I love about PHP: once something's imported (or required? included? required_once?) you don't have to think about it anymore. It's very set it and forget it. And then you simply remember it later when necessary. For this, I use pen and paper. Holy crap, I just had an even better idea. What if all third-party modules were imported as well? This may be a bit more challenging, but I truly believe you guys can do it. There are system settings I've heard about (Krons) that let you basically do anything over and over again. We could have Python automatically download all pips or whatever and import them without thinking. Boom! The Zen of Python. And can we put an and a $ somewhere in Python? I think these feel very cool to use, and are easily one of the best things I miss from more advanced languages like C and PHP. Let's be honest, doesn't this: $item-method(); Look a lot more professional than: item.method() It certainly justifies my salary a bit better. I don't have a patch for this because, let's be honest, I wouldn't know where to begin. But I can't imagine it being that hard. Is there a line or two we could change somewhere? Maybe just throw an import * into a header file somewhere? Finally, I propose replacing meaningful whitespace with meaningful random unicode characters. This would look like the matrix and once you got it it would feel really cool. With all of these changes I think we have the potential to turn this toy language into a powerhouse that could even be used for stuff like forum software. Let me know what you guys think of this. Also, I offer consulting work for a modest fee (though I don't do any programming myself, I'm more of a people person). -- messages: 185630 nosy: Daniel.Ellis, gvanrossum priority: normal severity: normal status: open title: Have all core library modules imported by default type: enhancement versions: Python 2.6, Python 2.7, 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/issue17587 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17587] Have all core library modules imported by default
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17587 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17587] Have all core library modules imported by default
Changes by R. David Murray rdmur...@bitdance.com: -- Removed message: http://bugs.python.org/msg185630 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17587 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16887] IDLE - tabify/untabify applied when clicking Cancel
Changes by Todd Rovito rovit...@gmail.com: -- nosy: +Todd.Rovito ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16887 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14146] IDLE: source line in editor doesn't highlight when debugging
Todd Rovito added the comment: Roger, You are a genius! The example program duplicates the bug exactly. It works on Mac (I assume Linux but I will test on Linux) and it does not work on correctly on Windows. On Windows as soon as the text widget looses focus then the hi-light disappears. I will use this code and file a bug report for TCL/TK and post on the tkinter mailing list. Thank you I was stuck. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14146 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14146] IDLE: source line in editor doesn't highlight when debugging
Todd Rovito added the comment: Bug report has been filed with Tk here: https://sourceforge.net/tracker/?func=detailaid=3609608group_id=12997atid=112997 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14146 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17585] IDLE - regression with exit() and quit()
Roger Serwy added the comment: Terry, I agree that the original patch introduces a buggy fileno and it knows too much about the internals of site.py which could change. The attached patch modifies site.py, similar to how Nick Coghlan split the two function calls in a single try/except block into two separate try/except blocks. I tried to keep the change as small as possible to avoid introducing any unintended regressions. The change does pass the test suite on 3.4 on Linux. -- Added file: http://bugs.python.org/file29620/issue17585.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17588] runpy cannot run Unicode path on Windows
New submission from Drekin: runpy.run_path(\u222b.py) raises UnicodeEncodeError when trying to use mbcs codec on Windows. However opening the file using open() is ok. So why is runpy trying to encode the name using mbcs encoding when it's not necessary or even correct? See http://bpaste.net/show/aOqQLMyYAAFTJ8pQnkli/ . -- components: Library (Lib), Unicode, Windows messages: 185634 nosy: Drekin, ezio.melotti priority: normal severity: normal status: open title: runpy cannot run Unicode path on Windows type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17585] IDLE - regression with exit() and quit()
Antoine Pitrou added the comment: Please read http://mail.python.org/pipermail/python-dev/2013-March/125021.html . The fileno() check shouldn't be needed anymore. Also, it can't effect 2.7, or you have another problem. -- nosy: +pitrou versions: -Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17585] IDLE - regression with exit() and quit()
Antoine Pitrou added the comment: (s/effect/affect/, sorry) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17585] IDLE - regression with exit() and quit()
Roger Serwy added the comment: Antoine, it does affect 2.7 since sys.stdin.close() doesn't call PyShell's close method. #9290 introduced this regression. I accept some responsibility because my manual testing of those patches in #9290 didn't include trying the exit() and quit() methods. The attached patch fixes the problem on the 2.7 branch. -- nosy: +serhiy.storchaka versions: +Python 2.7 Added file: http://bugs.python.org/file29621/issue17585_2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17585] IDLE - regression with exit() and quit()
Roger Serwy added the comment: I would also argue that the fileno_close.patch ought to be applied to the 3.2.4 and 3.3.1 release candidates. The changes in #9290 were applied only two months ago. -- versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6419] Broken test_kqueue.py on OpenBSD
Roundup Robot added the comment: New changeset cfd4cd15809e by Charles-Francois Natali in branch '2.7': Issue #6419: Fix a test_kqueue failure on some BSD flavors. http://hg.python.org/cpython/rev/cfd4cd15809e New changeset 96776fc3cbcc by Charles-Francois Natali in branch '3.3': Issue #6419: Fix a test_kqueue failure on some BSD flavors. http://hg.python.org/cpython/rev/96776fc3cbcc New changeset 0c9415ddf403 by Charles-Francois Natali in branch 'default': Issue #6419: Fix a test_kqueue failure on some BSD flavors. http://hg.python.org/cpython/rev/0c9415ddf403 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6419 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17585] IDLE - regression with exit() and quit()
Antoine Pitrou added the comment: I won't argue about any changes in IDLE, but the fileno-checking code in site.py should probably be removed, not complicated. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object
Éric Araujo added the comment: Ah, okay. I can’t wait for the time when unittest.main() is used everywhere and we delete run_unittest :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15627 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17585] IDLE - regression with exit() and quit()
Roger Serwy added the comment: I agree with Antoine that fileno checking code should be removed. I dug deeper into why that was introduced in the first place. 00b136b7da84 introduced the warning Trying to close unclosable fd! 86358b43c8bb intoduced the change to site.py about not closing stdin if wrapping fd 0 to avoid the warning. 23d9cb777d9a removed the warning as part of issue4233. So the code in site.py for checking fileno is cruft and can be safely removed. The site_reversion patch backs out of 86358b43c8bb. -- Added file: http://bugs.python.org/file29622/site_reversion.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17206] Py_XDECREF() expands its argument multiple times
Larry Hastings added the comment: For the record: I care. Generally speaking CPython is a lovingly crafted source tree, and the choices its architects made are nearly always sensible and well-reasoned. When I see things like this, things that seem kind of dumb on first glance, I worry that we're missing something. It could be that it did have a sensible reason fifteen years ago, like some bone-headed compiler generated awful code--and the macros *are* used everywhere, so maybe performance genuinely suffered. Or maybe the macros were originally intended to be usable as rvalues; it looks like Py_INCREF still permits that, and changing it to be a statement could be considered a breaking API change. But we can't let ourselves become hidebound and superstitious. I see no reason why a local temporary variable shouldn't be fine here, and perhaps in all the macros Mark cites. So don't get me wrong, I'm +1. (The documentation on Py_INCREF makes no mention of whether it's legal as an rvalue, and all the examples use it as a statement. Perhaps we should document it explicitly so for 3.4.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17206 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16 or UTF-8)
Sebastian Ortiz Vasquez added the comment: I have been working with this in order to generate an RSS feed using web2py. I found, XMLGenerator method does not validate if is an unicode or string type, and it does not encode accord the encoding parameter of the XMLGenerator. I added changed the method to verify if is an unicode object or try to convert to it using the desired encoding. Recall that the _write UnbufferedTextIOWrapper receives an unicode object as parameter. def characters(self, content): if isinstance(content, unicode): self._write(escape(content)) else: self._write(escape(unicode(content,self._encoding))) -- nosy: +neoecos title: Bugfix for #1470540 (XMLGenerator cannot output UTF-16) - Bugfix for #1470540 (XMLGenerator cannot output UTF-16 or UTF-8) versions: -Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29623/saxutils.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1470548 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17584] collections.Iterator __subclasshook__ does not check if next() is callable
Raymond Hettinger added the comment: It's the nature of duck typing in a dynamic language. You can tell whether something is present but can't tell whether it words correctly until you call it. For example, in Python 3, all objects have __lt__ defined, but all it does is return NotImplemented. So, you can't really tell whether something is orderable until you make the less-than call. In your case, the rule is that if next is present, we assume that it is iterable, but it won't be until it is called that we can tell whether it is implemented correctly (i.e. is callable with zero arguments, returns a value, and raises StopIteration when done). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17589] Make documentation about macros in C API explicit about rvalue vs statement
New submission from Larry Hastings: CPython API functions implemented as macros can expand into either rvalues or statements. Most expand into statements (often using the do {} while (0) syntactic sugar trick), but occasionally they're legal as rvalues. As of this writing Py_INCREF works as an rvalue. But discussion on another tracker issue (#17206) proposes changing the implementation in such a way that it will only be usable as a statement. Although it's mildly unlikely, it's certainly possible that this will break somebody's code. I propose that the documentation make an explicit ruling on whether macros are usable as rvalues or as statements. Perhaps a blanket statement would suffice, all macros are only supported for use as statements except where explicitly noted, then annotate specific macros that are supported for use as rvalues. Though that raises the question of acknowledging in the documentation that some things are macros--I think the documentation glosses over that fact right now. Note: I added you three (Georg, Mark, Martin) as I thought you might have an opinion on this one way or the other. If you're not interested, my apologies. -- assignee: docs@python components: Documentation messages: 185646 nosy: Mark.Shannon, docs@python, georg.brandl, larry, loewis priority: normal severity: normal stage: needs patch status: open title: Make documentation about macros in C API explicit about rvalue vs statement type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17590] mingw: translate gcc internal defines to python platform specific defines
New submission from Roumen Petrov: split of issue3871 -- components: Build, Cross-Build files: 0002-MINGW-translate-gcc-internal-defines-to-python-platf.patch keywords: patch messages: 185647 nosy: rpetrov priority: normal severity: normal status: open title: mingw: translate gcc internal defines to python platform specific defines type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29624/0002-MINGW-translate-gcc-internal-defines-to-python-platf.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17590 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17591] mingw: use header in lowercase
New submission from Roumen Petrov: split of issue3871 -- components: Cross-Build files: 0003-MINGW-use-header-in-lowercase.patch keywords: patch messages: 185648 nosy: rpetrov priority: normal severity: normal status: open title: mingw: use header in lowercase versions: Python 3.4 Added file: http://bugs.python.org/file29625/0003-MINGW-use-header-in-lowercase.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17591 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17584] collections.Iterator __subclasshook__ does not check if next() is callable
Byron Ruth added the comment: Thank you for the education. I didn't think about duck-typing extending to the level of whether or not something is callable.. then again the property _could_ return a callable and it would be transparent to the caller. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17592] mingw: configure MACHDEP and platform for build
New submission from Roumen Petrov: split of issue3871 -- components: Build, Cross-Build files: 0004-MINGW-configure-MACHDEP-and-platform-for-build.patch keywords: patch messages: 185650 nosy: rpetrov priority: normal severity: normal status: open title: mingw: configure MACHDEP and platform for build type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29626/0004-MINGW-configure-MACHDEP-and-platform-for-build.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17592 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8900] IDLE crashes when using keyboard shortcuts to open a file.
Roger Serwy added the comment: I changed the title to better reflect the original bug report. @Bruce: I did review Guilherme's patch a while ago in #10079. The editor window bug can be found in #6698. These are on my todo-list, especially now that PEP434 has been accepted. -- assignee: - roger.serwy title: IDLE crashes if Preference set to At Startup - Open Edit Window - IDLE crashes when using keyboard shortcuts to open a file. versions: +Python 2.7, Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8900 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17593] mailbox.py tries to link even on filesystem wihch does not support symbolic links
New submission from Dominik Stadler: I tried to use NoPriv (https://github.com/RaymiiOrg/NoPriv/) to backup emails to an USB Disk which is formatted for Windows compatibility, i.e. FAT-type filesystem, but got the error below. Seems mailbox.py still tries to create a symbolic link, which is not possible on this filesystem. Running on ext3 file system works fine. This is on Ubuntu Precise 12.04 with latest updates installed. Python is 2.7.3-0ubuntu3.1 Getting messages from server from folder: [Gmail]/Sent Mail. Saving message 1. Traceback (most recent call last): File ./nopriv.py, line 783, in module get_messages_to_local_maildir(folder, mail) File ./nopriv.py, line 236, in get_messages_to_local_maildir saveToMaildir(raw_email, maildir_folder) File ./nopriv.py, line 155, in saveToMaildir message_key = folder.add(msg) File /usr/lib/python2.7/mailbox.py, line 276, in add os.link(tmp_file.name, dest) OSError: [Errno 1] Operation not permitted -- components: Library (Lib) messages: 185652 nosy: dominik-stadler priority: normal severity: normal status: open title: mailbox.py tries to link even on filesystem wihch does not support symbolic links versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17593 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17584] collections.Iterator __subclasshook__ does not check if next() is callable
Terry J. Reedy added the comment: I responded to this on python-list. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17594] mingw: preset configure defaults
New submission from Roumen Petrov: split of issue3871, but implement ed differently - externalize some configure defaults instead to update configure script for each check -- components: Build, Cross-Build files: 0005-MINGW-preset-configure-defaults.patch keywords: patch messages: 185653 nosy: rpetrov priority: normal severity: normal status: open title: mingw: preset configure defaults type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29627/0005-MINGW-preset-configure-defaults.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17594 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17595] mingw: configure largefile support for windows builds
New submission from Roumen Petrov: split of issue3871 -- components: Build, Cross-Build files: 0006-MINGW-configure-largefile-support-for-windows-builds.patch keywords: patch messages: 185655 nosy: rpetrov priority: normal severity: normal status: open title: mingw: configure largefile support for windows builds type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29628/0006-MINGW-configure-largefile-support-for-windows-builds.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17595 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17596] mingw: add wincrypt.h in Python/random.c
New submission from Roumen Petrov: split of issue3871 -- components: Build, Cross-Build files: 0007-MINGW-add-wincrypt.h-in-Python-random.c.patch keywords: patch messages: 185656 nosy: rpetrov priority: normal severity: normal status: open title: mingw: add wincrypt.h in Python/random.c type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29629/0007-MINGW-add-wincrypt.h-in-Python-random.c.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17596 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17597] mingw: add $srcdir/PC to CPPFLAGS
New submission from Roumen Petrov: split of issue3871. May be best solution is to move errmap.h from PC/ to Objects/ and to use platform specific filename. -- components: Build, Cross-Build files: 0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch keywords: patch messages: 185657 nosy: rpetrov priority: normal severity: normal status: open title: mingw: add $srcdir/PC to CPPFLAGS type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29630/0008-MINGW-add-srcdir-PC-to-CPPFLAGS.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6696] Profile objects should be documented
Éric Araujo added the comment: Ezio, would you like to commit this? -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6696 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17598] mingw: init system calls
New submission from Roumen Petrov: split of issue3871. -- components: Build, Cross-Build files: 0009-MINGW-init-system-calls.patch keywords: patch messages: 185659 nosy: rpetrov priority: normal severity: normal status: open title: mingw: init system calls type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29631/0009-MINGW-init-system-calls.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17598 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17599] mingw: detect REPARSE_DATA_BUFFER
New submission from Roumen Petrov: split of issue3871. -- components: Build, Cross-Build files: 0010-MINGW-detect-REPARSE_DATA_BUFFER.patch keywords: patch messages: 185660 nosy: rpetrov priority: normal severity: normal status: open title: mingw: detect REPARSE_DATA_BUFFER type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29632/0010-MINGW-detect-REPARSE_DATA_BUFFER.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17599 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17600] mingw: build-in windows modules (winreg)
New submission from Roumen Petrov: split of issue3871. -- components: Build, Cross-Build files: 0011-MINGW-build-in-windows-modules-winreg.patch keywords: patch messages: 185661 nosy: rpetrov priority: normal severity: normal status: open title: mingw: build-in windows modules (winreg) type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29633/0011-MINGW-build-in-windows-modules-winreg.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17600 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15964] SyntaxError in asdl when building 2.7 with system Python 3
Roger Serwy added the comment: I use Arch Linux which has /usr/bin/python as 3.3.0. I can confirm that touch Include/Python-ast.h Python/Python-ast.c fixes the problem. But would it have been simpler just to convert the print statements to functions so that asdl_c.py would work with Python 3 as well as Python 2? -- nosy: +roger.serwy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15964 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17601] mingw: determine if pwdmodule should be used
New submission from Roumen Petrov: split of issue3871. (now without to impact other platforms - it will remain build-in module) -- components: Interpreter Core files: 0012-MINGW-determine-if-pwdmodule-should-be-used.patch keywords: patch messages: 185663 nosy: rpetrov priority: normal severity: normal status: open title: mingw: determine if pwdmodule should be used type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29634/0012-MINGW-determine-if-pwdmodule-should-be-used.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17601 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17602] mingw: default sys.path calculations for windows platforms
New submission from Roumen Petrov: Part is split of issue3871. Based of feedback to issue3871 users prefer to use posix installation scheme and this is implementation of 'relative' posix prefix. -- components: Interpreter Core files: 0013-MINGW-default-sys.path-calculations-for-windows-plat.patch keywords: patch messages: 185664 nosy: rpetrov priority: normal severity: normal status: open title: mingw: default sys.path calculations for windows platforms type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29635/0013-MINGW-default-sys.path-calculations-for-windows-plat.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17602 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17603] AC_LIBOBJ replacement of fileblocks
New submission from Roumen Petrov: split of issue3871 - actually this is not mingw* specific - it is for all platforms without fileblocks -- components: Build, Cross-Build files: 0014-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch keywords: patch messages: 185665 nosy: rpetrov priority: normal severity: normal status: open title: AC_LIBOBJ replacement of fileblocks type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29636/0014-MINGW-AC_LIBOBJ-replacement-of-fileblocks.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17603 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17604] mingw: use main() to start execution
New submission from Roumen Petrov: split of issue3871 -- components: Interpreter Core files: 0015-MINGW-use-main-to-start-execution.patch keywords: patch messages: 185666 nosy: rpetrov priority: normal severity: normal status: open title: mingw: use main() to start execution type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29637/0015-MINGW-use-main-to-start-execution.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17604 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17589] Make documentation about macros in C API explicit about rvalue vs statement
Georg Brandl added the comment: There are also some macros usable as lvalues, such as Py_REFCNT or Py_SIZE (they aren't documented at all currently). Anyway, documenting as statement-only unless explicitly stated differently is fine with me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17605] mingw-meta: build interpeter core
New submission from Roumen Petrov: split of issue3871 - this is meta issue only for part related to build interpreter core. Goal is statically linked python executable (python.exe). Patch set consist of : - 01 Issue17148 : nt thread model detection - 02 issue17590 : translate gcc internal defines to python platform specific defines - 03 issue17591 : use header in lowercase - 04 issue17592 : configure MACHDEP and platform for build - 05 issue17594 : preset configure defaults - 06 issue17595 : configure largefile support for windows builds - 07 issue17596 : add wincrypt.h in Python/random.c - 08 issue17597 : add $srcdir/PC to CPPFLAGS - 09 issue17598 : init system calls - 10 issue17599 : detect REPARSE_DATA_BUFFER - 11 issue17600 : build-in windows modules (winreg) - 12 issue17601 : determine if pwdmodule should be used - 13 issue17602 : default sys.path calculations for windows platforms - 14 issue17603 : AC_LIBOBJ replacement of fileblocks - 15 issue17604 : use main() to start execution After above patches user must regenerate configure script. Hints: a) at configure time define CPPFLAGS with minimum supported version like this -DWINVER=0x501 -D_WIN32_WINNT=0x501, i.e XP is now minimum b) use --without-libm c) do not use yet --enable-shared Notes: a) previous mingw patch (issue3871 posted in 2008) contain code that define w2k as minimum . Now python evolve and minimum is xp. b) previous patch nos not define libm in configure script . Instead to updated configure use tis flag c) will be included in additional patch-set related to build of standard extensions. -- components: Interpreter Core messages: 185669 nosy: rpetrov priority: normal severity: normal status: open title: mingw-meta: build interpeter core type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17605 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17589] Make documentation about macros in C API explicit about rvalue vs statement
Antoine Pitrou added the comment: Py_INCREF usable as an rvalue sounds more like an accident than a deliberate feature, and it would be IMO counter-productive to codify this behaviour in the docs. As for the lvalue usage of Py_REFCNT and Py_SIZE, I think it would be better if it were limited to CPython core. But arguably writers of extension types may want to mutate the size field of a varsize object. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17591] mingw: use header in lowercase
Roundup Robot added the comment: New changeset 58fcd81acfb1 by Antoine Pitrou in branch 'default': Issue #17591: Use lowercase filenames when including Windows header files. http://hg.python.org/cpython/rev/58fcd81acfb1 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17591 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17591] mingw: use header in lowercase
Antoine Pitrou added the comment: Committed, thanks. -- nosy: +pitrou resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17591 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17596] mingw: add wincrypt.h in Python/random.c
Antoine Pitrou added the comment: Why the #ifdef __MINGW32__? I suppose the include is harmless anyway. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17596 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11406] There is no os.listdir() equivalent returning generator instead of list
Gregory P. Smith added the comment: Here's an updated patch that fixes the windows build based on twouters' comments. It goes ahead and removes the old C implementation of listdir in favor of the trivial Python wrapping of scandir. -- Added file: http://bugs.python.org/file29638/issue11406-gps02.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11406 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11406] There is no os.listdir() equivalent returning generator instead of list
Antoine Pitrou added the comment: Bikeshedding: I would find iterdir much easier to remember than scandir (especially in relationship with listdir). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11406 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8900] IDLE crashes when using keyboard shortcuts to open a file.
Roundup Robot added the comment: New changeset 37352a3ccd54 by Roger Serwy in branch '2.7': #8900: Using keyboard shortcuts in IDLE to open a file no longer raises an exception. http://hg.python.org/cpython/rev/37352a3ccd54 New changeset 61092bbd1464 by Roger Serwy in branch '3.3': #8900: Using keyboard shortcuts in IDLE to open a file no longer raises an exception. http://hg.python.org/cpython/rev/61092bbd1464 New changeset 6ad256175971 by Roger Serwy in branch 'default': #8900: merge with 3.3. http://hg.python.org/cpython/rev/6ad256175971 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8900 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11406] There is no os.listdir() equivalent returning generator instead of list
Terry J. Reedy added the comment: I prefer iterdir also. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11406 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8900] IDLE crashes when using keyboard shortcuts to open a file.
Roger Serwy added the comment: I am closing this issue as being fixed. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8900 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13271] When -h is used with argparse, default values that fail should not matter
Joshua Chia added the comment: Added test case -- resolution: - duplicate status: open - closed Added file: http://bugs.python.org/file29639/test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11406] There is no os.listdir() equivalent returning generator instead of list
Gregory P. Smith added the comment: While i don't personally like things with iter in the name I won't object. That way the scandir name would be left available for a future version of this that yields namedtuples of directory entry details as Martin wants to see. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11406 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13271] When -h is used with argparse, default values that fail should not matter
Joshua Chia added the comment: Seems to be duplicate of http://bugs.python.org/issue12776 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17577] Add lookahead/peek wrapper to itertools
Phil Connell added the comment: I like the suggested API: iterator with indexing is a good articulation of the request. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17577 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1470548] xml.sax.saxutils.XMLGenerator cannot output UTF-16
Arfrever Frehtes Taifersar Arahesis added the comment: Sebastian Ortiz Vasquez: Please file a new issue and attach a patch (in unified format) instead of a whole Python module. -- title: Bugfix for #1470540 (XMLGenerator cannot output UTF-16 or UTF-8) - xml.sax.saxutils.XMLGenerator cannot output UTF-16 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1470548 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13271] When -h is used with argparse, default values that fail should not matter
Changes by Éric Araujo mer...@netwok.org: -- stage: test needed - committed/rejected superseder: - argparse: type conversion function should be called only once ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12776] argparse: type conversion function should be called only once
Éric Araujo added the comment: FTR a contributor to #13271 (--help should work even if a type converter fails) indicated that it’s fixed by this patch, so it may be good to add a regression test. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12776 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17606] BUG: XMLGenerator cannot output with the correct encoding
New submission from Sebastian Ortiz Vasquez: The XMLGenerator character method is unable to detect and encode using the encoding defined in the constructor. This yields to an UnicodeEncode exception, because always tries to encode using 'ascii' as default in python 2 -- components: XML files: XMLGenerator.patch keywords: patch messages: 185684 nosy: Arfrever, BreamoreBoy, benjamin.peterson, doerwalter, georg.brandl, larry, loewis, neoecos, neoecos, ngrig, pitrou, python-dev, serhiy.storchaka priority: normal severity: normal status: open title: BUG: XMLGenerator cannot output with the correct encoding versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file29640/XMLGenerator.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17606 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1470548] xml.sax.saxutils.XMLGenerator cannot output UTF-16
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- versions: +Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1470548 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17606] xml.sax.saxutils.XMLGenerator cannot output with the correct encoding
Arfrever Frehtes Taifersar Arahesis added the comment: Your patch does not apply cleanly to 2.7 branch. Please read documentation: http://docs.python.org/devguide/ http://docs.python.org/devguide/setup.html#checkout Use e.g. 'hg diff' to create patch. Only security fixes are allowed in 2.6 branch. -- title: BUG: XMLGenerator cannot output with the correct encoding - xml.sax.saxutils.XMLGenerator cannot output with the correct encoding versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17606 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17606] xml.sax.saxutils.XMLGenerator cannot output with the correct encoding
Arfrever Frehtes Taifersar Arahesis added the comment: Also please try to write a new test. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17606 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6698] IDLE no longer opens only an edit window when configured to do so
Roger Serwy added the comment: We can fix the bug as-is and then open a separate enhancement issue for Tal's suggestions. I place bug in quotes because the correct behavior is not documented. -- assignee: - roger.serwy nosy: +Todd.Rovito stage: - patch review type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6698 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17583] IDLE HOWTO
Amit Saha added the comment: Adding the patch here. I am not sure about how to add the screenshots, so I haven't done them. Just attached the document as a patch (note that I have placed in doc/howto). Thanks for the comments. -- hgrepos: +180 keywords: +patch Added file: http://bugs.python.org/file29641/idle.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17583 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17206] Py_XDECREF() expands its argument multiple times
Marc-Andre Lemburg added the comment: On 31.03.2013 21:29, Larry Hastings wrote: Larry Hastings added the comment: For the record: I care. Generally speaking CPython is a lovingly crafted source tree, and the choices its architects made are nearly always sensible and well-reasoned. When I see things like this, things that seem kind of dumb on first glance, I worry that we're missing something. Did someone test the patch on a use case where the performance of this macro matters a lot ? E.g. deallocating large lists or dictionaries. Todays CPUs have plenty of registers available, so it's possible that the patch actually speeds up things, since the decref'ed variable may well be an indirect reference. At the time Py_DECREF was written, registers were precious golden flasks, only to be filled with the most valuable of things ;-) Just want to be sure we're not missing something... -- nosy: +lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17206 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14254] IDLE - shell restart or closing during readline does not exit nested event loop
Roger Serwy added the comment: Closing the shell window while in the nested event loop for readline fails to exit the nested event loop. I updated the title to reflect the broader problem with readline's handling of the nested event loop. The rev1 patch causes the nested event loop to exit when restarting or closing the shell. -- assignee: - roger.serwy stage: - patch review title: IDLE - shell restart during readline does not reset readline - IDLE - shell restart or closing during readline does not exit nested event loop versions: +Python 3.4 -Python 3.2 Added file: http://bugs.python.org/file29642/reading_reset_rev1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14254 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17583] IDLE HOWTO
Changes by Ezio Melotti ezio.melo...@gmail.com: -- hgrepos: -180 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17583 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14254] IDLE - shell restart or closing during readline does not exit nested event loop
Ned Deily added the comment: With the rev1 patch (on OS X), the cursor seems to end up on the wrong line after the restart: import sys sys.stdin.readline() RESTART *Cursor left here at (*), i.e. the left margin of the next line, not on the same line as the prompt. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14254 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14254] IDLE - shell restart or closing during readline does not exit nested event loop
Ned Deily added the comment: However, the patch *does* fix the original problem that the first input after restart is skipped. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14254 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17583] IDLE HOWTO
Ezio Melotti added the comment: I left a few comments on rietveld. I wonder if it's better to make two separate versions, one for py2 and one for py3, and avoid repeating things (like the name of the packages) twice. You should also be able to include the images in the patch by using hg add locally. This should include them when you do hg diff idle.patch (if it doesn't work you might have to set git = on (see http://docs.python.org/devguide/committing.html#minimal-configuration)). -- nosy: +ezio.melotti stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17583 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5492] Error on leaving IDLE with quit() or exit() under Linux
Roger Serwy added the comment: I found the root cause of the original error. Entering exit() at the shell raises SystemExit which gets written to the shell's text widget. The call to actually write the text passes through .write() in Lib/idlelib/OutputWindow.py, which calls text.update(). The call to .update() enters the Tk event loop and flushes pending events, including expired .after callbacks. Forcing the .after callback in .close() to 1 ms will always trigger the error. Commenting out the text.update() in OutputWindow.py avoids the error. The patch causes .kill_subprocess() to execute immediately which prevents the subprocess from writing to sys.stderr. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5492 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14254] IDLE - shell restart or closing during readline does not exit nested event loop
Roger Serwy added the comment: Ned, I can confirm the behavior you are seeing. I am trying to trace down why this spurious '\n' gets inserted. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14254 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17583] IDLE HOWTO
Amit Saha added the comment: Hi Ezio, thanks for your review comments. I will make the changes to the document, and also add the images in a later patch. I do agree that repeating package names for Python 2 and Python 3 is perhaps not an ideal way. I am also trying to think of other ways to justify having two separate documents: may be the code samples? print 'Hello world' versus print('Hello World') ? Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17583 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17586] fix typo in contextlib.rst
New submission from Roundup Robot: New changeset 18e699c4d8c0 by Ned Deily in branch 'default': Issue #17586: fix typo in contextlib.rst http://hg.python.org/cpython/rev/18e699c4d8c0 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17586 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17586] fix typo in contextlib.rst
Ned Deily added the comment: Thanks for catching this! -- nosy: +ned.deily resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17586 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17593] mailbox.py tries to link even on filesystem wihch does not support symbolic links
R. David Murray added the comment: The problem is that mailbox decides if links are possible based on the OS rather than on the file system. This is a general problem that Python has...when the Python file system APIs, and this code, were written, OSes could only read their own file systems, and there was only one file system type per OS. Fixing this, then, pretty much requires solving the general problem of introspecting file system capabilities. I think there are open issues relating to that. -- components: +email nosy: +barry, r.david.murray type: - behavior versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17593 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17587] Have all core library modules imported by default
R. David Murray added the comment: Ah, I see I misunderstood the argument, here. Upon reflection, this clearly deserves an opportunity for input from other developers. -- nosy: +r.david.murray resolution: invalid - stage: committed/rejected - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17587 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17577] Add lookahead/peek wrapper to itertools
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- Removed message: http://bugs.python.org/msg185533 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17577 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17577] Add lookahead/peek wrapper to itertools
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- Removed message: http://bugs.python.org/msg185534 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17577 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17583] IDLE HOWTO
Todd Rovito added the comment: Ezio, I left a few comments on rietveld. This is a really nice start to a great FAQ. Thanks for your contribution I think Python needs a nice FAQ on IDLE. You might want to add some detail about the right click menu which allows a user to cut, copy, paste, and set breakpoints. I think a section on the debugger would be excellent. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17583 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17583] IDLE HOWTO
Amit Saha added the comment: Hi Todd, thanks for your comments. I wanted to clarify that I intend to make this a HOWTO, not a FAQ. I hope that's fine? -Amit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17583 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17586] fix typo in contextlib.rst
Raymond Hettinger added the comment: Thanks. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17586 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6698] IDLE no longer opens only an edit window when configured to do so
Todd Rovito added the comment: Roger, I reviewed and tested the patch, it does seem to fix the bug. Now when the on startup configure option is selected IDLE will behave as expected. I think this makes sense to fix the bug even though it is not documented we can infer the behavior based on the configuration dialog box. Tal's suggestion makes sense but this is for sure an enhancement. Please feel free to push the patch at your earliest convenience. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6698 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com