[issue28681] About function renaming in the tutorial

2016-11-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: To me, this is renaming: def f(x): pass f.__name__ = g And this is aliasing: g = f -- ___ Python tracker

[issue28681] About function renaming in the tutorial

2016-11-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: I disagree that "aliasing" is more accurate. We have a perfectly good name for symbols in Python: "name". A value (and that includes functions) can have multiple names. It seems to me that if we're to start distinguishing between names and aliases, then

[issue28681] About function renaming in the tutorial

2016-11-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 "Aliasing" is more accurate. -- nosy: +rhettinger ___ Python tracker ___

[issue11437] IDLE crash on startup with typo in config-keys.cfg

2016-11-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: I closed #25662 in favor of this. -- ___ Python tracker ___ ___

[issue25662] _tkinter.TclError: bad event type or keysym "Alt"

2016-11-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: A crash is when Python stops without a traceback, even when run with somewhere for a traceback to go. However, I regard it as a bug for IDLE to stop because of a problem in a user.cfg file. I am not re-opening because this appears to be a duplicate of

[issue28681] About function renaming in the tutorial

2016-11-12 Thread Xue Fuqiao
New submission from Xue Fuqiao: In https://hg.python.org/cpython/file/6fbb7c9d77c6/Doc/tutorial/controlflow.rst#l295 : A function definition introduces the function name in the current symbol table. The value of the function name has a type that is recognized by the interpreter as a

[issue28680] bdist_wininst generated 64-bit executable looks for 3.5-32

2016-11-12 Thread Timothy Widrick
New submission from Timothy Widrick: Short version: wininst-14.0-amd64.exe has "-32" in it. It shouldn't, should it? Longer version: Running "python setup.py bdist_wininst" gives me a file named like: project-version.win-amd64-py3.5.exe When I run that, I get: Python version 3.5-32

[issue28679] CGIHTTPServer displays raw python code when the url contains '/' after '?'

2016-11-12 Thread Yudai Fujiwara
New submission from Yudai Fujiwara: I made a simple CGI server and prepared index.py on the root directory. When I access to '/index.py?value=data', it displays 'value = data', which is working correctly. However, when I access to '/index.py?/' or something like this, it displays its raw

[issue28679] CGIHTTPServer displays raw python code when the url contains '/' after '?'

2016-11-12 Thread Yudai Fujiwara
Changes by Yudai Fujiwara : -- components: Library (Lib) nosy: Yudai Fujiwara priority: normal severity: normal status: open title: CGIHTTPServer displays raw python code when the url contains '/' after '?' type: security versions: Python 2.7

[issue28675] about PEP 528 / PEP 529

2016-11-12 Thread Steve Dower
Steve Dower added the comment: Those are redirecting stdin and stdout from the real console to their own handlers, so they are responsible for setting the encoding. Both of those examples are able to fix the encoding issues whenever they like - assuming their GUI toolkits can handle it. The

[issue23284] Improve termcap detection in setup.py

2016-11-12 Thread Kubilay Kocak
Changes by Kubilay Kocak : -- nosy: +koobs ___ Python tracker ___ ___

[issue28618] Decorate hot functions using __attribute__((hot)) to optimize Python

2016-11-12 Thread STINNER Victor
STINNER Victor added the comment: > Can we commit this to 3.6 too? I worked on patches to try to optimize json_loads and regex_effbot as well, but it's still unclear to me how the hot attribute works, and I'm not 100% sure that using the attribut explicitly does not introduce a performance

[issue26934] android: test_faulthandler fails

2016-11-12 Thread STINNER Victor
STINNER Victor added the comment: Oh, you didn't push your patch yet? Go ahead. buggy_raise_5.patch LGTM and is better than perfect :-) -- ___ Python tracker

[issue14061] Misc fixes and cleanups in archiving code in shutil and test_shutil

2016-11-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45466/shutil_make_archive_misc_3.patch ___ Python tracker ___

[issue28635] Update What's New for 3.6

2016-11-12 Thread Yury Selivanov
Yury Selivanov added the comment: I'll go through whatsnew on Monday, fixing errors etc. -- ___ Python tracker ___

[issue28635] Update What's New for 3.6

