[issue40320] Add ability to specify instance of contextvars context to Task() & asyncio.create_task()

2021-06-10 Thread Mark Gordon
Change by Mark Gordon : -- keywords: +patch nosy: +msg555 nosy_count: 3.0 -> 4.0 pull_requests: +25251 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26664 ___ Python tracker ___

[issue44352] Native Windows Python builds running on Europe/Moscow TZ report wrong time from datetime.datetime.now when there is TZ environment variable also set to Europe/Moscow

2021-06-10 Thread Mike Kaganski
Mike Kaganski added the comment: Thank you Eryk! This is a good workaround for me. I have implemented it: https://git.libreoffice.org/core/+/3bcaa4ba79477a21251ddaa06e0ea159196a7ffb It looks like it's not a Python's problem; I suppose this may be closed. Thanks again! -- resolution:

[issue44388] venv API Docs for EnvBuilder.ensure_directories incorrectly describe behavior

2021-06-10 Thread Matthew Clapp
Change by Matthew Clapp : -- keywords: +patch pull_requests: +25250 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26663 ___ Python tracker ___ __

[issue24781] Improve UX of IDLE Highlighting configuration tab

2021-06-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since uipreferences.py was written, in 2015, configdialog uses ttk widgets, including Notebook. We have factored out a class for each notebook pane plus one for help sources and one for traced variables. I have in mind something like highlight3.png and will

[issue44388] venv API Docs for EnvBuilder.ensure_directories incorrectly describe behavior

2021-06-10 Thread Matthew Clapp
New submission from Matthew Clapp : The docs for the venv module, EnvBuilder class, ensure_directories method, describe behavior that doesn't match what its actual behavior is, (and what the code is). I propose to update the documentation of the API to match the actual behavior. https://doc

[issue31930] IDLE: Pressing "Home" on Windows places cursor before ">>>"

2021-06-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: IDLE Classic Windows currently works correctly. A custom keyset with <> badly rebound does not. So maybe I was using the latter when I open this. Anyway, this is moot in 3.10 with prompt removed, and I intend to backpart the change. -- resolution

[issue18444] IDLE: Revise macOS key bindings, make new one.

2021-06-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: I also closed #21359, which has more comment from Ned about bindings not working. -- ___ Python tracker ___

[issue21359] IDLE macOS: Some Command shortcuts do not work correctly

2021-06-10 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> duplicate stage: test needed -> resolved status: open -> closed superseder: -> IDLE: Revise macOS key bindings, make new one. ___ Python tracker

[issue18444] IDLE: Revise macOS key bindings, make new one.

2021-06-10 Thread Terry J. Reedy
Change by Terry J. Reedy : -- components: +macOS ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue18444] IDLE: Revise macOS key bindings, make new one.

2021-06-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: I closed #32761 about new macOS keyset, in favor of this one. There is a bit more discussion there to consider. I agree that a chart of <> down side and keyset across top would be a good start. -- nosy: -Todd.Rovito title: IDLE: Revise Mac OS X ke

[issue32761] Create IDLE Modern Mac keyset

2021-06-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: #18444 is about revising macOS keysets and/or making a new one. This is about the latter. So closing as duplicate. -- resolution: -> duplicate stage: -> needs patch status: open -> closed superseder: -> IDLE: Revise Mac OS X key bindings. version

[issue19094] urljoin should raise a TypeError if URL is not a string

2021-06-10 Thread Jacob Walls
Jacob Walls added the comment: Hi vajrasky, do you have any interest in converting your patch to a GitHub PR? If not I can see about doing so myself. Cheers. -- nosy: +jacobtylerwalls ___ Python tracker ___

[issue44376] Improve performance of integer exponentiation

2021-06-10 Thread Tim Peters
Tim Peters added the comment: This is a stab at reducing overhead for small exponents, along the lines I sketched: https://github.com/python/cpython/pull/26662 Unfortunately, I've been unable to convince BPO and GitHub to recognize that the PR is related to this report. Did something basic

[issue44376] Improve performance of integer exponentiation

2021-06-10 Thread Tim Peters
Change by Tim Peters : -- keywords: +patch pull_requests: +25248 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26662 ___ Python tracker ___ _

[issue44365] Bad dataclass post-init example

