[issue45546] Unable to pickle enum with nested frozen dataclass?

2021-11-03 Thread Ethan Furman
Change by Ethan Furman : -- Removed message: https://bugs.python.org/msg405650 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2021-11-03 Thread miss-islington
miss-islington added the comment: New changeset e813dd4d7bb0ecfabc7dae75e13f58164bcf8da6 by Miss Islington (bot) in branch '3.9': bpo-45680: ``typing`` docs: improve links to docs on ``GenericAlias``/``__class_getitem__`` (GH-29387)

[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2021-11-03 Thread miss-islington
miss-islington added the comment: New changeset c10896696f47a8348e6d9ea3c1d96fa6ba131a31 by Miss Islington (bot) in branch '3.10': bpo-45680: ``typing`` docs: improve links to docs on ``GenericAlias``/``__class_getitem__`` (GH-29387)

[issue45707] Variable reassginment triggers incorrect behaviors of locals()

2021-11-03 Thread Josh Rosenberg
Josh Rosenberg added the comment: This is a documented feature of locals() (it's definitionally impossible to auto-vivify *real* locals, because real locals are statically assigned to specific indices in a fixed size array at function compile time, and the locals() function is returning a

[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2021-11-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +27659 pull_request: https://github.com/python/cpython/pull/29400 ___ Python tracker ___

[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2021-11-03 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +27658 pull_request: https://github.com/python/cpython/pull/29399 ___ Python tracker

[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2021-11-03 Thread Ken Jin
Ken Jin added the comment: New changeset e03e50377d6f8f212af60fed4ae405ebeb73237d by Alex Waygood in branch 'main': bpo-45680: ``typing`` docs: improve links to docs on ``GenericAlias``/``__class_getitem__`` (GH-29387)

[issue45707] Variable reassginment triggers incorrect behaviors of locals()

2021-11-03 Thread Dennis Sweeney
Dennis Sweeney added the comment: >From https://docs.python.org/3/library/functions.html#exec : "modifications to the default locals dictionary should not be attempted. Pass an explicit locals dictionary if you need to see effects of the code on locals after function exec() returns." There

[issue45707] Variable reassginment triggers incorrect behaviors of locals()

2021-11-03 Thread Xinmeng Xia
New submission from Xinmeng Xia : Normally after executing a piece of code in a function, locals() should contain the local variables and these variables can be reassigned next. In the following code, "attr" should be found in locals(). Actually, it can not be found in either locals() or

[issue45706] Add IMAP4.login_plain to imaplib

2021-11-03 Thread Prem Buczkowski
Change by Prem Buczkowski : -- pull_requests: +27656 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29398 ___ Python tracker ___

[issue43652] Upgrade Windows tcl/tk to 8.6.11

2021-11-03 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +27655 pull_request: https://github.com/python/cpython/pull/29397 ___ Python tracker ___

[issue45706] Add IMAP4.login_plain to imaplib

2021-11-03 Thread Prem Buczkowski
Change by Prem Buczkowski : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45706] Add IMAP4.login_plain to imaplib

2021-11-03 Thread Prem Buczkowski
New submission from Prem Buczkowski : Hi everyone and nice to meet you! I would like to propose adding a method login_plain to Python IMAP4 standard library client. Currently, one can use login, login_cram_md5 or add their own authentication method using authenticate. While login works

[issue45582] Rewrite getpath.c in Python

2021-11-03 Thread Steve Dower
Steve Dower added the comment: Unsurprisingly, it was a bad edit that I made to the Makefile myself. The commit that undoes it is https://github.com/python/cpython/pull/29041/commits/aedebcc45a638f5cf65d17046ae09b5cac97cebf but since I made the initial change as part of this PR, it was

[issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors

2021-11-03 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +27654 pull_request: https://github.com/python/cpython/pull/29396 ___ Python tracker ___

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-11-03 Thread Zack McCauley
Zack McCauley added the comment: Awesome, thanks for the clear update reason. Makes more sense now. I was able to get our software to patch around. An API to get the installer urls would be super helpful. Thanks Ned! On Wed, Nov 3, 2021 at 4:19 PM Ned Deily wrote: > > Ned Deily added the

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-11-03 Thread Ned Deily
Ned Deily added the comment: After I posted the previous reply, I saw that there have been other users affected by this, so I have now also made the updated installer available under the old URL. -- ___ Python tracker

[issue45705] |= set update scoping

2021-11-03 Thread Steven D'Aprano
Change by Steven D'Aprano : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-11-03 Thread Ned Deily
Ned Deily added the comment: > Could this be bumped to a version update to like 3.10.1 or just replace the > old package with this updated one? I'm sorry that this caused problems for you. We rarely update the artifacts for a release but, in this case, 3.10.1 was not scheduled for release

[issue45697] PyType_IsSubtype is doing excessive work in the common case

2021-11-03 Thread Itamar Ostricher
Itamar Ostricher added the comment: thanks for the feedback Serhiy! repeating my response from the PR here as well (not sure what's the proper etiquette.. :-) ) note that this code path is not for creating new types (which is slow as you say), but for creating new instances (which is quite

[issue45582] Rewrite getpath.c in Python

2021-11-03 Thread Steve Dower
Steve Dower added the comment: I'm betting the out-of-tree (actually just deeper within the same tree) bit is related, but I just can't see how. Modules/getbuildinfo.c takes extra parameters and they seem to be being used, so I can't tell why getpath.c's are not (those rules are listed

[issue45615] Missing test for type of error when printing traceback for non-exception

2021-11-03 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45614] traceback of exception with non-unicode __module__

2021-11-03 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45694] Limit the number of chained exceptions included in formatted traceback

2021-11-03 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45635] Tidy up error handling in traceback.c / python run.c

2021-11-03 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45678] `functools.singledispatchmethod` is missing tests (and is buggy in 3.9)

2021-11-03 Thread Alex Waygood
Alex Waygood added the comment: Backporting these tests to 3.9 revealed a bug in the 3.9 branch; PR 29394 is an attempt at fixing this bug. -- ___ Python tracker ___

[issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6

2021-11-03 Thread Jim Crist-Harif
Jim Crist-Harif added the comment: > Is tornado the only example or you are aware of other libraries with such > behavior? A quick survey of other language network stacks didn't turn anything up, *But* I also didn't find any implementations (other than asyncio & tornado) that bind multiple

[issue45613] [sqlite3] set threadsafety attribute based on default SQLite threaded mode

2021-11-03 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44257] typo and verbous grammar in the grammar spec

2021-11-03 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44257] typo and verbous grammar in the grammar spec

2021-11-03 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +27653 pull_request: https://github.com/python/cpython/pull/29395 ___ Python tracker ___

[issue45546] Unable to pickle enum with nested frozen dataclass?

2021-11-03 Thread Ethan Furman
Ethan Furman added the comment: Eric, I'm already aware of the nested class issue; what I was hoping for was your actual use-case? You're pickling and sending an entire enum (and all its members) to another system/process? -- ___ Python tracker

[issue45613] [sqlite3] set threadsafety attribute based on default SQLite threaded mode

2021-11-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset c2739867113a2b650db300c03ef06cf18dcee3f4 by Erlend Egeberg Aasland in branch 'main': bpo-45613: Set `sqlite3.threadsafety` dynamically (GH-29227) https://github.com/python/cpython/commit/c2739867113a2b650db300c03ef06cf18dcee3f4

[issue44257] typo and verbous grammar in the grammar spec

2021-11-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 762173c6709f5cf3b59cbbe47d4e6fafbfe7ec2a by wim glenn in branch 'main': bpo-44257: fix "assigment_expr" typo + regenerate the grammar, and remove unused imports (GH-29393)

[issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6

2021-11-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: PR for documentation fix is appreciated. Random fails to bind the same port if free ports are available is kind of regression. Is tornado the only example or you are aware of other libraries with such behavior? --

[issue45705] |= set update scoping

2021-11-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This is not a bug. You are getting an UnboundLocalError because in the scope of scoped_def function, scoped_dict is marked as local (because you assign to it in the function) but you are reading it before that. Please, take a look at:

[issue45705] |= set update scoping

2021-11-03 Thread James Bowery
James Bowery added the comment: My mistake. Disregard. -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves

2021-11-03 Thread Zack McCauley
Zack McCauley added the comment: Could this be bumped to a version update to like 3.10.1 or just replace the old package with this updated one? The package name and format now break automations that relied on matching version names in the url. This pattern has worked since 2.7 releases. For

[issue45705] |= set update scoping

2021-11-03 Thread James Bowery
New submission from James Bowery : Comment out the |= line and it prints "{'b':2}" as expected. $ cat t.py scoped_dict = {'b':2} def scoped_def(): print(scoped_dict) scoped_dict |= {'a',1} scoped_def() $ p t.py Traceback (most recent call last): File "/home/jabowery/dev/t.py", line

[issue45697] PyType_IsSubtype is doing excessive work in the common case

2021-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Creating a new type takes microseconds, and using PyObject_TypeCheck() instead of PyType_IsSubtype() can save nanoseconds. So, while this replacement looks harmless, its effect can hardly be measured even in microbenchmarks. --

[issue45582] Rewrite getpath.c in Python

2021-11-03 Thread Eric Snow
Eric Snow added the comment: On Wed, Nov 3, 2021 at 1:21 PM Steve Dower wrote: > Last remaining test failure is one that I can't figure out on my own - the > freeze test is rerunning a CPython build (on Linux) and is apparently > building getpath.c with the ".c.o" rule rather than the

[issue45678] `functools.singledispatchmethod` is missing tests (and is buggy in 3.9)

2021-11-03 Thread Alex Waygood
Change by Alex Waygood : -- components: +Library (Lib) title: `functools.singledispatchmethod` is missing tests -> `functools.singledispatchmethod` is missing tests (and is buggy in 3.9) ___ Python tracker

[issue45678] `functools.singledispatchmethod` is missing tests

2021-11-03 Thread Alex Waygood
Change by Alex Waygood : -- pull_requests: +27652 pull_request: https://github.com/python/cpython/pull/29394 ___ Python tracker ___

[issue45582] Rewrite getpath.c in Python

2021-11-03 Thread Steve Dower
Steve Dower added the comment: Last remaining test failure is one that I can't figure out on my own - the freeze test is rerunning a CPython build (on Linux) and is apparently building getpath.c with the ".c.o" rule rather than the "Modules/getpath.o" rule. Any tips as to what I should be

[issue44257] typo and verbous grammar in the grammar spec

2021-11-03 Thread wim glenn
Change by wim glenn : -- nosy: +wim.glenn nosy_count: 2.0 -> 3.0 pull_requests: +27651 pull_request: https://github.com/python/cpython/pull/29393 ___ Python tracker ___

[issue41105] Add some extra content check in configure process for some empty header file who has been deprecated by glibc

2021-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Rather of using AC_COMPILE_IFELSE() in configure.ac, would not be easier to use #ifdef in the C file? -- nosy: +serhiy.storchaka ___ Python tracker

[issue45700] Got SEGV in compilation python3.6 with GCC-11, and please renewal python3.6.

2021-11-03 Thread Ned Deily
Ned Deily added the comment: As you note, Python 3.6 is almost at end-of-life, in fewer than two months from now. And, in any case, it is in the security-fix-only phase of its life cycle so changes just to support OS platform or build tool updates are out-of-scope in general, not to mention

[issue41105] Add some extra content check in configure process for some empty header file who has been deprecated by glibc

2021-11-03 Thread Christian Heimes
Christian Heimes added the comment: The configure script is auto-generated from configure.ac. Any chance must be applied to configure.ac. We could replace the AC_CHECK_HEADERS() for stropt.h with a more elaborate AC_COMPILE_IFELSE() block that checks for presence of I_PUSH. Could you

[issue45704] string.Formatter.parse does not handle auto-numbered positional fields

2021-11-03 Thread Sascha Desch
Sascha Desch added the comment: Another thing that occurred to me is the question of what `.parse()` should do when a mix of auto-numbered and manually numbered fields is supplied e.g. `{}{1}`. As of now `.parse()` happily processes such inputs and some other piece of code deals with this

[issue41105] Add some extra content check in configure process for some empty header file who has been deprecated by glibc

2021-11-03 Thread Andrei Kulakov
Andrei Kulakov added the comment: I think adding this code in the `configure` script may fix it: as_ac_Header=`$as_echo "ac_cv_header_stropts.h" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "stropts.h" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"

[issue45404] Undefined I_* macros of stropts.h when building Python 3.10 on Ubuntu: fail to build the fcntl module

2021-11-03 Thread Andrei Kulakov
Andrei Kulakov added the comment: Duplicate of #41105 , where two more people ran into this issue. -- nosy: +andrei.avk ___ Python tracker ___

[issue45697] PyType_IsSubtype is doing excessive work in the common case

2021-11-03 Thread Itamar Ostricher
Itamar Ostricher added the comment: thanks for the feedback & discussion, I submitted a new PR -- ___ Python tracker ___ ___

[issue45506] Out of source tree builds failing on main - test_importlib others unreliable

2021-11-03 Thread Eric Snow
Eric Snow added the comment: New changeset 7b438282d39e742b2628a32e7c6699a140ff4cfb by Eric Snow in branch 'main': bpo-45506: Stop skipping test_embed. (gh-29300) https://github.com/python/cpython/commit/7b438282d39e742b2628a32e7c6699a140ff4cfb --

[issue45697] PyType_IsSubtype is doing excessive work in the common case

2021-11-03 Thread Itamar Ostricher
Change by Itamar Ostricher : -- pull_requests: +27650 pull_request: https://github.com/python/cpython/pull/29392 ___ Python tracker ___

[issue45578] Missing tests for the dis module

2021-11-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 8198617bcce885c280ba5f8acd066c71b311b1ac by Łukasz Langa in branch '3.9': [3.9] bpo-45578: add tests for `dis.distb` (GH-29332) (#29386) https://github.com/python/cpython/commit/8198617bcce885c280ba5f8acd066c71b311b1ac --

[issue45678] `functools.singledispatchmethod` is missing tests

2021-11-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset f1918385cccf3ef51d339dfa1f3654005508f307 by Miss Islington (bot) in branch '3.10': bpo-45678: Add ``functools.singledispatchmethod`` tests (GH-29328) (GH-29390) https://github.com/python/cpython/commit/f1918385cccf3ef51d339dfa1f3654005508f307

[issue45672] Mutation tests results of typing.py

2021-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is the problem actually? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.

2021-11-03 Thread Mark Shannon
Mark Shannon added the comment: New changeset acc89db9233abf4d903af9a7595a2ed7478fe7d3 by Mark Shannon in branch 'main': bpo-45691: Make array of small ints static to fix use-after-free error. (GH-29366) https://github.com/python/cpython/commit/acc89db9233abf4d903af9a7595a2ed7478fe7d3

[issue45704] string.Formatter.parse does not handle auto-numbered positional fields

2021-11-03 Thread Eric V. Smith
Eric V. Smith added the comment: > Side note: It's a somewhat weird that `.get_field` expects a string while > `.get_value` expects an int for positional arguments. .parse is just concerned with parsing, so it works on and returns strings. .get_field takes strings because it is the thing

[issue45678] `functools.singledispatchmethod` is missing tests

2021-11-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +27649 pull_request: https://github.com/python/cpython/pull/29391 ___ Python tracker ___

[issue45678] `functools.singledispatchmethod` is missing tests

2021-11-03 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27648 pull_request: https://github.com/python/cpython/pull/29390 ___ Python tracker

[issue45678] `functools.singledispatchmethod` is missing tests

2021-11-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 5a14929a6e4fab672e2f83a86773618e973b22a6 by Alex Waygood in branch 'main': bpo-45678: Add ``functools.singledispatchmethod`` tests (GH-29328) https://github.com/python/cpython/commit/5a14929a6e4fab672e2f83a86773618e973b22a6 --

[issue45578] Missing tests for the dis module

2021-11-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset fd6b70d6b715c2403a194a2b3eae3210e2e81742 by Łukasz Langa in branch '3.10': [3.10] bpo-45578: add tests for `dis.distb` (GH-29332) (GH-29385) https://github.com/python/cpython/commit/fd6b70d6b715c2403a194a2b3eae3210e2e81742 --

[issue45704] string.Formatter.parse does not handle auto-numbered positional fields

2021-11-03 Thread Sascha Desch
Sascha Desch added the comment: Yes it should return a string containing the index of the positional argument i.e. `"0"` so that it is compatible with `.get_field()`. Side note: It's a somewhat weird that `.get_field` expects a string while `.get_value` expects an int for positional

[issue45702] Python/dtoa.c requires 53 bit hardware rounding unavalable on x64

2021-11-03 Thread Oleg Iarygin
Oleg Iarygin added the comment: When I first saw "default rounding precision of 64 bits", I've thought it's about "64 bit precision", aka binary64, aka double. So I suggested that the code expects some hardly known Intel FPU-specific binary56 instead. Now, after a second paragraph of your

[issue45578] Missing tests for the dis module

2021-11-03 Thread Nikita Sobolev
Nikita Sobolev added the comment: Only `findlabels` tests are left! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2021-11-03 Thread Alex Waygood
Change by Alex Waygood : -- pull_requests: +27647 pull_request: https://github.com/python/cpython/pull/29389 ___ Python tracker ___

[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2021-11-03 Thread Alex Waygood
Change by Alex Waygood : -- pull_requests: +27646 pull_request: https://github.com/python/cpython/pull/29388 ___ Python tracker ___

[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2021-11-03 Thread Alex Waygood
Change by Alex Waygood : -- pull_requests: +27645 pull_request: https://github.com/python/cpython/pull/29387 ___ Python tracker ___

[issue45702] Python/dtoa.c requires 53 bit hardware rounding unavalable on x64

2021-11-03 Thread Mark Dickinson
Mark Dickinson added the comment: I'm not sure I understand the problem that you're reporting - what issues are you seeing in practice? x64 should be fine here. In normal circumstances, the compiled version of dtoa.c will be using SSE2 instructions and will already be doing floating-point

[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2021-11-03 Thread Alex Waygood
Change by Alex Waygood : -- title: Documentation on `GenericAlias` objects could be improved -> Documentation on `GenericAlias` objects and `__class_getitem__` could be improved ___ Python tracker

[issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache

2021-11-03 Thread Miro Hrončok
Change by Miro Hrončok : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache

2021-11-03 Thread Miro Hrončok
Miro Hrončok added the comment: The PR is now ready for review. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45578] Missing tests for the dis module

2021-11-03 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +27644 pull_request: https://github.com/python/cpython/pull/29386 ___ Python tracker ___

[issue45578] Missing tests for the dis module

2021-11-03 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +27643 pull_request: https://github.com/python/cpython/pull/29385 ___ Python tracker ___

[issue45704] string.Formatter.parse does not handle auto-numbered positional fields

2021-11-03 Thread Eric V. Smith
Eric V. Smith added the comment: For reference, the documentation is at https://docs.python.org/3/library/string.html#custom-string-formatting I guess in your example it should return: [('hello ', '0', '', None)] -- nosy: +eric.smith ___ Python

[issue45578] Missing tests for the dis module

2021-11-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset e346f196819aeb02a8a94205ce3e1536c4c2f105 by Nikita Sobolev in branch 'main': bpo-45578: add tests for `dis.distb` (GH-29332) https://github.com/python/cpython/commit/e346f196819aeb02a8a94205ce3e1536c4c2f105 -- nosy: +lukasz.langa

[issue45698] Error on importing getopt

2021-11-03 Thread Mgs M Rizqi Fadhlurrahman
Mgs M Rizqi Fadhlurrahman added the comment: OK, thank you for the answers. Sorry for the false alarm. -- ___ Python tracker ___

[issue45698] Error on importing getopt

2021-11-03 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this, since I don't think it's a bug in python, but rather in the user's setup. -- resolution: -> works for me stage: -> resolved status: open -> closed type: crash -> behavior ___ Python

[issue44496] string.Formatter class not allowing {.field}

2021-11-03 Thread Eric V. Smith
Eric V. Smith added the comment: I think this is a dupe of issue 27307. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45698] Error on importing getopt

2021-11-03 Thread Mgs M Rizqi Fadhlurrahman
running: `pyenv install 3.10.0` -- Added file: https://bugs.python.org/file50423/OnPaste.20211103-202914.png ___ Python tracker <https://bugs.python.org/issue45698> ___ _

[issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6

2021-11-03 Thread Jim Crist-Harif
Jim Crist-Harif added the comment: If you decline that a change is needed here, at the very least the current behavior of `port=0` should be documented. I'd be happy to push up a fix if so. -- ___ Python tracker

[issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6

2021-11-03 Thread Jim Crist-Harif
Jim Crist-Harif added the comment: > I'm not aware of an OS API call that binds both IPv4 and IPv6 to the same > random port. Sure, but `loop.create_server` is already higher-level than a single OS API call. By default `create_server` will already bind multiple sockets if `host=""`,

[issue45698] Error on importing getopt

2021-11-03 Thread Eric V. Smith
Eric V. Smith added the comment: I'm guessing the first line of getopt.py got deleted somehow. @rizqirizqi23: what do the first 10 lines of /home/mgsrizqi/.pyenv/versions/3.10.0/lib/python3.10/getopt.py look like? How did you install python? -- nosy: +eric.smith

[issue45704] string.Formatter.parse does not handle auto-numbered positional fields

2021-11-03 Thread Sascha Desch
New submission from Sascha Desch : It appears when adding auto-numbered positional fields in python 3.1 `Formatter.parse` was not updated to handle them and currently returns an empty string as the field name. ``` list(Formatter().parse('hello {}')) # [('hello ', '', '', None)] ``` This

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

2021-11-03 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > Congratulations, and thanks for your work and determination to get this done > :) Thanks, and thank you for helping out, Petr :) Also a big thanks to Dong-hee, Berker, Serhiy, Pablo, and Victor for reviews and guidance with this "project". --

[issue45692] IDLE: define word/id chars in one place.

2021-11-03 Thread Alex Waygood
Alex Waygood added the comment: The PR that proposes creating a new utility.py file is mine, linked to https://bugs.python.org/issue45447. Would it make things easier if I split it into two PRs: one adding an empty util.py file, and the other making my proposed changes to support syntax

[issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache

2021-11-03 Thread Miro Hrončok
Change by Miro Hrončok : -- keywords: +patch pull_requests: +27642 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29384 ___ Python tracker ___

[issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache

2021-11-03 Thread Miro Hrončok
Miro Hrončok added the comment: I have a fix in mind, will submit a draft pull request without tests shortly, continue with the tests later. -- ___ Python tracker ___

[issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache

2021-11-03 Thread Miro Hrončok
New submission from Miro Hrončok : Recently, when debugging a weird problem (see https://bugzilla.redhat.com/show_bug.cgi?id=2018551 for details if interested, but not important for this issue), I've realized that the _NamespacePath class (from importlib/_bootstrap_external.py) has a cache

[issue45698] Error on importing getopt

2021-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks strange. The line containing "function (including the special meanings of arguments of the form `-'" is a part of a multiline string literal, so there should not be such error. And it is line 4, not line 3 as in your traceback. --

[issue45698] Error on importing getopt

2021-11-03 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Could you please provide more details regarding the OS, whether you compiled Python yourself and the env settings you used ? Thanks, -- Marc-Andre Lemburg eGenix.com -- nosy: +lemburg ___ Python tracker

[issue45702] Python/dtoa.c requires 53 bit hardware rounding unavalable on x64

2021-11-03 Thread Oleg Iarygin
New submission from Oleg Iarygin : File configure.ac:4617 states the following: > # The short float repr introduced in Python 3.1 requires the > # correctly-rounded string <-> double conversion functions from > # Python/dtoa.c, which in turn require that the FPU uses 53-bit > # rounding; this

[issue45701] Add tuple tests to `functools.lru_cache`

2021-11-03 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +27641 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29339 ___ Python tracker ___

[issue45698] Error on importing getopt

2021-11-03 Thread Mgs M Rizqi Fadhlurrahman
Mgs M Rizqi Fadhlurrahman added the comment: Here: ``` Python 3.10.0 (default, Oct 30 2021, 15:16:25) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import getopt Traceback (most recent call last): File "", line 1, in File

[issue45701] Add tuple tests to `functools.lru_cache`

2021-11-03 Thread Nikita Sobolev
New submission from Nikita Sobolev : Context: https://bugs.python.org/issue45679 We need to add tests that `tuple` works as expected with `functools.lru_cache`, including `1` / `1.0` / `True` and `0` / `0.0` / `False` special cases. PR: https://github.com/python/cpython/pull/29339

[issue45698] Error on importing getopt

2021-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please provide an output as a text? -- ___ Python tracker ___ ___ Python-bugs-list

[issue45698] Error on importing getopt

2021-11-03 Thread Mgs M Rizqi Fadhlurrahman
Mgs M Rizqi Fadhlurrahman added the comment: Screenshot attached https://bugs.python.org/file50422/OnPaste.20211103-125049.png -- ___ Python tracker <https://bugs.python.org/issue45

[issue45679] typing.Literal[True] is implicitly converted to typing.Literal[1]

2021-11-03 Thread Ken Jin
Ken Jin added the comment: Closing this issue as the bug has been solved. @Nikita could you please open a new issue for your tests PR and link to that instead? It seems like an enhancement over the current test suite for lru_cache. Thanks! -- resolution: -> fixed stage: patch

[issue45633] Py_GT listed twice in Doc/extending/newtypes.rst

2021-11-03 Thread Ken Jin
Ken Jin added the comment: @Dmitry Smirnov, Thank you for your fix, and welcome to the CPython project! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue45697] PyType_IsSubtype is doing excessive work in the common case

2021-11-03 Thread Ken Jin
Ken Jin added the comment: > Dennis, you mean something like this? > https://github.com/itamaro/cpython/commit/92d46b260cf6ccce1a47003f539294530138e488 Not Dennis, but these changes looks good. As Serhiy mentioned, we can replace the hot callsites with PyObject_TypeCheck without slowing

  1   2   >