[issue39382] abstract_issubclass() doesn't take bases tuple item ref

2020-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report and patch. Agree that the code does not look safe. Do you mind to create a pull request? Would be nice to add a test for it. The three references to the Python class are: * the __dict__ descriptor * the __weakref__ descriptor *

[issue39646] compile warning in unicodeobject.c

2020-02-15 Thread hai shi
hai shi added the comment: I will create PR later. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39646] compile warning in unicodeobject.c

2020-02-15 Thread hai shi
New submission from hai shi : Objects/unicodeobject.c: In function ‘PyUnicode_IsIdentifier’: ./Include/cpython/unicodeobject.h:396:38: warning: ‘data’ may be used uninitialized in this function [-Wmaybe-uninitialized] ((const Py_UCS4 *)(data))[(index)] \

[issue39645] Expand concurrent.futures.Future's public API

2020-02-15 Thread Kyle Stanley
New submission from Kyle Stanley : Based on the following python-ideas thread: https://mail.python.org/archives/list/python-id...@python.org/thread/LMTQ2AI6A7UXEFVHRGHKWD33H24FGM6G/#ICJKHZ4BPIUMOPIT2TDTBIW2EH4CPNCP. In the above ML thread, the author proposed adding a new cf.SerialExecutor

[issue39644] Add Binary module.

2020-02-15 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: For binary addition and subtraction is it any different from https://docs.python.org/3/library/operator.html . Is there a PyPI package that implements these ideas to see how useful it already is? -- nosy: +xtreak

[issue39625] Traceback needs more details

2020-02-15 Thread SilentGhost
Change by SilentGhost : -- components: +Interpreter Core nosy: +vstinner versions: +Python 3.9 -Python 3.8 ___ Python tracker ___

[issue39642] Behaviour of disabled widgets: widget.bind(func) -vs- w = widget(command=func)

2020-02-15 Thread SilentGhost
Change by SilentGhost : -- nosy: +gpolo, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39644] Add Binary module.

2020-02-15 Thread SilentGhost
Change by SilentGhost : -- nosy: +Ananthakrishnan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39644] Add Binary module.

2020-02-15 Thread Ananthakrishnan
Change by Ananthakrishnan : -- nosy: +mark.dickinson, serhiy.storchaka, tim.peters -Ananthakrishnan ___ Python tracker ___ ___

[issue39644] Add Binary module.

2020-02-15 Thread Ananthakrishnan
New submission from Ananthakrishnan : Add binary module that has binary operations like: binary addition. binary subtracion. binary multiplication. binary division. compliment. 1's complement. 2's complement. cconverting to various number system. converting to BCD. converting to grey code.

[issue39382] abstract_issubclass() doesn't take bases tuple item ref

2020-02-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39643] Python calls newfstatat for "" in inspect

2020-02-15 Thread Ivan Babrou
New submission from Ivan Babrou : I noticed that a program (SaltStack) is a lot slower under Python 3. After some stracing I was able to find that inspect module is to blame. In strace output I can see a ton of calls like this: 05:31:56.698829 newfstatat(AT_FDCWD, "", 0x76bc4cf0, 0) =

[issue39382] abstract_issubclass() doesn't take bases tuple item ref

2020-02-15 Thread hai shi
Change by hai shi : -- nosy: +nascheme ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39642] Behaviour of disabled widgets: widget.bind(func) -vs- w = widget(command=func)

2020-02-15 Thread Clinton Hunter
New submission from Clinton Hunter : Using the bind method, the event will still trigger when the widget is disabled. However, if using "command=" it doesn't. Wondering whether the behaviour between the two ways of setting up event handling should behave the same? Not a major issue, easy

[issue39641] concatenation of Tuples

2020-02-15 Thread Steven D'Aprano
Steven D'Aprano added the comment: > The concatenation of two tuples into a third tuple, using the + command, > causes an error if every member of each of the two tuples is NOT a string! Works for me: py> ("Hello", 1, None) + (23, 19.5, "Goodbye") ('Hello', 1, None, 23, 19.5,

