[issue44995] "Hide the prompts and output" works abnormal

2021-08-24 Thread 杨青
New submission from 杨青 : 【url】https://docs.python.org/3/tutorial/classes.html 【chapter】9.4. Random Remarks 【problem description】 When I click on the demo "Hide the prompts and output" switch, the class definition statements were also hided. Please take a look as the appended screenshot.

[issue44988] Use the newest tcl/tk support

2021-08-24 Thread 张峻铭
张峻铭 <3180471...@qq.com> added the comment: OK, I see. Thanks for your consideration. -- ___ Python tracker ___ ___ Python-bugs-list

[issue44986] Date formats in help messages of argparse

2021-08-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- Removed message: https://bugs.python.org/msg400243 ___ Python tracker ___ ___ Python-bugs-list

[issue44986] Date formats in help messages of argparse

2021-08-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think anything like this should be done. Besides breaking existing '%%' markup, it invents a new %-formatting notation. -- nosy: +rhettinger type: crash -> enhancement ___ Python tracker

[issue44993] enum.auto() starts with one instead of zero

2021-08-24 Thread Ethan Furman
Ethan Furman added the comment: David, what is the actual use-case that tripped you up? There are a few ways to create Enums from other systems (json files, cpp files, etc.). -- ___ Python tracker

[issue17359] Mention "__main__.py" explicitly in command line docs

2021-08-24 Thread Łukasz Langa
Łukasz Langa added the comment: Solved as part of BPO-39452. -- nosy: +lukasz.langa resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 ___ Python tracker

[issue24632] Improve documentation about __main__.py

2021-08-24 Thread Łukasz Langa
Łukasz Langa added the comment: Solved as part of BPO-39452. -- nosy: +lukasz.langa resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 ___ Python tracker

[issue39452] Improve the __main__ module documentation

2021-08-24 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks a lot, Géry and Jack! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.9 ___ Python tracker

[issue39452] Improve the __main__ module documentation

2021-08-24 Thread miss-islington
miss-islington added the comment: New changeset ec5a03168f02ef92f98a94796bc6378fc73622e8 by Miss Islington (bot) in branch '3.10': bpo-39452: Rewrite and expand __main__.rst (GH-26883) https://github.com/python/cpython/commit/ec5a03168f02ef92f98a94796bc6378fc73622e8 --

[issue44993] enum.auto() starts with one instead of zero

2021-08-24 Thread Ethan Furman
Ethan Furman added the comment: My apologies for my apologies -- for some reason I thought this was first posted in August of 2020. -- ___ Python tracker ___

[issue44993] enum.auto() starts with one instead of zero

2021-08-24 Thread Ethan Furman
Ethan Furman added the comment: Firstly (or Zeroithly ;) my apologies for not noticing this earlier. In the functional API section: -- The reason for defaulting to 1 as the starting number and not 0 is that 0 is False in a boolean sense, but enum members all

[issue44994] datetime's C implementation verifies fromisoformat is ASCII, but the pure python implementation does not

2021-08-24 Thread Julian Berman
New submission from Julian Berman : This line (which contains a non-ASCII digit): python3.9 -c "import datetime; datetime.date.fromisoformat('1963-06-1৪')" raises: Traceback (most recent call last): File "", line 1, in ValueError: Invalid isoformat string: '1963-06-1৪'

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2021-08-24 Thread Anthony Sottile
Anthony Sottile added the comment: this maybe shouldn't have been backported to 3.8.x as the change in compiler flags appears to break pyc files in subtle ways: https://stackoverflow.com/q/68910329/812183 -- nosy: +Anthony Sottile ___ Python

[issue44988] Use the newest tcl/tk support

2021-08-24 Thread Ned Deily
Ned Deily added the comment: Thanks for the suggestion but 8.7 isn't even in beta yet, the most recent official release was 8.7a5. So it is way too early to consider moving the python.org installers to it. https://www.tcl.tk/software/tcltk/8.7.html -- nosy: +ned.deily resolution:

[issue44993] enum.auto() starts with one instead of zero

