[issue44689] ctypes.util.find_library() does not find macOS 11+ system libraries when built on older macOS systems

2021-09-01 Thread Ned Deily
Ned Deily added the comment: I don't think we have ever claimed to support building on an older system with a newer SDK, as in building on 10.15 with an 11 SDK. I am sure there have been problems with trying to do this in the past for some releases. It *may* work but there are no

[issue45080] functools._HashedSeq implements __hash__ but not __eq__

2021-09-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 1. self.hashvalue == other.hashvalue is not enough. Different tuples can have the same hash value, so you steel need to compare their context. 2. _HashedSeq is only used as a key in a dictionary. When you look up a key in dictionary, it compares hashes

[issue45056] compiler: Unnecessary None in co_consts

2021-09-01 Thread Inada Naoki
Change by Inada Naoki : Added file: https://bugs.python.org/file50255/unused_trimmed.txt ___ Python tracker ___ ___ Python-bugs-list

[issue45056] compiler: Unnecessary None in co_consts

2021-09-01 Thread Inada Naoki
Change by Inada Naoki : Added file: https://bugs.python.org/file50254/unused_310rc1.txt ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45056] compiler: Unnecessary None in co_consts

2021-09-01 Thread Inada Naoki
Change by Inada Naoki : Added file: https://bugs.python.org/file50253/unused_39.txt ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45056] compiler: Unnecessary None in co_consts

2021-09-01 Thread Inada Naoki
Change by Inada Naoki : Added file: https://bugs.python.org/file50252/dump_unused_consts.py ___ Python tracker ___ ___ Python-bugs-list

[issue44689] ctypes.util.find_library() does not find macOS 11+ system libraries when built on older macOS systems

2021-09-01 Thread Gregory Szorc
Gregory Szorc added the comment: I spoke too soon: you can reproduce this with CPython's build system and I think this is a legit regression. I think the function sniffing logic is subtly wrong. Here is the logic as written: #ifdef __APPLE__ #ifdef HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH

[issue44689] ctypes.util.find_library() does not find macOS 11+ system libraries when built on older macOS systems