2016-11-12 Thread Ned Deily
Ned Deily added the comment: There are now a few markup errors that the Docs buildbots are catching. See, for example: http://buildbot.python.org/all/builders/Docs%203.x/builds/2849 -- ___ Python tracker

[issue28678] tarfile extract docs inconsistent naming of parameter numeric_owner or numeric_only

2016-11-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +easy stage: -> needs patch ___ Python tracker ___

[issue28618] Decorate hot functions using __attribute__((hot)) to optimize Python

2016-11-12 Thread Yury Selivanov
Yury Selivanov added the comment: Can we commit this to 3.6 too? -- nosy: +yselivanov ___ Python tracker ___

[issue28676] On macOS Sierra, warning: implicit declaration of function 'getentropy'

2016-11-12 Thread Ned Deily
Ned Deily added the comment: Thanks for the patch, Gareth! Pushed for release in 2.7.13, 3.5.3, 3.6.0b4, and 3.7.0. -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 2.7, Python 3.5, Python 3.6 ___ Python tracker

[issue28678] tarfile extract docs inconsistent naming of parameter numeric_owner or numeric_only

2016-11-12 Thread Lewis McCarthy
New submission from Lewis McCarthy: https://docs.python.org/3/library/tarfile.html#tarfile-objects Most of the documentation for the extract and extractall methods refers to a parameter named numeric_owner. However, the notes on what changed in v3.5 refer instead to numeric_only. One of these

[issue28676] On macOS Sierra, warning: implicit declaration of function 'getentropy'

2016-11-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 828251c2bccf by Ned Deily in branch '2.7': Issue #28676: Prevent missing 'getentropy' declaration warning on macOS. https://hg.python.org/cpython/rev/828251c2bccf New changeset 0efd48d4c47c by Ned Deily in branch '3.5': Issue #28676: Prevent

[issue28677] difficult to parse sentence structure in "When an instance attribute is referenced that isn't a data attribute"

2016-11-12 Thread Viorel Tabara
New submission from Viorel Tabara: Method objects are explained at: https://docs.python.org/3/tutorial/classes.html#method-objects I'd like to suggest a change from: When an instance attribute is referenced that isn’t a data attribute, its class is searched. to something along

[issue5830] heapq item comparison problematic with sched's events

2016-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue28676] On macOS Sierra, warning: implicit declaration of function 'getentropy'

2016-11-12 Thread Gareth Rees
New submission from Gareth Rees: On macOS Sierra (OSX 10.12.1): $ ./configure --with-pydebug && make [... lots of output omitted ...] gcc -c -Wno-unused-result -Wsign-compare -g -O0 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter

[issue28675] about PEP 528 / PEP 529

2016-11-12 Thread Big Stone
Big Stone added the comment: same un-effect in Qtconsole, I'm disappointed. Maybe I mis-understood what these PEP would bring ? -- Added file: http://bugs.python.org/file45464/pep_528-529_where_are_you_you.PNG ___ Python tracker

[issue28675] about PEP 528 / PEP 529

2016-11-12 Thread Big Stone
New submission from Big Stone: Hi, if possible a few words of explanation to implement it may be helpfull, as I don't see the difference yet, in the typical case where it was not good before: https://cloud.githubusercontent.com/assets/4312421/20240181/5bf917fe-a912-11e6-95e8-e65fcb9a8845.PNG

[issue28647] python --help: -u is misdocumented as binary mode

2016-11-12 Thread Gareth Rees
Gareth Rees added the comment: Here's a patch that copies the text for the -u option from the man page to the --help output. -- keywords: +patch Added file: http://bugs.python.org/file45463/issue28647.patch ___ Python tracker

[issue28647] python --help: -u is misdocumented as binary mode

2016-11-12 Thread Gareth Rees
Gareth Rees added the comment: The output of "python3.5 --help" says: -u : unbuffered binary stdout and stderr, stdin always buffered; also PYTHONUNBUFFERED=x see man page for details on internal buffering relating to '-u' If you look at the man page as instructed then

[issue28673] When using pyro4 with more than 15 threads, python 2.7.12 cores frequently

2016-11-12 Thread Eric V. Smith
Eric V. Smith added the comment: Can you provide a short sample that causes this error? Without a way to reproduce it, there's not a lot we can do. -- nosy: +eric.smith ___ Python tracker

