[issue41168] Lack of proper checking in PyObject_SetAttr leads to segmentation fault

2020-08-06 Thread Jeffrey Kintscher
Jeffrey Kintscher added the comment: Can you attach the Python source code for the PoC? -- ___ Python tracker ___ ___

[issue41497] Potential UnicodeDecodeError in dis

2020-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch. Yes, when read Python source files you should either open them in binary mode if reading bytes is enough for use, or open them with tokenize.open() if we need string data, or use token.detect_encoding() and pass the result to open().

[issue41168] Lack of proper checking in PyObject_SetAttr leads to segmentation fault

2020-08-06 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: +Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41157] email.message_from_string() is unable to find the headers for the .msg files

2020-08-06 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: +Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41169] socket.inet_pton raised when pass an IPv6 address like "[::]" to it

2020-08-06 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: +Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-08-06 Thread miss-islington
miss-islington added the comment: New changeset fc354ca51d0b6f24f2871788dfa7e35c56129f8b by Miss Islington (bot) in branch '3.9': bpo-39871: Fix an error in a news entry (GH-21749) https://github.com/python/cpython/commit/fc354ca51d0b6f24f2871788dfa7e35c56129f8b --

[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-08-06 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +20905 pull_request: https://github.com/python/cpython/pull/21760 ___ Python tracker

[issue39871] math.copysign raises SystemError with non-float x and custom y

2020-08-06 Thread Inada Naoki
Inada Naoki added the comment: New changeset 54636355805dd2877bb54fbad8d967e1ddd8b553 by Zackery Spytz in branch 'master': bpo-39871: Fix an error in a news entry (GH-21749) https://github.com/python/cpython/commit/54636355805dd2877bb54fbad8d967e1ddd8b553 -- nosy: +inada.naoki

[issue38119] resource tracker destroys shared memory segments when other processes should still have valid access

2020-08-06 Thread Vinay Sharma
Vinay Sharma added the comment: As suggested by Guido I have floated this solution to python-dev mailing list. Link to archive: https://mail.python.org/archives/list/python-...@python.org/thread/O67CR7QWEOJ7WDAJEBKSY74NQ2C4W3AI/ -- ___ Python

[issue41497] Potential UnicodeDecodeError in dis

2020-08-06 Thread Inada Naoki
Change by Inada Naoki : -- versions: -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue37724] [[Errno 17] File exists: ] # Try create directories that are not part of the archive with

2020-08-06 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: +Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41440] os.cpu_count doesn't work on VxWorks RTOS

2020-08-06 Thread Dong-hee Na
Change by Dong-hee Na : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue41440] os.cpu_count doesn't work on VxWorks RTOS

2020-08-06 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset 3405e0542839cde94df9833b3809710a67a33c7c by pxinwr in branch 'master': bpo-41440: add os.cpu_count() support for VxWorks RTOS (GH-21685) https://github.com/python/cpython/commit/3405e0542839cde94df9833b3809710a67a33c7c -- nosy: +corona10

[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-06 Thread Eryk Sun
Eryk Sun added the comment: > Does the same apply for time.monotonic? I would argue that the > difference in behavior between Linux/macOS and Windows is > unreasonable; given that time.monotonic exists for measuring time > intervals For time.monotonic in Windows, Python could switch to

[issue41493] Refactoring dictresize to accept only new keysize

2020-08-06 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue41493] Refactoring dictresize to accept only new keysize

2020-08-06 Thread Inada Naoki
Inada Naoki added the comment: New changeset d9323a8c6e07071a59dc4c910661db33236c01b2 by Inada Naoki in branch 'master': bpo-41493: Refactoring dictresize (GH-21751) https://github.com/python/cpython/commit/d9323a8c6e07071a59dc4c910661db33236c01b2 --

[issue41238] Python 3 shelve.DbfilenameShelf is generating 164 times larger files than Python 2.7 when storing dicts

2020-08-06 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: +Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41232] Python `functools.wraps` doesn't deal with defaults correctly

2020-08-06 Thread Caleb Donovick
Change by Caleb Donovick : -- nosy: +donovick ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41419] Path.mkdir and os.mkdir don't respect setgid if its parent is g-s

2020-08-06 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: +Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41458] Avoid overflow/underflow in math.prod()

2020-08-06 Thread Tim Peters
Tim Peters added the comment: I may well have misread the code, believing it can still allow spurious over/underflows. On second reading of the current file, I don't know - it's more complicated than I thought. If it does guarantee to prevent them, then I shift from -1 to (probably ) -0.