2021-06-10 Thread Micael Jarniac
Micael Jarniac added the comment: Well, at least for this example, to call `super().__init__()`, I'd need to provide it the two arguments it expects, `x` and `y`, otherwise it'd give an error: > TypeError: __init__() missing 2 required positional arguments: 'x' and 'y' If I try calling it a

[issue44382] Python 3.9+ on Windows 8.0

2021-06-10 Thread Hypo Turtle
Hypo Turtle added the comment: Will do; that is where I presumed the issue was/comment needed added, just hadn't located that repo. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue44386] importlib and math.pi interact strangely

2021-06-10 Thread Jack DeVries
Jack DeVries added the comment: That is because pi, along with other constants in the math module are defined during module execution, not module creation: https://github.com/python/cpython/blob/62f1d2b3d7dda99598d053e10b785c463fdcf591/Modules/cmathmodule.c#L1257-L1262 Taking the example rig

[issue14322] More test coverage for hmac

2021-06-10 Thread Arjun
Arjun added the comment: would the update invalid test belong in the TestVectorsTestCase class or should I make a new one? -- ___ Python tracker ___ _

[issue44382] Python 3.9+ on Windows 8.0

2021-06-10 Thread Jack DeVries
Jack DeVries added the comment: https://buildbot.python.org/all/#/waterfall?tags=win64 Buildbot is only running against 8.1, not 8.0. I'm guessing that means that the docs are correct and python.org main page is wrong. I'd open an issue over there: https://github.com/python/pythondotorg/iss

[issue44387] Not obvious that locale.LC_MESSAGES may not exist sometimes (e.g. on Windows)

2021-06-10 Thread Jack DeVries
Jack DeVries added the comment: Follow-up: nope! My hypothesis was incorrect. This is all that _localemodule.c has to say about LC_MESSAGES: #ifdef LC_MESSAGES ADD_INT(module, LC_MESSAGES); #endif /* LC_MESSAGES */ -- ___ Python tracker

[issue44387] Not obvious that locale.LC_MESSAGES may not exist sometimes (e.g. on Windows)

2021-06-10 Thread Jack DeVries
Jack DeVries added the comment: Could it be that _locale throws an ImportError whenever LC_MESSAGES doesn't exist? Then, there are fall-backs defined here: https://github.com/python/cpython/blob/62f1d2b3d7dda99598d053e10b785c463fdcf591/Lib/locale.py#L45-L85 -- nosy: +jack__d ___

[issue44342] enum with inherited type won't pickle

2021-06-10 Thread Ethan Furman
Ethan Furman added the comment: New changeset b613132861839b6d05b67138842b579e1af29f9c by Miss Islington (bot) in branch '3.10': bpo-44342: [Enum] changed pickling from by-value to by-name (GH-26658) (GH-26660) https://github.com/python/cpython/commit/b613132861839b6d05b67138842b579e1af29f9c

[issue44387] Not obvious that locale.LC_MESSAGES may not exist sometimes (e.g. on Windows)

2021-06-10 Thread Richard Mines
New submission from Richard Mines : Documentation page: https://docs.python.org/3/library/locale.html#locale.LC_MESSAGES Code comment saying that locale.LC_MESSAGES doesn't exist sometimes: https://github.com/python/cpython/blob/62f1d2b3d7dda99598d053e10b785c463fdcf591/Lib/locale.py#L25-L26 Co

[issue44379] Pickling recursion error, did not import pickle

2021-06-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: The 'while pickling' part of the message is specific to running in IDLE, as Serhiy explained, but the recursion error itself is due to writing a program with infinite recursion. The program switches the last two items back and forth indefinitely. When run

