[issue33610] IDLE: Make multiple improvements to CodeContext

2020-12-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 99d37a0ee82c16f30a874c9b583d59a3844dc9c9 by Miss Islington (bot) in branch '3.9': bpo-33610: Edit idlelib.codecontext (GH-23773) (GH-23775) https://github.com/python/cpython/commit/99d37a0ee82c16f30a874c9b583d59a3844dc9c9 --

[issue42644] logging.disable('WARN') breaks AsyncIO

2020-12-15 Thread Andrew Svetlov
Andrew Svetlov added the comment: Reporting what? Please elaborate. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42639] Make atexit state per interpreter

2020-12-15 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 nosy_count: 2.0 -> 3.0 pull_requests: +22633 pull_request: https://github.com/python/cpython/pull/23699 ___ Python tracker ___

[issue42639] Make atexit state per interpreter

2020-12-15 Thread hai shi
Change by hai shi : -- pull_requests: +22634 pull_request: https://github.com/python/cpython/pull/23683 ___ Python tracker ___ ___

[issue14935] PEP 384 Refactoring applied to _csv module

2020-12-15 Thread Petr Viktorin
Petr Viktorin added the comment: Thank you for working on this! It took several years and some new C-API to get it right (see PEP 630), but I believe this and the related issues bpo-18710 and bpo-34533 can now be closed. -- resolution: -> fixed stage: patch review -> resolved

[issue42646] Add function that supports "applying" methods

2020-12-15 Thread wyz23x2
New submission from wyz23x2 : Doing this is generally very annoying: y = x.copy() y.some_method() Sometimes x doesn't have copy(), so: from copy import deepcopy y = deepcopy(x) y.some_method() So maybe a function could be added to help. For example: def apply(obj, function, /, args=(),

[issue42639] Make atexit state per interpreter

2020-12-15 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22637 pull_request: https://github.com/python/cpython/pull/23779 ___ Python tracker ___

[issue42639] Make atexit state per interpreter

2020-12-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3ca2b8fd75043927f0bb03b8dac72d32beae255d by Victor Stinner in branch 'master': bpo-42639: atexit._run_exitfuncs() uses sys.unraisablehook (GH-23779) https://github.com/python/cpython/commit/3ca2b8fd75043927f0bb03b8dac72d32beae255d --

[issue42577] Unhelpful syntax error when expression spans multiple lines

2020-12-15 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I concur, handling also multi-line constructs is tricky and I would prefer not to implement some hack for specific situations because my experience is that balancing that with other things Is tricky. As Lysandros mentioned, the parser reports

[issue42042] sphinx3 renders diffrently docs.python.org for 3.10

2020-12-15 Thread Wendy Reynolds
Change by Wendy Reynolds : -- type: -> performance Added file: https://bugs.python.org/file49682/python-391.html ___ Python tracker ___

[issue42644] logging.disable('WARN') breaks AsyncIO

2020-12-15 Thread Xavier Morel
Xavier Morel added the comment: The problem seems to be in the user code? As you were told by "Carreau", loggin.disable takes a logging level (an integer), since you're giving it a string which it dutifully stores, it blows up at the next logging call which happens to be in asyncio. This

[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-15 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22636 pull_request: https://github.com/python/cpython/pull/23778 ___ Python tracker ___

[issue42116] Inspect library ignore comments at the end of a function (inspect.getsource)

2020-12-15 Thread nhamid
nhamid added the comment: thank you for the fix, I forgot to mention that python 3.6 and python 3.7 have this issue too. -- versions: +Python 3.6, Python 3.7 ___ Python tracker

[issue42645] break/continue or return in finally block occurs twice in trace.

2020-12-15 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +22638 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23780 ___ Python tracker

[issue35083] Fix documentation for __instancecheck__

2020-12-15 Thread M. Eric Irrgang
Change by M. Eric Irrgang : -- nosy: +eirrgang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35083] Fix documentation for __instancecheck__

2020-12-15 Thread M. Eric Irrgang
M. Eric Irrgang added the comment: The optimization appears to have been made without this level of discussion. The change to PEP 3119 was likely overlooked. The intended PEP 3119 behavior seems clear and reasonable. r61575 was a small part of the SVN merge that became git commit

