[issue41902] Micro optimization for range.index if step is 1

2020-10-01 Thread Dong-hee Na
New submission from Dong-hee Na : if we declare range without setting step, we don't have to process divide operation. here is the benchmark result both setting step and without step, With my patch, there is no performance degrade with range.index when the step is not one and showing 19%

[issue41902] Micro optimization for range.index if step is 1

2020-10-01 Thread Dong-hee Na
Change by Dong-hee Na : Added file: https://bugs.python.org/file49483/bench_range_step.py ___ Python tracker ___ ___ Python-bugs-list

[issue22864] Add filter to multiprocessing.Pool

2020-10-01 Thread Christian Leichsenring
Christian Leichsenring added the comment: The main point the OP didn't make is exactly the issue that Pool.map returns a list which is potentially very large given that multiprocessing is used to process large amounts of data. So IMHO either there should be the possibility to exclude

[issue41901] Added some explaining to pickle errors.

2020-10-01 Thread Marco Sulla
New submission from Marco Sulla : All pickle error messages in typeobject.c was a generic "cannot pickle 'type' object". Added some explaining for every individual error. -- components: Interpreter Core messages: 377747 nosy: Marco Sulla priority: normal pull_requests: 21494 severity:

[issue41861] Convert sqlite3 to PEP 384

2020-10-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9031bd4fa42dbb0f25aee9286154ad4bf60df3f8 by Erlend Egeberg Aasland in branch 'master': bpo-41861: Convert _sqlite3 RowType and StatementType to heap types (GH-22444)

[issue37224] [subinterpreters] test__xxsubinterpreters fails randomly

2020-10-01 Thread STINNER Victor
STINNER Victor added the comment: The test still fails randomly: AMD64 Windows8.1 Refleaks 3.8 https://buildbot.python.org/all/#/builders/200/builds/48 test_subinterpreter failed twice on Refleaks which runs tests 6 times in a row. First run: 0:33:58 load avg: 4.78 [204/423/1]

[issue41896] Moving index with wordstart expression includes non-alphanumberic and underline characters if word is tagged and iat the edge of a text widget

2020-10-01 Thread pyTama
pyTama added the comment: I'm running on windows. The patch level on python 3.6 is (8, 6, 6, 'final', 0), while on python 3.5 is (8, 6, 4, 'final', 0). -- ___ Python tracker

[issue41861] Convert sqlite3 to PEP 384

2020-10-01 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +21495 pull_request: https://github.com/python/cpython/pull/22478 ___ Python tracker ___

[issue41902] Micro optimization for range.index if step is 1

2020-10-01 Thread Dong-hee Na
Dong-hee Na added the comment: For optimization case, >>> a = range(0, 1) >>> a.index(3) 3 -- ___ Python tracker ___ ___

[issue41896] Moving index with wordstart expression includes non-alphanumberic and underline characters if word is tagged and iat the edge of a text widget

2020-10-01 Thread E. Paine
E. Paine added the comment: Thank you for reporting this issue, however it is ultimately a Tk issue as shown by running the attached script in wish. I assume the Tk version was updated in Python 3.6, though I don't know which platform you are on so don't know which of Ned or Steve to nosy

[issue41804] test_epoll fails test_control_and_wait() randomly on aarch64 RHEL8 Refleaks 3.9

2020-10-01 Thread STINNER Victor
STINNER Victor added the comment: The test also fails on aarch64 RHEL7 Refleaks 3.x: https://buildbot.python.org/all/#/builders/131/builds/46 FAIL: test_control_and_wait (test.test_epoll.TestEPoll) -- ___ Python tracker

[issue41861] Convert sqlite3 to PEP 384

2020-10-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset 256e54acdbdb26745d4bbb5cf366454151e42773 by Erlend Egeberg Aasland in branch 'master': bpo-41861: Convert _sqlite3 CursorType and ConnectionType to heap types (GH-22478)

[issue41902] Micro optimization for range.index if step is 1

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

[issue31256] xml.etree.ElementTree: add support for doctype in tostring method

