[issue44605] functools.total_ordering doesn't work with metaclasses

2021-07-11 Thread Glyph Lefkowitz
Glyph Lefkowitz added the comment: Adding versions after confirming the bug is the same on 3.10 -- versions: +Python 3.10, Python 3.11 ___ Python tracker ___

[issue44599] Changing logging format for one handler changes it for all

2021-07-11 Thread Vinay Sajip
Vinay Sajip added the comment: > It looks like an unexpected behavior to me when reading the doc. Perhaps you missed this? https://docs.python.org/3/library/logging.html?highlight=exc_text#logging.Formatter.format "Note that the formatted exception information is cached in attribute

[issue44606] Discrepancy between isinstance() and issubclass() for union types

2021-07-11 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : 1. Different handling of None: >>> isinstance(None, int | type(None)) True >>> issubclass(type(None), int | type(None)) True >>> isinstance(None, int | None) True >>> issubclass(type(None), int | None) False 2. Different handling of virtual subclasses:

[issue43299] pyclbr.readmodule_ex traversing "import __main__": dies with ValueError: __main__.__spec__ is None / is not set

2021-07-11 Thread Andrei Kulakov
Andrei Kulakov added the comment: (Also if they are able to help, please report back here and update this issue, that will be much appreciated!) -- ___ Python tracker ___

[issue43299] pyclbr.readmodule_ex traversing "import __main__": dies with ValueError: __main__.__spec__ is None / is not set

2021-07-11 Thread Andrei Kulakov
Andrei Kulakov added the comment: Robert: thanks for the response.. I looked a bit more into it and I'm starting to think it's a PyWin issue, not pyclbr. It seems to me that PyWin is calling pyclbr readmodule_ex with module='__main__', and pyclbr is supposed to find it on the filesystem.

[issue44605] functools.total_ordering doesn't work with metaclasses

2021-07-11 Thread Glyph Lefkowitz
New submission from Glyph Lefkowitz : Consider the following example that attempts to make a series of types sortable by their class name: from functools import total_ordering @total_ordering class SortableMeta(type): def __new__(cls, name, bases, ns): return

[issue41972] bytes.find consistently hangs in a particular scenario

2021-07-11 Thread Dennis Sweeney
Dennis Sweeney added the comment: In "Fast String Searching" (1991), A. Hume and D. Sunday emphasize that most of the runtime of string-search algorithms occurs in a code path that skips over immediately-disqualified alignments. As such, that paper recommends extracting a hot "Horspool"

[issue41972] bytes.find consistently hangs in a particular scenario

2021-07-11 Thread Dennis Sweeney
Change by Dennis Sweeney : -- pull_requests: +25639 pull_request: https://github.com/python/cpython/pull/27091 ___ Python tracker ___

[issue44603] REPL: exit when the user types exit instead of asking them to explicitly type exit()

2021-07-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: For reference, this behaviour lives here: https://github.com/python/cpython/blob/e14d5ae5447ae28fc4828a9cee8e9007f9c30700/Lib/_sitebuiltins.py#L13-L26 -- ___ Python tracker

[issue44603] REPL: exit when the user types exit instead of asking them to explicitly type exit()

2021-07-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks, Stargirl for opening this issue and for the thorough description and proposals. I am sympathetic with the idea and the general proposal and (unsurprisingly) I agree with (1). For (2) there are some challenges here to consider. The most

[issue44604] [Enhancement] Asyncio task decorator to provide functionality similar to dask's delayed interface

2021-07-11 Thread Aritn Sarraf
New submission from Aritn Sarraf : For those not familiar, the dask delayed interface allows a user to define a DAG through a functional invocation interface. Dask docs here: https://docs.dask.org/en/latest/delayed.html Another example of this kind of interface is airflow's new TaskFlow api:

[issue44603] REPL: exit when the user types exit instead of asking them to explicitly type exit()

2021-07-11 Thread Stargirl Flowers
New submission from Stargirl Flowers : Presently, when using REPL if a user types simply "exit", they are greeted with a message instructing them to do it "correctly": >>> exit Use exit() or Ctrl-Z plus Return to exit It comes across as a little surprising that (1) the program knows what I

[issue44599] Changing logging format for one handler changes it for all

2021-07-11 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41354] filecmp.cmp documentation does not match actual code