2021-08-24 Thread Eric V. Smith
Eric V. Smith added the comment: I think everyone understands, we just feel that it doesn't matter. You can see if PEP 435 answers your question. Changing to an enhancement request for 3.11, for the proposal to add a optional argument to auto(). -- nosy: +ethan.furman type: ->

[issue44864] [argparse] Do not translate user-provided strings in `ArgumentParser.add_subparsers()`

2021-08-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: 'bug', for the tracker, mean a divergence between implementation and doc. Hence my question about the current doc. We could decide that either is wrong and should be changed. A change to meet 'expectations' and fix a 'design bug' is an enhancement.

[issue44934] Windows installer: Append Python to PATH instead of prepending it

2021-08-24 Thread Steve Dower
Steve Dower added the comment: Removing environment variables is "known" to be unreliable - another reason I don't like modifying them from an installer. It's meant to remove the item from the list based on value, so if anything has changed then it's not a huge surprise it will fail. I'm

[issue44993] enum.auto() starts with one instead of zero

2021-08-24 Thread David Rebbe
David Rebbe added the comment: Seems like there is a misunderstanding here as to why this is an issue. I can write an example up that would expand on the file I attached, but I feel like anyone that has experience in the above situations would identify this as an issue. Can I ask why

[issue44865] [argparse] Missing translations

2021-08-24 Thread Jérémie Detrey
Jérémie Detrey added the comment: Hi again! As for #44864, I've just added a short blurb to the PR. The fact that a few strings are missing calls to the localization function (whereas most of the other strings in `argparse` are already localized) might push this issue toward the bug-fix

[issue44993] enum.auto() starts with one instead of zero

2021-08-24 Thread Eric V. Smith
Eric V. Smith added the comment: Other than it’s not what you expect, do you have a concrete example of what problem this is causing you? We’re unlikely to change anything without knowing what problem is being solved. -- nosy: +eric.smith ___

[issue44864] [argparse] Do not translate user-provided strings in `ArgumentParser.add_subparsers()`

2021-08-24 Thread Jérémie Detrey
Jérémie Detrey added the comment: Hi Terry, Thanks for the feedback! I've just added a blurb to the PR. Regarding the issue type, even though this is indeed translation-related, I'd lean toward a bug report rather than an enhancement request: the fact that user-provided strings get fed to

[issue44991] [sqlite3] cleanup callbacks (GIL handling, naming, ...)

2021-08-24 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I'd like to propose further enhancements: - use intermingled declarations in the affected functions; this will make GIL acquisition stand more out, and it also improves readability and makes it easier to trace refs - take the naming step further: I'd

[issue44993] enum.auto() starts with one instead of zero

2021-08-24 Thread David Rebbe
David Rebbe added the comment: Definition of equivalent 1: equal in force, amount, or value Are you referring to memory space as what is actually stored in RAM? If so, that seems to be outside the scope here. I don't think anyone expected an interpreted language to have the same memory

[issue44992] functools.lru_cache does not guarantee cache hits for equal values

2021-08-24 Thread Brian Lee
Brian Lee added the comment: Thanks for clarifying - I see now that the docs specifically call out the lack of guarantees here with "usually but not always regard them as equivalent". I did want to specifically explain the context of my bug; 1. NumPy's strings have some unexpected behavior

[issue44991] [sqlite3] cleanup GIL handling

2021-08-24 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +26383 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27934 ___ Python tracker

[issue44993] enum.auto() starts with one instead of zero

2021-08-24 Thread Vedran Čačić
Vedran Čačić added the comment: _But why should it matter that starting value is the same_ unless you actually use IntEnums for indexing? About your code: what do you _actually_ mean by "equivalent"? I hope you don't think that the memory representation is the same. You keep mentioning APIs

[issue44993] enum.auto() starts with one instead of zero

2021-08-24 Thread David Rebbe
David Rebbe added the comment: Welcome to enums, they don't matter until they do. I'm personally not a fan of enums for APIs but they exist all the time. Indexing was an example case that nothing starts at 1. See the attached file to demonstrate differences. -- Added file:

[issue44993] enum.auto() starts with one instead of zero