[issue41458] Avoid overflow/underflow in math.prod()

2020-08-06 Thread Tim Peters
Tim Peters added the comment: Cool! So looks like you could also address an accuracy (not out-of-range) thing the frexp() method also does as well as possible: loosen the definition of "underflow" to include losing bits to subnormal products. For example, with the inputs >>> xs = [1e-200,

[issue41458] Avoid overflow/underflow in math.prod()

2020-08-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: Variable name correction: - If "x" and "t" are on the opposite side + If "x" and "total" are on the opposite side Extreme points will successfully combine: >>> float_info.max * float_info.min 3.9996 --

[issue26791] shutil.move fails to move symlink (Invalid cross-device link)

2020-08-06 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- keywords: +patch pull_requests: +20904 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21759 ___ Python tracker

[issue41458] Avoid overflow/underflow in math.prod()

2020-08-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: The algorithm stops all spurious overflows and underflows. If favorable cancellations exist, it finds them. Algorithm in Words -- For every x in the sequence, multiply onto the total if possible. If x and "total" can't be combined

[issue41371] test_zoneinfo fails when lzma module is unavailable

2020-08-06 Thread miss-islington
miss-islington added the comment: New changeset 5f0769a7529fcbc28190864f098f192053a10747 by Nathan M in branch 'master': bpo-41371: Handle lzma lib import error in test_zoneinfo.py (GH-21734) https://github.com/python/cpython/commit/5f0769a7529fcbc28190864f098f192053a10747 -- nosy:

[issue41371] test_zoneinfo fails when lzma module is unavailable

2020-08-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +20903 pull_request: https://github.com/python/cpython/pull/21758 ___ Python tracker ___

[issue41497] Potential UnicodeDecodeError in dis

2020-08-06 Thread JIanqiu Tao
JIanqiu Tao added the comment: I searched the whole Lib folder and find a lot of code uses "open(filename, 'r')" without handling default encoding. Should we open another issue for these problem? -- ___ Python tracker

[issue41458] Avoid overflow/underflow in math.prod()

2020-08-06 Thread Tim Peters
Tim Peters added the comment: See "wisdom" earlier ;-) It's ad hoc trickery that seemingly can't be explained without showing the precise implementation in use today. As already mentioned, frexp() trickery _can_ be explained: exactly what you'd get if left-to-right HW multiplication were

[issue41498] Undefinied _Py_Sigset_Converter function when HAVE_SIGSET_T not set

2020-08-06 Thread Roman Yurchak
Change by Roman Yurchak : -- type: -> compile error ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41498] Undefinied _Py_Sigset_Converter function when HAVE_SIGSET_T not set

2020-08-06 Thread Roman Yurchak
New submission from Roman Yurchak : The `_Py_Sigset_Converter` function is conditionally defined in https://github.com/python/cpython/blob/777b611c8c5676b80898a429f71d28e59bddc49d/Modules/posixmodule.h#L27 if `ifdef HAVE_SIGSET_T` However this function is called unconditionally in

[issue41458] Avoid overflow/underflow in math.prod()

2020-08-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: I attached a file with latest (and more tested) recipe. The underflow test was fixed: "not total and old_total and x". Also, the final call to math.prod() was in-lined so that I could time it with PyPy. --

[issue41497] Potential UnicodeDecodeError in dis

2020-08-06 Thread JIanqiu Tao
Change by JIanqiu Tao : -- keywords: +patch pull_requests: +20902 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21757 ___ Python tracker ___

[issue41497] Potential UnicodeDecodeError in dis

2020-08-06 Thread JIanqiu Tao
New submission from JIanqiu Tao : A potential UnicodeDecodeError could be raised when run "python -m dis" on non-utf8 encoding environment. Assume there is a file named "a.py", and contains "print('喵')", then save with UTF8 encoding. Run "python -m dis ./a.py", on non-UTF8 encoding

[issue41458] Avoid overflow/underflow in math.prod()

2020-08-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, the occasions where this mattered all involved a mix of multiplications and divisions that mostly cancel out. The quadratic formula example is typical: product([4.0, a, c, 1.0/b, 1.0/b]. Or a floating point implementation of comb():

[issue41458] Avoid overflow/underflow in math.prod()

2020-08-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Uncle Timmy] > I'm skeptical of the need for - and wisdom of - this. Granted, the need is not common. On the other hand, if we can do it cheaply, why wouldn't we? Unnecessary overflow or underflow is never a desirable outcome. Currently, users do not