2021-07-11 Thread Andrei Kulakov
Andrei Kulakov added the comment: Christof: I've left one comment on the PR. Generally your reasoning (on why unexpected deep cmp is not ideal), makes sense to me. However, this is a backwards incompatible change that will probably affect a large number of a lot of scripts that quietly run

[issue44594] AsyncExitStack.enter_async_context() is mishandling exception __context__

2021-07-11 Thread John Belmonte
John Belmonte added the comment: demonstrating the difference for async case: import contextlib import trio async def background(): assert False async def main1(): async with trio.open_nursery() as nursery: nursery.start_soon(background)

[issue44564] DeprecationWarning in test_enum over formatting

2021-07-11 Thread Brandon Schabell
Change by Brandon Schabell : -- keywords: +patch nosy: +brandonschabell nosy_count: 2.0 -> 3.0 pull_requests: +25638 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27090 ___ Python tracker

[issue44594] AsyncExitStack.enter_async_context() is mishandling exception __context__

2021-07-11 Thread John Belmonte
Change by John Belmonte : -- keywords: +patch nosy: +jbelmonte nosy_count: 3.0 -> 4.0 pull_requests: +25637 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27089 ___ Python tracker

[issue44602] Issue with get_build_version in msvc9compiler.py in distutils

2021-07-11 Thread Rajesh
Rajesh added the comment: Recently Microsoft also removed support to install Visual Studio 2015 installation using installer, so users who need visual studio 2015 must download and then install. This will cause issues to Python packages that depend on distutils which again depends on

[issue44159] mimetypes - "strict" on Windows

2021-07-11 Thread Brandon Schabell
Change by Brandon Schabell : -- keywords: +patch nosy: +brandonschabell nosy_count: 5.0 -> 6.0 pull_requests: +25636 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27088 ___ Python tracker

[issue44602] Issue with get_build_version in msvc9compiler.py in distutils

2021-07-11 Thread Rajesh
New submission from Rajesh : get_build_version method in msvc9compiler.py file in distutils folder is returning MSVC version as "14.2" for Python 3.9. 14.2 is the build version for Visual Studio 2015, but Visual studio 2015 wont work on Windows 10 as per the below link

[issue44601] argparse: potential bugs on add_subparser due to allow_abbrev cannot deal with short options

2021-07-11 Thread Xiang Zhong
New submission from Xiang Zhong : Additional argument like "allow_abbrev_short" should be added to avoid those potential bugs due to abbreviations on short options cannot be handled by "allow_abbrev". To reproduce and be well explanation, please check on my attached testing file. The

[issue38825] shutil.disk_usage - Lacking documentation

2021-07-11 Thread Tyler Crompton
Tyler Crompton added the comment: Not even the kernel knows how much space is available on a nonmounted partition. It doesn't know much beyond the fact that it exists and where it exists. There exist tools that can analyze nonmounted partitions, but these will vary by filesystem and

[issue44600] match/case statements trace incorrectly in 3.10.0b4

2021-07-11 Thread Brandt Bucher
Brandt Bucher added the comment: Thanks, I'll take a closer look at this soon (most likely this coming week). Out of curiosity, do we have a standard way of writing regression tests for correct line numbers like this? Of the top of my head, it seems like we could either statically compare

[issue10716] Modernize pydoc to use better HTML and separate CSS

2021-07-11 Thread Zac Gross
Zac Gross added the comment: Hey all, I'd like to note my interest in this issue getting addressed. I have a use case where I'd like to generate documentation for a module and using non-core modules to do that requires some approval that I would like to avoid. I understand there are other

[issue44600] match/case statements trace incorrectly in 3.10.0b4

2021-07-11 Thread Mark Shannon
Change by Mark Shannon : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44600] match/case statements trace incorrectly in 3.10.0b4

2021-07-11 Thread Ned Batchelder
New submission from Ned Batchelder : Some simple match/case statements show incorrect tracing. Below is the code to run, as well as the output. Output lines with initial stars are incorrect: they incorrectly indicate that case bodies are executing when they are not. Sorry for the bulk

[issue8595] Explain the default timeout in http-client-related libraries

2021-07-11 Thread Andrei Kulakov
Andrei Kulakov added the comment: I've put up the doc update PR: https://github.com/python/cpython/pull/27087 I did not add a module level default timeouts to these modules because it seems to me most of the issue is users being unaware of the current global default, which is fixed by docs