2021-08-24 Thread Vedran Čačić
Vedran Čačić added the comment: Honestly, I think it's backwards. Either they _do_ matter because of some external factor (you mention network interoperability, though I'd like you to clarify... what exactly did you send over the network?), or they don't matter (if done right, you shouldn't

[issue44990] Change layout of frames back to specials-locals-stack (from locals-specials-stack)

2021-08-24 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +26382 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27933 ___ Python tracker ___

[issue39452] Improve the __main__ module documentation

2021-08-24 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 7cba23164cf82f6619db002cd30021b5dfb1f809 by Jack DeVries in branch 'main': bpo-39452: Rewrite and expand __main__.rst (#26883) https://github.com/python/cpython/commit/7cba23164cf82f6619db002cd30021b5dfb1f809 -- nosy: +lukasz.langa

[issue39452] Improve the __main__ module documentation

2021-08-24 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 8.0 -> 9.0 pull_requests: +26381 pull_request: https://github.com/python/cpython/pull/27932 ___ Python tracker

[issue44993] enum.auto() starts with one instead of zero

2021-08-24 Thread David Rebbe
David Rebbe added the comment: I only created this issue because its a deviation from any standard that exists AFAIK. Nothing I know of starts at 1 in programming and I more than likely won't be the last one to make this mistake. If indexing in Python started at 1 or any other accessor for

[issue44992] functools.lru_cache does not consider strings and numpy strings as equivalent

2021-08-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the report but this is an allowed behavior and not a bug. Per the docs¹: If typed is set to true, function arguments of different types will be cached separately. For example, f(3) and f(3.0) will always be treated as distinct calls with

[issue44993] enum.auto() starts with one instead of zero

2021-08-24 Thread Vedran Čačić
Vedran Čačić added the comment: I think you should be even more explicit. If values matter, they _should_ be seen in code. (All of them, not just the first one.) auto() just means "this value doesn't really matter". And it's not really hard to write concrete values instead of auto(), in many

[issue34990] year 2038 problem in compileall.py

2021-08-24 Thread Ammar Askar
Change by Ammar Askar : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.11 -Python 3.5, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker

[issue34990] year 2038 problem in compileall.py

2021-08-24 Thread Ammar Askar
Ammar Askar added the comment: New changeset 0af681b652c43f0ba90988400ecc1e7934fbfc5d by Miss Islington (bot) in branch '3.10': [3.10] bpo-34990: Treat the pyc header's mtime in compileall as an unsigned int (GH-19708)

[issue34990] year 2038 problem in compileall.py

2021-08-24 Thread Ammar Askar
Ammar Askar added the comment: New changeset 9d3b6b2472f7c7ef841e652825de652bc8af85d7 by Miss Islington (bot) in branch '3.9': [3.9] bpo-34990: Treat the pyc header's mtime in compileall as an unsigned int (GH-19708)

[issue7057] tkinter doc: more 3.x updates

2021-08-24 Thread Mark Roseman
Mark Roseman added the comment: yes this should be closed.. with latest doc updates, most of these are no longer at all relevant -- nosy: +markroseman ___ Python tracker ___

[issue44993] enum.auto() starts with one instead of zero

2021-08-24 Thread David Rebbe
David Rebbe added the comment: Understandable and I do believe IntEnum should default as zero as its the default type most will choose when trying to mimic other languages. C/C++ has the same problem where the value isn't suppose to matter but as soon as you go across the compiled /

[issue44993] enum.auto() starts with one instead of zero

2021-08-24 Thread Vedran Čačić
Vedran Čačić added the comment: For IntEnum, maybe. But for Enum, the whole point of auto() is that the values don't really matter. The rationale was that with IntEnum, truth testing (which is often used in Python to realize Optional) would distinguish None, and then all true Enums would

[issue44993] enum.auto() starts with one instead of zero

2021-08-24 Thread David Rebbe
New submission from David Rebbe : enum.auto() By default, the initial value starts at 1. Per the documentation here: https://docs.python.org/3/library/enum.html#enum.auto This doesn't really follow expected behavior in majority of programming languages nor python. Most will expect starting

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

2021-08-24 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +26380 pull_request: https://github.com/python/cpython/pull/27931 ___ Python tracker ___

[issue44992] functools.lru_cache does not consider strings and numpy strings as equivalent

2021-08-24 Thread Brian Lee
New submission from Brian Lee : This seems like unexpected behavior: Two keys that are equal and have equal hashes should yield cache hits, but they do not. Python 3.9.6 (default, Aug 18 2021, 19:38:01) [GCC 7.5.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license"

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

2021-08-24 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Petr: > I think the module could use a more comprehensive review for GIL handling > [...] I agree. I created bpo-44991 for this. -- ___ Python tracker

[issue44991] [sqlite3] cleanup GIL handling

2021-08-24 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : Quoting msg400205 by Petr in bpo-42064: I think the module could use a more comprehensive review for GIL handling, rather than doing it piecewise in individual PRs. I recommend that any function passed to SQLite (and only those) should - be named

[issue43826] Resource warnings in test_subprocess

2021-08-24 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.11 -Python 3.10 ___ Python tracker ___

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

2021-08-24 Thread miss-islington
miss-islington added the comment: New changeset 9ed523159c7ba840dbf403e02498eeae1b5d3ed9 by Erlend Egeberg Aasland in branch 'main': bpo-42064: Pass module state to `sqlite3` UDF callbacks (GH-27456) https://github.com/python/cpython/commit/9ed523159c7ba840dbf403e02498eeae1b5d3ed9

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

2021-08-24 Thread Petr Viktorin
Petr Viktorin added the comment: I think the module could use a more comprehensive review for GIL handling, rather than doing it piecewise in individual PRs. I recommend that any function passed to SQLite (and only those) should - be named `*_callback`, for clarity - acquire the GIL at

[issue44985] Inconsistent returned value of inspect.getfullargspec(object.__init__).

2021-08-24 Thread Mehrzad
Mehrzad added the comment: My suggestion: Although both `object(...)` and `object.__init__(...)`, run through the same method, they are semantically and intentionally different. 1. `ObjectType(...)`; implicit call of `object.__init__`: The user intends to create an object. If extra

[issue43826] Resource warnings in test_subprocess

2021-08-24 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: New changeset 7179930ab5f5b2dea039023bec968aadc03e3775 by Karthikeyan Singaravelan in branch 'main': bpo-43826: Fix resource warning due to unclosed objects. (GH-25381)

[issue44990] Change layout of frames back to specials-locals-stack (from locals-specials-stack)

2021-08-24 Thread Mark Shannon
New submission from Mark Shannon : The two plausible layouts from evaluation stack frames are described here: https://github.com/faster-cpython/ideas/issues/31#issuecomment-844263795 We opted for layout A, although it is a bit more complex to manage and slightly more expensive in terms of

[issue44962] asyncio.create_task weakrefset race condition

2021-08-24 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33710] Deprecate gettext.lgettext()

2021-08-24 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: It seems like the docs have a note that these functions were removed in Python 3.10 but they probably missed the release. Doc : https://docs.python.org/3.10/library/gettext.html#gettext.lgettext -- ___

[issue34990] year 2038 problem in compileall.py

2021-08-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +26379 pull_request: https://github.com/python/cpython/pull/27929 ___ Python tracker ___

[issue34990] year 2038 problem in compileall.py

2021-08-24 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +26378 pull_request: https://github.com/python/cpython/pull/27928 ___ Python tracker

[issue34990] year 2038 problem in compileall.py

2021-08-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset bb21e28fd08f894ceff2405544a2f257d42b1354 by Ammar Askar in branch 'main': bpo-34990: Treat the pyc header's mtime in compileall as an unsigned int (GH-19708) https://github.com/python/cpython/commit/bb21e28fd08f894ceff2405544a2f257d42b1354

[issue44988] Use the newest tcl/tk support

2021-08-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am sympathetic to the idea, but is 8.7 out of beta yet? Do you have a link to the release page? Is it backward compatible, so that tkinter code written to run on current 8.6 would run on new binaries? In any case, such a change would only be done in a

[issue38912] test_asyncio altered the execution environment

2021-08-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43598] test_subprocess logs multiple ResourceWarning warnings

2021-08-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Resource warnings in test_subprocess ___ Python tracker