[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2021-06-10 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +25247 pull_request: https://github.com/python/cpython/pull/26632 ___ Python tracker ___ ___

[issue44385] Some target-related rules are unreachable in the grammar

2021-06-10 Thread miss-islington
miss-islington added the comment: New changeset 3ce35bfbbe29664942f9a8c50c177a4575a31934 by Lysandros Nikolaou in branch '3.9': [3.9] bpo-44385: Remove unused grammar rules (GH-26655) (GH-26659) https://github.com/python/cpython/commit/3ce35bfbbe29664942f9a8c50c177a4575a31934 -- __

[issue44342] enum with inherited type won't pickle

2021-06-10 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +25246 pull_request: https://github.com/python/cpython/pull/26660 ___ Python tracker _

[issue44342] enum with inherited type won't pickle

2021-06-10 Thread Ethan Furman
Ethan Furman added the comment: New changeset 62f1d2b3d7dda99598d053e10b785c463fdcf591 by Ethan Furman in branch 'main': bpo-44342: [Enum] changed pickling from by-value to by-name (GH-26658) https://github.com/python/cpython/commit/62f1d2b3d7dda99598d053e10b785c463fdcf591 -- _

[issue44368] Invalid mapping patterns give confusing SyntaxErrors

2021-06-10 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 05073036dcecefc00b0c3e7397601809da41e2f1 by Pablo Galindo in branch 'main': bpo-44368: Improve syntax errors with invalid as pattern targets (GH-26632) https://github.com/python/cpython/commit/05073036dcecefc00b0c3e7397601809da41e2f1 --

[issue44386] importlib and math.pi interact strangely

2021-06-10 Thread Paul Prescod
New submission from Paul Prescod : from importlib import util mathmodule = util.find_spec("math") math1 = util.module_from_spec(mathmodule) print(math1.pi) = $ python3.8 /tmp/foo.py 3.141592653589793 $ python3.9 /tmp/foo.py Traceback (most recent call last): File "/tmp/foo.py", line

[issue44385] Some target-related rules are unreachable in the grammar

2021-06-10 Thread Lysandros Nikolaou
Change by Lysandros Nikolaou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue44385] Some target-related rules are unreachable in the grammar

2021-06-10 Thread miss-islington
miss-islington added the comment: New changeset 3e137426de3e6a37622b2ca61207b1323fdea11f by Miss Islington (bot) in branch '3.10': bpo-44385: Remove unused grammar rules (GH-26655) https://github.com/python/cpython/commit/3e137426de3e6a37622b2ca61207b1323fdea11f --

[issue44385] Some target-related rules are unreachable in the grammar

2021-06-10 Thread Lysandros Nikolaou
Change by Lysandros Nikolaou : -- pull_requests: +25245 pull_request: https://github.com/python/cpython/pull/26659 ___ Python tracker ___ __

[issue44342] enum with inherited type won't pickle

2021-06-10 Thread Ethan Furman
Change by Ethan Furman : -- keywords: +patch pull_requests: +25244 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26658 ___ Python tracker ___ ___

[issue44385] Some target-related rules are unreachable in the grammar

2021-06-10 Thread miss-islington
miss-islington added the comment: New changeset e7b4644607789848f9752a3bd20ff216e25b4156 by Lysandros Nikolaou in branch 'main': bpo-44385: Remove unused grammar rules (GH-26655) https://github.com/python/cpython/commit/e7b4644607789848f9752a3bd20ff216e25b4156 -- nosy: +miss-islingt

[issue44385] Some target-related rules are unreachable in the grammar

2021-06-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +25243 pull_request: https://github.com/python/cpython/pull/26657 ___ Python tracker ___ __

[issue44356] Multiple enum mixins not allowed even when they have the same datatype

2021-06-10 Thread Ethan Furman
Ethan Furman added the comment: New changeset 304ec53b53021ceddf62a38e66a06aed37e2ac41 by Miss Islington (bot) in branch '3.9': bpo-44356: [Enum] allow multiple data-type mixins if they are all the same (GH-26649) (GH-26652) https://github.com/python/cpython/commit/304ec53b53021ceddf62a38e66

[issue44356] Multiple enum mixins not allowed even when they have the same datatype

2021-06-10 Thread Ethan Furman
Ethan Furman added the comment: New changeset 01286017c3345e2b8a0af2bd48f6eb2087693a82 by Miss Islington (bot) in branch '3.10': bpo-44356: [Enum] allow multiple data-type mixins if they are all the same (GH-26649) (GH-26653) https://github.com/python/cpython/commit/01286017c3345e2b8a0af2bd4

[issue44342] enum with inherited type won't pickle

2021-06-10 Thread Ethan Furman
Ethan Furman added the comment: Looking into this I think the root of the problem is the way `reduce` is handled -- currently, Enum's `__reduce_ex__` works by returning the class, and the value to use to lookup the member. Because that lookup can fail with complex enums, EnumType will sabot

[issue34266] Bad behavior with "restart \" or "restart "" in pdb

2021-06-10 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch nosy: +iritkatriel nosy_count: 2.0 -> 3.0 pull_requests: +25242 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26656 ___ Python tracker _

[issue44385] Some target-related rules are unreachable in the grammar