[issue8595] Explain the default timeout in http-client-related libraries

2021-07-11 Thread Andrei Kulakov
Change by Andrei Kulakov : -- keywords: +patch nosy: +andrei.avk nosy_count: 6.0 -> 7.0 pull_requests: +25635 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27087 ___ Python tracker

[issue29753] [Linux] ctypes packs bitfields Incorrectly

2021-07-11 Thread Filipe Laíns
Filipe Laíns added the comment: Sorry for not posting a link here, see https://github.com/python/cpython/pull/19850#issuecomment-869410686. The issue is not legacy behavior, it's that the fix messed up the functionality and that was not caught by tests. I don't have much time to look into

[issue29753] [Linux] ctypes packs bitfields Incorrectly

2021-07-11 Thread Sam Price
Sam Price added the comment: I’ve been looking forward to this fix. The old implementation did not match what my LLVM compiler generated. On Sun, Jul 11, 2021 at 2:52 PM Charles Machalow wrote: > > Charles Machalow added the comment: > > Maybe we need to add a __packing__ option to

[issue29753] [Linux] ctypes packs bitfields Incorrectly

2021-07-11 Thread Charles Machalow
Charles Machalow added the comment: Maybe we need to add a __packing__ option to specify how packing should work and default to legacy behavior. Then allow users to specify if they want similar behavior cross-os. Otherwise changing this does change packing for existing users and can lead to

[issue29753] [Linux] ctypes packs bitfields Incorrectly

2021-07-11 Thread miss-islington
miss-islington added the comment: New changeset 42da46ed522157b057d73e6b623615ef6427999e by Miss Islington (bot) in branch '3.10': bpo-29753: revert 0d7ad9f (GH-19850) (GH-27085) https://github.com/python/cpython/commit/42da46ed522157b057d73e6b623615ef6427999e --

[issue44599] Changing logging format for one handler changes it for all

2021-07-11 Thread Amanieu
New submission from Amanieu : I want to stream a logger to several streams. Changing the standard format works, but changing the formatException function changes it for all! As I am not entirely sure if it is a feature and I am misunderstanding something, I have posted on SO on this topic:

[issue29753] [Linux] ctypes packs bitfields Incorrectly

2021-07-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset e14d5ae5447ae28fc4828a9cee8e9007f9c30700 by Filipe Laíns in branch 'main': bpo-29753: revert 0d7ad9f (GH-19850) (GH-27085) https://github.com/python/cpython/commit/e14d5ae5447ae28fc4828a9cee8e9007f9c30700 -- nosy: +pablogsal

[issue29753] [Linux] ctypes packs bitfields Incorrectly

2021-07-11 Thread miss-islington
Change by miss-islington : -- pull_requests: +25634 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/27086 ___ Python tracker ___

[issue44598] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-07-11 Thread Christian Heimes
Christian Heimes added the comment: Python 3.9.5 and OpenSSL 1.1.1f are both outdated. Can you reproduce the problem with 3.9.6 and 1.1.1k? Can you tel us more about your system (distribution, CPU arch, compiler) and provide a C stacktrace with debug symbols? -- nosy:

[issue29753] [Linux] ctypes packs bitfields Incorrectly

2021-07-11 Thread Filipe Laíns
Filipe Laíns added the comment: Unfortunately, the fix has some unforeseen side-effects, so we'll have to revert it :/ -- resolution: fixed -> status: closed -> open versions: +Python 3.11 ___ Python tracker

[issue44598] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-07-11 Thread tongxiaoge
New submission from tongxiaoge : I have reproduced this problem in the latest versions of Python 3.8.11 and 3.9.6. Python 3.8.5 does not have this problem, other versions are not tested. The failure log is as follows: [ 613s] 0:02:27 load avg: 4.66 Re-running failed tests in verbose mode [

[issue43838] There is a way to access an underlying mapping in MappingProxyType

2021-07-11 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29753] [Linux] ctypes packs bitfields Incorrectly

2021-07-11 Thread Filipe Laíns
Change by Filipe Laíns : -- pull_requests: +25633 pull_request: https://github.com/python/cpython/pull/27085 ___ Python tracker ___

[issue44568] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-07-11 Thread tongxiaoge
Change by tongxiaoge : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___