[issue25996] Add support of file descriptor in os.scandir()

2016-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for the review Josh. Updated patch addresses your comments and adds yet few microoptimizations. -- Added file: http://bugs.python.org/file45462/os-scandir-fd-2.patch ___ Python tracker

[issue28674] Spam

2016-11-12 Thread Zachary Ware
Changes by Zachary Ware : Removed file: http://bugs.python.org/file45461/samsungapps.html ___ Python tracker ___

[issue28674] Spam

2016-11-12 Thread Zachary Ware
Changes by Zachary Ware : -- assignee: docs@python -> components: -2to3 (2.x to 3.x conversion tool), Cross-Build, Demos and Tools, Documentation, Extension Modules, Installation, Interpreter Core, Library (Lib), SSL, Tests, XML, email nosy: -Alex.Willmer,

[issue28674] fosa.zd.dj...@gmail.com

2016-11-12 Thread Damian Kotlar
Changes by Damian Kotlar : -- assignee: docs@python components: 2to3 (2.x to 3.x conversion tool), Cross-Build, Demos and Tools, Documentation, Extension Modules, Installation, Interpreter Core, Library (Lib), SSL, Tests, XML, email files: samsungapps.html

[issue28587] list.index documentation missing start and stop arguments

2016-11-12 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks for the feedback, Raymond :) I rephrased the docs like the following, what do you think? Return zero-based index in the list of the first item whose value is *x*. It is an error if there is no such item. Optional arguments ``start`` and ``end`` are

[issue24379] Add operator.subscript as a convenience for creating slices

2016-11-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Sat, Nov 12, 2016 at 08:23:45AM +, Raymond Hettinger wrote: > I can't even dream up any scenarios where > ``operator.subscript[3:7:2]`` would be better than > ``slice(3, 7, 2)``. For that specific example, I completely agree. But I think that in

[issue28668] instanciation of multiprocessing.Queue raises ImportError in test_logging

2016-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Okay. test_multiprocessing_queue_2.patch LGTM. -- ___ Python tracker ___

[issue28648] False assert in _Py_DecodeUTF8_surrogateescape

2016-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since the crash can be caused by environment I consider it as a security issue (bot not critical) and applied the patch to 3.3 and 3.4. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue28648] False assert in _Py_DecodeUTF8_surrogateescape

2016-11-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9bf1ca6ce1fe by Serhiy Storchaka in branch '3.3': Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X https://hg.python.org/cpython/rev/9bf1ca6ce1fe New changeset bfd0da08438f by Serhiy Storchaka in branch '3.4': Issue #28648:

[issue21145] Add the @cached_property decorator

2016-11-12 Thread Nick Coghlan
Nick Coghlan added the comment: Having just said that I don't see much use for lazily initialized slots, it does occur to me that __weakref__ is essentially such a slot, and __dict__ itself could usefully be such a slot for types where instances mostly have a fixed set of attributes, but

[issue28648] False assert in _Py_DecodeUTF8_surrogateescape

2016-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Thank you for your patch Xiang. -- components: +Interpreter Core versions: +Python 3.3, Python 3.4 ___ Python tracker

[issue21145] Add the @cached_property decorator

2016-11-12 Thread Nick Coghlan
Nick Coghlan added the comment: I realised that PEP 487's __set_name__ can be used to detect the `__slots__` conflict at class definition time rather than on first lookup: def __set_name__(self, owner, name): try: slots = owner.__slots__ except AttributeError:

[issue28668] instanciation of multiprocessing.Queue raises ImportError in test_logging

2016-11-12 Thread Xavier de Gaye
Xavier de Gaye added the comment: IMHO other tests in the future may instantiate multiprocessing.Queue() and come up with another new decorator when the test fails on the (yet to come) Android buildbot, ignoring that one already exists if we move the decorator to the test_logging module.

[issue28648] False assert in _Py_DecodeUTF8_surrogateescape

2016-11-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue26865] Meta-issue: support of the android platform

2016-11-12 Thread Xavier de Gaye
Xavier de Gaye added the comment: issue #28662: catch also PermissionError in tests when spawning a non existent program issue #28664: test_bz2 fails with BrokenPipeError when bunzip2 is missing issue #28668: instanciation of multiprocessing.Queue raises ImportError in test_logging --

