[issue40280] Consider supporting emscripten/webassembly as a build target
Terry J. Reedy added the comment: Christian: IDLE and test_idle require threading. I once tested for threading in test_idle (not sure about IDLE itself) but removed the test when threading was made supposedly non-optional. Test_idle still tests for tkinter and idlelib. For PR 32352. did you miss IDLE's requirement or is tkinter and hence IDLE and its test not included on WASM/emscripten? Will it never be? -- nosy: +terry.reedy ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47229] Python tests fail on Chromebook Linux/Bullseye
Change by Terry J. Reedy : -- components: +Tests -IDLE title: IDLE UI crashes on Chromebook Linux/Bullseye -> Python tests fail on Chromebook Linux/Bullseye type: crash -> behavior ___ Python tracker <https://bugs.python.org/issue47229> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47229] IDLE UI crashes on Chromebook Linux/Bullseye
Terry J. Reedy added the comment: "Thonny GUI uses the same as IDLE": I presume this means that Thonny also uses tkinter and both fail, which means that tkinter is not working right. Your test run indicates that python is not running correctly either. It only tried to run 10 of what should be over 400 tests and 9 of those failed because of failure to import the test file. You should report this to whoever supplies python on Chromebook, which I presume is whoever supplies Bullseye. -- resolution: -> third party stage: -> resolved status: open -> closed title: IDLE / Thonny UI crashes on Chromebook Linux/Bullseye -> IDLE UI crashes on Chromebook Linux/Bullseye ___ Python tracker <https://bugs.python.org/issue47229> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27546] Integrate tkinter and asyncio (and async)
Terry J. Reedy added the comment: I posted look_tk3, I believe, as an answer to an SO question. https://stackoverflow.com/questions/47895765/use-asyncio-and-tkinter-or-another-gui-lib-together-without-freezing-the-gui/47896365#47896365 -- ___ Python tracker <https://bugs.python.org/issue27546> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47229] IDLE crashes on Chromebook Linux/Bullseye
Change by Terry J. Reedy : -- title: IDLE / Thonny UI crashes on Chromebook Linux/Bullseye -> IDLE crashes on Chromebook Linux/Bullseye ___ Python tracker <https://bugs.python.org/issue47229> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47229] IDLE / Thonny UI crashes on Chromebook Linux/Bullseye
Terry J. Reedy added the comment: This issue tracker is for improving the CPython distribution. It is not a tracker for other software, or for general help with running Python. For the latter, try https://mail.python.org/mailman/listinfo/python-list Thonny is 3rd party software with its own tracker, although I suspect that the problem is with your upgrade Chromebook/Linux Bullseye. While running Python on Linux on PCs is supported, I do not believe Chromebooks are included; there is certainly no Chromebook buildbot for testing CPython listed on https://buildbot.python.org/all/#/builders. If there is a Chromebook Python list, you might ask if tkinter works with Bullseye for other users. IDLE *is* part of CPython. What specific release of Python are you running. This is the first thing IDLE prints when it starts. If you are running a somewhat recent release of 3.9 or 3.10, then continue. To see whether there might be an IDLE-specific or ever tkinter-specific problem, run the CPython test suite from a command line with "python3 -m test -j0 -ugui" and report results. (Or 'python ...' is 'python' works to run python 3.) If it passes except for IDLE tests, start IDLE from a command line with "python3 -m idlelib". Get IDLE to quit/crash. Then report any error info printed in the terminal. -- ___ Python tracker <https://bugs.python.org/issue47229> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47226] Unexpected indent message
Change by Terry J. Reedy : -- nosy: -paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware ___ Python tracker <https://bugs.python.org/issue47226> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47226] Unexpected indent message
Terry J. Reedy added the comment: " keys = pygame.key.get_pressed() is showing error called unexpected indent" The problem is that the keys line in indented one less space than the line above. A shorter example below. if True: a = 1 b = 2 SyntaxError: unindent does not match any outer indentation level This issue tracker is not a help forum. Next time, please post instead to something like python-list. Give a minimal snippet of code, like my example above, showing the problem and the complete error message. Also, copy and paste the error message instead of an image. Please read https://stackoverflow.com/help/minimal-reproducible-example about how to ask good questions. This is in no way an IDLE issue. -- resolution: -> not a bug stage: -> resolved status: open -> closed title: if we write a line of code like i wrote keys = pygame.key.get_pressed() is showing error called unexpected indent -> Unexpected indent message ___ Python tracker <https://bugs.python.org/issue47226> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47190] Integrating tkinter and asyncio event loops
Terry J. Reedy added the comment: That issue has my previous experiments. Thank you Serhiy for finding it ;-). -- resolution: -> duplicate superseder: -> Integrate tkinter and asyncio (and async) ___ Python tracker <https://bugs.python.org/issue47190> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46033] Duplicated sentence in for statement documentation
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker <https://bugs.python.org/issue46033> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46033] Duplicated sentence in for statement documentation
Terry J. Reedy added the comment: New changeset 281f980d354d1709018a2dc77f79388faf3e56c0 by Michał D in branch 'main': bpo-46033: Clarify for-statement execution (GH-30025) https://github.com/python/cpython/commit/281f980d354d1709018a2dc77f79388faf3e56c0 -- nosy: +terry.reedy ___ Python tracker <https://bugs.python.org/issue46033> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24563] [doc] Encoding declaration: doc supported encodings
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue24563> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24563] [doc] Encoding declaration: doc supported encodings
Terry J. Reedy added the comment: New changeset 01be5d6446abbdd95d0c18bd19a58a62b05568d8 by Terry Jan Reedy in branch 'main': bpo-24563: Link encoding names to encoding declarations (GH-32274) https://github.com/python/cpython/commit/01be5d6446abbdd95d0c18bd19a58a62b05568d8 -- ___ Python tracker <https://bugs.python.org/issue24563> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24563] [doc] Encoding declaration: doc supported encodings
Change by Terry J. Reedy : -- pull_requests: +30337 pull_request: https://github.com/python/cpython/pull/32274 ___ Python tracker <https://bugs.python.org/issue24563> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24563] [doc] Encoding declaration: doc supported encodings
Terry J. Reedy added the comment: I am writing a PR with an internal link. I decided that linking to Standard Encodings is sufficient. The Python Text Encodings section follows that. Anyone wanting to use any of those can experiment to see which work. -- ___ Python tracker <https://bugs.python.org/issue24563> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47190] Integrating tkinter and asyncio event loops
Terry J. Reedy added the comment: I did some somewhat similar experiments a few years ago. I will try to find the code sometime. -- nosy: +terry.reedy ___ Python tracker <https://bugs.python.org/issue47190> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47147] Allow `return yield from`
Terry J. Reedy added the comment: I think that this should be closed as rejected, and that Patrick should remove the 'return's that are in front of 'yield from ...'. Then 'yield from x' will be a statement, not an expression, and the ()s will not be needed, as they are used to differentiate yield expressions from yield statements. Generator functions return generators, not return expressions. The latter are only used for the StopIteration .value attribute, which I believe is always None for Patrick's code and in any case is never used. So his code should run the same without these 'return's. The exception for '= yield ...' is similar to '= a, ...' not needing ()s. This is the only exception for yield expressions because this is normally the only place a yield expression should be used by itself instead of with other operators or functions, where ()s are needed. The python-ideas thread archive is at https://mail.python.org/archives/list/python-id...@python.org/thread/L6XRQ5YWAE535JGZH2MF2TD32C65K5ZI/ Andrew Svetlov objected (-1) because to him ()s make the statement more readable. Michael Smith got to the real problem, which is that one should not be using "return (yield from x)" unless one is accessing a possibly non-None value attribute of the implicitly raised StopIteration exception. I oppose adding a second no-() exception for such rare (and somewhat confusing) expert uses. In a generator function, the return value is a generator based on the entire body of the function. Any return statement value becomes the value attribute of the StopIteration raised when the generator is exhausted. In other words, 'return x' in this context translates to "raise StopIteration(x)' (which is illegal to write directly). I am pretty sure that in your code, the value of 'yield from func' is always None. In any case, StopIteration().value is never used. To illustrate: def g0(): return (yield from ()) # Immediately raise StopIteration(None). try: next(g0()) except StopIteration as e: print(e.value) # Prints 'None'. -- nosy: +terry.reedy versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issue47147> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47156] IDLE: make use of extended SyntaxError info.
New submission from Terry J. Reedy : In 3.10 and 3.11: >>> while s := input.read(MAXBINSIZE): ... while len(s) < MAXBINSIZE and ns := input.read(MAXBINSIZE-len(s)): File "", line 2 while len(s) < MAXBINSIZE and ns := input.read(MAXBINSIZE-len(s)): ^^ SyntaxError: cannot use assignment expressions with expression IDLE only colors the 'l' of 'len'; add extended marking. Some other errors gained extended location in 3.11 (only, I believe). Adding colors may require monkeypatching method or subclassing class in traceback.py. May have commented on issue or PR. Related: Put SyntaxError in box. (Anyone really want log of error?) -- assignee: terry.reedy components: IDLE messages: 416302 nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE: make use of extended SyntaxError info. versions: Python 3.10, Python 3.11 ___ Python tracker <https://bugs.python.org/issue47156> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47079] Integral.denominator shouldn't return an int
Terry J. Reedy added the comment: Raymond and Serhiy, you were the last two active devs to touch numbers.py. -- nosy: +rhettinger, serhiy.storchaka, terry.reedy ___ Python tracker <https://bugs.python.org/issue47079> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47072] Database corruption with the shelve module
Terry J. Reedy added the comment: 3.8 only gets security patches. If you can, please test with a newer version. -- nosy: +terry.reedy ___ Python tracker <https://bugs.python.org/issue47072> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47093] Documentation Fix: Remove .bat when activating venv on windows
J Y added the comment: Do you think it's worth changing it to just activate and adding a footnote mentioning the variations as I've been a dev for a few years now and it stumped me for a minute as I work in a few different envs. Mainly thinking of making setting up venv's as easy as possible for new comers with one less roadblock on their journey. -- ___ Python tracker <https://bugs.python.org/issue47093> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28080] Allow reading member names with bogus encodings in zipfile
Stephen J. Turnbull added the comment: I'm not going to have time to look at the PR for a couple days. I don't understand what the use case is for writing or appending with filenames in a non-UTF-8 encoding. At least in my experience, reading such files is rare, but I have never been asked to write one. The correspondents who send me zipfiles with the directory encoded in shift_jisx0213 are perfectly happy to read zipfiles with the directory encoded in UTF-8. If that is true for other users, then unzipping the file to a temporary directory with the appropriate --metadata-encoding, adding the required paths there, and zipping a new archive seems perfectly workable. In that case making this feature read-only makes the most sense to me. -- ___ Python tracker <https://bugs.python.org/issue28080> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47086] Include HTML docs with Windows installer instead of CHM
Terry J. Reedy added the comment: In the IDLE Help menu, 'Python Docs', default hotkey 'F1', invokes '<>', which is handled by EditorWindow.help_docs. For Windows, line 599, is 'os.startfile(self.help_url)'. (Otherwise, webbrowser is used.) On Windows, help_url is os.path.join(sys.base_prefix, 'Doc','Python%s.chm' % _sphinx_version()) if the result is valid, else python.org/...(but '3.1' because only 3 chars are grabbed). How do I use winreg to get the file name from "HKCU\Software\Python\PythonCore\{sys.winver}\Help\Main Python Documentation"? The winreg doc assumes some knowledge of registry terminology that I do not have and has no examples, so my attempts failed. -- ___ Python tracker <https://bugs.python.org/issue47086> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47093] Documentation Fix: Remove .bat when activating venv on windows
New submission from J Y : https://docs.python.org/3/tutorial/venv.html For windows, tutorial-env\Scripts\activate.bat doesn't appear to set up venv successfully. Instead, tutorial-env\Scripts\activate (without .bat) works. This may confuse new users if this is not rectified. -- assignee: docs@python components: Documentation messages: 415783 nosy: docs@python, jovinator priority: normal severity: normal status: open title: Documentation Fix: Remove .bat when activating venv on windows type: enhancement versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue47093> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31552] IDLE: Convert browswers to use ttk.Treeview
Terry J. Reedy added the comment: ttk.Treeview also has problems, at least on some systems and versions. https://mail.python.org/pipermail/tkinter-discuss/2022-March/004226.html HiDPI displays and tkinter [cont] https://mail.python.org/pipermail/tkinter-discuss/attachments/20220316/843e7076/attachment-0001.png Apparently on linux. https://mail.python.org/pipermail/tkinter-discuss/2022-March/004228.html https://www.tcl.tk/man/tcl/TkCmd/ttk_treeview.html under "Styling Options' there is parameter to set the -rowheight that needs to be defined as ttk::style configure Treeview \ -rowheight [expr {[font metrics font -linespace] + 2}] however I could not find how to call this command, and when If I do the following style = ttk.Style() style.configure("Treeview", rowheight="30") it works, but it is not dynamic with the font size/dpi Response has suggestion. -- ___ Python tracker <https://bugs.python.org/issue31552> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47056] turtle.write() causes flickering when the tracer is turned off.
Terry J. Reedy added the comment: On Win10, running 3.11.0a5+ from command line, upper ABC and boxes flicker when strings are displayed. (When run with from IDLE editor, there is no flicker except sometimes when moving mouse over or off title bar buttons.) (3.8 only gets security fixes.) -- nosy: +terry.reedy versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8 ___ Python tracker <https://bugs.python.org/issue47056> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47054] "SyntaxError: non-default argument follows default argument" confuses
Change by Terry J. Reedy : -- title: "SyntaxError: non-default argument follows default argument" should be "parameter" -> "SyntaxError: non-default argument follows default argument" confuses ___ Python tracker <https://bugs.python.org/issue47054> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47054] "SyntaxError: non-default argument follows default argument" should be "parameter"
Terry J. Reedy added the comment: Current message same in 3.11 and 3.9, but I am not sure about backporting to old parser. However merges a change, if any, can decide. -- nosy: +pablogsal, terry.reedy stage: -> needs patch type: -> behavior versions: +Python 3.11 -Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue47054> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22628] Idle: Tree lines are spaced too close together.
Terry J. Reedy added the comment: We started using ttk widgets in 3.6. As I said above, the real solution should be to use ttk.Treeview. This is issue 31552. -- resolution: -> fixed status: open -> closed superseder: -> IDLE: Convert browswers to use ttk.Treeview ___ Python tracker <https://bugs.python.org/issue22628> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31552] IDLE: Convert browswers to use ttk.Treeview
Terry J. Reedy added the comment: 3. continued. As noted in #22628, idlelib.tree has line spacing and other stuff hardcoded so it will not work properly on all monitors. -- ___ Python tracker <https://bugs.python.org/issue31552> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47037] Build problems on Windows
Terry J. Reedy added the comment: I recompiled, retested, and all tests are ok, with no unexpected box. Thank you all. The vcruntime warnings are also gone, so I will chalk them up to a onetime glitch. -- ___ Python tracker <https://bugs.python.org/issue47037> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46996] Drop support of Tcl/Tk older than 8.5.12
Terry J. Reedy added the comment: tk release availability is a bit confusing. https://wiki.tcl-lang.org/page/Changes+in+Tcl%2FTk+8%2E6 appears to lists things 'new' in 3.6.1, but that seems to mean new since 8.5.1, as it includes thing introduced in 8.5.n, where n > 1. For instance, ttk spinbox is listed in this doc, but was available in 8.5.9, so is in 8.5.12+ and can be used without an 8.6 requirement. Similarly, https://www.tcl.tk/man/tcl8.5/TkCmd/ttk_treeview.html the 8.5.19 doc for the widget, shows the 'new in 8.6' treeview tag commands. I suspect that they were present in 8.5.13. Is there a specific 8.5.12 doc available? I searched and tried adding '.12' in the url above and both failed. Buildbots without _tkinter don't help either. -- status: open -> closed ___ Python tracker <https://bugs.python.org/issue46996> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46996] Drop support of Tcl/Tk older than 8.5.12
Terry J. Reedy added the comment: Ronald: According to a page (which I cannot find, E. Paine should know) Centos 7 has the oldest tcl among current *nix distributions. https://centos.pkgs.org/7/centos-x86_64/tcl-8.5.13-8.el7.x86_64.rpm.html says it is 8.5.13, which is what I remember from the comparison page. Serhiy: IDLE has required TkVersion >= 8.5 for some years (currently top of pyshell.py). Does the _tkinter.c line #error "Tk older than 8.5.12 not supported" translate into an ImportError (which is already caught). I never worried about someone trying to import 8.3 or before, but Apple's 8.5.9 is possible. Is there any reason that IDLE might someday require 8.6 before tkinter does? -- nosy: +terry.reedy ___ Python tracker <https://bugs.python.org/issue46996> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47037] Build problems on Windows
Terry J. Reedy added the comment: Re the 3.9/3.10 warnings: I have not intentionally touched my C install in years. I don't know what Windows' updates do (most recently yesterday) . I presume vcruntime140.dll is on my C: ssd, which has shown no problems. Debug runs w/o -j0 normally take about 18 minutes. After 51 minutes, the 3.10 test run froze CP (as in, had to close with [X] and reopen). Output ends with "0:51:02 load avg: 0.01 [407/427] test_winconsoleio Ä^Z" -- ___ Python tracker <https://bugs.python.org/issue47037> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47037] Build problems on Windows
New submission from Terry J. Reedy : 3.11 apparently builds without error, and 'python' and 'python -m idlelib' appears to start normally, but there is a new problem. python -m test raises OS box with 'Debug Assertion Failed!', program python_d.exe, File minkernal\crts\ucrt\src\time\wcsftime.exe Line 1184, expression false. Dismiss box and a few tests run until box repeats and Command Prompt eventually locks. ...test test_idle finished OK once after dismissing box. On retry, test ran OK but CP locked instead of showing new prompt. 3.10 and 3.9 (but not 3.11): compiling show a newish warning. pythonw.vcxproj -> f:\dev\310\PCbuild\amd64\pythonw_d.exe pythonw.vcxproj -> f:\dev\310\PCbuild\amd64\pythonw_d.pdb (Full PDB) f:\dev\310\PCbuild\pythoncore.vcxproj(554,5): warning : A copy of vcruntime140.dll is also required Does not 3.11 also require this? (wherever it is supposed to be?). Aside from the warning, 3.10 appear to be working normally. There is no error box when starting tests and 50 have run so far without a box. -- components: Build, Windows messages: 415355 nosy: lukasz.langa, pablogsal, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Build problems on Windows type: compile error versions: Python 3.10, Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.org/issue47037> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25415] [io doc] Reword "there is no public constructor"
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue25415> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25415] [io doc] Reword "there is no public constructor"
Terry J. Reedy added the comment: New changeset cedd2473a9bebe07f3ced4f341cf58a2fef07b03 by slateny in branch 'main': bpo-25415: Remove confusing sentence from IOBase docstrings (PR-31631) https://github.com/python/cpython/commit/cedd2473a9bebe07f3ced4f341cf58a2fef07b03 -- ___ Python tracker <https://bugs.python.org/issue25415> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6143] IDLE - clear and restart the shell window
Terry J. Reedy added the comment: https://stackoverflow.com/questions/71290382/how-do-i-adjust-python-idle-shell-settings-so-that-the-next-line-of-code-i-type is from someone who, for whatever reason, likes having blank space in the shell below the input prompt. It is not clear whether deleting lines to make that happen would be satisfactory, or if all lines must be accessible. -- versions: +Python 3.11 -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue6143> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25415] [io doc] Reword "there is no public constructor"
Terry J. Reedy added the comment: "IOBase" is a public name and IOBase has an __init__ method. It definitely has a public constructor. However, like other abstract base classes, it is not meant to be directly instantiated by users other than writers of other classes. Ditto for the 3 other io ABCs. Because this is generic to all ABCs, it need not be repeated for each. The proposed replacement is the opposite of the truth. Rather than accepting no arguments, IOBase, like the ABCs in numbers and collections.abc, has a generic signature and accepts any arguments (which I believe are ignored). >>> io.IOBase.__init__.__text_signature__ '($self, /, *args, **kwargs)' >>> io.IOBase(3, a=5) A class, such as `object`, accepting no arguments other that self raises. (At one time, object had the generic signature above.) >>> object(3) Traceback (most recent call last): File "", line 1, in object(3) TypeError: object() takes no arguments I think that the fix should be to delete the original incorrect statement and not replace it with another incorrect statement. Most abstract base classes are in collections.abc and numbers. They are not specifically labelled 'abstract base class' in their docstrings because they are in modules consisting more or less entirely of ABCs. Since io is mostly a module of concrete classes, I think it appropriate to specifically label them, as they are now. Once so labeled, nothing need be added that is true of all ABCs. -- title: [doc] "there is no public constructor" should be reworded in io module documentation -> [io doc] Reword "there is no public constructor" ___ Python tracker <https://bugs.python.org/issue25415> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46849] Memory problems detected using Valgrind
Change by Terry J. Reedy : -- nosy: -terry.reedy ___ Python tracker <https://bugs.python.org/issue46849> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46849] Memory problems detected using Valgrind
Terry J. Reedy added the comment: Posting a thousand line message makes following a discussion extremely difficult. Move it into an attachment, if you did not do that already, and delete the message by 'editing' it. As I said, I cannot otherwise respond to this. -- ___ Python tracker <https://bugs.python.org/issue46849> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46854] Failed to compile static python3.7.12
Change by Terry J. Reedy : -- nosy: +ned.deily ___ Python tracker <https://bugs.python.org/issue46854> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46849] Memory problems detected using Valgrind
Terry J. Reedy added the comment: It is possible that some core developer may get regular valgrind reports, but I would not know who. I am pretty sure that you should run it at least on the latest release of the 'main' branch, 3.11.0a5, and perhaps even better, the current tip. There might be a performance patch that was not backported. (I have no idea what iotop is.) -- nosy: +terry.reedy ___ Python tracker <https://bugs.python.org/issue46849> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46845] dict: Use smaller entry for Unicode-key only dict.
Terry J. Reedy added the comment: CPython, at least, allows users to insert non-string keys in namespace dicts that are conceptually string-key only. >>> globals()[0] = 'zero' >>> globals()[0] 'zero' >>> vars() {'__name__': '__main__', ..., 0: 'zero'} [This is for consenting adults only, as it prevents sorting keys and string-only operations on keys. >>> dir() ... TypeError: '<' not supported between instances of 'int' and 'str'] Do you propose to 1. Only use StringKeyDicts when non-string keys are not possible? (Where would this be?) 2. Switch to a normal dict when a non-string key is added? (But likely not switch back when the last non-string key is removed.) 3. Deprecate and remove the option to add non-string keys to namespace dicts? (Proposed and rejected at least once as not gaining much.) -- nosy: +terry.reedy ___ Python tracker <https://bugs.python.org/issue46845> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46838] Parameters and arguments parser syntax error improvments
Terry J. Reedy added the comment: With two exceptions, nice suggestions if feasible. >>> def foo(*args=None): pass SyntaxError: * argument cannot have default value >>> def foo(**kwargs=None): pass SyntaxError: ** argument cannot have default value Good. >>> foo(*args=[0]) SyntaxError: cannot assign to iterable argument unpacking >>> foo(**args={"a": None}) SyntaxError: cannot assign to keyword argument unpacking Incomprehensible. It seems to me that these should have same message as first two; message should not depend on proposed default. -- nosy: +terry.reedy ___ Python tracker <https://bugs.python.org/issue46838> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46833] Windows installer is unclear and has redundant settings
Change by Terry J. Reedy : -- title: Installer Wizard is unclear and has redundant settings -> Windows installer is unclear and has redundant settings ___ Python tracker <https://bugs.python.org/issue46833> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46816] Remove declarations for non-__STDC__ compilers
Change by Terry J. Reedy : -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue46816> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46810] Make multiprocessing.connection.Client support ipv6
Change by Terry J. Reedy : -- nosy: +davin, pitrou title: multiprocessing.connection.Client doesn't support ipv6 -> Make multiprocessing.connection.Client support ipv6 ___ Python tracker <https://bugs.python.org/issue46810> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37426] getpass.getpass not working with on windows when ctrl+v is used to enter the string
Change by Terry J. Reedy : -- nosy: -terry.reedy versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issue37426> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26175] Fully implement IOBase abstract on SpooledTemporaryFile
Terry J. Reedy added the comment: Also, which of the two patches. Irit, you just patched Temp file doc, can you look at the PR code? -- nosy: +iritkatriel ___ Python tracker <https://bugs.python.org/issue26175> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26175] Fully implement IOBase abstract on SpooledTemporaryFile
Terry J. Reedy added the comment: Éric, you might use git log or git blame to see who that is active has patched the relevant file in the last few years. -- ___ Python tracker <https://bugs.python.org/issue26175> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34429] [doc] On Windows tempfile.TemporaryFile behaves like NamedTemporaryFile
Change by Terry J. Reedy : -- nosy: -terry.reedy ___ Python tracker <https://bugs.python.org/issue34429> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36595] IDLE: Add search to textview.ViewWindow
Terry J. Reedy added the comment: #46830 is a duplicate request. -- versions: +Python 3.11 -Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue36595> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46830] Add Find functionality to Squeezed Text viewer
Change by Terry J. Reedy : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE: Add search to textview.ViewWindow ___ Python tracker <https://bugs.python.org/issue46830> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40358] pathlib's relative_to should behave like os.path.relpath
Change by Terry J. Reedy : -- nosy: -terry.reedy ___ Python tracker <https://bugs.python.org/issue40358> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45641] Error In opening a file through tkinter on macOS Monterey
Change by Terry J. Reedy : -- pull_requests: -29607 ___ Python tracker <https://bugs.python.org/issue45641> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46732] Builtin __bool__ docstrings are wrong
Terry J. Reedy added the comment: For whatever reason, all builtins with a __bool__ method appear to share the same docstring. For example, >>> range.__bool__.__doc__ 'self != 0' >>> bool(range(0)) False >>> bool(range(1)) True The concrete collection classes have their lengths stored internally so bool use that via len(self). But len(range) != 0 iff stop != start. -- title: None.__bool__ docstring is wrong -> Builtin __bool__ docstrings are wrong ___ Python tracker <https://bugs.python.org/issue46732> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46782] Docs error for 3.10
Terry J. Reedy added the comment: The conversions from 0o777 to 511 in 3.10 and 3.11 but not in 3.9 are these: https://docs.python.org/3/library/pathlib.html#pathlib.Path.mkdir Path.mkdir(mode=511, parents=False, exist_ok=False) https://docs.python.org/3/library/os.html#os.mkdir os.mkdir(path, mode=511, *, dir_fd=None) I don't know whether different sphinx versions are used for different versions of the docs. -- nosy: +eric.araujo, mdk, terry.reedy ___ Python tracker <https://bugs.python.org/issue46782> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46760] test_dis should test the dis module, not everything else
Terry J. Reedy added the comment: With IDLE, I have issues with trying to test IDLE code without retesting tkinter, as well as deciding on the proper units of behavior to test. Some suggestions: 1. Add a docstring to the module with guidelines, after review from a couple of others. For instance,I believe you are saying that no test should explicitly call compile. Rather the test writer should call compile and extract the bytecode to copy into a test. 2. Make yourself a module code owner so you get informed and can review. Reviewing would be easier with guidelines to refer to, instead of repeating them. 3. An example issue is that some callables take many types of arguments. If not already, tests that the function can extract the bytecode from various objects should be separate from tests that extracted bytecode is then handled properly. Would any internal refactoring of dis and addition of _test functions make it easier to make test more independent of each other? 4. I would rather read the multiple long lists like expected_opinfo_outer = [ Instruction(opname='LOAD_CONST', opcode=100, arg=1, argval=3, argrepr='3', offset=0, starts_line=2, is_jump_target=False), Instruction(opname='LOAD_CONST', opcode=100, arg=2, argval=4, argrepr='4', offset=3, starts_line=None, is_jump_target=False), ... ] condensed to expected_opinfo_outer = [Instruction(opname, opcode, arg, argval, argrepr, offset, starts_line, is_jumps_target) for opname, opcode, arg, argval, argrepr, offset, starts_line, is_jumps_target in (('LOAD_CONST', 100,1, 3, '3', 0, 2, False), ('LOAD_CONST', 100,2, 4, '4', 3, None,False), ... )] -- nosy: +terry.reedy ___ Python tracker <https://bugs.python.org/issue46760> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46740] Improve Telnetlib's throughput
Terry J. Reedy added the comment: Even if deprecated, it will be around for at least 2 versions. A patch now might be worthwhile, but I don't know who would review it. -- nosy: +terry.reedy ___ Python tracker <https://bugs.python.org/issue46740> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46735] gettext.translations crashes when locale is unset
Terry J. Reedy added the comment: As 'crash', as used here, is when python exits abnormally *without* an exception traceback. The traceback in the linked report is: Traceback (most recent call last): File "video2x.py", line 53, in from upscaler import AVAILABLE_DRIVERS File "/home/meltonmb/video2x-4.6.1/src/upscaler.py", line 48, in language = gettext.translation(DOMAIN, LOCALE_DIRECTORY, [default_locale], fallback=True) File "/usr/lib/python3.8/gettext.py", line 583, in translation mofiles = find(domain, localedir, languages, all=True) File "/usr/lib/python3.8/gettext.py", line 554, in find for nelang in _expand_lang(lang): File "/usr/lib/python3.8/gettext.py", line 213, in _expand_lang loc = locale.normalize(loc) File "/usr/lib/python3.8/locale.py", line 401, in normalize code = localename.lower() AttributeError: 'NoneType' object has no attribute 'lower' Whether the bug is in the 3rd party module 'upscaler' or the stdlib module gettext depends on whether the DOMAIN, LOCALE_DIRECTORY, and [default_locale] arguments in upscaler's call to gettext.translation meet the documented requirements. What are their values? -- nosy: +terry.reedy ___ Python tracker <https://bugs.python.org/issue46735> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46733] pathlib.Path methods can raise NotImplementedError
Terry J. Reedy added the comment: I think pathlib should be raising TypeError, ValueError, or something else as appropriate. Or not raising in situations Eryk indicated. x/0 *could* be +- float('inf'), but we don't raise NotImplementedError for it. -- nosy: +terry.reedy ___ Python tracker <https://bugs.python.org/issue46733> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46732] None.__bool__ docstring is wrong
Terry J. Reedy added the comment: There is no object.__bool__. None.__bool__.__doc__ appears to be an accidental copy of bool/int/float/complex.__bool__.__doc__. It should just be 'False'. -- nosy: +terry.reedy title: object.__bool__ docstring is wrong -> None.__bool__ docstring is wrong ___ Python tracker <https://bugs.python.org/issue46732> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46725] Unpacking without parentheses is allowed since 3.9
Terry J. Reedy added the comment: Allowing no parentheses is also consistent with the following: for x in 1,2,3: print(x) -- nosy: +terry.reedy -jwilk ___ Python tracker <https://bugs.python.org/issue46725> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46764] Wrapping a bound method with a @classmethod no longer works
Change by Michael J. Sullivan : -- keywords: +patch pull_requests: +29517 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31367 ___ Python tracker <https://bugs.python.org/issue46764> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46764] Wrapping a bound method with a @classmethod no longer works
New submission from Michael J. Sullivan : class A: def foo(self, cls): return 1 class B: pass class B: bar = classmethod(A().foo) B.bar() In Python 3.8 and prior, this worked. Since Python 3.9, it produces "TypeError: A.foo() missing 1 required positional argument: 'cls'" I tracked it down, and the issue was introduced by https://github.com/python/cpython/pull/8405/files, which makes classmethod's tp_descr_get invoke its argument tp_descr_get when present instead of calling PyMethod_New. That this was a semantics change that could break existing code may have been missed (though it is a fairly obscure such change). The reason it breaks this case in particular of bound methods, though, is that bound methods have a tp_descr_get that does nothing (increfs the method and then returns it). Dropping that tp_descr_get fixes this issue and doesn't introduce any test failures. Not sure if there is some potential downstream breakage of that? (This issue was originally reported to me by Jared Hance) -- components: Interpreter Core messages: 413310 nosy: msullivan priority: normal severity: normal status: open title: Wrapping a bound method with a @classmethod no longer works versions: Python 3.10, Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.org/issue46764> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45447] Make IDLE recognize .pyi stub files as source for open, save, and edit
Terry J. Reedy added the comment: Issue 46746 is the followup for browsers (currently restricted to .py files) and anything else. -- title: Make IDLE recognize .pyi stub files (and .pyw) as python source -> Make IDLE recognize .pyi stub files as source for open, save, and edit ___ Python tracker <https://bugs.python.org/issue45447> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46746] IDLE: Consistently handle non .py source files
New submission from Terry J. Reedy : Python will attempt to execute any file it can decode to unicode text as a startup script. It will only import .py files as a module. #45447 turned on syntax coloring for .pyi stub files. (.pyw files and files starting with "!#.*python" were already recognized as source (scripts).) It also added '.pyi' as a possible python extension in open and save dialogs. For this issue, fix some other modules, as appropriate, for non-.py files. Pathbrowser: Except for the files in sys.path, pathbrowser only shows .py files and directories including such. It should be easy to also list .pyw and .pyi files and directories. Perhaps a button could be added to list all files. Open Module: Opens a module when given a valid import name. So it cannot be used to open non-modules, which is to say, non .py files. .pyi files are condensed modules, not startup files, but opening them would require considerable change since the import machinery is currently used. We could add a message to the box saying, "To open a non-module (non .py) file, use File => Open." Modulebrowser: This was originally called Classbrowser as it only browsed top-level classes and their methods. It now browses all classes and def-ined functions and I renamed it to indicate the expanded scope. Since it only browses .py files, I did not know that I was theoretically narrowing the scope to exclude non-.py files. Currently, when editing a non-.py file and trying to open a module browser, a window is opened and nothing happens. This is the same as with a file with no classes or functions. Either browse or display an error message. The latter would include files with nothing to browse. Anything else? -- assignee: terry.reedy components: IDLE messages: 413210 nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE: Consistently handle non .py source files type: enhancement versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue46746> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45447] Make IDLE recognize .pyi stub files (and .pyw) as python source
Terry J. Reedy added the comment: New changeset 6331c08d1c3248ff47a7b8e0045c9023c9af672c by Terry Jan Reedy in branch 'main': bpo-45447: Fix entry in What's New 3.11 (GH-31307) https://github.com/python/cpython/commit/6331c08d1c3248ff47a7b8e0045c9023c9af672c -- ___ Python tracker <https://bugs.python.org/issue45447> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45447] Make IDLE recognize .pyi stub files (and .pyw) as python source
Terry J. Reedy added the comment: New changeset cef91ca80c41749824eca1d4b2c99731e3d5f64c by Terry Jan Reedy in branch 'main': bpo-45447: Add entry to What's new 3.9 (GH-31305) https://github.com/python/cpython/commit/cef91ca80c41749824eca1d4b2c99731e3d5f64c -- ___ Python tracker <https://bugs.python.org/issue45447> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45447] Make IDLE recognize .pyi stub files (and .pyw) as python source
Terry J. Reedy added the comment: New changeset 2d98433549be358d1c192e30e51b8d345d618cc7 by Terry Jan Reedy in branch 'main': bpo-45447: Add entry to What's new 3.10 (GH-31304) https://github.com/python/cpython/commit/2d98433549be358d1c192e30e51b8d345d618cc7 -- ___ Python tracker <https://bugs.python.org/issue45447> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45447] Make IDLE recognize .pyi stub files (and .pyw) as python source
Change by Terry J. Reedy : -- pull_requests: +29468 pull_request: https://github.com/python/cpython/pull/31307 ___ Python tracker <https://bugs.python.org/issue45447> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45447] Make IDLE recognize .pyi stub files (and .pyw) as python source
Terry J. Reedy added the comment: New changeset 9fabcfbe68ff81ef5f17f86a93daf9cce9d83876 by Terry Jan Reedy in branch '3.10': bpo-45447: Add syntax highlighting for `.pyi` files in IDLE (GH-28950) https://github.com/python/cpython/commit/9fabcfbe68ff81ef5f17f86a93daf9cce9d83876 -- ___ Python tracker <https://bugs.python.org/issue45447> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45447] Make IDLE recognize .pyi stub files (and .pyw) as python source
Change by Terry J. Reedy : -- pull_requests: +29466 pull_request: https://github.com/python/cpython/pull/31305 ___ Python tracker <https://bugs.python.org/issue45447> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45447] Make IDLE recognize .pyi stub files (and .pyw) as python source
Change by Terry J. Reedy : -- pull_requests: +29465 pull_request: https://github.com/python/cpython/pull/31304 ___ Python tracker <https://bugs.python.org/issue45447> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45447] Make IDLE recognize .pyi stub files (and .pyw) as python source
Change by Terry J. Reedy : -- pull_requests: +29464 pull_request: https://github.com/python/cpython/pull/31303 ___ Python tracker <https://bugs.python.org/issue45447> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45447] Make IDLE recognize .pyi stub files (and .pyw) as python source
Terry J. Reedy added the comment: New changeset 50cf4991c49e19f917305dd7b9c71085c11edddb by Alex Waygood in branch 'main': bpo-45447: Add syntax highlighting for `.pyi` files in IDLE (GH-28950) https://github.com/python/cpython/commit/50cf4991c49e19f917305dd7b9c71085c11edddb -- ___ Python tracker <https://bugs.python.org/issue45447> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46666] IDLE Add indent guide
Terry J. Reedy added the comment: I am guessing that N++ or its GUI framework uses a transparent overlay. For tkinter, that would mean a transparent Canvas on which one could draw vertical dotted gray lines 1-pixel wide. However, Serhiy Storchaka in msg213643 of #20920 said: "Tk supports alpha only for photo images and as an attribute of top-level window. It doesn't support alpha component in colors." I searched 'tkinter transparent canvas'. For pixel positioning, photos with transparent backgrounds can only be used on a canvas. This was one of the answers to https://stackoverflow.com/questions/53021603/how-to-make-a-tkinter-canvas-background-transparent More details, using pil(low) to make images, are in the following: https://www.tutorialspoint.com/how-to-make-a-tkinter-canvas-rectangle-transparent https://www.javaer101.com/en/article/921105.html Another answer to the SO question, for Windows only, was to pip install pywin32 and use various calls to make a canvas layered with a transparent colorkey. Perhaps the same could be done, at least on Windows, with ctypes. A top-level background is made (partially) transparent with "top.attributes('-alpha', d)" where d in [0.0-1.0]. On Windows, 'top.wm_attributes('-transparentcolor', keycolor) makes that keycolor actually be transparent, like the green/blue screen used in television and movies. But any keycolor pixel in the toplevel exposes the screen beneath the toplevel, not the widget in the toplevel. This detail is not clear in the tk docs. https://www.youtube.com/watch?v=75jbNpc8vN4 What also is not clear is whether the keycolor applies only to the one toplevel or all toplevels, nor what happens when one toplevel is over another. I summarized the above so I or anyone else can find the information. I am closing this issue for now, but someone can reopen if the situation changes. -- resolution: -> third party stage: test needed -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue4> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46666] IDLE Add indent guide
Terry J. Reedy added the comment: '│' is a bit taller that ascii bar '|'; hex(ord('│')) = '0x2502'. It is a bit heavy. In this Windows Firefox box it is slightly lighter than | but in IDLE with Source Code Pro, it is slightly darder. Worse is being centered instead of on one edge. We would have to check it with multiple fixed-ascii-pitch fonts on multiple systems before using any non-ascii char. Does it always have the exact width of ascii ' ' or easier to check, ascii '|', so that is does not change the indent? This is easily tested in the Settings dialog Font tab sample box. Paste the following │││ ||| It passes with all but one of the Windows mono fonts I tried. I may ask a tk/tkinter question on SO about other possible options. Testing this one in code: if a: # Put 1st bar on 4th space. if b: │if c: │ │pass if d: │pass if a: # Put 1st bar on 5th space. if b: │ if c: │ │ pass if d: │ pass if a: # Put 1st bar on 1st space. │ if b: │ │ if c: │ │ │ pass │ if d: │ │ pass The 2nd option looks best to me. The 3rd would be easier to program, as default tab indent would always be '│ '. In any case, copied code would not be runnable code. I would add this on the Option menu between Code Context and Line Numbers. I believe only updating the markers on demand would be much easier to program than dynamically updating them with each keystroke (checking key and whether whitespace in indent area). Before merging a PR (writen by someone else), someone other than me, such as Raymond, must test it in real use both for correctness, usefulness, and aesthetics. (I anticipate that I would fail it on the latter two.) -- ___ Python tracker <https://bugs.python.org/issue4> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46666] IDLE Add indent guide
Terry J. Reedy added the comment: I loaded a .py file into N++ and see them. Under 3 x, there are clearly separate minidots. Under 10x, the dots are hardly visible. They are not characters in the text (cannot be copied) but a special manipulation of the column of pixels 'between' spaces. This must be a built-in feature of to the text widget. I suspect it involves special subpixel manipulation, perhaps requiring information from the monitor. AFAIK, Tk widgets do not have this feature. Unless there is a unicode char consisting of light dots on the very edge, we cannot even simulate this. -- ___ Python tracker <https://bugs.python.org/issue4> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46666] IDLE Add indent guide
Terry J. Reedy added the comment: [Please just select the current development version. Others can be marked if and when backported. 3.8 and before only get security fixes. Same for 3.9 after about next May 31.] Please explain exactly what you want and rewrite something like the following. if a: if b: if c: pass if d: pass IDLE's code context feature (Options menu) could be considered an indent guide. In some ways, it is better. What you see in the editor is what is saved (including when running), so any non-code additions have to be removed first. -- stage: -> test needed title: IDLE indent guide -> IDLE Add indent guide type: -> enhancement versions: -Python 3.10, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue4> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46665] IDLE Windows shortcuts by default
Terry J. Reedy added the comment: I wish it were otherwise, but configuration defaults cannot be changed as some people would not like it and it would badly interact with custom configurations. We can add new themes and keysets, but that should be very rare. We can consider adding bindings, though clashes with customizations are possible. Do you have any documentation for you claims? My impression is that Microsoft occasionally makes UI changes, so that 'Microsoft Standard' is a bit of a joke. Maybe keys are an exception. Ctrl+y is *not* recognized in Notepad. ctrl+shift+z acts the same as ctrl_z. Notepad++ recognizes both and lists both for Dedent in its Scintilla mapper. If it is not in use in the Windows keyset, adding it could be considered. Before the first character on a line, in the absence of a selection, tab and backspace indent and dedent. When there is a selection, tab and ctrl-] indent the selections and ctrl-[ dedents. Shift-tab acts the same as tab. I believe that tk, at least on Windows, does not recognize shift-tab as different from tab. I know that this is true for some named keys, such as Enter. (This stuff needs to be documented.) Shift-tab works as you (and I) want in Notepad++, so this is not a Windows issue. -- stage: -> needs patch type: -> enhancement versions: -Python 3.10, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue46665> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45447] Make IDLE recognize .pyi stub files (and .pyw) as python source
Terry J. Reedy added the comment: I broaden the issue title scope and will correspondingly restrict the PR scope. 'Recognition' applies to open and save dialogs, syntax marking, and module browsing. (The latter needs fixing for .pyw also.) Improving the handling of no extension source with initial #! line will be a different issue. -- title: IDLE: Support syntax highlighting for .pyi stub files -> Make IDLE recognize .pyi stub files (and .pyw) as python source ___ Python tracker <https://bugs.python.org/issue45447> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45447] IDLE: Support syntax highlighting for .pyi stub files
Terry J. Reedy added the comment: For the open dialog, we only need the expanded extension list. People with no-extension python code file must select 'all files'. Once the file is open, we need the issource function to decide whether to turn on the colorizer. I intend to review the patch itself tomorrow. -- ___ Python tracker <https://bugs.python.org/issue45447> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46609] Generator-based coroutines in Python 3.10, 3.9 docs
Change by Terry J. Reedy : -- nosy: -miss-islington resolution: -> fixed stage: patch review -> resolved status: open -> closed title: Generator-based coroutines in Python 3.10 docs -> Generator-based coroutines in Python 3.10, 3.9 docs ___ Python tracker <https://bugs.python.org/issue46609> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46609] Generator-based coroutines in Python 3.10 docs
Terry J. Reedy added the comment: New changeset 459e26f0987a12a19238baba422e13a8f7fcfca3 by Miss Islington (bot) in branch '3.9': [3.9] bpo-46609: Update asyncio-task coroutine doc (GH-31132) https://github.com/python/cpython/commit/459e26f0987a12a19238baba422e13a8f7fcfca3 -- ___ Python tracker <https://bugs.python.org/issue46609> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46637] Incorrect error message: "missing 1 required positional argument"
Terry J. Reedy added the comment: I think the incorrect qualification should be dropped, if sanely feasible. More misleading are hidden positional-only args. Doc: min(iterable, *[, key, default]) min(arg1, arg2, *args[, key]) >>> min(iterator=(1,3)) Traceback (most recent call last): File "", line 1, in min(iterator=(1,3)) TypeError: min expected at least 1 argument, got 0 1 was passed, but 0 were gotten, as the 1 passed was silently ignored. -- nosy: +terry.reedy versions: +Python 3.11 -Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue46637> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46609] Generator-based coroutines in Python 3.10 docs
Terry J. Reedy added the comment: New changeset 5603db43ba7ba5568b7516d0e28730a2bc1e1f26 by Terry Jan Reedy in branch '3.10': [3.10] bpo-46609: Update asyncio-task coroutine doc (GH-31132) https://github.com/python/cpython/commit/5603db43ba7ba5568b7516d0e28730a2bc1e1f26 -- ___ Python tracker <https://bugs.python.org/issue46609> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46609] Generator-based coroutines in Python 3.10 docs
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +29311 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/31132 ___ Python tracker <https://bugs.python.org/issue46609> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46609] Generator-based coroutines in Python 3.10 docs
Terry J. Reedy added the comment: Looking at the doc answered the question. Further down the 3.10 version, '3.10' was revised to '3.11', and indeed, the decorator and the entire section are gone. There was no change in 3.9 doc, but should be. I will submit a PR for 3.10 and try to remember to make an additional change in the 3.9 backport. The doc for iscoroutine and ...function are gone because they have no use in new 3.11+ code. The functions remain though, as they will still work, even though redundant. -- stage: -> needs patch type: -> behavior versions: +Python 3.9 ___ Python tracker <https://bugs.python.org/issue46609> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46609] Generator-based coroutines in Python 3.10 docs
Terry J. Reedy added the comment: Yuri or Andrew: either of you know the fix for "Support for generator-based coroutines is deprecated and is scheduled for removal in Python 3.10."? -- nosy: +asvetlov, terry.reedy, yselivanov ___ Python tracker <https://bugs.python.org/issue46609> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46588] IDLE fix typo in test_calltip.py
Change by Terry J. Reedy : -- assignee: -> terry.reedy components: +IDLE title: fix typo in test_calltip.py -> IDLE fix typo in test_calltip.py type: enhancement -> behavior versions: +Python 3.10, Python 3.9 ___ Python tracker <https://bugs.python.org/issue46588> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46588] fix typo in test_calltip.py
New submission from Terry J. Reedy : New changeset 222865daabfa7a8b12ca9a5e9c23b9ce217448f1 by Caio Agiani in branch 'main': bpo-46588: fix typo in test_calltip.py (GH-31119) https://github.com/python/cpython/commit/222865daabfa7a8b12ca9a5e9c23b9ce217448f1 -- nosy: +terry.reedy ___ Python tracker <https://bugs.python.org/issue46588> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46630] IDLE: Set query focus to entry box on Windows
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.org/issue46630> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46630] IDLE: Set query focus to entry box on Windows
Terry J. Reedy added the comment: New changeset d1df81a730499cc6286d02afa6028a1e9c22bbbf by Terry Jan Reedy in branch 'main': bpo-46630: Fix initial focus of IDLE query dialogs (GH-31112) https://github.com/python/cpython/commit/d1df81a730499cc6286d02afa6028a1e9c22bbbf -- ___ Python tracker <https://bugs.python.org/issue46630> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46630] IDLE: Set query focus to entry box on Windows
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +29295 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31112 ___ Python tracker <https://bugs.python.org/issue46630> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46630] IDLE: Set query focus to entry box on Windows
New submission from Terry J. Reedy : On Mac, and I presume *nix in general, query boxes open with the focus on the first entry box, with the cursor displayed. One can immediate enter a line number, dotted module name, or whatever. On Windows, since 3.9, one must hit Tab or click on the entry box to set the focus. If a blank entry is an error, one can even click on OK or hit Enter and the focus will move after an error message. idlelib/query.py already has self.entry.focus_set. Why did that stop working in 3.9? All patches to query.py were before May 2021 and backported to 3.8. Perhaps the upgrade from tk 8.6.9 to 8.6.12 had an effect given the code as it is. Text widgets have the same issue and Editor window has 'text.focus_set' in '__init__' and that works. Whatever, moving entry.focus_set() to just after self.deiconify() works without affecting unittests both in Windows repository and 3.11 installed on macOS. -- assignee: terry.reedy components: IDLE messages: 412465 nosy: terry.reedy priority: normal severity: normal status: open title: IDLE: Set query focus to entry box on Windows type: behavior ___ Python tracker <https://bugs.python.org/issue46630> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45975] Simplify some while-loops with walrus operator
Terry J. Reedy added the comment: New changeset 916d0d822c79933f4c420f7a36f16f3eb788646b by Terry Jan Reedy in branch 'main': bpo-45975: IDLE - Remove extraneous parens (GH-31107) https://github.com/python/cpython/commit/916d0d822c79933f4c420f7a36f16f3eb788646b -- ___ Python tracker <https://bugs.python.org/issue45975> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45975] Simplify some while-loops with walrus operator
Change by Terry J. Reedy : -- pull_requests: +29290 pull_request: https://github.com/python/cpython/pull/31107 ___ Python tracker <https://bugs.python.org/issue45975> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45975] Simplify some while-loops with walrus operator
Terry J. Reedy added the comment: New changeset fafd2dadf63973a04f5693e5be19f3e7521c10d4 by Terry Jan Reedy in branch '3.9': [3.9] bpo-45975: Use walrus operator for some idlelib while loops (GH-31083) https://github.com/python/cpython/commit/fafd2dadf63973a04f5693e5be19f3e7521c10d4 -- ___ Python tracker <https://bugs.python.org/issue45975> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com