[issue35379] IDLE's close fails io is set to None on Mac

2020-07-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: #41413 exposed another double save on Mac issue. -- ___ Python tracker ___ ___ Python-bugs-list m

[issue41421] Random.paretovariate sometimes raises ZeroDivisionError for small alpha

2020-07-28 Thread Tim Peters
Tim Peters added the comment: I'm inclined to ignore this. No actual user has complained about this, and I doubt any ever will: it's got to be rare as hen's teeth to use a parameter outside of, say, [0.1, 10.0], in real life. The division error can't happen for those. For "small" alpha, the

[issue41413] IDLE: exit at input() prompt is not complete

2020-07-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: More specifically, why the change results the same box twice on Mac but not on Windows. The previous double-save issue, worst on Mac, was #35379. -- nosy: +taleinat ___ Python tracker

[issue41421] Random.paretovariate sometimes raises ZeroDivisionError for small alpha

2020-07-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- type: -> behavior versions: +Python 3.10, Python 3.9 -Python 3.6, Python 3.7 ___ Python tracker ___ __

[issue41421] Random.paretovariate sometimes raises ZeroDivisionError for small alpha

2020-07-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: The point of the "u = 1.0 - self.random()" line was to prevent the case where *u* was exactly equal to zero; however, as you noted, raising a very small number to a small can round down to zero. We could wrap the calculation in a try/except to catch the Z

[issue41427] howto/descriptor.rst unnecessarily mentions method.__class__

2020-07-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list m

[issue41429] Let fnmatch.filter accept a tuple of patterns

2020-07-28 Thread Andrés Delfino
New submission from Andrés Delfino : I propose to let fnmatch.filter accept a tuple of patterns as its pat parameter, while still supporting a single string argument (just like str.endswith does). The code to do this manually and efficiently pretty much involves copying filter. -- co

[issue41427] howto/descriptor.rst unnecessarily mentions method.__class__

2020-07-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Good catch. Thanks for the report. -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue41046] unittest: make skipTest a classmethod