[issue41456] loop.run_in_executor creat thread but not destory it after the task run over

2020-08-06 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: -Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22107] tempfile module misinterprets access denied error on Windows

2020-08-06 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: -Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38119] resource tracker destroys shared memory segments when other processes should still have valid access

2020-08-06 Thread Damian Barabonkov
Damian Barabonkov added the comment: Agreed. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41478] Empty representation of AssertionError

2020-08-06 Thread Ilya Kamenshchikov
Ilya Kamenshchikov added the comment: Changing behavior and it's impact on existing code is, without a doubt, a big deal here. Maybe it's a reason not to do anything about it. Just to understand guiding design principle, what is expected from __str__ in more general case? I thought about it as

[issue38119] resource tracker destroys shared memory segments when other processes should still have valid access

2020-08-06 Thread Vinay Sharma
Vinay Sharma added the comment: Well, the chances of resource tracker dying abruptly are very less because it's thoroughly tested, and there are mechanisms to re-spawn resource_tracker process if you see the code. There is a function called `def ensure_running`. Resource tracker is still

[issue35805] email package folds msg-id identifiers using RFC2047 encoded words where it must not

2020-08-06 Thread Olivier Dony
Olivier Dony added the comment: Somehow the message identifiers in the code sample got messed up in previous comment, here's the actual code, for what it's worth ;-) https://gist.github.com/odony/0323eab303dad2077c1277076ecc3733 -- ___ Python

[issue38119] resource tracker destroys shared memory segments when other processes should still have valid access

2020-08-06 Thread Damian Barabonkov
Damian Barabonkov added the comment: Unless the resource_tracker also dies along with the process. In which case, I'm not sure what there is there to do. I believe the resource_tracker actually spawns a process alongside the process that uses it. So if the parent process seg-faults, the

[issue35805] email package folds msg-id identifiers using RFC2047 encoded words where it must not

2020-08-06 Thread Olivier Dony
Olivier Dony added the comment: Further, under Python 3.8 the issue is not fully solved, as other identification headers are still being folded in a non-RFC-conformant manner (see OP for RFC references). This was indicated on the original PR by the author:

[issue35805] email package folds msg-id identifiers using RFC2047 encoded words where it must not

2020-08-06 Thread Olivier Dony
Olivier Dony added the comment: With regard to msg349895, is there any chance this fix could be considered for backport? I imagine you could view it as a new feature, but it seems to be the only official fix we have for the fact that Python 3 generates invalid SMTP messages. And that's not

[issue38119] resource tracker destroys shared memory segments when other processes should still have valid access

2020-08-06 Thread Vinay Sharma
Vinay Sharma added the comment: That's a valid point Guido. But, I guess this can be easily handled by resource tracker. At this current moment resource tracker unlinks shared memory if the process which created it dies without unliking it. Therefore, resource tracker handles cleaning up

[issue41473] test_gdb fails on AMD64 Fedora Rawhide 3.x

2020-08-06 Thread STINNER Victor
STINNER Victor added the comment: I reported https://bugzilla.redhat.com/show_bug.cgi?id=1866884 to gdb: "Arch64: sometimes, gdb fails to load symbols of a dynamic library with a pending breakpoint". -- ___ Python tracker

[issue41473] test_gdb fails on AMD64 Fedora Rawhide 3.x

2020-08-06 Thread STINNER Victor
STINNER Victor added the comment: More logs on the AArch64 issue. It seems like *sometimes*, gdb fails to parse debug symbols of _testcapi.cpython-310d-aarch64-linux-gnu.so, whereas most of the time, "bt" shows symbols as expected. stdout+stderr when the bug happens.

[issue41458] Avoid overflow/underflow in math.prod()

2020-08-06 Thread Raymond Hettinger
Change by Raymond Hettinger : Added file: https://bugs.python.org/file49373/sum_and_prod.py ___ Python tracker ___ ___ Python-bugs-list

[issue41492] Fix signing description for Windows release builds

2020-08-06 Thread miss-islington
miss-islington added the comment: New changeset 1437bb06a9cfbf7dd2d2aa14f6a784bb020bdb84 by Miss Islington (bot) in branch '3.9': bpo-41492: Fixes the description appearing in UAC prompts on Windows (GH-21754) https://github.com/python/cpython/commit/1437bb06a9cfbf7dd2d2aa14f6a784bb020bdb84