2020-10-01 Thread Stefan Behnel
Stefan Behnel added the comment: Yes, it fixed already. Thanks! -- nosy: +scoder resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue37294] concurrent.futures.ProcessPoolExecutor state=finished raised error

2020-10-01 Thread DanilZ
DanilZ added the comment: I think you have correctly estimated the problem in the last part of your message: "as it could possibly indicate an issue with running out of memory when the dataframe is converted to pickle format (which often increases the total size) within the process

[issue41900] XML C14N serialisation fails with default namespace

2020-10-01 Thread Stefan Behnel
Change by Stefan Behnel : -- keywords: +patch pull_requests: +21493 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22474 ___ Python tracker

[issue37294] concurrent.futures.ProcessPoolExecutor state=finished raised error

2020-10-01 Thread DanilZ
DanilZ added the comment: . > On 1 Oct 2020, at 03:11, Kyle Stanley wrote: > > > Kyle Stanley added the comment: > > DanilZ, could you take a look at the superseding issue > (https://bugs.python.org/issue37297) and see if your exception raised within > the job is the same? > > If

[issue41900] XML C14N serialisation fails with default namespace

2020-10-01 Thread Stefan Behnel
New submission from Stefan Behnel : import xml.etree.ElementTree as ET xml=""" http://soap.sforce.com/2006/04/metadata;> """ print(ET.canonicalize(xml)) Fails with: ValueError: Namespace "" is not declared in scope when trying to build the QName of the unnamespaced "targets" attribute.

[issue41899] Poor example for Element.remove()

2020-10-01 Thread Stefan Behnel
Stefan Behnel added the comment: Closing as duplicate of issue 41891. Let's keep the discussion there. -- nosy: +scoder resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker

[issue41899] Poor example for Element.remove()

2020-10-01 Thread Stefan Behnel
Stefan Behnel added the comment: Closing as duplicate of issue 41892. Let's keep the discussion there. -- ___ Python tracker ___

[issue41899] Poor example for Element.remove()

2020-10-01 Thread Stefan Behnel
Change by Stefan Behnel : -- Removed message: https://bugs.python.org/msg377740 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue41896] Moving index with wordstart expression includes non-alphanumberic and underline characters if word is tagged and iat the edge of a text widget

2020-10-01 Thread E. Paine
Change by E. Paine : -- nosy: +epaine ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41871] Add PyList_Remove() in listobject.c

2020-10-01 Thread STINNER Victor
STINNER Victor added the comment: > it is more convenient to just call the method Calling a Python method in Python is not convenient nor efficient. For example, PyObject_CallMethod() has to decode a name from UTF-8 and then needs a lookup into the type dictionary. The list.remove() raises

[issue41902] Micro optimization for range.index if step is 1

2020-10-01 Thread STINNER Victor
STINNER Victor added the comment: PR 22479 avoids calling PyNumber_FloorDivide(a, b) if b == 1 (if b == _PyLong_One): it makes range.index(a, 1) call 214 ns faster. I'm surprised that PyNumber_FloorDivide(a, 1) takes 214 ns. Does it spend most time in binary_op1()? Or