2020-07-28 Thread James Corbett
James Corbett added the comment: I was careless in my example, it would need to be `cls.skipTest(reason)`. However, that really doesn't have anything to do with why it should be a `classmethod` instead of an instance method: it's so that you can call `skipTest` from `classmethods`, namely `s

[issue41429] Let fnmatch.filter accept a tuple of patterns

2020-07-28 Thread Andrés Delfino
Change by Andrés Delfino : -- keywords: +patch pull_requests: +20812 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21666 ___ Python tracker ___ __

[issue41427] howto/descriptor.rst unnecessarily mentions method.__class__

2020-07-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: The origin of the error was an incorrect update from Python 2 semantics where the class was exposed as an attribute: Python 2.7.17 (v2.7.17:c2f86d86e6, Oct 19 2019, 16:24:34) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright",

[issue41420] Academic Free License v. 2.1 link is not found and is obsolete

2020-07-28 Thread Guido van Rossum
Guido van Rossum added the comment: A few options present themselves: - We could switch to AFL 3.0 (https://opensource.org/licenses/AFL-3.0). This will require some review by our lawyer. - We could link to another copy of AFL 2.1. Honestly the original one seems pretty odd. - We could link

[issue41420] Academic Free License v. 2.1 link is not found and is obsolete

2020-07-28 Thread Guido van Rossum
Guido van Rossum added the comment: I also found what looks like a copy of AFL 2.1 on Python's own wiki: https://wiki.python.org/moin/PythonSoftwareFoundationLicenseFaq/AFL-2.1 (Of course, being a wiki, this has the disadvantage of being publicly editable. :-) Yet another option presents it

[issue41421] Random.paretovariate sometimes raises ZeroDivisionError for small alpha

2020-07-28 Thread Tim Peters
Tim Peters added the comment: BTW, if we have to "do something", how about changing return 1.0 / u ** (1.0/alpha) to the mathematically equivalent return (1.0 / u) ** (1.0/alpha) ? Not sure about Linux-y boxes, but on Windows that would raise OverflowError instead of ZeroDivisionError. Whi

[issue41430] Document C docstring behavior

2020-07-28 Thread James Corbett
New submission from James Corbett : As described in https://stackoverflow.com/questions/25847035/what-are-signature-and-text-signature-used-for-in-python-3-4, https://bugs.python.org/issue20586, and https://stackoverflow.com/questions/50537407/add-a-signature-with-annotations-to-extension-met

[issue41421] Random.paretovariate sometimes raises ZeroDivisionError for small alpha

2020-07-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't feel a need to change anything, my post hit a few seconds after yours :-) That said, "return u ** (-1.0 / alpha)" would be a slight, but nice improvement. It might also be reasonable to document a safe range of alpha values. --

[issue41427] howto/descriptor.rst incorrectly mentions method.__class__

2020-07-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- title: howto/descriptor.rst unnecessarily mentions method.__class__ -> howto/descriptor.rst incorrectly mentions method.__class__ ___ Python tracker _

[issue41416] Restore default implementation of __ne__ in mixins Set and Mapping

2020-07-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- Removed message: https://bugs.python.org/msg374497 ___ Python tracker ___ ___ Python-bugs-list mail

[issue41416] Restore default implementation of __ne__ in mixins Set and Mapping

2020-07-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: If you want to add back the __ne__() method, that would be fine. FWIW, "class A(collections.abc.Set, int)" seems pretty exotic to me. I wouldn't have expected that work out well. -- ___ Python tracker

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Inada Naoki
New submission from Inada Naoki : Although there are dict.copy() and PyDict_Copy(), dict_merge can be used for copying dict. * d={}; d.update(orig) * d=dict(orig) * d=orig.copy() # orig has many dummy keys. -- components: Interpreter Core messages: 374550 nosy: inada.naoki priority: n

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +20813 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21669 ___ Python tracker ___

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Inada Naoki
Inada Naoki added the comment: Microbenchmark for commit cf4f61ce50e07f7ccd3aef991647050c8da058f9. # timeit -s 'd=dict.fromkeys(range(8))' -- 'dict(d)' Mean +- std dev: [master] 311 ns +- 2 ns -> [patched] 144 ns +- 1 ns: 2.16x faster (-54%) # timeit -s 'd=dict.fromkeys(range(1000))' -- 'dic

[issue38156] input fucntion raises SystemError after specific input.

2020-07-28 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset a74eea238f5baba15797e2e8b570d153bc8690a7 by Benjamin Peterson in branch 'master': closes bpo-38156: Always handle interrupts in PyOS_StdioReadline. (GH-21569) https://github.com/python/cpython/commit/a74eea238f5baba15797e2e8b570d153bc8690a7

[issue38156] input fucntion raises SystemError after specific input.

2020-07-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +20815 pull_request: https://github.com/python/cpython/pull/21671 ___ Python tracker ___ __

[issue38156] input fucntion raises SystemError after specific input.

2020-07-28 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +20814 pull_request: https://github.com/python/cpython/pull/21670 ___ Python tracker _

[issue38156] input fucntion raises SystemError after specific input.

2020-07-28 Thread miss-islington
miss-islington added the comment: New changeset 22216107f2890e7ee2ab055e4983b76ff9c62169 by Miss Islington (bot) in branch '3.9': closes bpo-38156: Always handle interrupts in PyOS_StdioReadline. (GH-21569) https://github.com/python/cpython/commit/22216107f2890e7ee2ab055e4983b76ff9c62169 --

[issue38156] input fucntion raises SystemError after specific input.

2020-07-28 Thread miss-islington
miss-islington added the comment: New changeset 7cfede6859586f77f786bda56af4698ae2245f56 by Miss Islington (bot) in branch '3.8': closes bpo-38156: Always handle interrupts in PyOS_StdioReadline. (GH-21569) https://github.com/python/cpython/commit/7cfede6859586f77f786bda56af4698ae2245f56 --

[issue41430] Document C docstring behavior

2020-07-28 Thread James Corbett
Change by James Corbett : -- keywords: +patch pull_requests: +20816 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21673 ___ Python tracker ___ __

[issue41427] howto/descriptor.rst incorrectly mentions method.__class__

2020-07-28 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +20817 pull_request: https://github.com/python/cpython/pull/21667 ___ Python tracker _

[issue41427] howto/descriptor.rst incorrectly mentions method.__class__

2020-07-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +20818 pull_request: https://github.com/python/cpython/pull/21668 ___ Python tracker ___ __

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Inada Naoki
Inada Naoki added the comment: To reduce code size, I am considering to remove clone_combined_dict. I will check how PyDict_Copy() is performance critical. This is microbenchmark result of d.copy() and dict(d). $ ./python -m pyperf timeit --compare-to ./python-master -s 'd=dict.fromkeys(ran

[issue41428] PEP 604 -- Allow writing union types as X | Y

2020-07-28 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Inada Naoki
Inada Naoki added the comment: PyDict_Copy() is not used in eval loop or calling functions. So removing clone_combined_dict() is a considerable option. Another option is to use clone_combined_dict() in dict_merge, instead of adding dict_copy2(). Pros: No performance regression. PyDict_Copy(

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +20819 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21674 ___ Python tracker ___ _

[issue41427] howto/descriptor.rst incorrectly mentions method.__class__

2020-07-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the PR. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41432] IDLE: Handle bad highlight tab color config

2020-07-28 Thread Terry J. Reedy
New submission from Terry J. Reedy : https://stackoverflow.com/questions/35397377/python-freezes-when-configuring-idle froze IDLE with a custom theme missing 'colours for the blinker and highlighting'. I reported some experiments there. Tracebacks might help, but Proposal 1: check theme bef

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka, yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue31904] Python should support VxWorks RTOS

2020-07-28 Thread Peixing Xin
Change by Peixing Xin : -- pull_requests: +20820 pull_request: https://github.com/python/cpython/pull/21675 ___ Python tracker ___ _

[issue41433] Logging libraries BufferingHandler flushed twice at shutdown

2020-07-28 Thread Tatsunosuke Shimada
New submission from Tatsunosuke Shimada : BufferingHandler I expected function flush of BufferingHandler called once but it is called twice. This is due to that shutdown calls flush before close function which calls flush function inside. (Faced this issue on my custom implementation of flus

[issue41433] Logging libraries BufferingHandler flushed twice at shutdown

2020-07-28 Thread Tatsunosuke Shimada
Tatsunosuke Shimada added the comment: Found related issue. https://bugs.python.org/issue901330 -- ___ Python tracker ___ ___ Pytho

[issue41282] Deprecate and remove distutils

2020-07-28 Thread Hugo van Kemenade
Change by Hugo van Kemenade : -- nosy: +hugovk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue41434] IDLE: Warn user on "Run Module" if file is not .py/.pyw

2020-07-28 Thread wyz23x2
New submission from wyz23x2 : It would be great if IDLE shows a note when a non-Python file is attempted to run. -- assignee: terry.reedy components: IDLE messages: 374561 nosy: terry.reedy, wyz23x2 priority: normal severity: normal status: open title: IDLE: Warn user on "Run Module" i

[issue41434] IDLE: Warn user on "Run Module" if file is not .py/.pyw

2020-07-28 Thread wyz23x2
wyz23x2 added the comment: It should be able to turn on/off this feature. -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue41434] IDLE: Option to warn user on "Run Module" if file is not .py/.pyw

2020-07-28 Thread wyz23x2
Change by wyz23x2 : -- title: IDLE: Warn user on "Run Module" if file is not .py/.pyw -> IDLE: Option to warn user on "Run Module" if file is not .py/.pyw ___ Python tracker _

<    1   2