[issue41492] Fix signing description for Windows release builds

2020-08-06 Thread miss-islington
miss-islington added the comment: New changeset 713ba03276c4ddc33c9debc51b03164ea18eead6 by Miss Islington (bot) in branch '3.8': bpo-41492: Fixes the description appearing in UAC prompts on Windows (GH-21754) https://github.com/python/cpython/commit/713ba03276c4ddc33c9debc51b03164ea18eead6

[issue41473] test_gdb fails on AMD64 Fedora Rawhide 3.x

2020-08-06 Thread STINNER Victor
STINNER Victor added the comment: I looked at the aarch64 failure on Fedora Rawhide using GCC and the master branch. When I run "./python -m test -v test_gdb -m test_pycfunction" multiple times, I get a different error at each run, and sometimes the test pass, whereas nothing changes

[issue41492] Fix signing description for Windows release builds

2020-08-06 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +20900 pull_request: https://github.com/python/cpython/pull/21755 ___ Python tracker

[issue41492] Fix signing description for Windows release builds

2020-08-06 Thread Steve Dower
Steve Dower added the comment: New changeset 777b611c8c5676b80898a429f71d28e59bddc49d by Steve Dower in branch 'master': bpo-41492: Fixes the description appearing in UAC prompts on Windows (GH-21754) https://github.com/python/cpython/commit/777b611c8c5676b80898a429f71d28e59bddc49d

[issue41492] Fix signing description for Windows release builds

2020-08-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +20901 pull_request: https://github.com/python/cpython/pull/21756 ___ Python tracker ___

[issue38119] resource tracker destroys shared memory segments when other processes should still have valid access

2020-08-06 Thread Guido van Rossum
Guido van Rossum added the comment: I recommend bringing this new proposal up on python-dev or python-ideas, to get more eyeballs on the ideas before attempting implementation. One immediate worry I have is that if the reference counter is maintained in the shared memory segment, every

[issue41458] Avoid overflow/underflow in math.prod()

2020-08-06 Thread Tim Peters
Tim Peters added the comment: I'm skeptical of the need for - and wisdom of - this. Where does it come up? I can't think of any context where this would have been useful, or of any other language or package that does something like this. Long chains of mults are unusual outside of integer

[issue41304] [CVE-2020-15801] python 38 embed ignore python38._pth file on windows

2020-08-06 Thread Steve Dower
Steve Dower added the comment: Yes, it only affects Windows OS. On all other platforms, the python38._pth file is _always_ ignored. We have not implemented this support for those platforms. -- ___ Python tracker

[issue41492] Fix signing description for Windows release builds

2020-08-06 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +20899 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21754 ___ Python tracker

[issue41478] Empty representation of AssertionError

2020-08-06 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > That's a solution, except you must know ahead of time this issue exists. If we changed str(e) to make it the same as repr(e), there would be no way to get only the message. str(e) returns the message so if the message given was empty (or no message was