2021-06-10 Thread Lysandros Nikolaou
Change by Lysandros Nikolaou : -- keywords: +patch pull_requests: +25241 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26655 ___ Python tracker _

[issue44385] Some target-related rules are unreachable in the grammar

2021-06-10 Thread Lysandros Nikolaou
New submission from Lysandros Nikolaou : Three rules (targets, target and t_atom) in the grammar are unreachable. We were using them at some point in the past, but we never removed them when we replaced them with other rules. -- assignee: lys.nikolaou components: Parser messages: 3955

[issue44370] Inconsistent results for min() and max() with math.nan as argument

2021-06-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: We should consider biting the bullet and revising the default NaN sort order. It has been a perpetual irritant. 1) Have NaNs always compare to less than any other float value. 2) When comparing two distinct NaNs, use the NaN payload and fall back to obj

[issue37022] pdb: do_p and do_pp swallow exceptions from __repr__

2021-06-10 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37022] pdb: do_p and do_pp swallow exceptions from __repr__

2021-06-10 Thread Irit Katriel
Irit Katriel added the comment: New changeset 175ebc60d52f2e88cf5cba5224c15074d2623c10 by Miss Islington (bot) in branch '3.9': bpo-37022: Fix bug where pdb's do_p/do_pp commands swallow exceptions from repr (GH-18180) (GH-26651) https://github.com/python/cpython/commit/175ebc60d52f2e88cf5cb

[issue37022] pdb: do_p and do_pp swallow exceptions from __repr__

2021-06-10 Thread Irit Katriel
Irit Katriel added the comment: New changeset e3bc32fc1ad5537b476b34062b07a040533c913a by Miss Islington (bot) in branch '3.10': bpo-37022: Fix bug where pdb's do_p/do_pp commands swallow exceptions from repr (GH-18180) (GH-26650) https://github.com/python/cpython/commit/e3bc32fc1ad5537b476b

[issue44365] Bad dataclass post-init example

2021-06-10 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure directly calling __post_init__ is a good pattern. Why would not calling __init__, like you would with any other class, not be the preferred thing to do? -- ___ Python tracker