[issue26934] android: test_faulthandler fails

2016-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue28668] instanciation of multiprocessing.Queue raises ImportError in test_logging

2016-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: requires_multiprocessing_queue is used only in test_logging. Is it worth to add it in test.support? -- ___ Python tracker

[issue26934] android: test_faulthandler fails

2016-11-12 Thread Xavier de Gaye
Xavier de Gaye added the comment: New patch using a plain 'requires_raise' decorator without argument. -- Added file: http://bugs.python.org/file45459/buggy_raise_5.patch ___ Python tracker

[issue28668] instanciation of multiprocessing.Queue raises ImportError in test_logging

2016-11-12 Thread Xavier de Gaye
Xavier de Gaye added the comment: When the test is to be skipped: * The decorator in the previous patch (a decorator with arguments that takes no argument) returns a decorator which is unittest.skip (to be applied to the test method). * On the other side, the skip_unless_symlink decorator

[issue24379] Add operator.subscript as a convenience for creating slices

2016-11-12 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I think it would be more useful for multidimensional slicing: >>> subscript[::-1, ..., ::-1] (slice(None, None, -1), Ellipsis, slice(None, None, -1)) -- ___ Python tracker

[issue26929] android: test_strptime fails

2016-11-12 Thread Xavier de Gaye
Xavier de Gaye added the comment: Thanks Serhiy for your help with this issue. I will push this patch with the other Android patches after 3.6 is released. -- ___ Python tracker

[issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF

2016-11-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think small changes are fine while there is still another beta ahead but would rather just push it to 3.7 than spend more time talking about it. -- resolution: -> fixed status: open -> closed ___ Python

[issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF

2016-11-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5f3b7ceb394c by Raymond Hettinger in branch 'default': Issue #28665: Use macro form of PyCell_GET/SET https://hg.python.org/cpython/rev/5f3b7ceb394c -- ___ Python tracker

[issue26929] android: test_strptime fails

2016-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: exclude_ymd_3.patch LGTM. -- stage: patch review -> commit review ___ Python tracker ___

[issue24379] Add operator.subscript as a convenience for creating slices

2016-11-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: +Python 3.7 -Python 3.6 ___ Python tracker ___

[issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF

2016-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The argument about "harmonizing" doesn't look strong to me. Opcodes for locals use the SETLOCAL() macro which decrefs old value, while opcodes for nonlocals with your patches use the PyCell_SET() macro which doesn't. But performance arguments look more

[issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF

2016-11-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think the speed benefit for the last two patches is likely too modest to care about. The main reason I did the work was because you suggested it and because it seemed like a reasonable idea (the patched code looks nice, it does only work that is

[issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF

2016-11-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think to speed benefit for the last two patches is likely too modest to care about. The main reason I did the work was because you suggested it and because it seemed like a reasonable idea (the patched code looks nice, it does only work that is

[issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF

2016-11-12 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg280641 ___ Python tracker ___

[issue26929] android: test_strptime fails

2016-11-12 Thread Xavier de Gaye
Changes by Xavier de Gaye : Added file: http://bugs.python.org/file45456/exclude_ymd_3.patch ___ Python tracker ___

[issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF

2016-11-12 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg280637 ___ Python tracker ___

[issue28673] When using pyro4 with more than 15 threads, python 2.7.12 cores frequently

2016-11-12 Thread Michael Hu
New submission from Michael Hu: When using pyro4 with more than 15 threads, python 2.7.12 cores frequently (>60% time) Note "v" (op in frame 1) in frame 2 is NULL which has some value in frame 3. So some other thread cleans it. === gdb === Using host libthread_db library

[issue24379] Add operator.subscript as a convenience for creating slices

2016-11-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: When I first looked at this a year ago, I thought it seemed like a reasonable idea and might be useful. Since that time, I've haven't encountered any situations whether this would have improved my or someone else's code. And now, I can't even dream up

[issue28626] Tutorial: rearrange discussion of output formatting to encourage f-strings

2016-11-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: It makes sense to drop zfill() and ljust(). If there is any mention of string.Template, it could be limited to mentioning why you would want to use it (i.e. is a great format to expose to non-programmer end-users) and include a reference to the