[issue36201] AssertCountEqual does not work for nested dictionaries.

2020-10-17 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue41854] argparse.add_mutually_exclusive_group fails for optional positional arguments

2020-10-17 Thread Reuben Thomas
Reuben Thomas added the comment: Thanks for the hint; could this be documented, please? -- ___ Python tracker ___ ___

[issue36179] _hashopenssl has reference leaks in OOM case

2020-10-17 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32820] Add and document __format__ method for IPv[46]Address

2020-10-17 Thread Eric Osborne
Eric Osborne added the comment: Yes, I agree. Regardless of backport policy, this is a handy little convenience featurette, not sliced bread v2, so it's not worth backporting even if it was permissible. eric On Fri, Oct 16, 2020 at 7:13 PM Eric V. Smith wrote: > > Eric V. Smith added the

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2020-10-17 Thread Alex Grönholm
Change by Alex Grönholm : -- keywords: +patch pull_requests: +21699 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22736 ___ Python tracker ___

[issue42056] Configure on Apple ARM: "Unexpected output of 'arch' on OSX"

2020-10-17 Thread Ronald Oussoren
Ronald Oussoren added the comment: I have a PR that implements support for Apple Silicon: https://github.com/python/cpython/pull/21564 Sadly this is not yet complete. I hope to make progress again during the core sprint next week. -- nosy: +ronaldoussoren

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

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

[issue32820] Add and document __format__ method for IPv[46]Address

2020-10-17 Thread Irit Katriel
Irit Katriel added the comment: In that case, should this issue be closed? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue42060] Usage of assert in http/client.py

2020-10-17 Thread Felipe Rodrigues
New submission from Felipe Rodrigues : Hi all! I was testing some static analysis tool and decided to use the HTTP module as testing ground. While running `bandit` at the client module, it detected 3 instances of using `assert` inside the code. Twice in the HTTPResponse class and once in

[issue42042] docs.python.org for 3.10 missing the new refererence record.

2020-10-17 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +21702 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22739 ___ Python tracker ___

[issue38320] Clarify unittest expectedFailure behaviour in the documentation

2020-10-17 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch nosy: +iritkatriel nosy_count: 2.0 -> 3.0 pull_requests: +21703 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22740 ___ Python tracker

[issue42042] sphinx3 renders diffrently docs.python.org for 3.10

2020-10-17 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +mdk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32820] Add and document __format__ method for IPv[46]Address

2020-10-17 Thread Eric V. Smith
Eric V. Smith added the comment: At this point, it's a documentation-only issue. This new feature isn't documented. It might be less confusing to close this issue and open a new one. I'll do that shortly. -- versions: +Python 3.10 ___ Python

[issue32820] Add and document __format__ method for IPv[46]Address

2020-10-17 Thread Eric V. Smith
Eric V. Smith added the comment: I've created issue 42061 for the documentation. Hopefully marking that issue as easy and newcomer friendly will attract some attention. Thanks ewosborne and Serhiy for adding this feature, and everyone for their input. -- resolution: -> fixed

[issue42049] Add image/webp to list of media types in mimetypes.py

2020-10-17 Thread waicalibre
waicalibre added the comment: Yep, looks like this issue is an exact duplicate. Sorry about that. It looks like WebP is still not registered with IANA so it can't be added to the list according to this comment: https://github.com/python/cpython/blob/master/Lib/mimetypes.py#L407. It could

[issue42061] Document __format__ method for IPv[46]Address

2020-10-17 Thread Eric V. Smith
New submission from Eric V. Smith : This feature was added in issue 32820, but was never documented. -- assignee: docs@python components: Documentation keywords: easy, newcomer friendly messages: 378812 nosy: docs@python, eric.smith priority: normal severity: normal stage: needs patch

[issue38820] Make Python compatible with OpenSSL 3.0.0

2020-10-17 Thread Christian Heimes
Christian Heimes added the comment: No, this is still work in progress. -- resolution: fixed -> stage: resolved -> status: closed -> open ___ Python tracker ___

[issue42060] Usage of assert in http/client.py

2020-10-17 Thread Felipe Rodrigues
Change by Felipe Rodrigues : -- keywords: +patch pull_requests: +21700 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22737 ___ Python tracker

[issue42062] Usage of HTTPResponse.url

2020-10-17 Thread Felipe Rodrigues
Change by Felipe Rodrigues : -- keywords: +patch pull_requests: +21701 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22738 ___ Python tracker