[issue42111] Make the xxlimited module an example of best extension module practices

2020-12-15 Thread Petr Viktorin
Change by Petr Viktorin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue42646] Add function that supports "applying" methods

2020-12-15 Thread Eric V. Smith
Eric V. Smith added the comment: This seems way too special case for the stdlib, and especially not as a builtin. I've never seen this pattern before. Why is copy so special? I suggest raising this on the python-ideas mailing list if you'd like to get some traction for it. -- nosy:

[issue42142] test_ttk timeout: FAIL tkinter ttk LabeledScale test_resize, and more

2020-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There should be no timeouts (because wait_visibility no longer is used in tests). The fix can introduce new failures (like in issue42507), but it is a separate issue and may be related to bugs in the implementation of Tk on macOS. -- resolution:

[issue42645] break/continue or return in finally block occurs twice in trace.

2020-12-15 Thread Mark Shannon
New submission from Mark Shannon : This function def f(): try: return 2 finally: 4 would generate a try of [1, 2, 4, 2]. It should generate [1, 2, 4] and not trace the return twice. -- assignee: Mark.Shannon messages: 383044 nosy: Mark.Shannon, nedbat

[issue24416] Have date.isocalendar() return a structseq instance

2020-12-15 Thread Baptiste Mispelon
Baptiste Mispelon added the comment: (Apologies if this isn't the right place and/or time for this kind of negative feedback. I'm open to suggestions for a more appropriate venue) I found it disheartening that my work on this ticket has been erased. While I understand that other

[issue42116] Inspect library ignore comments at the end of a function (inspect.getsource)

2020-12-15 Thread Irit Katriel
Irit Katriel added the comment: Thanks for the report. 3.6 is no longer maintained and 3.7 is getting security fixes only. So this won't be backported to those versions. -- versions: -Python 3.6, Python 3.7 ___ Python tracker

[issue42647] Unable to use concurrent.futures in atexit hook