[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-06-10 Thread Ethan Furman
Ethan Furman added the comment: Thank you everyone for your help. -- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.11 ___ Python tracker

[issue44356] Multiple enum mixins not allowed even when they have the same datatype

2021-06-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +25239 pull_request: https://github.com/python/cpython/pull/26653 ___ Python tracker ___ __

[issue44356] Multiple enum mixins not allowed even when they have the same datatype

2021-06-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +25240 pull_request: https://github.com/python/cpython/pull/26654 ___ Python tracker ___ __

[issue44356] Multiple enum mixins not allowed even when they have the same datatype

2021-06-10 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +25238 pull_request: https://github.com/python/cpython/pull/26652 ___ Python tracker _

[issue37022] pdb: do_p and do_pp swallow exceptions from __repr__

2021-06-10 Thread Irit Katriel
Irit Katriel added the comment: New changeset 6544b2532df82d137b71323445a07a6e29bcdec0 by Daniel Hahler in branch 'main': bpo-37022: Fix bug where pdb's do_p/do_pp commands swallow exceptions from repr (GH-18180) https://github.com/python/cpython/commit/6544b2532df82d137b71323445a07a6e29bcde

[issue37022] pdb: do_p and do_pp swallow exceptions from __repr__

2021-06-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +25237 pull_request: https://github.com/python/cpython/pull/26651 ___ Python tracker ___ __

[issue37022] pdb: do_p and do_pp swallow exceptions from __repr__

2021-06-10 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +25236 pull_request: https://github.com/python/cpython/pull/26650 ___ Python tracker _

[issue44356] Multiple enum mixins not allowed even when they have the same datatype

2021-06-10 Thread Ethan Furman
Ethan Furman added the comment: New changeset 8a4f0850d75747af8c96ca0e7eef1f5c1abfba25 by Ethan Furman in branch 'main': bpo-44356: [Enum] allow multiple data-type mixins if they are all the same (GH-26649) https://github.com/python/cpython/commit/8a4f0850d75747af8c96ca0e7eef1f5c1abfba25 -

[issue33962] IDLE: use ttk.spinbox with configdialog

2021-06-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: Mark, I am not sure what last comment meant, but we generally only test IDLE with 3.x with the 8.6.y that comes with 3.x. Ned Deily sometimes runs gui tests with various tcl/tk versions and builds to select one for the installer, but he knows about whatever

[issue33962] IDLE: use ttk.spinbox with configdialog

2021-06-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 540ebc4a8874f94152980be7778f3f793b65f111 by Miss Islington (bot) in branch '3.10': bpo-33962: Use ttk spinbox for IDLE indent space config (GH-22954) https://github.com/python/cpython/commit/540ebc4a8874f94152980be7778f3f793b65f111 --

[issue44384] test_ttk_guionly: 2 tests fail once each on Pipelines Ubuntu

2021-06-10 Thread Terry J. Reedy
New submission from Terry J. Reedy : 3.10 Pipelines Ubuntu CI (like #42370) Each passed on 3.11 and 3.9 and all other CI tests and my machine. FIRST RUN - FAIL: test_heading_callback (tkinter.test.test_ttk.test_widgets.TreeviewTest)

[issue44364] Add non integral tests for `sqrt()`

2021-06-10 Thread Mark Dickinson
Mark Dickinson added the comment: > 2921 is the smallest integers for which math.sqrt(x) > x**0.5 This is platform-dependent. On my machine, for example, `math.sqrt(2921) == 2921**0.5` returns `True`. I don't see a lot of value in additional tests here; we're only wrapping the libm sqrt, so

[issue33962] IDLE: use ttk.spinbox with configdialog

2021-06-10 Thread miss-islington
miss-islington added the comment: New changeset 9b889433c7bb3ed7e2b4655f024b49d97fe412fb by Miss Islington (bot) in branch '3.9': bpo-33962: Use ttk spinbox for IDLE indent space config (GH-22954) https://github.com/python/cpython/commit/9b889433c7bb3ed7e2b4655f024b49d97fe412fb --

[issue44342] enum with inherited type won't pickle

2021-06-10 Thread Ethan Furman
Change by Ethan Furman : -- priority: normal -> high versions: +Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44364] Add non integral tests for `sqrt()`

2021-06-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 65733 and 262694 are integers in range 1..100 with largest relative errors of naive square root (with different signs). 33031 and 524557 are integers in range 1..100 with largest relative errors of naive cube root (with different signs). -

[issue44356] Multiple enum mixins not allowed even when they have the same datatype

2021-06-10 Thread Ethan Furman
Change by Ethan Furman : -- title: Abstract enum mixins not allowed -> Multiple enum mixins not allowed even when they have the same datatype ___ Python tracker ___ __

[issue44356] Multiple enum mixins not allowed even when they have the same datatype

2021-06-10 Thread Ethan Furman
Change by Ethan Furman : -- keywords: +patch pull_requests: +25235 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26649 ___ Python tracker ___ ___

[issue44364] Add non integral tests for `sqrt()`

2021-06-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >>> math.sqrt(2.5) == 2.5**0.5 True >>> math.sqrt(25.25) == 25.25**0.5 True If we test the precision of math.sqrt(), would not be better to test it with data for which naive way of calculating the root returns different result? For example 2921 is the smal

[issue33962] IDLE: use ttk.spinbox with configdialog

2021-06-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +25234 pull_request: https://github.com/python/cpython/pull/26648 ___ Python tracker ___ __

[issue33962] IDLE: use ttk.spinbox with configdialog

2021-06-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 42d5a4fc3b35e45cdd237d56a04e98894d0a31f5 by Mark Roseman in branch 'main': bpo-33962: Use ttk spinbox for IDLE indent space config (GH-22954) https://github.com/python/cpython/commit/42d5a4fc3b35e45cdd237d56a04e98894d0a31f5 -- ___

[issue33962] IDLE: use ttk.spinbox with configdialog

2021-06-10 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +25233 pull_request: https://github.com/python/cpython/pull/26647 ___ Python tracker _

[issue44362] improve documentation of SSL deprecations

2021-06-10 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch nosy: +christian.heimes nosy_count: 6.0 -> 7.0 pull_requests: +25232 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26646 ___ Python tracker

[issue44370] Inconsistent results for min() and max() with math.nan as argument

2021-06-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The idea of math.ieee754_total_order looks interesting, but how would it work with min/max? In https://grouper.ieee.org/groups/msc/ANSI_IEEE-Std-754-2019/background/minNum_maxNum_Removal_Demotion_v3.pdf there is a comparison of several standards and imple

[issue44376] Improve performance of integer exponentiation

2021-06-10 Thread Tim Peters
Tim Peters added the comment: Under the released 3.9.5 for 64-bit Win10, raising to the power 2 is clearly much slower than multiplying directly: C:\Windows\System32>py -3 -m timeit -s "x=151" "x*x" 1000 loops, best of 5: 30 nsec per loop C:\Windows\System32>py -3 -m timeit -s "x=151" "x

[issue44383] argparse.BooleanOptionalAction interacts poorly with ArgumentDefaultsHelpFormatter

2021-06-10 Thread Julian Gilbey
New submission from Julian Gilbey : With code like the following: import argparse parser = argparse.ArgumentParser( description="Test program", formatter_class=argparse.ArgumentDefaultsHelpFormatter, ) parser.add_argument( "--foo", help="Use the foo component.", actio

[issue44382] Python 3.9+ on Windows 8.0

2021-06-10 Thread Hypo Turtle
New submission from Hypo Turtle : As per https://docs.python.org/3/using/windows.html: "This means that Python 3.9 supports Windows 8.1 and newer." Isn't reflected on python.org main page which has: "Note that Python 3.9+ cannot be used on Windows 7 or earlier." Leaving 8.0 unaddressed. -

[issue44381] Allow enabling control flow guard in Windows build

2021-06-10 Thread Steve Dower
Steve Dower added the comment: FWIW, I don't actually know what the performance impact is. I'm not set up for running the perf benchmarks, and I don't know if anyone else is (on Windows), but if someone would like to then it'll be easier once the environment option to enable it is in there.

[issue44381] Allow enabling control flow guard in Windows build

2021-06-10 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +25231 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26645 ___ Python tracker ___

[issue44381] Allow enabling control flow guard in Windows build

2021-06-10 Thread Steve Dower
New submission from Steve Dower : Currently we don't enable CFG (which is runtime protection against code injection into tables), because it likely has a performance impact and the kind of attack is outside our scope. However, we should make it easier to build CPython with CFG enabled, so tha

[issue44376] Improve performance of integer exponentiation

2021-06-10 Thread Mark Dickinson
Mark Dickinson added the comment: I can't reproduce this on my Mac laptop (using Python builds from MacPorts). Numbers for both x**2 and x*x are fairly stable across Python 3.2 to Python 3.10. There's some variation, but nothing close to the same extent that Steven is seeing. Here are my ra

[issue44357] Add math.cbrt() function: Cube Root

2021-06-10 Thread Mark Dickinson
Mark Dickinson added the comment: All done; closing. Thank you for the contribution! -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue44357] Add math.cbrt() function: Cube Root

2021-06-10 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset ac867f10b49322e25f34d2d8abd8e63c86834750 by Ajith Ramachandran in branch 'main': bpo-44357:Add `math.cbrt()` function: Cube Root (GH-26622) https://github.com/python/cpython/commit/ac867f10b49322e25f34d2d8abd8e63c86834750 -- _

[issue44379] Pickling recursion error, did not import pickle

2021-06-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is because you run the code in IDLE. print(tempList) converts argument to string and write it to sys.stdout. In IDLE sys.stdout is a proxy object which uses RPC to communicate with the IDLE process which should insert the written text in the console tex

[issue44380] glob.glob handling of * (asterisk) wildcard is broken

2021-06-10 Thread Maxim Egorushkin
Maxim Egorushkin added the comment: > glob.glob does not provide something equivalent to a DOTALL flag I see now, said a blind man. -- ___ Python tracker ___ ___

[issue44380] glob.glob handling of * (asterisk) wildcard is broken

2021-06-10 Thread Isaac Muse
Isaac Muse added the comment: Sadly, this because pathlib glob and glob.glob use different implementations. And glob.glob does not provide something equivalent to a DOTALL flag allowing a user to glob hidden files without explicitly defining the leading dot in the pattern. -- nosy:

[issue44364] Add non integral tests for `sqrt()`

2021-06-10 Thread Mark Dickinson
Change by Mark Dickinson : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mai

[issue44364] Add non integral tests for `sqrt()`

2021-06-10 Thread Mark Dickinson
New submission from Mark Dickinson : New changeset 90cd4330329a99e52f7141db5e0a469d30088e66 by Ajith Ramachandran in branch 'main': bpo-44364:Add non integral tests for `sqrt()` (#26625) https://github.com/python/cpython/commit/90cd4330329a99e52f7141db5e0a469d30088e66 -- ___

[issue44380] glob.glob handling of * (asterisk) wildcard is broken

2021-06-10 Thread Maxim Egorushkin
Maxim Egorushkin added the comment: I may be naive, but why then: $ python3 -c 'from pathlib import Path; print(list(Path(".").glob("*.bash_profile")))' Outputs: [PosixPath('.bash_profile')] ? -- ___ Python tracker

[issue44380] glob.glob handling of * (asterisk) wildcard is broken

2021-06-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +nailor, petri.lehtinen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44380] glob.glob handling of * (asterisk) wildcard is broken

2021-06-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Only pattern beginning with a dot can match filename beginning with a dot. >From https://docs.python.org/3/library/glob.html Note that unlike fnmatch.fnmatch(), glob treats filenames beginning with a dot (.) as special cases. This phrase was added in i

[issue44376] Improve performance of integer exponentiation

2021-06-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is it because exponentiation becomes slower or because multiplication becomes faster? What are absolute numbers? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue44380] glob.glob handling of * (asterisk) wildcard is broken