[issue42042] docs.python.org for 3.10 missing the new refererence record.

2020-10-17 Thread Dong-hee Na
Dong-hee Na added the comment: This is the regression bug caused by sphinx==3.2.1 If we roll back the sphinx version(2.4.4), it is okay. I am investigating what causes this issue. -- ___ Python tracker

[issue42042] sphinx3 renders diffrently docs.python.org for 3.10

2020-10-17 Thread Dong-hee Na
Change by Dong-hee Na : -- title: docs.python.org for 3.10 missing the new refererence record. -> sphinx3 renders diffrently docs.python.org for 3.10 ___ Python tracker ___

[issue42042] sphinx3 renders diffrently docs.python.org for 3.10

2020-10-17 Thread Dong-hee Na
Dong-hee Na added the comment: Okay this is the theme bug. https://github.com/python/python-docs-theme/pull/57 -- ___ Python tracker ___

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2020-10-17 Thread Guido van Rossum
Guido van Rossum added the comment: Can you submit a PR to fix this? It looks like you already have a good understanding of the root cause of the problem, so it should be easy to fix. (Be sure to add a unit test.) It can be backported to earlier Python versions that have typing.TypedDict

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2020-10-17 Thread Alex Grönholm
New submission from Alex Grönholm : >>> DummyDict = TypedDict('DummyDict', {'x': int, 'y': str}, total=False) >>> DummyDict.__required_keys__ frozenset({'x', 'y'}) This happens because the TypedDict function does not pass the "total" metaclass argument to _TypedDictMeta() (instead passing

[issue42062] Usage of HTTPResponse.url

2020-10-17 Thread Felipe Rodrigues
New submission from Felipe Rodrigues : Hello all, While testing some static analysis tools on HTTP/client.py, Pylint pointed me to HTTPResponse.geturl() method with a "no-member" error for the `url` attribute. I tried invoking the `geturl` method and reading the `HTTPResponse.url` attribute

[issue42042] docs.python.org for 3.10 missing the new refererence record.

2020-10-17 Thread Dong-hee Na
Dong-hee Na added the comment: sphinx2 (Pdb) par[0].attributes {'ids': ['c._PyObject_New'], 'classes': [], 'names': ['c._PyObject_New'], 'dupnames': [], 'backrefs': [], 'first': False} sphinx3 (Pdb) par[0].attributes {'ids': ['c._PyObject_New'], 'classes': [], 'names': [], 'dupnames': [],

[issue42042] docs.python.org for 3.10 missing the new refererence record.

2020-10-17 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +Mariatta ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42042] docs.python.org for 3.10 missing the new refererence record.

2020-10-17 Thread Dong-hee Na
Dong-hee Na added the comment: One more regression is that code background highlight is not applied after sphinx version3 See https://docs.python.org/3.10/c-api/dict.html#c.PyDict_Next https://docs.python.org/3.9/c-api/dict.html#c.PyDict_Next -- stage: patch review ->

[issue32820] Add and document __format__ method for IPv[46]Address

2020-10-17 Thread Eric Osborne
Eric Osborne added the comment: Did I really ship an enhancement without documenting it? I am a terrible person. I will pick up the issue and take care of it. eric On Sat, Oct 17, 2020 at 9:07 AM Eric V. Smith wrote: > > Eric V. Smith added the comment: > > I've created issue 42061 for

[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2020-10-17 Thread Guido van Rossum
Guido van Rossum added the comment: Whoops, sorry, didn't see that you already have a PR. I'll review it next week during the core sprint. -- ___ Python tracker ___

[issue40529] Auto Completions with case insensitive

2020-10-17 Thread Tal Einat
Tal Einat added the comment: Thanks for the suggestion and for the high quality PR, Madhusudhan! I'm not sure about this feature. It seems harmless enough, with the default being the existing case-sensitive completion. But it seems like a rather esoteric thing to want, so I'm not sure it's

[issue42065] Fix incorrectly formatted _codecs.charmap_decode error message

2020-10-17 Thread Tal Einat
New submission from Tal Einat : The error message for _codecs.charmap_decode uses a non-existent formatting placeholder "%lx", when a mapped value is a number outside the range of valid Unicode code points. This was reported by Max Bernstein (@tekknolagi) on GitHub PR GH-19940. --

[issue42065] Fix incorrectly formatted _codecs.charmap_decode error message

2020-10-17 Thread Maxwell Bernstein
Change by Maxwell Bernstein : -- keywords: +patch nosy: +tekknolagi nosy_count: 1.0 -> 2.0 pull_requests: +21704 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19940 ___ Python tracker

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

2020-10-17 Thread Dennis Sweeney
Dennis Sweeney added the comment: I added the cutoff for strings >= 10 characters, and I converted the PR from a draft to "Ready to Review." When running stringbench.py before and after the PR, I get these results: Summary: Unicode Before: 81.82 Bytes Before: 92.62 Unicode

[issue42063] More options to http.server & SimpleHTTPRequestHandler

2020-10-17 Thread Jake
New submission from Jake : I would find it useful to have more options to http.server SimpleHTTPRequestHandler: 1) The option to get the current directory in not only HTML, but represented in JSON for example. This could be an added --json flag in the main method of http.server, and an

[issue18857] urlencode of a None value uses the string 'None'

2020-10-17 Thread Tal Einat
Tal Einat added the comment: Thanks for the PRs, James! I've closed the PRs for now, to avoid having people spend time reviewing them while this issue is closed as "wontfix". That said, if further discussion changes that decision, the PRs could be reopened. -- nosy: +taleinat

[issue42065] Fix incorrectly formatted _codecs.charmap_decode error message

2020-10-17 Thread Tal Einat
Tal Einat added the comment: New changeset 3635388f52b42e5280229104747962117104c453 by Max Bernstein in branch 'master': bpo-42065: Fix incorrectly formatted _codecs.charmap_decode error message (GH-19940) https://github.com/python/cpython/commit/3635388f52b42e5280229104747962117104c453

[issue40775] Fix missing dot in sqlite3 Node type name

2020-10-17 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : Fixed in GH-22417 / bpo-41861 -- resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue42065] Fix incorrectly formatted _codecs.charmap_decode error message

