[issue41774] While removing element from list using for and remove(), which has same items output is not right

2020-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I like the simple ad easy 'slice replacement = iterator' form > because it illustrates to me that we have done something > right with Python's design. I understand that you like it and that it reflects the way you think the world should work, , but

[issue41860] random.choices() raises "int too large" error while random.randint does not

2020-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: This is a known limitation and there isn't much we can do about it. The root cause is that for performance reasons the len() function doesn't handle sizes larger than a C ssize_t: >>> len(range(2**100)) Traceback (most recent call last): ...

[issue41774] While removing element from list using for and remove(), which has same items output is not right

2020-09-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Raymond, please take what I have written and rewrite it to your satisfaction. I have lots else to do, including investigating the IDLE bug you just reported. -- assignee: terry.reedy -> ___ Python tracker

[issue33867] Module dicts are wiped on module garbage collection

2020-09-25 Thread Irit Katriel
Irit Katriel added the comment: I also can't reproduce it on a later version. If this is a 2.7/3.6 only problem, should the issue be closed? -- nosy: +iritkatriel ___ Python tracker

[issue40813] Line number of SyntaxError

2020-09-25 Thread Irit Katriel
Change by Irit Katriel : -- title: Output SyntaxError is not defective -> Line number of SyntaxError ___ Python tracker ___ ___

[issue41860] random.choices() raises "int too large" error while random.randint does not

2020-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is virtually a duplicate of issue40388. -- nosy: +mark.dickinson, rhettinger, serhiy.storchaka ___ Python tracker ___

[issue41826] test_peg_generator compilation warnings

2020-09-25 Thread Skip Montanaro
Skip Montanaro added the comment: Possible patch. All this does is add some C casts. @pablogsal suggested there was more to be done, but my glance at the reference he gave suggested that's already been done. My apologies if I misinterpreted his reference. -- keywords: +patch Added

[issue41862] can not open file in system folder

2020-09-25 Thread Christopher Reilly
New submission from Christopher Reilly : I am trying to load a Windows dll "ibfs64.dll" located in the C:\Windows\System32 folder: ctypes.windll.LoadLibrary('ibfs64.dll') When I attempt this call with Python 3.8.5 downloaded from python.org, the call fails with > FileNotFoundError:

[issue41797] PyModule_GetState doesn't work with LazyLoader

2020-09-25 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2020-09-25 Thread Mark Shannon
Mark Shannon added the comment: New changeset 02d126aa09d96d03dcf9c5b51c858ce5ef386601 by Mark Shannon in branch 'master': bpo-39934: Account for control blocks in 'except' in compiler. (GH-22395) https://github.com/python/cpython/commit/02d126aa09d96d03dcf9c5b51c858ce5ef386601 --

[issue41861] Convert sqlite3 to PEP 384

2020-09-25 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : https://www.python.org/dev/peps/pep-0384/ -- components: Library (Lib) messages: 377488 nosy: erlendaasland priority: normal severity: normal status: open title: Convert sqlite3 to PEP 384 ___ Python

[issue41861] Convert sqlite3 to PEP 384

2020-09-25 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +berker.peksag, ghaering ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41861] Convert sqlite3 to PEP 384

2020-09-25 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +21448 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22409 ___ Python tracker

[issue41862] can not open file in system folder

2020-09-25 Thread Eryk Sun
Eryk Sun added the comment: > File "c:\users\chris\appdata\local\programs\python\python38-32 > \lib\runpy.py", line 194, in _run_module_as_main You have to use 64-bit Python in order to load a 64-bit DLL from the native "%SystemRoot%\System32" directory. The fact that the installation

[issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch

2020-09-25 Thread Bug Reporter
Bug Reporter added the comment: Please note that test_ssl also passes if /etc/ssl/openssl.conf is modified per msg376705 by Vladyslav Bondar (with /usr/lib/x86_64-linux-gnu/libssl.so.1.1) -- ___ Python tracker

[issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch

2020-09-25 Thread Bug Reporter
Bug Reporter added the comment: I downloaded Ubuntu's openssl_1.1.1f.orig.tar.gz and openssl_1.1.1f-1ubuntu2.debian.tar.xz from https://launchpad.net/ubuntu/+source/openssl/1.1.1f-1ubuntu2, but I did not know how to apply patches. In addition, too many files differ, so I could not

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-25 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +21451 pull_request: https://github.com/python/cpython/pull/22415 ___ Python tracker ___

[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2020-09-25 Thread Jakub Kulik
Jakub Kulik added the comment: We internally tested the most recent PR and found some issues with it: https://github.com/python/cpython/pull/21457#issuecomment-698845895 We ended up using a much simpler patch, which seems to work as expected. --- Python-3.7.8/Lib/cgi.py +++

[issue40871] threading.Event.wait_unset()

2020-09-25 Thread Fabio Manganiello
Fabio Manganiello added the comment: +1 I have similar applications (both using multithreading and multiprocessing) which rely upon waiting for events to be both set and unset. Some example common pattern: ``` from multithreading import Thread, Event, Queue import time q = Queue() reading

[issue33867] Module dicts are wiped on module garbage collection

2020-09-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue41863] IDLE shell not opening

2020-09-25 Thread Gagandeep Longia
New submission from Gagandeep Longia : I downloaded Python 3.5 and tried opening the IDLE shell. Each time I do it, it says "The application "IDLE" can't be opened." Any help? My Mac OS X is 10.14.6 Mojave -- components: macOS messages: 377496 nosy: glongia18, ned.deily,

[issue41859] Uncaught ValueError

2020-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: > What python binary? This is from the 64-bit macOS build on python.org: $ python3.9 Python 3.9.0rc2 (v3.9.0rc2:2bd31b5fde, Sep 16 2020, 20:19:18) [Clang 6.0 (clang-600.0.57)] on darwin Thanks for looking into this :-) Let me know if filing

[issue35765] Document references object x but doesn't show it in the example

2020-09-25 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 3.0 -> 4.0 pull_requests: +21449 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22411 ___ Python tracker

[issue40066] Enum._convert should change __repr__ and/or __str__ to use module name instead of class name

2020-09-25 Thread Ethan Furman
Ethan Furman added the comment: At this point, the PR has made the following changes: - normal Enums - repr() -> "classname.membername" - str() -> "membername" - stdlib Enums available as module attributes (RegexFlag, AddressFamily, etc.) - repr() -> "modulename.membername" - str()

[issue41774] While removing element from list using for and remove(), which has same items output is not right

2020-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry for the wording of the last message. Go ahead with whatever you would like do :-) Was only trying to point-out that the generator semantics don't interact nicely with slice assignments: $ python3.9 -m timeit -s 'a=list(range(1000))' 'b=a[:]'

[issue41863] IDLE shell not opening

2020-09-25 Thread Ned Deily
Change by Ned Deily : -- assignee: -> terry.reedy components: +IDLE nosy: +terry.reedy ___ Python tracker ___ ___ Python-bugs-list

[issue41863] IDLE shell not opening

2020-09-25 Thread Ned Deily
Ned Deily added the comment: Python 3.5 is very old; the last macOS installers from python.org for it were released over 3 years ago and the 3.5 release series has reached end-of-life. Is there a reason you can't use a current version of Python? 3.8.6 is now current. Since Python 3.5.4,

[issue11305] TextIOWrapper.readline and str.splitlines have different behavior

2020-09-25 Thread Irit Katriel
Irit Katriel added the comment: I think this documentation enhancement was done under issue36642 (PR 12855). -- nosy: +iritkatriel ___ Python tracker ___

[issue11305] TextIOWrapper.readline and str.splitlines have different behavior

2020-09-25 Thread Irit Katriel
Irit Katriel added the comment: Sorry, I copied the wrong numbers. The doc change is here: https://github.com/python/cpython/commit/8218bd4caf683ee98c450a093bf171dbca6c4849 -- ___ Python tracker

[issue39107] Upgrade tcl/tk to 8.6.10 (Windows and maxOS)

2020-09-25 Thread Steve Dower
Steve Dower added the comment: > PR branches on the main repository are discouraged. I had another reason, which was that I needed to trigger a signed build of the separate Tcl and Tk binaries. This is much easier (and safer) to do from the main repo than my own fork. But yeah, in general

[issue41863] IDLE shell not opening

2020-09-25 Thread GJL
GJL added the comment: Hey Ned, I'm using 3.5 in accordance with what "Introduction to Computation and Programming Using Python|With Application to Understanding Data" Should I just uninstall 3.5 and opt to use 3.8.6? -- ___ Python tracker

[issue41863] IDLE shell not opening

2020-09-25 Thread GJL
GJL added the comment: Thank you very much! I will uninstall soon and download 3.8.6 -- if anything comes up then I'll let you know fosho -- ___ Python tracker ___

[issue41863] IDLE shell not opening with 3.5 on Mac Mohave.

2020-09-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: To try to run IDLE with 8.5, one should install tcl/tk 8.5.18 as described at https://www.python.org/download/mac/tcltk/. This requires making a free Active State account and is not at all guaranteed to be sufficient. Today I installed 3.8.6 and 3.9.0rc2

[issue41863] IDLE shell not opening

2020-09-25 Thread Ned Deily
Ned Deily added the comment: Ah! I've never looked at the book or the MIT course materials. I see that an update to the book is planned for next year and that 3.5 would have been current when the current edition of the book was published. Generally, changes between recent Python feature

[issue41826] test_peg_generator compilation warnings

2020-09-25 Thread Skip Montanaro
Change by Skip Montanaro : -- pull_requests: +21450 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22412 ___ Python tracker ___

[issue41826] test_peg_generator compilation warnings

2020-09-25 Thread Skip Montanaro
Skip Montanaro added the comment: I created a PR from my patch, but it includes all the merges to my smontanaro/cpython master branch from python/cpython. I thought I was following the instructions properly (https://devguide.python.org/gitbootcamp/#creating-a-pull-request), but I guess I'm

[issue29940] Add follow_wrapped=True option to help()

2020-09-25 Thread Tal Einat
Tal Einat added the comment: To clarify, to my understanding the issue here is that when using a class as a decorator, and copying the wrapped function's __doc__ to self.__doc__ in __init__, help() will pick up the wrapper class's __doc__ rather than the instance's __doc__. For example:

[issue39107] Upgrade tcl/tk to 8.6.10 (Windows and maxOS)

2020-09-25 Thread Ned Deily
Ned Deily added the comment: The ScaleTest failure is the subject of Issue41306 and PR 21715. -- ___ Python tracker ___ ___

[issue41306] test_tk test_widgets.ScaleTest fails with Tk 8.6.10

2020-09-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Fixing this test bug is required to upgrade tk on Windows. #39107 and PR 22405. E. Paine reported on the PR 21715 that this change is intentional and here to stay. I wondered the same; thank you for asking. -- nosy: +terry.reedy

[issue30953] Fatal python error when jumping into except clause

2020-09-25 Thread Irit Katriel
Irit Katriel added the comment: This seems resolved. -- nosy: +iritkatriel ___ Python tracker ___ ___ Python-bugs-list mailing

[issue41813] Clarify specification of object.__await__

2020-09-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- components: +asyncio nosy: +asvetlov, yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing

[issue41812] Broken link on documentation header

2020-09-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +mdk versions: -Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue41822] Document the meaning of values for sys.float_info.rounds

2020-09-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: Document the mean of values for sys.float_info.rounds -> Document the meaning of values for sys.float_info.rounds versions: +Python 3.10 ___ Python tracker

[issue41848] PEG parser doesn't allow lambda in for_if_clause

2020-09-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: After adding parens, >>> [x for x in [] if (lambda: x)] [] -- nosy: +terry.reedy ___ Python tracker ___

[issue41858] Fix incomplete line on optparse documentation

2020-09-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: I can see how the current phrasing gives one pause, and might seem incomplete, but it is not incorrect. The sense of Additionally, users can run one of :: -h --help and optparse will ... is "Additionally, users can run one of `` -h`` or ``

[issue29940] Add follow_wrapped=True option to help()

2020-09-25 Thread Emmanuel Arias
Emmanuel Arias added the comment: Hi @taleinat, Seems tha the wrapped func already has the __doc__ (in this case) copied. following your example: >>> double >>> double.__doc__ 'A function' so help(double) will print correctly the double doc. --

[issue41848] PEG parser doesn't allow lambda in for_if_clause

2020-09-25 Thread Guido van Rossum
Guido van Rossum added the comment: I propose not to fix this, since it is pointless (a lambda is always truthy). We can call it out in What's New in 3.9 -- as a very small footnote. :-) -- ___ Python tracker

[issue39326] Python-3.8.1 "test_importlib" failed

2020-09-25 Thread Vinícius Viana W .
Vinícius Viana W. added the comment: I had this issue too, but in Python-3.8.6. I did what @Darryl Hall Jr suggested. But in my case, I just needed to ran 'sudo apt-get install zlib1g-dev', and then, I ran 'sudo make testall', and I got: 'Tests result: SUCCESS'! Thank you -- nosy: