[issue44608] Memory use increase in function _tkinter._flatten

2021-07-12 Thread stardust222
New submission from stardust222 <490661...@qq.com>: In the following code, the memory use of function _tkinter._flatten is increase as the number of calls when I input an illegal value. import sys import tracemalloc import _tkinter arg_list = [] arg_list.append('ptqiioaaejhdoat') # check fo

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

2021-07-12 Thread Amanieu
Amanieu added the comment: Yes I did miss that. My bad and thank you so much. -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue43948] sysconfig's osx_framework_user puts headers in different locations from distutils

2021-07-12 Thread Tzu-ping Chung
Change by Tzu-ping Chung : -- keywords: +patch pull_requests: +25641 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27093 ___ Python tracker ___ _

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

2021-07-12 Thread John Belmonte
John Belmonte added the comment: cc: ncoghlan for help with ExitStack exception context -- nosy: +ncoghlan ___ Python tracker ___ _

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

2021-07-12 Thread Filipe Laíns
Change by Filipe Laíns : -- nosy: +FFY00 stage: -> needs patch type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailin

[issue44207] Add a version number to Python functions

2021-07-12 Thread Mark Shannon
Mark Shannon added the comment: New changeset 9487a17e3c7cbb3f11c144775cd108601701bb74 by Mark Shannon in branch 'main': bpo-44207: Add an internal version number to function objects. (GH-27078) https://github.com/python/cpython/commit/9487a17e3c7cbb3f11c144775cd108601701bb74 -- __

[issue44604] [Enhancement] Asyncio task decorator to provide interface to define async DAGs (similar to dask's delayed interface)

2021-07-12 Thread Art
Change by Art : -- title: [Enhancement] Asyncio task decorator to provide functionality similar to dask's delayed interface -> [Enhancement] Asyncio task decorator to provide interface to define async DAGs (similar to dask's delayed interface) ___

[issue33178] Add support for BigEndianUnion and LittleEndianUnion in ctypes

2021-07-12 Thread David Goncalves
David Goncalves added the comment: PR 25480 passes checks and awaits core review. All comments thus far have been addressed. -- ___ Python tracker ___ ___

[issue44607] Teleport method for turtle class

2021-07-12 Thread Vedran Čačić
Vedran Čačić added the comment: In my view, turtle is a great tool for exploring _polar_ coordinates. If you set emphasis to rectangular coordinates, there are many tools that are much better. Second, your function might be ok for you, but it is really not suitable for standard library. Prob

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

2021-07-12 Thread Vedran Čačić
Vedran Čačić added the comment: Of course, the "license" mention should be changed in the same way (in the same message). -- nosy: +veky ___ Python tracker ___ ___

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

2021-07-12 Thread Taylor Alexander
Taylor Alexander added the comment: Hello all. Curious issue. Thanks Stargirl for opening it. Would it be possible for the __repr__ function to examine the calling commands and determine if the origin is the special case where exit is typed in the REPL? Then only when Quitter repr is called w

[issue44583] Failure to build on OSF1.

2021-07-12 Thread Ronald Oussoren
Ronald Oussoren added the comment: IMHO the most important question to answer first is: Why is adding OSF1 support a good idea? The PR, which IMHO in its current state is not mergeable, adds some complexity to the build and ongoing maintenance of CPython itself. This tends to be acceptable

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

2021-07-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Unfortunately, I don't know how that can help because the stack trace is the same in these two cases: >>> import traceback >>> class A: ... def __repr__(self): ... traceback.print_stack() >>> A() File "", line 1, in File "", line 4, in __r

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

2021-07-12 Thread Taylor Alexander
Taylor Alexander added the comment: Makes sense. Thanks for taking a look. -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue44583] Failure to build on OSF1.

2021-07-12 Thread Jay Krell
Jay Krell added the comment: I have a machine up and running that I would like to run this on. Perhaps that is vastly inadequate. Nothing is free, I realize. And Solaris, agreed, would seem to merit "more" support, but zero==zero. I will see if I can setup a buildbot and I am wondering being

[issue44353] PEP 604 NewType

2021-07-12 Thread Yurii Karabas
Yurii Karabas <1998uri...@gmail.com> added the comment: Jelle I can try to implement it in C to see if it will give better performance. -- ___ Python tracker ___ __

[issue44353] PEP 604 NewType

2021-07-12 Thread Ken Jin
Ken Jin added the comment: @Yurii, I would like to caution against a C accelerator for the typing module. My reasoning follows: 1. The maintenance burden is higher. typing is already somewhat complex in Python (lots of MRO/metaclass wizardry). A C module would require knowledge of the C API

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

2021-07-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: I strongly oppose this change. Merely printing an object should not have a side-effect of this magnitude. Standard Python behaviour is that an object's repr should return a useful string, not exit the interpreter. This is a backwards-incompatible change: ri

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

2021-07-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is a backwards-incompatible change, at the very least it needs an okay from the core devs (and possibly even a PEP) not just a patch. Stargirl Flowers suggested: > we could ask the user to confirm that they want to exit Please, no, that is the very op

[issue44607] Teleport method for turtle class

2021-07-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What other Turtle implementations support the teleport command? -- nosy: +serhiy.storchaka ___ Python tracker ___ _

[issue26329] os.path.normpath("//") returns //

2021-07-12 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +25642 pull_request: https://github.com/python/cpython/pull/27094 ___ Python tracker

[issue26329] os.path.normpath("//") returns //

2021-07-12 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: New changeset 66c5853406bbcccecf35372795078c0641a5f385 by Furkan Onder in branch 'main': bpo-26329: update os.path.normpath documentation (GH-20138) https://github.com/python/cpython/commit/66c5853406bbcccecf35372795078c0641a5f385 --

[issue26329] os.path.normpath("//") returns //

2021-07-12 Thread miss-islington
Change by miss-islington : -- pull_requests: +25643 pull_request: https://github.com/python/cpython/pull/27095 ___ Python tracker ___ __

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

2021-07-12 Thread Stargirl Flowers
Stargirl Flowers added the comment: I don't think we should completely write off the possibility of doing this just because the *current* implementation is counter-intuitive. As I expressed in the original post, the explanation of this behavior is rather unsatisfying to newcomers. Also @ste

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

2021-07-12 Thread Stargirl Flowers
Stargirl Flowers added the comment: Also, if a PEP is recommended, I will be happy to author it. -- ___ Python tracker ___ ___ Pyth

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

2021-07-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > However, I disagree that "exit" should not be a special case. But a special case of *what*? How would you implement this in a backwards-compatible way? -- ___ Python tracker

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

2021-07-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: IPython and other reprs are an entire abstraction layer on top of Python, which allows them to do a lot of extra things like implement new commands and alters a lot of behaviours, but the CPython REPL is just the interpreter evaluating commands, and t

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

2021-07-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: For reference, IPython has an entire interception + filtering mechanism to auto call certain functions: https://github.com/ipython/ipython/blob/0e4d6390b2174fb1b352a082b72ad387ae696e87/IPython/core/prefilter.py#L414-L425 where exit is one instance of

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

2021-07-12 Thread Paul Ganssle
Paul Ganssle added the comment: If we want to confine the behavior to just the repl, we could possibly have the repl set an environment variable or something of that nature for interactive sessions, so that `__repr__` of `exit` can tell the difference between being invoked in a REPL and not —

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

2021-07-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > would be in the REPL layer by special-casing `exit` Unfortunately, there is no REPL *layer* as my previous comments mentioned. There is a few details that change for interactive mode but fundamentally the pipeline is the same as reading from a file,

[issue44571] itertools: takedowhile()

2021-07-12 Thread pavel-lexyr
pavel-lexyr added the comment: There is a core part of the `takedowhile` proposal's use case that I am having trouble envisioning via the alternative `before_and_after` proposal. If the `after` part of the iterator the user does not engage with, the transitional elements will be stuck indefi

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

2021-07-12 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +25644 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27096 ___ Python tracker __

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

2021-07-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: One thing we *could* do which is not super invasive, is to match a single AST node of type NAME at the end of Python run. This seems to work but is a bit inelegant: >>> print(exit) Use exit() or Ctrl-D (i.e. EOF) to exit >>> [exit] [Use exit() or Ctrl

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

2021-07-12 Thread Stargirl Flowers
Stargirl Flowers added the comment: I do want to be cautious of saying that we can't do it because of the way the REPL is currently implemented- which appears to be an implementation driven by convenience more than necessity. I also find pushing against special-case behavior in the REPL stra

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

2021-07-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > I do want to be cautious of saying that we can't do it because of the way the > REPL is currently implemented- which appears to be an implementation driven > by convenience more than necessity. Apologies if I have not been clear on this. Is not that

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

2021-07-12 Thread Stargirl Flowers
Stargirl Flowers added the comment: Fair point about semantic behavior and complexity, but hopefully we can come up with a solution that's easier for users. I do like the PR suggested. -- ___ Python tracker __

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

2021-07-12 Thread Paul Ganssle
Paul Ganssle added the comment: I'm +1 for Pablo's approach. That's approximately what I meant by "special-case it in the REPL layer" anyway. Are there any downsides to doing it this way? It seems tightly scoped and with minimal overhead. -- ___

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

2021-07-12 Thread Christof Hanke
Christof Hanke added the comment: Andrei, See https://bugs.python.org/issue42958 Someone else stumbled over this topic. Maybe you can merge these two requests? Otherwise, I'm fine with a new arg. Christof -- ___ Python tracker

[issue42958] filecmp.cmp(shallow=True) isn't actually shallow when only mtime differs

2021-07-12 Thread Christof Hanke
Christof Hanke added the comment: Hi, this is also discussed in https://bugs.python.org/issue41354. Ciao, Christof -- nosy: +chanke ___ Python tracker ___

[issue44609] Buffer support in the stable ABI

2021-07-12 Thread Tarun Johar
New submission from Tarun Johar : PEP 384 and PEP 652 define a stable ABI to be used with Python 3.2 and later. On Windows, symbols for the stable ABI are exported from the python3.dll shared library. The following functions are present in Python 3.9 but have been removed from Python 3.10b3

[issue26329] os.path.normpath("//") returns //

2021-07-12 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 443db64f496d3988d20cfda2c3c2ceb6702df36f by Miss Islington (bot) in branch '3.10': bpo-26329: update os.path.normpath documentation (GH-20138) (GH-27094) https://github.com/python/cpython/commit/443db64f496d3988d20cfda2c3c2ceb6702df36f --

[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-07-12 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 0389426fa4af4dfc8b1d7f3f291932d928392d8b by Miss Islington (bot) in branch '3.8': bpo-44022: Improve the regression test. (GH-26503) (#26506) https://github.com/python/cpython/commit/0389426fa4af4dfc8b1d7f3f291932d928392d8b -- __

[issue44472] ltrace functionality doesn't work if there is an exception set

2021-07-12 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 6fb4248cd9502f50dd089fdcf548d735dcfd981e by Miss Islington (bot) in branch '3.9': bpo-44472: Fix ltrace functionality when exceptions are raised (GH-26822) (#26831) https://github.com/python/cpython/commit/6fb4248cd9502f50dd089fdcf548d735dcfd981e

[issue43298] Windows build cannot detect missing Windows SDK

2021-07-12 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset e7009f4f9a6a55036ef628a07bedc8dab1aa851e by Miss Islington (bot) in branch '3.9': bpo-43298: Improved error message when building without the Windows SDK installed (GH-26800) (#26803) https://github.com/python/cpython/commit/e7009f4f9a6a55036ef628

[issue43207] InspectLoader.is_package is not an abstract method

2021-07-12 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 779983ed7f86610be4a7201deeffdcb8608977e0 by Miss Islington (bot) in branch '3.9': bpo-43207: InspectLoader.is_package is not an abstract method (GH-24517) (#26322) https://github.com/python/cpython/commit/779983ed7f86610be4a7201deeffdcb8608977e0

[issue38820] Make Python compatible with OpenSSL 3.0.0

2021-07-12 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset c92b391dcefe9a7b3e6290bc2e2356eedfcf4bc3 by Christian Heimes in branch '3.9': [3.9] bpo-38820: Test with OpenSSL 3.0.0-alpha16 (GH-25942) (#25944) https://github.com/python/cpython/commit/c92b391dcefe9a7b3e6290bc2e2356eedfcf4bc3 -- nosy:

[issue43207] InspectLoader.is_package is not an abstract method

2021-07-12 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue42194] Docs for argparse.BooleanOptionalAction missing "New in version 3.9"

2021-07-12 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +25645 pull_request: https://github.com/python/cpython/pull/27097 ___ Python tracker

[issue42194] Docs for argparse.BooleanOptionalAction missing "New in version 3.9"

2021-07-12 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset da2e673c53974641a0e13941950e7976bbda64d5 by David Sanders in branch 'main': bpo-42194: Add "New in version: 3.9" to argparse.BooleanOptionalAction (GH-23026) https://github.com/python/cpython/commit/da2e673c53974641a0e13941950e7976bbda64d5 -

[issue42194] Docs for argparse.BooleanOptionalAction missing "New in version 3.9"

2021-07-12 Thread miss-islington
Change by miss-islington : -- pull_requests: +25646 pull_request: https://github.com/python/cpython/pull/27098 ___ Python tracker ___ __

[issue26329] os.path.normpath("//") returns //

2021-07-12 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 47abf240365ddd54a91c6ac167900d4bf6806c4f by Miss Islington (bot) in branch '3.9': bpo-26329: update os.path.normpath documentation (GH-20138) (#27095) https://github.com/python/cpython/commit/47abf240365ddd54a91c6ac167900d4bf6806c4f -- _

[issue26329] os.path.normpath("//") returns //

2021-07-12 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue44610] Format issue with strftime and %Y

2021-07-12 Thread Bartosz Kaznowski
New submission from Bartosz Kaznowski : When you convert a date pre the year 1000 to a string with `%Y` as the formatter and then back to a date again then it fails. This is because `%Y` expects it to be formatted with leading zeroes. For example, the year 1/01/01 (/mm/dd) should be 0001/

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

2021-07-12 Thread Andrei Kulakov
Andrei Kulakov added the comment: Actually, I was mistaken about this, `readmodule_ex` can get the __main__ from sys.modules.. I will look more into this later today. -- ___ Python tracker _

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

2021-07-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Are there any downsides to doing it this way? It seems tightly scoped and > with minimal overhead. We also need to support quit(), if we go this route. It makes parsing in the REPL a bit slower because it needs to check for this at every command an

[issue42194] Docs for argparse.BooleanOptionalAction missing "New in version 3.9"

2021-07-12 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 721d4796be60e6a0a11dee8318794f78928648c1 by Miss Islington (bot) in branch '3.10': bpo-42194: Add "New in version: 3.9" to argparse.BooleanOptionalAction (GH-23026) (#27097) https://github.com/python/cpython/commit/721d4796be60e6a0a11dee8318794f78

[issue43048] Printing RecursionError results in RecursionError

2021-07-12 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 489c27358376e772a61753c3f67daa836ca1eab7 by Vladimir Feinberg in branch '3.9': [3.9] bpo-43048: RecursionError traceback RecursionError bugfix for cpy3.9 (GH-24460) (#24460) https://github.com/python/cpython/commit/489c27358376e772a61753c3f67daa83

[issue43048] Printing RecursionError results in RecursionError

2021-07-12 Thread Łukasz Langa
Change by Łukasz Langa : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailin

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

2021-07-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Since Paul is +1 if another core dev (or devs) are +1 as well with the approach in PR27096 I would feel confident to proceed with this. Alternatively, we could discuss this more generally in python-dev if someone feels that we should have a more open

[issue42194] Docs for argparse.BooleanOptionalAction missing "New in version 3.9"

2021-07-12 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset c786988b19d7b6808d4c940f7206b95e49e06b71 by Miss Islington (bot) in branch '3.9': bpo-42194: Add "New in version: 3.9" to argparse.BooleanOptionalAction (GH-23026) (#27098) https://github.com/python/cpython/commit/c786988b19d7b6808d4c940f7206b95e4

[issue42194] Docs for argparse.BooleanOptionalAction missing "New in version 3.9"

2021-07-12 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue44571] itertools: takedowhile()

2021-07-12 Thread Tim Peters
Tim Peters added the comment: If you don't use the 'after` iterator, then of course you'll never see the values (if any) it would have yielded. How could it possibly be otherwise? By design and construction, the `before` iterator ends before yielding the first (if any) transitional element.

[issue44428] _ProactorBasePipeTransport.abort() after _ProactorBasePipeTransport.close() does not cancel writes

2021-07-12 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue44571] itertools: takedowhile()

2021-07-12 Thread Tim Peters
Tim Peters added the comment: That said, if you really do want those semantics, it's easy to build on top of Raymond's API: def takewhile_plus_one_more_if_any(pred, iterable): from itertools import islice, chain before, after = before_and_after(pred, iterable) return chain(before,

[issue44571] itertools: takedowhile()

2021-07-12 Thread pavel-lexyr
pavel-lexyr added the comment: Thank you - that answers the questions. The use case where we would want to know if the last element is transitional or not completely slipped my mind for some reason. -- ___ Python tracker

[issue44611] CPython uses deprecated randomness API

2021-07-12 Thread Dan Stromberg
New submission from Dan Stromberg : CPython 3.9 uses CryptGenRandom(), which has been deprecated by Microsoft. I'm told the randomness produced by CryptGenRandom() is fine, but Microsoft has introduced a newer API for getting randomness. For these reasons, Python/bootstrap_hash.c should be up

[issue42958] filecmp.cmp(shallow=True) isn't actually shallow when only mtime differs

2021-07-12 Thread Andrei Kulakov
Andrei Kulakov added the comment: Christof and Alexander, as you both said your preference is to have some way of enforcing "only shallow" compare, I want to clarify -- it seems if you do that, you will get the answer of True if the files are most likely the same (sig is equal), but if the s

[issue44607] Teleport method for turtle class

2021-07-12 Thread Muffinlicious
Muffinlicious added the comment: Turtle is the most accessible and well-known drawing module for kids to use so teleporting makes more sense in the context of drawing random shapes or small pictures around the screen. I've seen the penup/goto/pendown combo so often that I figure it at least

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

2021-07-12 Thread Andrei Kulakov
Andrei Kulakov added the comment: Upon further pondering, I'm not sure PyWin is doing the right thing here. I believe it's best to first file it with PyWin and find out what it is trying to do and why. Pyclbr behavior sort of makes sense to me -- pyclbr goal is to parse and browse the sourc

[issue44559] Enum: revert to 3.9

2021-07-12 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +25647 pull_request: https://github.com/python/cpython/pull/27099 ___ Python tracker ___

[issue44610] Format issue with strftime and %Y

2021-07-12 Thread Bartosz Kaznowski
Change by Bartosz Kaznowski : -- versions: +Python 3.9 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue44610] Format issue with strftime and %Y

2021-07-12 Thread Bartosz Kaznowski
Change by Bartosz Kaznowski : -- versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-l

[issue44612] inspect module points that could be using f-String

2021-07-12 Thread Leonardo Freua
New submission from Leonardo Freua : There are some points in inspect module (I counted 48 since version 3.7) that could be using f-String formatting instead of format(). Changing these points will improve code readability, it will also decrease the complexity at these points and not to menti

[issue44613] Make importlib.metadata non-provisional in Python 3.10

2021-07-12 Thread Barry A. Warsaw
New submission from Barry A. Warsaw : As discussed with Jason, importlib.metadata will be made non-provisional in 3.10. I have a PR in the works for this. -- assignee: barry components: Documentation messages: 397344 nosy: barry, jaraco priority: normal severity: normal status: open t

[issue44612] inspect module points that could be using f-String

2021-07-12 Thread Leonardo Freua
Change by Leonardo Freua : -- keywords: +patch pull_requests: +25648 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27100 ___ Python tracker ___ _

[issue44613] Make importlib.metadata non-provisional in Python 3.10

2021-07-12 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- keywords: +patch pull_requests: +25649 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27101 ___ Python tracker ___

[issue44612] inspect module points that could be using f-String

2021-07-12 Thread Ammar Askar
Ammar Askar added the comment: As per https://bugs.python.org/issue36249 and https://bugs.python.org/issue38351 We don't generally do large-scale changes that are mostly formatting based. We would prefer that these sort of improvements happen when someone happens to be touching that code any

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

2021-07-12 Thread Ammar Askar
Ammar Askar added the comment: Brandt, maybe this regression test from a previous tracing bug might be useful for the test writing: https://github.com/python/cpython/pull/22026/files#diff-8b73bfc55514d8add8904c5f4d1d24b7b644ebfccba8d846085303577aa94dd6 -- nosy: +ammar2 _

[issue44612] inspect module points that could be using f-String

2021-07-12 Thread Leonardo Freua
Leonardo Freua added the comment: Understood. Anyway, it was good to try to help at this point. -- ___ Python tracker ___ ___ Pytho

[issue44612] inspect module points that could be using f-String

2021-07-12 Thread Ammar Askar
Ammar Askar added the comment: Thanks for trying to help Leonardo! You might consider looking for easy issues on the bug tracker or reviewing open pull requests to help. Definitely take a look at the dev guide :) https://cpython-devguide.readthedocs.io/fixingissues/ -- resolution: -

[issue44612] inspect module points that could be using f-String

2021-07-12 Thread Leonardo Freua
Leonardo Freua added the comment: Thanks, Ammar. I'll look. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

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

2021-07-12 Thread Dennis Sweeney
Dennis Sweeney added the comment: The one twist is that if type(b) is a strict subtype of type(a), then "a < b" first calls type(b).__gt__(b, a), then falls back to type(a).__lt__(a, b). Example: >>> class Int(int): ... def __gt__(self, other): ... print("Here!") ... retu

[issue44612] inspect module points that could be using f-String

2021-07-12 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, thank you Leonardo! There are probably places in the stdlib where changing to f-strings would be a performance improvement. Of course finding those places is the challenge! -- nosy: +eric.smith ___ Python trac

[issue43950] Include column offsets for bytecode instructions

2021-07-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 1890dd235f618d60c938f6904d2e1a8a56f99c1c by Batuhan Taskaya in branch 'main': bpo-43950: Specialize tracebacks for subscripts/binary ops (GH-27037) https://github.com/python/cpython/commit/1890dd235f618d60c938f6904d2e1a8a56f99c1c --

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

2021-07-12 Thread Éric Araujo
Éric Araujo added the comment: Someone would need to take the patch, apply it to current main branch, fix issues and open a PR. -- versions: +Python 3.11 -Python 3.8 ___ Python tracker __

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

2021-07-12 Thread Éric Araujo
Éric Araujo added the comment: On second thought, this issue is not purely programming, but also has a UI component. Better HTML and separated CSS would be good, but before that I think we’d need someone with design chops to mock up a better page layout and style (better than big coloured re

[issue44593] _randbelow_with_getrandbits may request an unnecessary random bit

2021-07-12 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> duplicate superseder: -> _randbelow_with_getrandbits function inefficient with powers of two ___ Python tracker ___

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

2021-07-12 Thread Guido van Rossum
Guido van Rossum added the comment: Ken Jin, should we treat type(None) as a subclass of int|None? -- nosy: +kj ___ Python tracker ___

[issue42958] filecmp.cmp(shallow=True) isn't actually shallow when only mtime differs

2021-07-12 Thread Andrei Kulakov
Andrei Kulakov added the comment: Also see this 16 years old issue: https://bugs.python.org/issue1234674 -- ___ Python tracker ___

[issue38825] shutil.disk_usage - Lacking documentation

2021-07-12 Thread Norman Lorrain
Norman Lorrain added the comment: Something like this: .. impl-detail:: Where applicable (e.g. Unix) *path* must point to somewhere on a **mounted** filesystem partition. On Sun, 11 Jul 2021 at 16:18, Tyler Crompton wrote: > > Tyler Crompton added the comment: > > Not even the ker

[issue44614] Broken Pipe in Server of Manager in multiprocessing when finalizing, sometimes

2021-07-12 Thread Florian Streibelt
New submission from Florian Streibelt : It seems that the shutdown() method of the Server in in managers.py is already sending the result of its execution directly into the connection, and then the handle_request() method is trying to send ('#RETURN', None) yet again after returning from the c

[issue44613] Make importlib.metadata non-provisional in Python 3.10

2021-07-12 Thread Jason R. Coombs
Jason R. Coombs added the comment: Thanks Barry for filing this. I was planning to do it but happy for you to beat me to it. I had one question I'd been meaning to ask - with this change, can the code paths that were deprecated in 3.10 be removed in 3.11 (SelectableGroups and cast to dict o

[issue44615] Multiprocessing Pool example and comments incomplete/wrong?

2021-07-12 Thread Florian Streibelt
New submission from Florian Streibelt : The docs at the url https://docs.python.org/3/library/multiprocessing.html#module-multiprocessing.pool state in a red warning box: "Warning multiprocessing.pool objects have internal resources that need to be properly managed (like any other resource)

[issue44611] CPython uses deprecated randomness API

2021-07-12 Thread Tim Peters
Tim Peters added the comment: Dan, the Microsoft URL in your message gives a 404 for me. Did you perhaps mean to end it with "cng-portal" (instead of "cng-por")? -- nosy: +tim.peters ___ Python tracker

[issue44611] CPython uses deprecated randomness API

2021-07-12 Thread Thomas Grainger
Thomas Grainger added the comment: https://docs.microsoft.com/en-us/windows/win32/seccng/cng-portal ? -- nosy: +graingert ___ Python tracker ___ __

[issue42958] filecmp.cmp(shallow=True) isn't actually shallow when only mtime differs

2021-07-12 Thread Christof Hanke
Christof Hanke added the comment: Hi Andrei, I would follow rsync. >From the man page: """ [...] -c, --checksum This changes the way rsync checks if the files have been changed and are in need of a transfer. Without this option, rsync uses a "quick check"

[issue42958] filecmp.cmp(shallow=True) isn't actually shallow when only mtime differs

2021-07-12 Thread Andrei Kulakov
Andrei Kulakov added the comment: But rsync is a quite more specific tool. For example, unix cmp command does not guess based on any part of `stat` sig. That's a much closer command in scope to 'filecmp'. -- ___ Python tracker

[issue44616] Incorrect tracing for "except" with variable

2021-07-12 Thread Ned Batchelder
New submission from Ned Batchelder : This construct isn't traced properly: except ExceptionName as var: if something: raise Here's a reproducer: -- 8< - import linecache, sys def trace(frame, event, arg): # The weird globals here is

[issue44616] Incorrect tracing for "except" with variable

2021-07-12 Thread Ned Batchelder
Ned Batchelder added the comment: Based on https://github.com/nedbat/coveragepy/issues/1187, btw -- ___ Python tracker ___ ___ Pyth

[issue34451] docs: tutorial/introduction doesn't mention toggle of prompts

2021-07-12 Thread Thomas
Change by Thomas : -- keywords: +patch nosy: +thmsdnnr nosy_count: 6.0 -> 7.0 pull_requests: +25650 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27105 ___ Python tracker __

  1   2   >