2020-10-17 Thread Tal Einat
Change by Tal Einat : -- components: +Library (Lib), Unicode nosy: +ezio.melotti, vstinner -tekknolagi type: -> behavior versions: +Python 3.10, Python 3.8, Python 3.9 ___ Python tracker

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2020-10-17 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : Porting sqlite3 to multi-phase initialisation is non-trivial and must be broken into smaller bpo's, often with multiple PR's per bpo. As far as I can see, this is the task list: 1) Heap types (PEP 384): bpo-41861 2) Argument Clinic: bpo-40956 3)

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2020-10-17 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Instead of using a custom context struct for sqlite3_create_funcion_v2(), we may just use sqlite3_context_db_handle() to get `self`, and then fetch the state using PyType_GetModuleState(Py_TYPE(self)). --

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2020-10-17 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: No, unless we can add `self` as a private context to a sqlite3 database handle, we can't use that shortcut. However, using a custom context struct works, and it's a minor code change. Proof-of-concept implementation diffstat: 2 files changed, 54

[issue18857] urlencode of a None value uses the string 'None'

2020-10-17 Thread James Addison
James Addison added the comment: No problem, and thanks for the heads-up Tal! I'll raise this as a topic on python-dev if it still seems worth pursuing, after collecting some more thoughts about it. -- ___ Python tracker

[issue36201] AssertCountEqual does not work for nested dictionaries.

2020-10-17 Thread Irit Katriel
Irit Katriel added the comment: Should this be closed as won't fix? -- nosy: +iritkatriel ___ Python tracker ___ ___

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

2020-10-17 Thread Guido van Rossum
Guido van Rossum added the comment: This may be irrelevant at this point, but trying to understand the original reproducer, I wanted to add my 1c worth. It seems Dennis' reproducer.py is roughly this: (I'm renaming BIG//3 to K to simplify the math.) aBaBBB

[issue42050] ensurepip fails if cwd contains illformed setup.cf

2020-10-17 Thread Filipe Laíns
Change by Filipe Laíns : -- nosy: +FFY00, dstufft, ncoghlan, pradyunsg ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42057] pytest case which catch exceptions become segfault

2020-10-17 Thread Filipe Laíns
Change by Filipe Laíns : -- nosy: +FFY00 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42065] Fix incorrectly formatted _codecs.charmap_decode error message

2020-10-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +21706 pull_request: https://github.com/python/cpython/pull/22744 ___ Python tracker ___

[issue42065] Fix incorrectly formatted _codecs.charmap_decode error message

2020-10-17 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +21705 pull_request: https://github.com/python/cpython/pull/22743 ___ Python tracker