[issue17050] argparse.REMAINDER doesn't work as first argument

2020-02-15 Thread dHannasch
dHannasch added the comment: Okay. Would it be all right if I submit a fix to get it working at least in the subparser case? -- ___ Python tracker ___

[issue39625] Traceback needs more details

2020-02-15 Thread szb512
szb512 added the comment: I think it is the "C2" class. Traceback is probably refering to that class. -- nosy: +sdcards ___ Python tracker ___

[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2020-02-15 Thread szb512
szb512 added the comment: I am going to think maybe it was the "os.path.ismount" command that is causing the issue. Does the file exist? -- nosy: +sdcards ___ Python tracker

[issue39641] concatenation of Tuples

2020-02-15 Thread Ammar Askar
Ammar Askar added the comment: Are you trying to concatenate a single string? If so keep in mind you need a trailing comma: >>> (1, 2) + (3, 4) + ('a',) (1, 2, 3, 4, 'a') >>> (1, 2) + (3, 4) + ('a') Traceback (most recent call last): File "", line 1, in TypeError: can only concatenate

[issue39641] concatenation of Tuples

2020-02-15 Thread Ammar Askar
Change by Ammar Askar : -- Removed message: https://bugs.python.org/msg362037 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39641] concatenation of Tuples

2020-02-15 Thread Ammar Askar
Ammar Askar added the comment: tuple + tuple is NOT tuple concatenation. It adds each individual member of the tuple. So for example (a, b) + (c, d) results in (a + c, b + d) -- nosy: +ammar2 ___ Python tracker

[issue39641] concatenation of Tuples

2020-02-15 Thread bruce blosser
New submission from bruce blosser : The concatenation of two tuples into a third tuple, using the + command, causes an error if every member of each of the two tuples is NOT a string! This does not appear to be documented ANYWHERE, and really causes a whole lot of head scratching and more

[issue12915] Add inspect.locate and inspect.resolve

2020-02-15 Thread Vinay Sajip
Change by Vinay Sajip : -- pull_requests: +17895 pull_request: https://github.com/python/cpython/pull/18517 ___ Python tracker ___

[issue39633] venv does not include python. symlink by default

2020-02-15 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: That's right. I'll do that then. Thanks for baring with me. Should we update the docs to mentiom this or just close this issue? On Sat, Feb 15, 2020, 22:33 Vinay Sajip wrote: > > Vinay Sajip added the comment: > > In general, people should be working

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-15 Thread Andy Lester
Andy Lester added the comment: I'm hoping that a goal here is to make static inline int _Py_IS_TYPE(PyObject *ob, PyTypeObject *type) actually be static inline int _Py_IS_TYPE(const PyObject *ob, const PyTypeObject *type) -- ___ Python tracker

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-15 Thread Andy Lester
Andy Lester added the comment: @vstinner would it be helpful if I went on a sweep looking for places we can use the new Py_IS_TYPE macro? Getting away from Py_TYPE(op) would also mean a move to making the internals const-correct. -- nosy: +petdance

[issue39633] venv does not include python. symlink by default

2020-02-15 Thread Vinay Sajip
Vinay Sajip added the comment: In general, people should be working in venvs. That means that libraries should assume they are being installed into venvs. Therefore makefiles should be invoking plain "python" rather than "pythonX.Y", as they can never be sure which exact interpreter they're

[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2020-02-15 Thread Vedran Čačić
Vedran Čačić added the comment: If we want something mnemonic, I'm sure nothing beats __abs__. (Hey, we have __truediv__ already!;) -- nosy: +veky ___ Python tracker ___

[issue31116] base85 z85 variant encoding

2020-02-15 Thread SilentGhost
Change by SilentGhost : -- nosy: +pitrou versions: +Python 3.9 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2020-02-15 Thread George Melikov
George Melikov added the comment: I want to add that it's a usual practice: - https://github.com/libuv/libuv/pull/1580/files/bdd987a9b4347164e31e22d2d5ce06fbb5ebc859 - https://rev.ng/gitlab/revng/qemu/commit/6f1953c4c14566d3303709869fd26201828b3ccf --

[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2020-02-15 Thread George Melikov
George Melikov added the comment: If there is a way not to sync data - you should use neither fdatasync nor fsync. So IMHO if someone wants to sync data and want to use fdatasync - I see the only way on MacOS is to use fsync(). > Note also that this change will not help to run code with

[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2020-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: fsync() may be slower than fdatasync(). There may be cases in which you prefer to not call fsync() or call it less often if POSIX fdatasync() is not available. To do this you should know whether Python fdatasync() calls POSIX fdatasync() or fsync(). The

[issue31116] base85 z85 variant encoding

2020-02-15 Thread Derek Wilson
Derek Wilson added the comment: z85 avoids all of: ` \ " ' _ , ; Backtick and semicolon increase the number of places that z85 can be used without issue over b85. All of these might not be as big an issue in python as in other tools/languages but interoperability would still be improved

[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2020-02-15 Thread George Melikov
Change by George Melikov : -- keywords: +patch pull_requests: +17893 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18516 ___ Python tracker ___

[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

2020-02-15 Thread George Melikov
New submission from George Melikov : POSIX fdatasync() is similar to fsync() but it tries not to sync non-needed metadata. If POSIX OS doesn't have it - it's safe to use fsync() (If we need to sync data to disk - we have to use one of these functions). This change will help to run code with

[issue39633] venv does not include python. symlink by default

2020-02-15 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: You're right! That could be very confusing. But isn't this risk already there, since this could happen if one runs `python3.8 -m venv venv` and then `python3.7` with the venv activated? -- ___ Python tracker

[issue39638] Keep ASDL signatures for AST nodes

2020-02-15 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch pull_requests: +17892 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18515 ___ Python tracker ___

[issue12915] Add inspect.locate and inspect.resolve

2020-02-15 Thread Vinay Sajip
Vinay Sajip added the comment: To be more precise, one could use ^(?!\d)(\w+)(\.(?!\d)(\w+))* for _DOTTED_WORDS and use the re.U flag when compiling the pattern. That should match any packages where segments start with a letter and continue with alphanumerics. Do you agree? --

[issue12915] Add inspect.locate and inspect.resolve

2020-02-15 Thread Vinay Sajip
Vinay Sajip added the comment: > The regex looks too strict. Python 3 accepts non-ASCII module names. Would adding the re.U flag be enough, or are you thinking of other possibilities? -- ___ Python tracker

[issue39633] venv does not include python. symlink by default

2020-02-15 Thread Vinay Sajip
Vinay Sajip added the comment: Except that if there's a global other pythonX.Y of the different version, that would get run ... potentially even more confusing. -- ___ Python tracker

[issue4080] unittest: display time used by each test case

2020-02-15 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- versions: +Python 3.9 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39636] Can't change Treeview row color in Tkinter

2020-02-15 Thread Олег Париев
Олег Париев added the comment: I noticed that the background does not change, but the foreground changes well -- ___ Python tracker ___

[issue39635] One paragraph of the doc is not translated in French

2020-02-15 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Translation related issues are tracked under separate GitHub repo. Please report at https://github.com/python/python-docs-fr -- nosy: +mdk, xtreak ___ Python tracker

[issue39639] Remove Suite node from AST

2020-02-15 Thread hai shi
hai shi added the comment: I am not sure there have any relation with jython's python.asdl? https://github.com/jythontools/jython/blob/master/ast/Python.asdl#L10 -- nosy: +shihai1991 ___ Python tracker

[issue39637] Probably incorrect message after failed import

2020-02-15 Thread Rick van Rein
Change by Rick van Rein : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39637] Probably incorrect message after failed import

2020-02-15 Thread Rick van Rein
Rick van Rein added the comment: Thanks for explaining. It is indeed confusing, even though I'm quite experienced with Python. -- ___ Python tracker ___

[issue34822] Simplify AST for slices

2020-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated the PR. I can obviously be biased about my changes, so I need an approval of other core developer to merge them. I created several PRs to popular third-party projects which work with AST to support both old and new AST schemes. --

[issue32892] Remove specific constant AST types in favor of ast.Constant

2020-02-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +17891 pull_request: https://github.com/python/cpython/pull/18514 ___ Python tracker ___

[issue39639] Remove Suite node from AST

2020-02-15 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch pull_requests: +17890 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18513 ___ Python tracker ___

[issue39637] Probably incorrect message after failed import

2020-02-15 Thread Steven D'Aprano
Steven D'Aprano added the comment: > Shouldn't that say that "'environ' is not a package" instead? No. The os module is special, so I'll talk about the usual case first. Normally, for `import spam.eggs` to succeed, *spam* has to be a package, and *eggs* has to be either a sub-module inside

[issue39639] Remove Suite node from AST

2020-02-15 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- priority: normal -> low title: Remote Suite node from AST -> Remove Suite node from AST ___ Python tracker ___

[issue39639] Remote Suite node from AST

2020-02-15 Thread Batuhan Taskaya
New submission from Batuhan Taskaya : AST is containing a node from past that is explained as "not really an actual node but useful in Jython's typesystem.". There is no usage of it anywhere in the CPython repo, just some code in ast_optimizer, symbol table and compiler to forbid it from

[issue39537] Change line number table format

2020-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Every bytecode is generated from some AST node which has an associated range of lines. So there should not be bytecodes that have no line number. If for some reasons you generate bytecodes that have no line number, you can just set lineno > end_lineno for

[issue39638] Keep ASDL signatures for AST nodes

2020-02-15 Thread Batuhan Taskaya
New submission from Batuhan Taskaya : It would be super convenient to keep ASDL declarations in AST nodes. There are multiple benefits of it; 1 -> When debugging or playing with the AST, time to time you may require to know what kind of things a field gets or is that field an optional one.

[issue39637] Probably incorrect message after failed import

2020-02-15 Thread Rick van Rein
New submission from Rick van Rein : The following error message surprises me: >>> import os.environ Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'os.environ'; 'os' is not a package Shouldn't that say that "'environ' is not a package" instead?

[issue39636] Can't change Treeview row color in Tkinter

2020-02-15 Thread Олег Париев
New submission from Олег Париев : Good afternoon! Cannot change the color of a Treeview string in Python version 3.8.x. The same problem would be in Python version 3.7.3, but a solution for it does not help. You can see the question by reference: https://bugs.python.org/issue36468 PS Sorry

[issue39635] One paragraph of the doc is not translated in French

2020-02-15 Thread Frédéric Danna
New submission from Frédéric Danna : In the French doc of the 3.8 version, https://docs.python.org/fr/3/tutorial/interpreter.html, there is an entire parapragph which is still writtent in Englush (not translated in French): > On Windows machines where you have installed Python from the >

[issue20184] Derby #16: Convert 50 sites to Argument Clinic across 9 files

2020-02-15 Thread hai shi
hai shi added the comment: Looks like `builtins.vars` and `builtins.dir` should be migrated to AC too, so I create PR18512. -- nosy: +shihai1991 ___ Python tracker ___

[issue20184] Derby #16: Convert 50 sites to Argument Clinic across 9 files

2020-02-15 Thread hai shi
Change by hai shi : -- pull_requests: +17889 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/18512 ___ Python tracker ___

[issue12915] Add inspect.locate and inspect.resolve

2020-02-15 Thread STINNER Victor
STINNER Victor added the comment: The regex looks too strict. Python 3 accepts non-ASCII module names. Should existing functions be modified to reuse the new function? -- nosy: +vstinner ___ Python tracker