[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-06 Thread Rishav Kundu
Rishav Kundu added the comment: > perf_counter behavior during system suspend is undefined Does the same apply for time.monotonic? I would argue that the difference in behavior between Linux/macOS and Windows is unreasonable; given that time.monotonic exists for measuring time intervals

[issue38119] resource tracker destroys shared memory segments when other processes should still have valid access

2020-08-06 Thread Damian Barabonkov
Damian Barabonkov added the comment: As per Guido's comment (https://github.com/python/cpython/pull/21516#issuecomment-668110711), I'm going to use this space to discuss ways to go forward with resource tracking and SharedMemory. Taking inspiration from Vinay

[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-06 Thread Rishav Kundu
Rishav Kundu added the comment: [1]: https://docs.python.org/3.8/library/time.html#time.clock_gettime [2]: https://developer.apple.com/documentation/kernel/1646199-mach_continuous_time effectively uses CLOCK_MONOTONIC_RAW on macOS. -- ___ Python

[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-06 Thread STINNER Victor
STINNER Victor added the comment: > While I agree that the behavior of perf_counter should be consistent across > macOS/Linux and Windows wrt system suspend, perf_counter behavior during system suspend is undefined. -- ___ Python tracker

[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-06 Thread Rishav Kundu
Rishav Kundu added the comment: While I agree that the behavior of perf_counter should be consistent across macOS/Linux and Windows wrt system suspend, you can already access those clocks by using time.clock_gettime [1] with appropriate clock IDs (CLOCK_MONOTONIC_RAW on macOS and

[issue41496] Create public API for typing._eval_type

2020-08-06 Thread Dominik V.
Change by Dominik V. : -- keywords: +patch pull_requests: +20898 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21753 ___ Python tracker ___

[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-06 Thread nooB
nooB added the comment: > perf_counter documentation says "It does include time elapsed during sleep > and is system-wide." where "sleep" here means time.sleep() Apologies for misinterpreting the documentation. A clock function that includes system suspend time can be useful. Consider this

[issue22107] tempfile module misinterprets access denied error on Windows

2020-08-06 Thread Václav Dvořák
Change by Václav Dvořák : -- nosy: +Václav Dvořák ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41478] Empty representation of AssertionError

2020-08-06 Thread Ilya Kamenshchikov
Ilya Kamenshchikov added the comment: That's a solution, except you must know ahead of time this issue exists. Best Regards, -- Ilya Kamen On Tue, Aug 4, 2020 at 6:59 PM Rémi Lapeyre wrote: > > Rémi Lapeyre added the comment: > > Hi, can you not use its repr: > > > >>> try: raise

[issue41496] Create public API for typing._eval_type

2020-08-06 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +gvanrossum, levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41496] Create public API for typing._eval_type

2020-08-06 Thread Dominik V.
New submission from Dominik V. : In this [python-ideas thread](https://mail.python.org/archives/list/python-id...@python.org/thread/T6K4DWENPM7LYXSDVYQYDVFEVBMA5K3L/) it was suggested to create a public API for `typing._eval_type` in order to be able to create custom versions of

[issue41495] SPAM

2020-08-06 Thread Steven D'Aprano
Change by Steven D'Aprano : -- resolution: -> not a bug stage: -> resolved status: open -> closed title: Technical advise -> SPAM ___ Python tracker ___

[issue41495] Technical advise

2020-08-06 Thread Steven D'Aprano
Change by Steven D'Aprano : -- Removed message: https://bugs.python.org/msg374932 ___ Python tracker ___ ___ Python-bugs-list

[issue41495] Technical advise

2020-08-06 Thread john mathew
New submission from john mathew : We provide Technical Help to our users by a diagnosis of their computer and other devices. And if there is an issue to be solved, we give out the solution. This helps the user to avoid any existing issues. http://tplinklogins.com

[issue41494] Add window resizing support [ SIGWINCH ] to Lib/pty

2020-08-06 Thread Soumendra Ganguly
Change by Soumendra Ganguly : -- pull_requests: +20896 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21752 ___ Python tracker ___

[issue37625] Class variable is still accessible after class instance has been overwritten out

2020-08-06 Thread Eric V. Smith
Change by Eric V. Smith : -- Removed message: https://bugs.python.org/msg374930 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue40275] test.support has way too many imports

2020-08-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset 79bb2c93f2d81702fdf1f93720369e18a76b7d1a by Hai Shi in branch 'master': bpo-40275: Use new test.support helper submodules in tests (GH-21743) https://github.com/python/cpython/commit/79bb2c93f2d81702fdf1f93720369e18a76b7d1a --

[issue37625] Class variable is still accessible after class instance has been overwritten out

2020-08-06 Thread john mathew
john mathew added the comment: I am Grateful that you shared this informational post. Your website has everything that I have been looking for so long. Your knowledge about this topic is quite impressive. I am amazed by the content you shared on this website. I am John Mathew a technical

[issue41458] Avoid overflow/underflow in math.prod()

2020-08-06 Thread Mark Dickinson
Mark Dickinson added the comment: Whoops. There's a missing `count += 1` in there, of course. -- ___ Python tracker ___ ___

[issue41458] Avoid overflow/underflow in math.prod()

2020-08-06 Thread Mark Dickinson
Mark Dickinson added the comment: Here's code to illustrate the idea. It doesn't yet handle zeros, infinities or nans; that support would need to be added. import math def fprod(numbers): # Product of numbers, avoiding intermediate underflow and overflow. # Does not handle zeros,

[issue40275] test.support has way too many imports

2020-08-06 Thread hai shi
Change by hai shi : -- pull_requests: +20895 pull_request: https://github.com/python/cpython/pull/21743 ___ Python tracker ___ ___

[issue41458] Avoid overflow/underflow in math.prod()

2020-08-06 Thread Mark Dickinson
Mark Dickinson added the comment: If we want to do this (and I'm still not convinced that we do), I think there's a simpler way: use `frexp` to decompose each float into a fraction and an exponent, multiply the fractions (which barring zeros will all be in [0.5, 1.0)), and keep track of the

[issue41494] Add window resizing support [ SIGWINCH ] to Lib/pty

2020-08-06 Thread Soumendra Ganguly
New submission from Soumendra Ganguly : This was tested using Python 3.7 after commenting out the sys.audit lines. https://docs.python.org/3/library/pty.html presents us with an example usage of pty.spawn. This example mimics script(1). However, the script(1) from util-linux has fantastic

[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-06 Thread Ronald Oussoren
Ronald Oussoren added the comment: mach_absolute_time returns time in ticks, there's a separate API that returns the resolution of this clock (which is already used). The manpage explicitly says that mach_absolute_time and CLOCK_UPTIME_RAW are the same clock: CLOCK_UPTIME_RAW clock

[issue41273] asyncio: proactor read transport: use recv_into instead of recv

2020-08-06 Thread STINNER Victor
STINNER Victor added the comment: Tony: "asyncio: proactor read transport: use recv_into instead of recv" seems to be implemented, but PR 21446 "bpo-41279: Add StreamReaderBufferedProtocol" is a new feature. I suggest to open a new issue for this feature, and close this one. --

[issue41303] perf_counter result does not count system sleep time in Mac OS

2020-08-06 Thread STINNER Victor
STINNER Victor added the comment: > On macOS CLOCK_UPTIME_RAW is the same as mach_absolute_time (according to the > manpage). https://developer.apple.com/documentation/kernel/1462446-mach_absolute_time says: "mach_absolute_time: Returns current value of a clock that increments

[issue41465] io.TextIOWrapper.errors not writable

2020-08-06 Thread Walter Dörwald
Walter Dörwald added the comment: I guess that is good enough. "Being changeable" does not necessarily mean mean "being changeable via attribute assignment". Thanks for your research. Closing the issue as "not a bug". -- resolution: -> not a bug stage: -> resolved status: open ->

[issue41458] Avoid overflow/underflow in math.prod()

2020-08-06 Thread Vedran Čačić
Vedran Čačić added the comment: > s.append(x) if side == s_side else t.append(x) To me, (s if side == s_side else t).append(x) seems much better. Not only more is factored, but .append is viewed as a procedure (returning None, changing its object), and if-expression is really used for its

[issue41456] loop.run_in_executor creat thread but not destory it after the task run over

2020-08-06 Thread KevinGuo
Change by KevinGuo : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41493] Refactoring dictresize to accept only new keysize

2020-08-06 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +20894 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21751 ___ Python tracker ___

[issue41456] loop.run_in_executor creat thread but not destory it after the task run over

2020-08-06 Thread KevinGuo
KevinGuo added the comment: OK, thanks for your reply -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41493] Refactoring dictresize to accept only new keysize

2020-08-06 Thread Inada Naoki
New submission from Inada Naoki : dictresize accept `minsize` and calculate `newsize` which is `newsize >= minsize`. Some caller pass the exact dk_size so calculating `newsize` is not necessary. Split calculating `newsize` from `minused` into new function. Additonally, use _Py_bit_length for

[issue26791] shutil.move fails to move symlink (Invalid cross-device link)

2020-08-06 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- versions: +Python 3.10, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___ ___

[issue41491] plistlib can't load macOS BigSur system LaunchAgent

2020-08-06 Thread Ronald Oussoren
Ronald Oussoren added the comment: Please also report this at apple using the feedback assistent. -- ___ Python tracker ___ ___

[issue41456] loop.run_in_executor creat thread but not destory it after the task run over

2020-08-06 Thread Ronald Oussoren
Ronald Oussoren added the comment: This is expected behaviour. Run_in_executor uses a concurrent.futures.ThreadPoolExecutor to manage the worker threads. Those threads will get reused when more work is scheduled, and will exit when the runloop is shut down. -- nosy: +ronaldoussoren

[issue26791] shutil.move fails to move symlink (Invalid cross-device link)

2020-08-06 Thread Jeffrey Kintscher
Jeffrey Kintscher added the comment: SilentGhost's analysis is correct. The provided example code causes the error because it is trying to move the symlink into its target when the target is a directory. Any cross-device moving issues are unrelated to this example code. Here is the