2020-12-15 Thread Julien Danjou
New submission from Julien Danjou : Python 3.9 introduced a regression with concurrent.futures. The following program works fine on Python < 3.8 but raises an error on 3.9: ``` import atexit import concurrent.futures def spawn(): with concurrent.futures.ThreadPoolExecutor() as t:

[issue42630] Variable.__init__ raises obscure AttributeError

2020-12-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +22639 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23781 ___ Python tracker ___

[issue42328] ttk style.map function incorrectly handles the default state for element options.

2020-12-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.9 ___ Python tracker ___

[issue42639] Make atexit state per interpreter

2020-12-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset b8fa135908d294b350cdad04e2f512327a538dee by Victor Stinner in branch 'master': bpo-42639: Move atexit state to PyInterpreterState (GH-23763) https://github.com/python/cpython/commit/b8fa135908d294b350cdad04e2f512327a538dee --

[issue14935] PEP 384 Refactoring applied to _csv module

2020-12-15 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 6a02b384751dbc13979efc1185f0a7c1670dc349 by Petr Viktorin in branch 'master': bpo-14935: Remove static state from the _csv module (GH-23224) https://github.com/python/cpython/commit/6a02b384751dbc13979efc1185f0a7c1670dc349 --

[issue40600] Add option to disallow > 1 instance of an extension module

2020-12-15 Thread STINNER Victor
STINNER Victor added the comment: > Thanks! Indeed, that's an even better solution than I had in mind. > It follows PEP 630 quite nicely: > https://www.python.org/dev/peps/pep-0630/#managing-global-state The atexit module was my main motivation for this issue. So I'm fine with closing it.

[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset ceb420251c1d635520049fbb7b5269a73d63fb58 by Victor Stinner in branch 'master': bpo-32381: pymain_run_file() uses PySys_FormatStderr() (GH-23778) https://github.com/python/cpython/commit/ceb420251c1d635520049fbb7b5269a73d63fb58 --

[issue26515] Update extending/embedding docs to new way to build modules in C

2020-12-15 Thread Petr Viktorin
Petr Viktorin added the comment: PEP 630 is now Active. I believe the vast majority of modules can now be ported, and it should be helpful for early adopters (including CPython stdlib). But there are still Open Issues and the API not battle-tested on all the edge cases. The PEP is written

[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2020-12-15 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > pidigits and regex_v8 are LOAD_ATTR heavy benchmarks? The PR is for LOAD_METHOD infrastructure, not for LOAD_ATTR (There was an incorrect title in the PR that I corrected but the contents are correct). > I will run benchmarks in my machine to

[issue42646] Add function that supports "applying" methods

2020-12-15 Thread wyz23x2
wyz23x2 added the comment: Edit: applied should be the better name because of reversed(), sorted() etc. and doesn't conflict with Py 2. -- ___ Python tracker ___

[issue42644] logging.disable('WARN') breaks AsyncIO

2020-12-15 Thread OverLordGoldDragon
OverLordGoldDragon added the comment: Everything's in the linked issue; in summary, the command kills IPython, and an IPython maintainer showed code suggesting the problem's rooted in CPython's improper handling of 'WARN' as alias for logging.WARN. --

[issue35083] Fix documentation for __instancecheck__

2020-12-15 Thread M. Eric Irrgang
M. Eric Irrgang added the comment: Actually, it looks like performance concerns were raised as issues [2303](https://bugs.python.org/issue2303) and [2534](https://bugs.python.org/issue2534). For #2534, the issue was different. For issue #2303, behavior-changing optimization was proposed.

[issue42639] Make atexit state per interpreter

2020-12-15 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22635 pull_request: https://github.com/python/cpython/pull/23777 ___ Python tracker ___

[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-15 Thread STINNER Victor
STINNER Victor added the comment: My PR 23778 fix the encoding/error handler when writing the filename into stderr, when the file does not exist: $ LANG= PYTHONCOERCECLOCALE=0 ./python -X utf8=0 héllo.py ./python: can't open file '/home/vstinner/python/master/h\udcc3\udca9llo.py': [Errno 2]

[issue42639] Make atexit state per interpreter

2020-12-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset f7049b5fb680c774e4950d10be62859a749f4e79 by Victor Stinner in branch 'master': bpo-42639: Add script_helper.run_test_script() (GH-23777) https://github.com/python/cpython/commit/f7049b5fb680c774e4950d10be62859a749f4e79 --

[issue18710] Add PyState_GetModuleAttr

2020-12-15 Thread Petr Viktorin
Petr Viktorin added the comment: Let me summarize the original issue with the following quote from the python-dev thead: > doing some sys.modules acrobatics and re-importing suddenly changes the internal state of a previously imported [_csv] module. The issue is now solved; both reproducers

[issue42035] [C API] PyType_GetSlot cannot get tp_name

2020-12-15 Thread Petr Viktorin
Petr Viktorin added the comment: I'll be happy to review adding a PyType_GetName function. -- ___ Python tracker ___ ___

[issue42639] Make atexit state per interpreter

2020-12-15 Thread STINNER Victor
STINNER Victor added the comment: Ok, the initial issue is now fixed. It's possible to have more than one atexit module instance, registered callbacks in one or the other module are all called as expected. I also wrote an unit test for that. I also took the opportunity of this issue to

[issue42641] Deprecate os.popen() function

2020-12-15 Thread STINNER Victor
STINNER Victor added the comment: > check2 = os.popen('grep "net\.ipv4\.ip_forward" /etc/sysctl.conf > /etc/sysctl.d/*').read() Such code leaks a zombi process when the child process completes, because the parent never reads its exit status :-( --

[issue24893] Tk occasionally mispositions Text() insert cursor on mouse click.

2020-12-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36675] Doctest directives and comments missing from code samples

2020-12-15 Thread Julien Palard
Julien Palard added the comment: New changeset c8a10d2fabff492ab352501c316baf5f2fc6510e by Julien Palard in branch 'master': bpo-36675: Doc: Reveal doctest directives (GH-23620) https://github.com/python/cpython/commit/c8a10d2fabff492ab352501c316baf5f2fc6510e --

[issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget

2020-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, the fix is not backported yet. Automatically backporting does not work because of renames in the supporting test library. -- ___ Python tracker

[issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget

2020-12-15 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +22644 pull_request: https://github.com/python/cpython/pull/23787 ___ Python tracker

[issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget

2020-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 28bf6ab61f77c69b732a211c398ac882bf3f65f4 by Serhiy Storchaka in branch '3.9': [3.9] bpo-42318: Fix support of non-BMP characters in Tkinter on macOS (GH-23281). (GH-23784)

[issue1514420] Traceback display code can attempt to open a file named ""

2020-12-15 Thread Irit Katriel
Irit Katriel added the comment: Ok, I'm unconfused now - this is the C version of the traceback, in _Py_DisplaySourceLine, not the traceback.py one that uses linecache. It wouldn't be hard to add the check for "<>" in the filename there. Is there a reason not to do it? --

[issue42641] Deprecate os.popen() function

2020-12-15 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +22640 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23782 ___ Python tracker ___

[issue19733] Setting image parameter of a button crashes with Cocoa Tk

2020-12-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +22642 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23785 ___ Python tracker

[issue42649] RecursionError when parsing unwieldy expression (regression from 2.7 -> 3.x)

2020-12-15 Thread Michael Orlitzky
Change by Michael Orlitzky : -- type: -> compile error ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42630] Variable.__init__ raises obscure AttributeError

2020-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Currently, a root window is created implicitly only when you create a Tkinter or Ttk widget. i.e. things which should be visible to user. When you create image, variable, or use global utility function like getbool() or mainloop() or image_types() it

[issue42650] Can people use dest=argparse.SUPPRESS in custom Action classes?

2020-12-15 Thread Brad Warren
New submission from Brad Warren : argparse internally sets dest=SUPPRESS in action classes like _HelpAction and _VersionAction to prevent an attribute from being created for that option on the resulting namespace. Can users creating custom Action classes also use this functionality without

[issue40219] ttk LabeledScale: label covered by hidden element

2020-12-15 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +22645 pull_request: https://github.com/python/cpython/pull/23788 ___ Python tracker

[issue40219] ttk LabeledScale: label covered by hidden element

2020-12-15 Thread miss-islington
Change by miss-islington : -- pull_requests: +22646 pull_request: https://github.com/python/cpython/pull/23789 ___ Python tracker ___

[issue40219] ttk LabeledScale: label covered by hidden element

2020-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b9ced83cf427ec86802ba4c9a562c6d9cafc72f5 by E-Paine in branch 'master': bpo-40219: Lowered ttk LabeledScale dummy (GH-21467) https://github.com/python/cpython/commit/b9ced83cf427ec86802ba4c9a562c6d9cafc72f5 --

[issue40219] ttk LabeledScale: label covered by hidden element

2020-12-15 Thread miss-islington
miss-islington added the comment: New changeset 13d40c2a418116797eccd77bd65e4dbd689008db by Miss Islington (bot) in branch '3.8': bpo-40219: Lowered ttk LabeledScale dummy (GH-21467) https://github.com/python/cpython/commit/13d40c2a418116797eccd77bd65e4dbd689008db --

[issue40600] Add option to disallow > 1 instance of an extension module

2020-12-15 Thread Petr Viktorin
Petr Viktorin added the comment: Thanks! Indeed, that's an even better solution than I had in mind. It follows PEP 630 quite nicely: https://www.python.org/dev/peps/pep-0630/#managing-global-state I will close this issue and PRs. I don't agree with adding a general API for disallowing

[issue42649] RecursionError when parsing unwieldy expression (regression from 2.7 -> 3.x)

2020-12-15 Thread Michael Orlitzky
New submission from Michael Orlitzky : The attached file contains a huge, ugly expression that can be parsed in python-2.7 but not python-3.x (I've tested 3.7, 3.8, and 3.9). With the 3.x versions, I get $ python3 DPT_defn RecursionError: maximum recursion depth exceeded during

[issue42644] logging.disable('WARN') breaks AsyncIO

2020-12-15 Thread Xavier Morel
Xavier Morel added the comment: Oh I now see you've created a PR to do essentially that, nm. -- ___ Python tracker ___ ___

[issue42630] Variable.__init__ raises obscure AttributeError

2020-12-15 Thread Ivo Shipkaliev
Ivo Shipkaliev added the comment: Thank you very much, fellows! Serhiy, I'm lloking at Lib/tkinter/__init__.py changes. I'd like to share my thoughts on this: I understand your concern: "But I am not sure what is better: raise error (RuntimeError) if the global function uses _default_root

[issue42644] logging.disable('WARN') breaks AsyncIO

2020-12-15 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: I should have been more careful in my explanation in the upstream issue to have a complete report in here. I think that patching logging.disable to raise a type error immediately would be welcome; as the effect of storing a wrong type make any asyncio

[issue42644] logging.disable('WARN') breaks AsyncIO

2020-12-15 Thread Matthias Bussonnier
Change by Matthias Bussonnier : -- keywords: +patch pull_requests: +22643 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23786 ___ Python tracker

[issue42644] logging.disable('WARN') breaks AsyncIO

2020-12-15 Thread Xavier Morel
Xavier Morel added the comment: > I think that patching logging.disable to raise a type error immediately would > be welcome FWIW `logging` has a built-in checker / converter[0] which is already used in a bunch of places (e.g. the aforementioned setLevel), it could just be added inside

[issue38661] Changes to tkinter result in (unexpected) widget map call return changes wrt. 3.7

2020-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This was likely caused by different versions of Tk. It should be fixed now in issue42328. Style.map() should convert result to uniform representation on all versions and platforms, and accept input in different forms. Please check. -- resolution:

[issue14935] PEP 384 Refactoring applied to _csv module

2020-12-15 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 3.10 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue31904] Python should support VxWorks RTOS

2020-12-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset b230409f21f5e5b42de6ec10147cd95ae3bdd095 by pxinwr in branch 'master': bpo-31904: Skip os.path.expanduser() tests on VxWorks (GH-23776) https://github.com/python/cpython/commit/b230409f21f5e5b42de6ec10147cd95ae3bdd095 --

[issue19206] Support disabling file I/O when doing traceback formatting

2020-12-15 Thread Irit Katriel
Irit Katriel added the comment: Since this issue was created, the traceback module changed considerably, and now we have the TracebackException/StackSummary classes which capture information about an exception for later rendering. The lookup_lines arg controls the timing of the file access:

[issue24743] Make _PyTraceback_Add public

2020-12-15 Thread Irit Katriel
Irit Katriel added the comment: This seems like something that needs to be discussed on python-ideas before it can be brought to implementation. -- resolution: -> rejected stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue31904] Python should support VxWorks RTOS

2020-12-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9a0dea6137a9fe295c8b03aaa08a74c8572ecc4e by pxinwr in branch 'master': bpo-31904: Skip some tests of changing owner in _test_all_chown_common() on VxWorks (GH-23716)

[issue31904] Python should support VxWorks RTOS

2020-12-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset e1e3c2dac3da8a179f57bd3e3309ab65385bcc8a by pxinwr in branch 'master': bpo-31904: Disable os.popen and popen test cases on VxWorks (GH-21687) https://github.com/python/cpython/commit/e1e3c2dac3da8a179f57bd3e3309ab65385bcc8a --

[issue35930] Raising an exception raised in a "future" instance will create reference cycles

2020-12-15 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: The corrected test case in the terminal: (a "del" was missing) """ import gc import concurrent.futures executor = concurrent.futures.ThreadPoolExecutor(999) def a(): 1/0 future=executor.submit(a) future.result() # An exception is raised here. That is

[issue42641] Deprecate os.popen() function

2020-12-15 Thread STINNER Victor
STINNER Victor added the comment: > document drawbacks and limitations of os.popen and advertise alternatives. This sounds like a good idea in any case ;-) -- ___ Python tracker

[issue42648] subprocess: add a helper/parameter to catch exec() OSError exception

2020-12-15 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +22647 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23790 ___ Python tracker ___

[issue2824] zipfile to handle duplicate files in archive

2020-12-15 Thread Irit Katriel
Irit Katriel added the comment: This was changed to a warning in issue20262. Is that enough or should it be an exception? -- nosy: +iritkatriel ___ Python tracker ___

[issue42648] subprocess: add a helper/parameter to catch exec() OSError exception

2020-12-15 Thread STINNER Victor
STINNER Victor added the comment: I wrote PR 23790 which adds exec_raise=True parameter to subprocess.Popen. exec_raise=False avoids try/except OSError. I dislike the "exec_raise" parameter name. The function is not related to exec, but more specific to OSError. A better name may include

[issue38820] Make Python compatible with OpenSSL 3.0.0

2020-12-15 Thread Chih-Hsuan Yen
Change by Chih-Hsuan Yen : -- nosy: +yan12125 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42648] subprocess: add a helper/parameter to catch exec() OSError exception

2020-12-15 Thread STINNER Victor
New submission from STINNER Victor : While working on on bpo-42641 "Deprecate os.popen() function", I tried to replace os.popen() with a subprocess function, to avoid relying on an external shell. Example from test_posix: with os.popen('id -G 2>/dev/null') as idg: groups

[issue41969] ttk.RadioButtons mis-sized under Windows 10 UI Scaling, with dpiAware set true

2020-12-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> third party status: open -> pending ___ Python tracker ___ ___ Python-bugs-list

[issue41349] Tk window not going full screen on 90° rotated screen on mac

2020-12-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> third party status: open -> pending ___ Python tracker ___ ___ Python-bugs-list

[issue42630] Variable.__init__ raises obscure AttributeError

2020-12-15 Thread E. Paine
E. Paine added the comment: > In my view, we should always create a default root if it's needed I somewhat disagree. I think Serhiy has done a very good job (in what I've reviewed so far) of balancing when a new root should or shouldn't be created (e.g. does it make sense to create a new

[issue21521] Tkinter + OSX + Spaces : Multiple file dialogues created

2020-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: asksaveasfilename is just a wrapper around the tk_getSaveFile Tk command which is implemented differently on Windows, macOS and X Window. The used widgets have very different appearance and behavior on different platforms, so there is no chance to test

[issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget

2020-12-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +22641 pull_request: https://github.com/python/cpython/pull/23784 ___ Python tracker ___

[issue42641] Deprecate os.popen() function

2020-12-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7f14a3756b61272cc15f24302589874b125c2f04 by Victor Stinner in branch 'master': bpo-42641: Enhance test_select.test_select() (GH-23782) https://github.com/python/cpython/commit/7f14a3756b61272cc15f24302589874b125c2f04 --

[issue42641] Deprecate os.popen() function

2020-12-15 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-42648: "subprocess: add a helper/parameter to catch exec() OSError exception". -- ___ Python tracker ___

[issue42577] Unhelpful syntax error when expression spans multiple lines

2020-12-15 Thread Guido van Rossum
Guido van Rossum added the comment: I think something should probably be done about this, but opening another tracker issue is not the way to make progress here. So I am closing the issue. It will happen in due time. No need to have more open issues. -- stage: -> resolved status:

[issue42648] subprocess: add a helper/parameter to catch exec() OSError exception

2020-12-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: I suggest just adding a couple options to getstatusoutput instead of wrangling new to-catch-or-not-to-catch APIs if code like your test_posix example is what you want to replace. -- ___ Python tracker

[issue42648] subprocess: add a helper/parameter to catch exec() OSError exception

2020-12-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: arguably run() with check=True could've turned the OSError into a CalledProcessError [can't do that now, someone surely depends on it]. So if both are supplied, perhaps it does that instead of returning a CompletedProcess with .oserror set? the API

[issue42090] zipfile.Path.joinpath API inconsistent with pathlib.Path.joinpath

2020-12-15 Thread miss-islington
miss-islington added the comment: New changeset 928dbfc16c9c4715459c80fe551c74702480db8b by Jason R. Coombs in branch 'master': bpo-42090: zipfile.Path.joinpath now accepts multiple arguments (GH-22976) https://github.com/python/cpython/commit/928dbfc16c9c4715459c80fe551c74702480db8b

[issue42648] subprocess: add a helper/parameter to catch exec() OSError exception

2020-12-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: The shell was isolating the user from the exec error by always existing and turning the exec error into a status return. >>> subprocess.run('foo', shell=True) /bin/sh: line 1: foo: command not found CompletedProcess(args='foo', returncode=127) >>>

[issue14586] TypeError: truncate() takes no keyword arguments

2020-12-15 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10 -Python 2.7, Python 3.2, Python 3.3 ___ Python tracker ___ ___ Python-bugs-list

[issue42648] subprocess: add a helper/parameter to catch exec() OSError exception

2020-12-15 Thread STINNER Victor
STINNER Victor added the comment: https://docs.python.org/dev/library/subprocess.html#subprocess-replacements documentation suggests to replace os.popen(cmd, "w") with Popen(cmd, stdin=PIPE): without shell=True. My problem is that the replacement does change the behavior if the command does

[issue42648] subprocess: add a helper/parameter to catch exec() OSError exception

2020-12-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: We could also be thinking too low level here. We don't have to re-use returncode for this or do it on POpen itself. This could be done at the `run()` API level and CompletedProcess could be given state indicating success or failure of the exec itself.

[issue42648] subprocess: add a helper/parameter to catch exec() OSError exception

2020-12-15 Thread Eryk Sun
Eryk Sun added the comment: I suggesting changing the name to indicate that only OSError exceptions are suppressed, not SubprocessError exceptions. Maybe call it no_oserror. As to the status code to use, if you want a a common code that can't interfere, it has to be either a negative value

[issue42630] Variable.__init__ raises obscure AttributeError

2020-12-15 Thread Ivo Shipkaliev
Ivo Shipkaliev added the comment: First: thank you! > I think Serhiy has done a very good job ... I'm not saying he ain't! More so, I greatly appreciate everyone's time and effort. But I'm discussing the implementation here, not somebody's work. Apparently I haven't been precise enough in

[issue42648] subprocess: add a helper/parameter to catch exec() OSError exception

2020-12-15 Thread STINNER Victor
STINNER Victor added the comment: I updated my PR 23790 to add many usage of the new parameter, to see which kind of code would benefit of it. -- Use case: Get the output of a command, don't fail if the command doesn't exist. Example: get "gcc --version" output. It's common to redirect

[issue35930] Raising an exception raised in a "future" instance will create reference cycles

2020-12-15 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Even more reproductible case, now 100%: """ import gc import concurrent.futures executor = concurrent.futures.ThreadPoolExecutor(999) def a(): 1/0 future=executor.submit(a) future.result() # An exception is raised here. That is normal del future #

[issue35930] Raising an exception raised in a "future" instance will create reference cycles

2020-12-15 Thread Jesús Cea Avión
Change by Jesús Cea Avión : -- versions: +Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42179] Clarify chaining exceptions in tutorial/errors.rst

2020-12-15 Thread Carol Willing
Carol Willing added the comment: New changeset 3f9fe23c05280dc5736c07bb0e968cdaf8c503d0 by Vladimir in branch 'master': bpo-42179: Clarify exception chaining (GH-23160) https://github.com/python/cpython/commit/3f9fe23c05280dc5736c07bb0e968cdaf8c503d0 --

[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2020-12-15 Thread Inada Naoki
Inada Naoki added the comment: $ ./python -m pyperf compare_to master.json load_method.json -G --min-speed=1 Slower (15): - unpack_sequence: 63.2 ns +- 0.8 ns -> 68.5 ns +- 14.8 ns: 1.08x slower (+8%) - pathlib: 23.1 ms +- 0.3 ms -> 24.4 ms +- 0.4 ms: 1.05x slower (+5%) - scimark_fft: 418 ms

[issue42646] Add function that supports "applying" methods

2020-12-15 Thread Josh Rosenberg
Josh Rosenberg added the comment: If you're annoyed by having to use two lines, one to copy, one to call the mutating method, you can use the walrus operator: (y := x.copy()).some_method() or: (y := deepcopy(x)).some_method() Does that cover your use case? For the list case, you'd

  1   2   >