2021-09-01 Thread Gregory Szorc
Gregory Szorc added the comment: Oh, this might be my custom Modules file not passing the HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH define properly. I suspect I was working around this bug before by disabling the dyld bits. Sorry for the noise! (I should have reproduced with CPython's build

[issue45067] Failed to build _curses on CentOS 7

2021-09-01 Thread Senthil Kumaran
Senthil Kumaran added the comment: Here is the output of make with relevant lines. CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-DNDEBUG -g -fwrapv -O3 -Wall' _TCLTK_INCLUDES='' _TCLTK_LIBS='' ./python -E ./setup.py build running build running build_ext building

[issue45078] test_importlib: test_read_bytes() fails on AMD64 Windows8.1 Non-Debug 3.x

2021-09-01 Thread Jason R. Coombs
Jason R. Coombs added the comment: I'm not confident that I can get the message to the buildbot, so I sent a message to python-buildb...@python.org requesting to run the workaround on the buildbot. The message was flagged for moderation. My hope is that eventually goes through and will

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2021-09-01 Thread Guido van Rossum
Guido van Rossum added the comment: We can add to the 3.10 docs that it is deprecated without any code change. And in 3.11 we can add a warning. -- ___ Python tracker ___

[issue45078] test_importlib: test_read_bytes() fails on AMD64 Windows8.1 Non-Debug 3.x

2021-09-01 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've submitted a PR that deletes the file and requested it be built by the buildbots, but I also see that that bot hasn't built anything in 7 days (https://buildbot.python.org/all/#/builders/405), so I'm not hopeful my request for it to build that change

[issue45078] test_importlib: test_read_bytes() fails on AMD64 Windows8.1 Non-Debug 3.x

2021-09-01 Thread Jason R. Coombs
Change by Jason R. Coombs : -- keywords: +patch pull_requests: +26561 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28120 ___ Python tracker ___

[issue45078] test_importlib: test_read_bytes() fails on AMD64 Windows8.1 Non-Debug 3.x

2021-09-01 Thread Jason R. Coombs
Jason R. Coombs added the comment: I'm going to attempt that technique again and see if it's sufficient to bypass the symptom. -- ___ Python tracker ___

[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: > docutils is already fixed in the development version. I requested a release: > https://sourceforge.net/p/docutils/bugs/364/ At 2019-07-22, Günter Milde wrote: "Docutils 0.15 is released" (with the fix). The latest docutils version is 0.17.1. --

[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: > This breaks Samba's build: > https://bugzilla.samba.org/show_bug.cgi?id=14266 Samba has been updated in the meanwhile, buildtools/wafsamba/samba_utils.py: -function_code = node.read('rU', None) +function_code =

[issue45078] test_importlib: test_read_bytes() fails on AMD64 Windows8.1 Non-Debug 3.x

2021-09-01 Thread Jason R. Coombs
Jason R. Coombs added the comment: There is an issue where that file originally got EOL conversions, so all Windows buildbots were failing (issue44779). I'd thought we'd worked around the issue by pushing out a PR that deleted the file and ensuring it ran on the buildbots

[issue45083] Need to use the exception class qualname when rendering exception (in C code)

2021-09-01 Thread Irit Katriel
Irit Katriel added the comment: I've reproduced this on 3.9 and 3.10 as well. -- versions: +Python 3.10, Python 3.9 ___ Python tracker ___

[issue45083] Need to use the exception class qualname when rendering exception (in C code)

2021-09-01 Thread Irit Katriel
Change by Irit Katriel : -- title: Incorrect exception output in C -> Need to use the exception class qualname when rendering exception (in C code) ___ Python tracker ___

[issue45083] Incorrect exception output in C

2021-09-01 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +26560 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28119 ___ Python tracker ___

[issue45081] dataclasses that inherit from Protocol subclasses have wrong __init__

2021-09-01 Thread Edgar Ramírez
Change by Edgar Ramírez : -- nosy: +edgarrmondragon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: Guido: How come the deprecation didn't happen in 3.10? Were people just not interested? Well, if nobody deprecates it, it's not deprecated. It is simple as it it :-) IMO it's ok to only deprecate it in Python 3.11, unless Pablo *really* wants to deprecate

[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue. I created PR 28118 to try again to remove the "U" mode in Python 3.11. -- resolution: fixed -> status: closed -> open versions: +Python 3.11 -Python 3.9 ___ Python tracker

[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2021-09-01 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +26559 pull_request: https://github.com/python/cpython/pull/28118 ___ Python tracker ___

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2021-09-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: I think we just forgot to make the change in time. 3.11 is fine. We're not _maintaining_ lib2to3 or describing it as fit for any modern purpose regardless. It's just code that'll sit around in the back of the 3.10 stdlib but not be able to parse the

[issue45085] Remove the binhex module, binhex4 and hexbin4 standards

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: In bpo-39353, Serhiy Storchaka proposed: "But it would be nice to create a separate package on PyPI that provides such functionality before removing it from the stdlib." The purpose of the PEP 594 is to reduce the Python maintenance burden. Publishing a

[issue45085] Remove the binhex module, binhex4 and hexbin4 standards

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: The binhex module was deprecated in Python 3.9 by bpo-39353 (commit beea26b57e8c80f1eff0f967a0f9d083a7dc3d66). I have been asked there to keep binascii.crc_hqx() (not deprecated it). -- ___ Python tracker

[issue45085] Remove the binhex module, binhex4 and hexbin4 standards

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: See also the PEP 594: Removing dead batteries from the standard library https://www.python.org/dev/peps/pep-0594/ -- ___ Python tracker ___

[issue45085] Remove the binhex module, binhex4 and hexbin4 standards

2021-09-01 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +26558 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28117 ___ Python tracker ___

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2021-09-01 Thread Guido van Rossum
Guido van Rossum added the comment: How come the deprecation didn't happen in 3.10? Were people just not interested? -- ___ Python tracker ___

[issue45081] dataclasses that inherit from Protocol subclasses have wrong __init__

2021-09-01 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45085] Remove the binhex module, binhex4 and hexbin4 standards

2021-09-01 Thread STINNER Victor
New submission from STINNER Victor : The binhex module was deprecated in Python 3.9 by bpo-39353 (commit beea26b57e8c80f1eff0f967a0f9d083a7dc3d66). I propose to remove it: see attached PR. The PR also removes the following binascii functions, also deprecated in Python 3.9: * a2b_hqx(),

[issue39353] Deprecate the binhex module, binhex4 and hexbin4 standards

2021-09-01 Thread STINNER Victor
Change by STINNER Victor : -- title: Deprecate the binhex module -> Deprecate the binhex module, binhex4 and hexbin4 standards ___ Python tracker ___

[issue39353] Deprecate the binhex module

2021-09-01 Thread STINNER Victor
Change by STINNER Victor : -- title: Deprecate the binhex module, binhex4 and hexbin4 standards -> Deprecate the binhex module ___ Python tracker ___

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: I retarget this issue to Python 3.11, since lib2to3 is *not* deprecated in Python 3.10. -- versions: +Python 3.11 -Python 3.10 ___ Python tracker

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: I created PR 28116 to deprecate the lib2to3 package: replace PendingDeprecationWarning to DeprecationWarning. In 2021, I don't think that we should keep the 2to3 tool in the stdlib. Python 2 reached end of line 1 year ago. For the lib2to3 *parser*, IMO it

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2021-09-01 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner nosy_count: 11.0 -> 12.0 pull_requests: +26557 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28116 ___ Python tracker

[issue27485] urllib.splitport -- is it official or not?

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: Follow-up: I created bpo-45084 to remove these undocumented and deprecated functions in Python 3.11. -- nosy: +vstinner ___ Python tracker

[issue45084] urllib.parse: remove deprecated functions (splittype, to_bytes, etc.)

2021-09-01 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +26556 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28115 ___ Python tracker ___

[issue45084] urllib.parse: remove deprecated functions (splittype, to_bytes, etc.)

2021-09-01 Thread STINNER Victor
New submission from STINNER Victor : bpo-27485 deprecated the following urllib.parse undocumented functions in Python 3.8: * splitattr() * splithost() * splitnport() * splitpasswd() * splitport() * splitquery() * splittag() * splittype() * splituser() * splitvalue() * to_bytes() (commit

[issue39758] StreamWriter.wait_closed() can hang indefinitely.

2021-09-01 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- components: -Build, C API, Parser, Tests, email nosy: -pablogsal ___ Python tracker ___ ___

[issue39758] StreamWriter.wait_closed() can hang indefinitely.

2021-09-01 Thread Stanislav Beblo
Change by Stanislav Beblo : -- components: +Build, C API, Parser, Tests, email nosy: +barry, lys.nikolaou, pablogsal, r.david.murray type: behavior -> performance versions: +Python 3.10, Python 3.11 -Python 3.7 ___ Python tracker

[issue45083] Incorrect exception output in C

2021-09-01 Thread Irit Katriel
New submission from Irit Katriel : iritkatriel@Irits-MBP cpython % cat exc.py class A: class B: class E(Exception): pass raise A.B.E() iritkatriel@Irits-MBP cpython % cat test.py import exc iritkatriel@Irits-MBP cpython % ./python.exe test.py Traceback (most recent call

[issue45076] open "r+" problem

2021-09-01 Thread otn
otn added the comment: It works correct for ver2.6, and also "rb+". Buffering procsess should work the same as those case. -- ___ Python tracker ___

[issue45082] ctypes: Deprecate c_buffer() alias to create_string_buffer()

2021-09-01 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +26555 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28114 ___ Python tracker ___

[issue45082] ctypes: Deprecate c_buffer() alias to create_string_buffer()

2021-09-01 Thread STINNER Victor
New submission from STINNER Victor : Since the ctypes module was added to the stdlib (commit babddfca758abe34ff12023f63b18d745fae7ca9 in 2006), ctypes.c_buffer() was an alias to ctypes.create_string_buffer(). The implementation contains a commented deprecation: def c_buffer(init,

[issue44091] traceback & inspect modules should verify that the .py source file matches the one that the running process is using

2021-09-01 Thread Guido van Rossum
Guido van Rossum added the comment: All legit cases, I agree, but are they worth the considerable work? -- ___ Python tracker ___

[issue44091] traceback & inspect modules should verify that the .py source file matches the one that the running process is using

2021-09-01 Thread Irit Katriel
Irit Katriel added the comment: It's not only a software updates issue - these kinds of problems show up for developers when they change the code on disk while a program is running and some traceback or pdb show code from the disk which is confusing. I also saw an issue about changing

[issue45081] dataclasses that inherit from Protocol subclasses have wrong __init__

2021-09-01 Thread Julian Fortune
New submission from Julian Fortune : I believe [`bpo-44806: Fix __init__ in subclasses of protocols`](https://github.com/python/cpython/pull/27545) has caused a regression when using a Dataclass. In Python `3.9.7`, a `dataclass` that inherits from a subclass of `typing.Protocol` (i.e., a

[issue44091] traceback & inspect modules should verify that the .py source file matches the one that the running process is using

2021-09-01 Thread Guido van Rossum
Guido van Rossum added the comment: This sounds like a project requiring a considerable amount of plumbing to get the info from where it's available to where it's needed. For example, importlib reads the PYC file, checks the header, and then passes the rest of the file to marshal.loads(),

[issue44091] traceback & inspect modules should verify that the .py source file matches the one that the running process is using

2021-09-01 Thread Irit Katriel
Irit Katriel added the comment: While we're changing code objects, perhaps consider this as well? -- nosy: +gvanrossum, iritkatriel ___ Python tracker ___

[issue45069] python 3.9.2 contains libcrypto-1_1.dll and libssl-1_1.dll associates CVE-2021-23840\CVE-2021-3450\CVE-2021-3711\CVE-2021-3712\CVE-2021-23841\CVE-2021-3449 of openssl-1.1.1i

2021-09-01 Thread Ned Deily
Ned Deily added the comment: What problem are you reporting here? Python 3.9.2 is no longer current nor supported; the most recent release is 3.9.7, which, among many other changes, now uses OpenSSL 1.1.1l. https://www.python.org/downloads/ https://www.python.org/dev/peps/pep-0596/

[issue34561] Replace list sorting merge_collapse()?

2021-09-01 Thread Tim Peters
Tim Peters added the comment: I created a PR that implements the powersort merge strategy: https://github.com/python/cpython/pull/28108 Across all the time this issue report has been open, that strategy continues to be the top contender. Enough already ;-) It's indeed a more difficult

[issue39758] StreamWriter.wait_closed() can hang indefinitely.

2021-09-01 Thread Artem
Artem added the comment: See this issue on 3.9.6 No SSL, but plain sockets. This seems to appear when writer.write/writer.drain was cancelled, and writer.close/writer.wait_closed called after this. -- nosy: +aeros, seer versions: +Python 3.9 ___

[issue45078] test_importlib: test_read_bytes() fails on AMD64 Windows8.1 Non-Debug 3.x

2021-09-01 Thread Filipe Laíns
Change by Filipe Laíns : -- nosy: +FFY00 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45075] confusion between frame and frame_summary in traceback module

2021-09-01 Thread Irit Katriel
Irit Katriel added the comment: Yes, frame_info is good. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45075] confusion between frame and frame_summary in traceback module

2021-09-01 Thread Chris Jerdonek
Chris Jerdonek added the comment: Or frame_info (more readable), since FrameSummary is proposed to be "Information about a single frame from a traceback." -- ___ Python tracker

[Python-announce] Wing Python IDE 8.0.3 has been released

2021-09-01 Thread Wingware
Wing 8.0.3 allows specifying the Django settings module for unit tests with --settings= in Run Args on the Testing page of Project Properties, fixes using an Activated Env that contains spaces in its path, prevents failure to reformat code on remote hosts and containers, fixes searching in

[issue45079] 3.8.11 and 3.8.12 missing Windows artifacts, only tarballs - build system failed?

2021-09-01 Thread Arcadiy Ivanov
Arcadiy Ivanov added the comment: Nevermind. Looks like the policy is not to build binaries once in security fixes only mode. I guess the build bot gets tired or something... -- resolution: not a bug -> wont fix ___ Python tracker

[issue45079] 3.8.11 and 3.8.12 missing Windows artifacts, only tarballs - build system failed?

2021-09-01 Thread Zachary Ware
Zachary Ware added the comment: 3.8 is in security-only maintenance mode, which means we no longer provide binary installers for this version. If you need binary installers, we highly recommend updating to a version in bugfix maintenance mode, which currently means 3.9. --

[issue45080] functools._HashedSeq implements __hash__ but not __eq__

2021-09-01 Thread Leopold Talirz
New submission from Leopold Talirz : Disclaimer: this is my first issue on the python bug tracker. Please feel free to close this issue and redirect this to a specific mailing list, if more appropriate. The implementation of `functools._HashedSeq` [1] does not include an implementation of

[issue45079] 3.8.11 and 3.8.12 missing Windows artifacts, only tarballs - build system failed?

2021-09-01 Thread Arcadiy Ivanov
New submission from Arcadiy Ivanov : The following versions only contain tarballs with no Windows artifacts available. Is the build system OK? https://www.python.org/ftp/python/3.8.12/ https://www.python.org/ftp/python/3.8.11/ .10 is fine: https://www.python.org/ftp/python/3.8.10/ Latest 3.9

Re: Trouble propagating logging configuration

2021-09-01 Thread Dieter Maurer
Loris Bennett wrote at 2021-9-1 13:48 +0200: > ... >Yes, but to quote from >https://docs.python.org/3.6/howto/logging.html#logging-basic-tutorial: > > A good convention to use when naming loggers is to use a module-level > logger, in each module which uses logging, named as follows: > >

[issue44895] refleak test failure in test_exceptions

2021-09-01 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file50251/strict_refleak_check.patch ___ Python tracker ___ ___

[issue45020] Freeze all modules imported during startup.

2021-09-01 Thread Eric Snow
Eric Snow added the comment: On Tue, Aug 31, 2021 at 12:14 PM Brett Cannon wrote: > > set __file__ (and __path__) on frozen modules? > > See https://bugs.python.org/issue21736 Great! I'll take a look. -- ___ Python tracker

[issue45020] Freeze all modules imported during startup.

2021-09-01 Thread Eric Snow
Eric Snow added the comment: On Tue, Aug 31, 2021 at 10:05 PM Inada Naoki wrote: > I don't want all frozen header files to be committed in git repository. > Can't we just build them during build process? That's a good point (and an interesting one). Only two of the frozen modules are

ANN: Wing Python IDE 8.0.3 has been released

2021-09-01 Thread Wingware
Wing 8.0.3 allows specifying the Django settings module for unit tests with --settings= in Run Args on the Testing page of Project Properties, fixes using an Activated Env that contains spaces in its path, prevents failure to reformat code on remote hosts and containers, fixes searching in

[issue44895] refleak test failure in test_exceptions

2021-09-01 Thread Irit Katriel
Irit Katriel added the comment: I changed it to +for i in range(2): +dash_R_cleanup(fs, ps, pic, zdc, abcs) +support.gc_collect() (loop twice instead of 3 times) and that seems fine too. -- ___ Python tracker

[issue44895] refleak test failure in test_exceptions

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: > (once I remove the @skip on test_no_hang_on_context_chain_cycle2). Oh. I forgot that the test is still skipped! > With your patch I don't see a leak for refleak.py, but I still see one for > ./python.exe -m test -R 3:3 test_exceptions -m >

[issue45078] test_importlib: test_read_bytes() fails on AMD64 Windows8.1 Non-Debug 3.x

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: Maybe Git does change the end of line of Lib/test/test_importlib/namespacedata01/utf-8.file file, even if .gitattributes contains: "Lib/test/test_importlib/namespacedata01/* -text" -- ___ Python tracker

[issue44771] Adopt changes from importlib_resources 5.2

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: test_importlib.test_read_bytes() is failing for 1 month on AMD64 Windows8.1 Non-Debug 3.x. Please see bpo-45078, the regression may be caused by the commit aaa83cdfab6817446285e631232f64b394ac6791. -- nosy: +vstinner

[issue45078] test_importlib: test_read_bytes() fails on AMD64 Windows8.1 Non-Debug 3.x

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: Interesting commits from: $ git log ee03bad25e83b00ba5fc2a0265b48c6286e6b3f7..a40675c659cd8c0699f85ee9ac31660f93f8c2f5 commit aaa83cdfab6817446285e631232f64b394ac6791 Author: Jason R. Coombs Date: Thu Jul 29 21:05:05 2021 -0400 bpo-44771: Apply

[issue45075] confusion between frame and frame_summary in traceback module

2021-09-01 Thread Chris Jerdonek
Chris Jerdonek added the comment: I was suggesting keeping more similarity between FrameSummary and StackSummary in addition to differentiating frame from FrameSummary. Since stack is used for StackSummary, frame_sum is more similar than f_summary while still providing the differentiation.

[issue44895] refleak test failure in test_exceptions

2021-09-01 Thread Irit Katriel
Irit Katriel added the comment: With your patch I don't see a leak for refleak.py, but I still see one for ./python.exe -m test -R 3:3 test_exceptions -m test_no_hang_on_context_chain_cycle2 -m test_recursion_normalizing_infinite_exception -m test_recursion_in_except_handler -m

[issue45078] test_importlib: test_read_bytes() fails on AMD64 Windows8.1 Non-Debug 3.x

2021-09-01 Thread STINNER Victor
New submission from STINNER Victor : Since build 305 (commit a40675c659cd8c0699f85ee9ac31660f93f8c2f5), test_importlib fails on AMD64 Windows8.1 Non-Debug 3.x: https://buildbot.python.org/all/#/builders/405/builds/305 The last successful build wa the build 304 (commit

[issue39326] Python-3.8.1 "test_importlib" failed

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: > Can you please attach the output log of the test? Since the original reporter didn't reply, we cannot investigate the issue and I close it. If you still have the issue, please reopen the issue with the full test output (attached as a file). --

[issue31962] test_importlib double free or corruption

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: I close the issue as out of date, since there is no activity for 4 years. Maybe it was fixed in the meanwhile. If it's not the case, please reopen the issue. If someone can still reproduce the issue, it would help to write a short reproducer script based on

[issue44895] refleak test failure in test_exceptions

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset 679cb4781ea370c3b3ce40d3334dc404d7e9d92b by Victor Stinner in branch 'main': bpo-44895: libregrtest: refleak check clears types later (GH-28113) https://github.com/python/cpython/commit/679cb4781ea370c3b3ce40d3334dc404d7e9d92b --

[issue44895] refleak test failure in test_exceptions

2021-09-01 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +26554 pull_request: https://github.com/python/cpython/pull/28113 ___ Python tracker ___

[issue45076] open "r+" problem

2021-09-01 Thread Zachary Ware
Zachary Ware added the comment: Usage questions like this are better suited to the Users category at https://discuss.python.org/c/users/7 or the python-l...@python.org mailing list. The write is buffered. If you want it to be written before you read, add `f.flush()` after the write;

[issue45075] confusion between frame and frame_summary in traceback module

2021-09-01 Thread Irit Katriel
Irit Katriel added the comment: I'm not sure I follow. We don't have a similar issue with StackSummary - there is no interpreter type for "stack" that you can confuse it with. -- ___ Python tracker

Re: Mutually exclusive options with argparse.

2021-09-01 Thread Lee Congdon
Does a mutually exclusive group, as described in "Mutual exclusion" at https://docs.python.org/3/library/argparse.html meet your needs? On Wed, Sep 1, 2021 at 9:48 AM hongy...@gmail.com wrote: > See the following code snippets [1] for implementation of the exclusive > options with argparse: > >

[issue45075] confusion between frame and frame_summary in traceback module

2021-09-01 Thread Chris Jerdonek
Chris Jerdonek added the comment: It might be good to have consistency with what will be used for StackSummary so two different approaches to naming aren't used. By the way, frame_sum is another possibility since I see frame_gen being used. -- nosy: +chris.jerdonek

[issue44895] refleak test failure in test_exceptions

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: > I changed dash_R_cleanup to put the sys._clear_type_cache() after > clear_caches() and the leak is gone Aha! The order of function calls in dash_R_cleanup() matters. Calling sys._clear_type_cache() at the end of dash_R_cleanup() perfectly makes sense.

Re: Request for argmax(list) and argmin(list)

2021-09-01 Thread Calvin Spealman
If only there were a library that already provides exactly the functions you're asking for... 樂 On Wed, Sep 1, 2021 at 9:54 AM ABCCDE921 wrote: > Because that does 2 passes over the entire array when you only need one > and there is no option to specify if you want the leftmost or rightmost >

Re: Trouble propagating logging configuration

2021-09-01 Thread Peter Otten
On 01/09/2021 13:48, Loris Bennett wrote: "Dieter Maurer" writes: Loris Bennett wrote at 2021-8-31 15:25 +0200: I am having difficulty getting the my logging configuration passed on to imported modules. My initial structure was as follows: $ tree blorp/ blorp/ |-- blorp | |--

[issue45061] [C API] Detect refcount bugs on True/False in C extensions

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: Christian Tismer: "What about an even more flexible solution? A debug option could memorize always the last object deallocated and give full info (the object's repr) before the crash would happen." Bugs in object_dealloc() are rare. Apart None, True and

[issue43592] test_importlib: test_multiprocessing_pool_circular_import() fails with "Too many open files" error on os.pipe()

2021-09-01 Thread Łukasz Langa
Łukasz Langa added the comment: Before you do it, check the defaults with: $ launchctl limit maxfiles I'm curious. -- ___ Python tracker ___

[issue43592] test_importlib: test_multiprocessing_pool_circular_import() fails with "Too many open files" error on os.pipe()

2021-09-01 Thread Łukasz Langa
Łukasz Langa added the comment: Try setting the following: $ sudo sysctl -w kern.maxfiles=65536 $ sudo sysctl -w kern.maxfilesperproc=65536 $ sudo ulimit -n 65536 -- nosy: +lukasz.langa ___ Python tracker

[issue43592] test_importlib: test_multiprocessing_pool_circular_import() fails with "Too many open files" error on os.pipe()

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: > x86-64 macOS 3.10: https://buildbot.python.org/all/#/builders/681/builds/345 On this machine, RLIMIT_NOFILE soft limit is 256. test.pythoninfo: resource.RLIMIT_NOFILE: (256, 9223372036854775807) platform.platform: macOS-11.5.2-x86_64-i386-64bit

[issue43592] test_importlib: test_multiprocessing_pool_circular_import() fails with "Too many open files" error on os.pipe()

2021-09-01 Thread STINNER Victor
STINNER Victor added the comment: x86-64 macOS 3.10: https://buildbot.python.org/all/#/builders/681/builds/345 == FAIL: test_multiprocessing_pool_circular_import (test.test_importlib.test_threaded_import.ThreadedImportTests)

my python progress

2021-09-01 Thread songbird
i've had some fun recently when i've had a chance to work on it. i needed some kind of project that would encourage me to learn more python. i still consider myself very new to the language and a long ways to go (and i don't consider the code as a great example, but it is progress to me in my

Re: Request for argmax(list) and argmin(list)

2021-09-01 Thread ABCCDE921
Because that does 2 passes over the entire array when you only need one and there is no option to specify if you want the leftmost or rightmost element On Wednesday, September 1, 2021 at 12:02:29 PM UTC+5:30, Paul Bryan wrote: > Why not: > > >>> l = [1, 3, 5, 9, 2, 7] > >>> l.index(max(l))

Mutually exclusive options with argparse.

2021-09-01 Thread hongy...@gmail.com
See the following code snippets [1] for implementation of the exclusive options with argparse: def query_builder(args): if args.r and args.s: sys.exit(Term.FAIL + 'Only one of -re and -sql should be set' + Term.ENDC) sum_status = sum(1 for x in [args.failure, args.code != -1] if

Re: Trouble propagating logging configuration

2021-09-01 Thread Loris Bennett
"Dieter Maurer" writes: > Loris Bennett wrote at 2021-8-31 15:25 +0200: >>I am having difficulty getting the my logging configuration passed on >>to imported modules. >> >>My initial structure was as follows: >> >> $ tree blorp/ >> blorp/ >> |-- blorp >> | |-- __init__.py >> | |--

[issue45077] multiprocessing.Pool(64) crashes on Windows

2021-09-01 Thread Kagami Sascha Rosylight
Kagami Sascha Rosylight added the comment: The argument-less instantiation also fails, which is worse. ``` >>> multiprocessing.Pool() >>> Exception in thread Thread-1: Traceback (most recent call last): File "C:\Users\sasch\AppData\Local\Programs\Python\Python39\lib\threading.py", line

Re: PEP Idea: Real private attribute

2021-09-01 Thread Calvin Spealman
On Tue, Aug 31, 2021 at 1:19 PM Mehrzad Saremi wrote: > Calvin, even if the language offered truly private members? > I'm saying I don't think they're necessary, especially not for the use case posited here. Private members in other languages are about things internal to the class of the object

[issue43976] Allow Python distributors to add custom site install schemes

2021-09-01 Thread Filipe Laíns
Filipe Laíns added the comment: Matthias, can you check if bpo-44982 solves your issues related to the conflicts you were experiencing for the Debian patching? If so, it would unblock this issue. I am probably gonna discuss this proposal with the conda-forge folks next week, to get some

[issue45075] confusion between frame and frame_summary in traceback module

2021-09-01 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +26553 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28112 ___ Python tracker ___

[issue45077] multiprocessing.Pool(64) crashes on Windows

2021-09-01 Thread Kagami Sascha Rosylight
New submission from Kagami Sascha Rosylight : Similar issue as the previous issue 26903. ``` Python 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import multiprocessing >>>

  1   2   >