[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-10-01 Thread WoodyWoo
WoodyWoo added the comment: Could I say the mutable sequence containing not the object but the pointer like C++. So they can changed in def functions. -- ___ Python tracker

[issue41903] PyNumber_InPlacePower ignores o3 if o1 implements __ipow__

2020-10-01 Thread Simon Cross
Simon Cross added the comment: The documentation for __ipow__ [4] suggests that the intention was to support the modulus argument, so perhaps that argues for fixing the behaviour of PyNumber_InPlacePower. [4] https://docs.python.org/3/reference/datamodel.html#object.__ipow__ --

[issue41901] Added some explaining to pickle errors.

2020-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was intentionally left a generic "cannot pickle 'type' object". Because there are many ways to make an object pickleable, and it is non-pickleable in all other cases. * "missing `__getstate__()` on variable-length object" It creates false impression

[issue41903] PyNumber_InPlacePower ignores o3 if o1 implements __ipow__

2020-10-01 Thread Ammar Askar
Ammar Askar added the comment: Whoops, forgot the numpy link: https://github.com/numpy/numpy/blob/33e1dbee8d9e11a3e96efaae822ff6f3c44e3cef/numpy/core/src/multiarray/number.c#L729-L741 -- ___ Python tracker

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2020-10-01 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 58a7da9e125422323f79c4ee95ac5549989d8162 by Robert Smallshire in branch 'master': bpo-26680: Incorporate is_integer in all built-in and standard library numeric types (GH-6121)

[issue41902] Micro optimization for range.index if step is 1

2020-10-01 Thread Dong-hee Na
Dong-hee Na added the comment: For practical use case >>> a = range(-2, 10) >>> a.index(2) -- ___ Python tracker ___ ___

[issue41903] PyNumber_InPlacePower ignores o3 if o1 implements __ipow__

2020-10-01 Thread Simon Cross
New submission from Simon Cross : The documentation for PyNumber_InPlacePower [1] reads: This is the equivalent of the Python statement o1 **= o2 when o3 is Py_None, or an in-place variant of pow(o1, o2, o3) otherwise. If o3 is to be ignored, pass Py_None in its place (passing NULL for o3

[issue41903] PyNumber_InPlacePower ignores o3 if o1 implements __ipow__

2020-10-01 Thread Ammar Askar
Ammar Askar added the comment: Huh, this is weird. I wonder why the data model provides the signature object.__ipow__(self, other[, modulo]) if the slot always seems to drop the third argument. Adding Brett to the nosy who found another issue around the special casing of pow/** recently.

[issue41903] PyNumber_InPlacePower ignores o3 if o1 implements __ipow__

2020-10-01 Thread Ammar Askar
Change by Ammar Askar : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41902] Micro optimization for range.index if step is 1

2020-10-01 Thread Dong-hee Na
Dong-hee Na added the comment: For the record with optimization Mean +- std dev: [range_master] 112 ns +- 3 ns -> [range_opt] 99.3 ns +- 1.8 ns: 1.13x faster (-12%) -- ___ Python tracker

[issue41903] PyNumber_InPlacePower ignores o3 if o1 implements __ipow__

2020-10-01 Thread Ammar Askar
Ammar Askar added the comment: Also of note, there is actually no way to call `PyNumber_InPlacePower` from pure python from what I can tell. Even libraries like numpy don't implement the three-argument version of the nb_inplace_power slot. -- ___

[issue41902] Micro optimization for range.index if step is 1

2020-10-01 Thread Mark Dickinson
Mark Dickinson added the comment: > Do we need another fast-path in long_div(a, b) when b == _PyLong_One? Just > return a in this case. I'd much prefer not. Every extra fast path check costs time for the general case, and there's no strong reason to expect people to be dividing by one. The

[issue41901] Added some explaining to pickle errors.

2020-10-01 Thread Marco Sulla
Marco Sulla added the comment: I do not remember the problem I had, but when I experimented with frozendict I get one of these errors. I failed to understand the problem so I added the additional info. Maybe adding an assert in debug mode? It will be visible only to devs. --

[issue41904] datetime.datetime.today makes no sense and should be removed

2020-10-01 Thread Damian Yurzola
New submission from Damian Yurzola : Last night I discovered we have datetime.datetime.today alongside datetime.datetime.now and datetime.date.today. - datetime.now - date.today Both make semantic sense. datetime.datetime.today returns a datetime, which make no semantic sense and causes

[issue41902] Micro optimization for range.index if step is 1

2020-10-01 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +21498 pull_request: https://github.com/python/cpython/pull/22480 ___ Python tracker ___

[issue41905] add update_abstractmethods function to update an ABC's abstract methods

2020-10-01 Thread Ben Avrahami
New submission from Ben Avrahami : python-ideas discussion: https://mail.python.org/archives/list/python-id...@python.org/thread/6BNJ3YSEBPHEPGXSAZGBW3TJ64ZGZIHE/ In order to allow "decorator mixins" (most notably dataclass and total_ordering) to implement ABCs, new functionality is needed. I

[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-10-01 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-37751 and my PR 17997. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41904] datetime.datetime.today makes no sense and should be removed

2020-10-01 Thread Steven D'Aprano
Steven D'Aprano added the comment: Even if I agreed that this method "makes no sense", and I don't, removing it would be gratuitous breakage. Why should we break potentially thousands of people's code who are happily using this method, merely because you say that people who use it have "the

[issue41902] Micro optimization for range.index if step is 1

2020-10-01 Thread STINNER Victor
STINNER Victor added the comment: Mark: "I'd much prefer not. Every extra fast path check costs time for the general case, and there's no strong reason to expect people to be dividing by one. The range code seems like the right place for this optimization, not the long-divide code." In

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

2020-10-01 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- nosy: +erlendaasland nosy_count: 17.0 -> 18.0 pull_requests: +21497 pull_request: https://github.com/python/cpython/pull/22478 ___ Python tracker

[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-10-01 Thread Eric V. Smith
Eric V. Smith added the comment: I can't say how ElementTree works without more checking, but this solution cannot work in general. Given a pointer to an object that's in a list, how would you get to the next item? Say the parent list-like object has a C array of pointers to the objects it

[issue41905] add update_abstractmethods function to update an ABC's abstract methods

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

[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-10-01 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +21499 pull_request: https://github.com/python/cpython/pull/17997 ___ Python tracker ___

[issue21955] ceval.c: implement fast path for integers with a single digit

2020-10-01 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +21500 pull_request: https://github.com/python/cpython/pull/22481 ___ Python tracker ___

[issue21955] ceval.c: implement fast path for integers with a single digit

2020-10-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset bd0a08ea90e4c7a2ebf29697937e9786d4d8e5ee by Victor Stinner in branch 'master': bpo-21955: Change my nickname in BINARY_ADD comment (GH-22481) https://github.com/python/cpython/commit/bd0a08ea90e4c7a2ebf29697937e9786d4d8e5ee --

[issue41902] Micro optimization for range.index if step is 1

2020-10-01 Thread STINNER Victor
STINNER Victor added the comment: About your benchmark, do you build Python with PGO+LTO optimizations? What is your OS and CPU? Do you use CPU isolation on Linux? It would be good to use PGO+LTO optimizations. -- ___ Python tracker

[issue41902] Micro optimization for range.index if step is 1

2020-10-01 Thread Dong-hee Na
Dong-hee Na added the comment: > do you build Python with PGO+LTO optimizations Nope, but I will try to run the benchmark > What is your OS and CPU? Do you use CPU isolation on Linux? macOS, intel i9 with 8 cores -- ___ Python tracker

[issue41902] Micro optimization for range.index if step is 1

2020-10-01 Thread Dong-hee Na
Dong-hee Na added the comment: PR 22479 and PR 22480 are different approaches. I (and Victor) want to check which approach might be better. PR 22480 would affect overall long division performance PR 22479 assumes that step=1 case is very often (e.g range(100), range(-100, 100)) --

[issue41904] datetime.datetime.today makes no sense and should be removed

2020-10-01 Thread Damian Yurzola
Damian Yurzola added the comment: Thanks for your prompt answer Steven. I was inspired to file this bug after reading through a multiplicity of bugs introduced by folks confused by the library's behavior. So there's good precedent. While granted, the documentation is explicit and the

[issue41905] add update_abstractmethods function to update an ABC's abstract methods

2020-10-01 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 2.0 -> 3.0 pull_requests: +21502 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22485 ___ Python tracker

[issue29893] create_subprocess_exec doc doesn't match software

2020-10-01 Thread STINNER Victor
STINNER Victor added the comment: > This was fixed in https://github.com/python/cpython/pull/12598 Right, thanks. I close the issue. commit 1328375ad1c91f25a1500945a67b0ef36e387527 Author: Dima Tisnek Date: Fri Apr 5 23:02:28 2019 +0900 Fix doc for create_subprocess_exec (GH-12598)

[issue41905] add update_abstractmethods function to update an ABC's abstract methods

2020-10-01 Thread Ben Avrahami
Ben Avrahami added the comment: for the functionality to work, `total_ordering` needs to change to also override abstract methods. I believe this is an OK change since total_ordering implicitly dictates that the comparison methods are interchangable. Thus, implementing some comparison

[issue29893] create_subprocess_exec doc doesn't match software

2020-10-01 Thread Carl Bordum Hansen
Carl Bordum Hansen added the comment: This was fixed in https://github.com/python/cpython/pull/12598 -- nosy: +carlbordum ___ Python tracker ___

[issue40956] Use Argument Clinic in sqlite3

2020-10-01 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +21501 pull_request: https://github.com/python/cpython/pull/22484 ___ Python tracker ___

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2020-10-01 Thread STINNER Victor
STINNER Victor added the comment: > Issue 41314 changed the __future__ annotations default version to 3.10. > 3.10.0a1 is scheduled for next Oct 5, less than 2 months from now. It would > be good if PR 20434 were merged before that. Python 3.9.0 final is also around the corner. Any update

[issue29127] Incorrect reference names in asyncio.subprocess documentation

2020-10-01 Thread Carl Bordum Hansen
Carl Bordum Hansen added the comment: I do not think this is the case any longer -- nosy: +carlbordum ___ Python tracker ___ ___

[issue41904] datetime.datetime.today makes no sense and should be removed

2020-10-01 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Thu, Oct 01, 2020 at 04:37:28PM +, Damian Yurzola wrote: > I was inspired to file this bug after reading through a multiplicity > of bugs introduced by folks confused by the library's behavior. Are these public bug reports or private anecdotes? I'm

[issue41906] logging.config.dictConfig does not work with callable filters

2020-10-01 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41904] datetime.datetime.today makes no sense and should be removed

2020-10-01 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +belopolsky, p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41692] Deprecate immortal interned strings: PyUnicode_InternImmortal()

2020-10-01 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +21503 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22486 ___ Python tracker ___

[issue17490] Improve ast.literal_eval test suite coverage

2020-10-01 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, I don't think PR 22469 is relevant to this issue? -- ___ Python tracker ___ ___

[issue41513] High accuracy math.hypot()

2020-10-01 Thread Raymond Hettinger
Change by Raymond Hettinger : Removed file: https://bugs.python.org/file49435/best_frac.py ___ Python tracker ___ ___ Python-bugs-list

[issue41834] Remove _Py_CheckRecursionLimit variable

2020-10-01 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41692] Deprecate immortal interned strings: PyUnicode_InternImmortal()

2020-10-01 Thread STINNER Victor
STINNER Victor added the comment: I proposed PR 22486 to deprecate the function. -- ___ Python tracker ___ ___ Python-bugs-list

[issue17490] Improve ast.literal_eval test suite coverage

2020-10-01 Thread Guido van Rossum
Guido van Rossum added the comment: I agree that it's better to just close this issue, the patch is 7 years old. -- nosy: +gvanrossum ___ Python tracker ___

[issue17490] Improve ast.literal_eval test suite coverage

2020-10-01 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch pull_requests: +21504 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22469 ___ Python tracker

[issue41902] Micro optimization for range.index if step is 1

2020-10-01 Thread Ammar Askar
Ammar Askar added the comment: Out of curiosity, what is the motivation for this optimization? Is there reason to believe that range.index is performed often enough that it's worth the extra code and maintenance cost here? -- nosy: +ammar2 ___

[issue40455] GCC 10 compiler warnings

2020-10-01 Thread STINNER Victor
STINNER Victor added the comment: There are still warnings on compile.c: https://buildbot.python.org/all/#/builders/448/builds/130 Python/compile.c:5660:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] Python/compile.c:5660: warning: writing 1 byte into a region of

[issue41905] add update_abstractmethods function to update an ABC's abstract methods

2020-10-01 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41905] add update_abstractmethods function to update an ABC's abstract methods

2020-10-01 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41613] get_type_hints regression for 3.9 and 3.10

2020-10-01 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: Commit 3ff51d425ecd98b7ba5a12ca9f77eda73fbf9f53 set the __builtins__ to None in namedtuple's creation, but the problem is that it is causing harm when the point came to the point of getting type hints on typing.NamedTuple.__new__ (we had a test about it),

[issue41889] enum: Mixin and int base class regression in 3.8.6

2020-10-01 Thread Ethan Furman
Change by Ethan Furman : -- keywords: +patch pull_requests: +21505 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22487 ___ Python tracker ___

[issue41889] enum: Mixin and int base class regression in 3.8.6

2020-10-01 Thread Ethan Furman
Change by Ethan Furman : -- assignee: -> ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41905] add update_abstractmethods function to update an ABC's abstract methods

2020-10-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: The downside of this proposal is that it is tightly coupled with class creation process. It requires all existing class decorators, metaclasses, and code generators to start caring about something that isn't part of their core functionality (very few

[issue41513] High accuracy math.hypot()

2020-10-01 Thread Raymond Hettinger
Change by Raymond Hettinger : Added file: https://bugs.python.org/file49484/best_frac.py ___ Python tracker ___ ___ Python-bugs-list

[issue41906] logging.config.dictConfig does not work with callable filters

2020-10-01 Thread raybb
New submission from raybb : According to the docs here (https://docs.python.org/3/library/logging.html): "You don’t need to create specialized Filter classes, or use other classes with a filter method: you can use a function (or other callable) as a filter. The filtering logic will check to

[issue41907] Regression in IntFlag behaviour in f-string

2020-10-01 Thread Roger Taylor
New submission from Roger Taylor : An IntFlag member before 3.8.6 was converted to an integer in an f-string. After 3.8.6, the textual IntFlag class and member name are placed in the interpolated f-string instead of the integer. 3.8.3: f"... {X.F} ..." where X.F = 1 << 4 will give "... 16

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

2020-10-01 Thread mohamed koubaa
Change by mohamed koubaa : -- pull_requests: +21506 pull_request: https://github.com/python/cpython/pull/22489 ___ Python tracker ___

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

2020-10-01 Thread mohamed koubaa
Change by mohamed koubaa : -- pull_requests: +21507 pull_request: https://github.com/python/cpython/pull/22490 ___ Python tracker ___

[issue41902] Micro optimization for range.index if step is 1

2020-10-01 Thread Dong-hee Na
Dong-hee Na added the comment: > s there reason to believe that range.index is performed often enough that > it's worth the extra code and maintenance cost here? There are at least 3 reasons 1. pointer comparaition optimization quite common usecase in CPython codebase. e.x) list.count 2. if

[issue41907] Regression in IntFlag behaviour in f-string

2020-10-01 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +barry, eli.bendersky, ethan.furman ___ Python tracker ___ ___ Python-bugs-list

[issue33533] Provide an async-generator version of as_completed

2020-10-01 Thread Justin Arthur
Change by Justin Arthur : -- nosy: +JustinTArthur nosy_count: 5.0 -> 6.0 pull_requests: +21508 pull_request: https://github.com/python/cpython/pull/22491 ___ Python tracker

[issue41902] Micro optimization for range.index if step is 1

2020-10-01 Thread Dong-hee Na
Dong-hee Na added the comment: I found another optimal case and this looks more practical usecase than range.index -- Added file: https://bugs.python.org/file49485/bench_range_compute_item.py ___ Python tracker

[issue41902] Micro optimization for range.index if step is 1

2020-10-01 Thread Dong-hee Na
Dong-hee Na added the comment: Mean +- std dev: [master-compute] 317 ns +- 3 ns -> [bpo-41902-compute] 287 ns +- 6 ns: 1.11x faster (-10%) -- ___ Python tracker ___

[issue41902] Micro optimization for range.index if step is 1

2020-10-01 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +21509 pull_request: https://github.com/python/cpython/pull/22492 ___ Python tracker ___

[issue33533] Provide an async-generator version of as_completed

2020-10-01 Thread Justin Arthur
Justin Arthur added the comment: I've added a new PR, PR 22491. This one has as_completed returning an iterator and includes tests for both the old and new style. I see a trivial amount of latency added in extra call stack over Guido's original implementation. Should we decide to deprecate

[issue38032] lib2to3 doesn't parse Python 3 identifiers containing non-spacing marks

2020-10-01 Thread Justin Arthur
Justin Arthur added the comment: Not sure if there is consensus on how to fix, but fixing #12731 will fix this for most of the cases I've seen complaints about as a side effect. -- ___ Python tracker