2021-06-10 Thread Maxim Egorushkin
Change by Maxim Egorushkin : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue44380] glob.glob handling of * (asterisk) wildcard is broken

2021-06-10 Thread Maxim Egorushkin
New submission from Maxim Egorushkin : Problem: `glob.glob` documentation states that "pathname ... can contain shell-style wildcards." However, it stops short of saying that shell-style wildcards are handled the same way as in a POSIX-compliant/friendly shell. https://pubs.opengroup.org/o

[issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread

2021-06-10 Thread Matt Whitlock
Matt Whitlock added the comment: Observed this same failure mode on a Raspberry Pi 1 while running 'make install' on Python 3.9.5 with 9 concurrent workers. Exception in thread Thread-1: Traceback (most recent call last): File "/var/tmp/portage/dev-lang/python-3.9.5_p2/image/usr/lib/python

[issue44356] Abstract enum mixins not allowed

2021-06-10 Thread Ethan Furman
Ethan Furman added the comment: Since I like puzzles, here is a working LenientStrEnum: class LenientStrEnum(str, Enum): # def __init__(self, *args): self._valid = True # @classmethod def _missing_(cls, value): logger.warning(

[issue44379] Pickling recursion error, did not import pickle

2021-06-10 Thread Violet Godfrey
New submission from Violet Godfrey : I accidentally created an infinite recursion. The error referenced pickling but I did not import pickle. To reproduce: def permute(inputList): '''permute(inputList) -> list returns list of all permutations of inputList CURRENTLY DOESN'T ACTUAL

[issue44376] Improve performance of integer exponentiation

2021-06-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37022] pdb: do_p and do_pp swallow exceptions from __repr__

2021-06-10 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list

[issue44365] Bad dataclass post-init example

2021-06-10 Thread Micael Jarniac
Micael Jarniac added the comment: I'm trying to think of an example, and what I've thought of so far is having a base dataclass that has a `__post_init__` method, and another dataclass that inherits from it and also has a `__post_init__` method. In that case, the subclass might need to call

[issue43318] pdb does not output the prompt message when successfully clear breakpoints by "filename:lineno"

2021-06-10 Thread Irit Katriel
Irit Katriel added the comment: Your fix looks correct - the problem is that the list of breakpoints gets emptied by the clear_break call, and you copy the list so that it can be echoed later if clear_break does not err. I made some polishing comments on the PR, and it also need to be rebase

[issue44242] enum.IntFlag regression: missing values cause TypeError

2021-06-10 Thread Ethan Furman
Ethan Furman added the comment: New changeset 749648609de89f14581190ea34b9c0968787a701 by Ethan Furman in branch '3.10': [3.10] bpo-44242: [Enum] remove missing bits test from Flag creation (GH-26586) (GH-26635) https://github.com/python/cpython/commit/749648609de89f14581190ea34b9c0968787a70

[issue44353] PEP 604 NewType

2021-06-10 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: https://github.com/python/typing/issues/746 has some previous discussion of implementing NewType as a class (motivated by __repr__), including benchmarks. -- ___ Python tracker

[issue44353] PEP 604 NewType

2021-06-10 Thread Ken Jin
Change by Ken Jin : -- nosy: +Jelle Zijlstra, gvanrossum, kj, levkivskyi versions: +Python 3.11 ___ Python tracker ___ ___ Python-bu

  1   2   >