[issue42065] Fix incorrectly formatted _codecs.charmap_decode error message

2020-10-17 Thread Tal Einat
Tal Einat added the comment: Thanks for the PR, Max! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

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

2020-10-17 Thread Tim Peters
Tim Peters added the comment: When I ran stringbench yesterday (or the day before - don't remember), almost all the benefit seemed to come from the "late match, 100 characters" tests. Seems similar for your run. Here are your results for just that batch, interleaving the two runs to make

[issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group

2020-10-17 Thread Tal Einat
Tal Einat added the comment: I suggest bringing this up for discussion on Python-Ideas. -- nosy: +taleinat ___ Python tracker ___

[issue40507] FileNotFound error raised by os.exec* doesn't contain filename

2020-10-17 Thread Tal Einat
Change by Tal Einat : -- type: -> enhancement versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___

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

2020-10-17 Thread Tim Peters
Tim Peters added the comment: I don't think we have any idea how the OP stumbled into this. Looks like it "just happened". The case you construted is quadratic-time, but not quite as bad: BaB BB Fails at once, because 'a' doesn't match the trailing needle 'B'. The Bloom

[issue42062] Usage of HTTPResponse.url

2020-10-17 Thread Martin Panter
Martin Panter added the comment: There is a comment in the HTTPResponse class regarding these methods: # For compatibility with old-style urllib responses. They were there for the "urlopen" API in "urllib.request", not for the "http.client" module on its own. I expect the "url" attribute is

[issue41983] Missing Documentation AF_PACKET

2020-10-17 Thread Martin Panter
Martin Panter added the comment: According to the documentation at and Issue 25041 it is only available on Linux. What documentation are you looking at? -- nosy: +martin.panter

[issue33129] Add kwarg-only option to dataclass

2020-10-17 Thread Ryan Hiebert
Change by Ryan Hiebert : -- nosy: +ryanhiebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40507] FileNotFound error raised by os.exec* doesn't contain filename

2020-10-17 Thread Tal Einat
Tal Einat added the comment: I agree that having the error message include the executable name could be useful. -- nosy: +taleinat ___ Python tracker ___

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

2020-10-17 Thread Dennis Sweeney
Dennis Sweeney added the comment: > But there _also_ seem to be real (but much smaller) benefits > for the "search backward" cases, which I don't recall seeing > when I tried it. Do you have a guess as to why? I did change `skip = mlast - 1;` to `skip = mlast;` as you had pointed out. So it

[issue37555] _CallList.__contains__ doesn't always respect ANY.

2020-10-17 Thread Elizabeth Uselton
Elizabeth Uselton added the comment: I believe it should work in both 3.8 and 3.9, the difference is that someone (Serhiy if I'm remembering correctly?) did the work in 3.9 of standardizing which side of the = the needle was on. So, this change works on 3.9 without the _AnyComparer class I

[issue18857] urlencode of a None value uses the string 'None'

2020-10-17 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hi James, I will give another look at it tonight or latest by Sunday PST , since I was involved in this and PRs. If we can make a decision within this context, great, otherwise we can open it up to python-dev On Sat, Oct 17, 2020 at 3:30 PM James Addison

[issue18857] urlencode of a None value uses the string 'None'

2020-10-17 Thread James Addison
James Addison added the comment: Thanks Senthil; please take your time. This isn't urgent, and would likely benefit from further standardization of the URL query string and/or form-encoded data formats (outside the Python project) to achieve consensus. A fully-considered answer at a later

[issue40509] In argparse, allow REMAINDER(...) arguments in a mutually exclusive group

2020-10-17 Thread paul j3
paul j3 added the comment: A more recent issue shows that the use of a '*' positional in a multually_exclusive_group is poorly understood and documented. https://bugs.python.org/issue41854 That's part of why I am not enthusiastic about extending this to include REMAINDER. And on

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

2020-10-17 Thread Guido van Rossum
Guido van Rossum added the comment: Right, so IIUC the *quadratic* portion of Dennis’ original reproducer, aBaBBB with pattern BBB, except with more cowbell :-) acts the same. -- ___ Python tracker

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

2020-10-17 Thread Tim Peters
Tim Peters added the comment: Yup, they act essentially the same, but yours jumps into the quicksand earlier ;-) I'm fond of this one: """ HUGE = 10**7 BIG = 10**6 bigxs = 'x' * BIG haystack = 'x' * HUGE needle = bigxs + 'y' + bigxs """ "The problem" then is in middle of the needle, not