[issue43971] documentation: no spacing around default args in annotated function

2021-04-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: >From PEP 8: right:label: str = '' wrong:result: int=0 # No spaces around equality sign current doc: quantity_on_hand: int=0): -- assignee: docs@python -> terry.reedy nosy: +terry.reedy versions: -Python 3.11, Python 3.7 ___

[issue43976] Allow Python distributors to add custom site install schemes

2021-04-30 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: Introduce mechanism to allow Python distributors to add custom site install schemes -> Allow Python distributors to add custom site install schemes ___ Python tracker ___

[issue43994] change representation of match as / capture as `Name(..., ctx=Store())`

2021-04-30 Thread Anthony Sottile
New submission from Anthony Sottile : I'm looking at adding support to `match` for pyflakes, and the first impression I have is that `MatchAs` is unnecessarily different from `Name` with `ctx=Store()` if it were represented as the latter pyflakes would not require special handling of `match`

[issue43995] test_grammar fails if run sequentially

2021-04-30 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : To reproduce: $ ./python.exe -m test test_typing test_grammar 0:00:00 load avg: 1.95 Run tests sequentially 0:00:00 load avg: 1.95 [1/2] test_typing 0:00:00 load avg: 1.95 [2/2] test_grammar test test_grammar failed -- Traceback (most recent call last

[issue43995] test_grammar fails if run sequentially

2021-04-30 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +24457 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25764 ___ Python tracker _

[issue43983] Can't install Python v3.9.4 / 0x80070643 / windows 10 64bit

2021-04-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: The error message suggests somethng else is using something in an existing 3.9 directory, and that you should close everything and reboot your machine and try again without running anything else. -- nosy: +terry.reedy ___

[issue43916] Mark static types newly converted to heap types as immutable: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag

2021-04-30 Thread STINNER Victor
STINNER Victor added the comment: I checked " Types converted pre Python 3.9" and "Types converted in Python 3.9" of: https://discuss.python.org/t/list-of-built-in-types-converted-to-heap-types/8403 (I didn't check "Types converted in Python 3.10" yet.) These lists are not complete, for exam

[issue43988] Add test.support.assert_dissallow_instantiation

2021-04-30 Thread STINNER Victor
STINNER Victor added the comment: You can keep PR 25757 to add the helper function, and then write a second PR to use it in all tests. -- ___ Python tracker ___ _

[issue43971] documentation: no spacing around default args in annotated function

2021-04-30 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +24458 pull_request: https://github.com/python/cpython/pull/25765 ___ Python tracker _

[issue43971] documentation: no spacing around default args in annotated function

2021-04-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +24459 pull_request: https://github.com/python/cpython/pull/25766 ___ Python tracker ___ __

[issue43971] documentation: no spacing around default args in annotated function

2021-04-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset e726a902b7c73a7056b7421d801e47255873 by Mohamed Moselhy in branch 'master': bpo-43971: Add spaces around annotated arg default '=' (GH-25702) https://github.com/python/cpython/commit/e726a902b7c73a7056b7421d801e47255873 -- ___

[issue43916] Mark static types newly converted to heap types as immutable: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag

2021-04-30 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > These lists are not complete, for example select.kevent was not listed > whereas it has a bug. If one of the admins could make that post into a wiki post, it would be open for editing, making it easier to fill the holes in the lists. -- _

[issue43995] test_grammar fails if run sequentially

2021-04-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset e467ec476f624323b8638cf100d1bfbf1d6a21c6 by Erlend Egeberg Aasland in branch 'master': bpo-43995: Fix reference leak in test_grammar (GH-25764) https://github.com/python/cpython/commit/e467ec476f624323b8638cf100d1bfbf1d6a21c6 --

[issue43995] test_grammar fails if run sequentially

2021-04-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks for the quick fix Erlend! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker __

[issue43950] Include column offsets for bytecode instructions

2021-04-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Specific examples of current messages and proposed improvements would help > focus discussion. Yeah, I am proposing going from: >>> x['aa']['bb']['cc']['dd'].sddfsdf.sdfsdf Traceback (most recent call last): File "", line 1, in T

[issue43950] Include column offsets for bytecode instructions

2021-04-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Basically, to highlight in all exceptions the range in the displayed line where the error ocurred. For instance: >>> foo(a, b/z+2, c, 132432 /x, d /y) ^ Traceback (most recent call last): File "", line 1, in ZeroDivisio

[issue43901] Lazy-create an empty annotations dict in all unannotated user classes and modules

2021-04-30 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: test_grammar also needed a fix. It has been updated to use import_helper.import_fresh_module in bpo-43995 (GH-25764). -- nosy: +erlendaasland ___ Python tracker ___

[issue38530] Offer suggestions on AttributeError and NameError

2021-04-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Hi Dennis, this is a fantastic investigation! I think I really like GCC approach here. We may want to invest into porting some of their ideas into our solution. -- ___ Python tracker

[issue41486] Add _BlocksOutputBuffer for bz2/lzma/zlib module

2021-04-30 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 251ffa9d2b16b091046720628deb6a7906c35d29 by Ma Lin in branch 'master': bpo-41486: Fix initial buffer size can't > UINT32_MAX in zlib module (GH-25738) https://github.com/python/cpython/commit/251ffa9d2b16b091046720628deb6a7906c35d29

[issue43916] Mark static types newly converted to heap types as immutable: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag

2021-04-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > If one of the admins could make that post into a wiki post, it would be open > for editing, making it easier to fill the holes in the lists. Not sure what do you have in mind for the wiki, but the easiest is to open some GitHub issue somewhere or us

[issue43916] Mark static types newly converted to heap types as immutable: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag

2021-04-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > * _ast.AST: use {Py_tp_new, PyType_GenericNew} and {Py_tp_init, > ast_type_init} slots. What happens if tp_new is called without calling > tp_init? I think this is fine since ast_type_init doesn't initialize any C fields and only mutates the object

[issue43950] Include column offsets for bytecode instructions

2021-04-30 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue43994] change representation of match as / capture as `Name(..., ctx=Store())`

2021-04-30 Thread Brandt Bucher
Brandt Bucher added the comment: Do you mind providing a bit more context? I'm sort of confused what exactly is being proposed here (as far as I can tell, it's not really possible to represent " as " with a single Name node). Also, I'm not sure if you're aware, but we just completed a huge o

[issue43979] Simplify urllib.parse_qsl

2021-04-30 Thread Dong-hee Na
Change by Dong-hee Na : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailin

[issue22167] iglob() has misleading documentation (does indeed store names internally)

2021-04-30 Thread Andrei Kulakov
Change by Andrei Kulakov : -- keywords: +patch nosy: +andrei.avk nosy_count: 8.0 -> 9.0 pull_requests: +24460 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25767 ___ Python tracker

[issue43979] Simplify urllib.parse_qsl

2021-04-30 Thread Dong-hee Na
Change by Dong-hee Na : -- resolution: -> fixed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue43994] change representation of match as / capture as `Name(..., ctx=Store())`

2021-04-30 Thread Brandt Bucher
Brandt Bucher added the comment: FWIW, I'm never used pyflakes, but I'm not really sure how it would be able to provide useful linting by just treating patterns as expressions (which is what I assume is desired here). I assume that these are the three lines you're trying to get rid of? http

[issue43971] documentation: no spacing around default args in annotated function

2021-04-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset e48405a9be067d50d6d0d83dc22013fc68f15657 by Miss Islington (bot) in branch '3.9': bpo-43971: Add spaces around annotated arg default '=' (GH-25702) https://github.com/python/cpython/commit/e48405a9be067d50d6d0d83dc22013fc68f15657 -- _

[issue43971] documentation: no spacing around default args in annotated function

2021-04-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 606bb1c77c66eca081d03374ad4b53d9e603dd9d by Miss Islington (bot) in branch '3.8': bpo-43971: Add spaces around annotated arg default '=' (GH-25702) https://github.com/python/cpython/commit/606bb1c77c66eca081d03374ad4b53d9e603dd9d -- _

[issue43996] Doc for mutable sequence pop() method implies argument is a slice or sequence.

2021-04-30 Thread Mark Sapiro
New submission from Mark Sapiro : In several places in the documentation including: ``` grep -rn 'pop.\[i\]' Lib/pydoc_data/topics.py:13184: '| "s.pop([i])" | retrieves the item at *i* ' Lib/pydoc_data/topics.py:13647: '| "s.pop([i])"

[issue43994] change representation of match as / capture as `Name(..., ctx=Store())`

2021-04-30 Thread Anthony Sottile
Anthony Sottile added the comment: I'm suggesting instead of: MatchAs(pattern=None, name='foo') to have MatchAs(pattern=None, name=Name('foo', ctx=Store())) -- ___ Python tracker _

[issue43916] Mark static types newly converted to heap types as immutable: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag

2021-04-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Something is wrong after commit 3bb09947ec4837de75532e21dd4bd25db0a1f1b7. When building Python I am getting: *** WARNING: renaming "_curses" since importing it failed: /home/pablogsal/github/python/master/build/lib.linux-x86_64-3.10-pydebug/_curses.cp

[issue43916] Mark static types newly converted to heap types as immutable: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag

2021-04-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The problem is that the curses module is using a function that requires to be built in the core: #ifdef Py_BUILD_CORE extern int _PyStructSequence_InitType( PyTypeObject *type, PyStructSequence_Desc *desc, unsigned long tp_flags); #endif -

[issue43950] Include column offsets for bytecode instructions

2021-04-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Marking what expression evaluated to None would be extremely helpful. So would marking the 0 denominator when there is more than one candidate: "e = a/b + c/d". It should be easy to revise IDLE Shell's print_exception to tag the span. In some cases, the c

[issue43916] Mark static types newly converted to heap types as immutable: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag

2021-04-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +24461 pull_request: https://github.com/python/cpython/pull/25768 ___ Python tracker ___ ___

[issue43916] Mark static types newly converted to heap types as immutable: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag

2021-04-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The build errors were in the CI, but because Python doesn't complain if it cannot build a module, then we never catched this. I have opened https://github.com/python/cpython/pull/25768 to fix it to unblock the release, since the curses module is broke

[issue43950] Include column offsets for bytecode instructions

2021-04-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > So would marking the 0 denominator when there is more than one candidate: "e > = a/b + c/d". No, it will mark the offset of the bytecode that was getting executed when the exception was raised. Is just a way to mark what is raising the particular e

[issue43916] Mark static types newly converted to heap types as immutable: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag

2021-04-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 558df9010915c8fe94f4d7f842e7c5aabbb06b14 by Pablo Galindo in branch 'master': bpo-43916: Export the _PyStructSequence_InitType to fix build errors in the curses module (GH-25768) https://github.com/python/cpython/commit/558df9010915c8fe9

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2021-04-30 Thread Inada Naoki
Inada Naoki added the comment: +1 to Eryk. > Hence my newbie questions are: 1) What problem are you trying to solve by this "unlinking trick"? Same to TempoaryFile in Unix. 2) Do we need to have a separate issue raised for this problem? I don't think so. We didn't unlink because wi didn't

[issue43989] Enum deprecation breaks SSL tests

2021-04-30 Thread robertohueso
Change by robertohueso : -- nosy: +robertohueso nosy_count: 7.0 -> 8.0 pull_requests: +24462 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25769 ___ Python tracker __

[issue43983] Can't install Python v3.9.4 / 0x80070643 / windows 10 64bit

2021-04-30 Thread Marwan Essam
Marwan Essam added the comment: Hello Terry, thank you for replying. I tried many times to reboot and no luck. Also i noticed that when i tried to install an older version like Python 2 the installation done without errors. -- nosy: +Marwan ___ Pyt

[issue43983] Can't install Python v3.9.4 / 0x80070643 / windows 10 64bit

2021-04-30 Thread Marwan Essam
Marwan Essam added the comment: Also if you are talking about the location of installation, i tried to install it in somewhere else and still not working -- ___ Python tracker __

[issue43957] [Enum] update __contains__ to return True for valid values

2021-04-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal nosy_count: 1.0 -> 2.0 pull_requests: +24463 pull_request: https://github.com/python/cpython/pull/25770 ___ Python tracker ___

[issue43994] change representation of match as / capture as `Name(..., ctx=Store())`

2021-04-30 Thread Anthony Sottile
Anthony Sottile added the comment: and actually, now that I look close it would be useful for `MatchStar` and `MatchMapping` to also use a `Name(..., ctx=Store())` for their respective parameters as well -- ___ Python tracker

[issue43997] dataclasses documentation needs version added for match_args, kw_only, and slots

2021-04-30 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: eric.smith priority: normal severity: normal stage: needs patch status: open title: dataclasses documentation needs version added for match_args, kw_only, and slots versions: Python 3.10 ___ Python tracker

[issue43997] dataclasses documentation needs version added for match_args, kw_only, and slots

2021-04-30 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> docs@python components: +Documentation keywords: +easy, newcomer friendly nosy: +docs@python ___ Python tracker ___ _

[issue42269] Add ability to set __slots__ in dataclasses

2021-04-30 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset c24199184bea0c851c1a7296ae54aaf18ee56752 by Yurii Karabas in branch 'master': bpo-42269: Add slots parameter to dataclass decorator (GH-24171) https://github.com/python/cpython/commit/c24199184bea0c851c1a7296ae54aaf18ee56752 -- ___

[issue42269] Add ability to set __slots__ in dataclasses

2021-04-30 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for all of your work, Yurii. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue43994] change representation of match as / capture as `Name(..., ctx=Store())`

2021-04-30 Thread Brandt Bucher
Brandt Bucher added the comment: + Nick and Guido The only benefit I see on our side is that it leaves the door open for complex assignment targets in the future, like (a, b), a[b], etc. (If I recall correctly, this is also why NamedExpr uses an expr target rather than just an identifier.)

[issue43994] change representation of match as / capture as `Name(..., ctx=Store())`

2021-04-30 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +freundTech ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue43994] change representation of match as / capture as `Name(..., ctx=Store())`

2021-04-30 Thread Guido van Rossum
Guido van Rossum added the comment: I'm -0.5 on reusing Name(ctx=Store). The reason we're using that in assignments is that in the past (before the PEG parser) the parser literally used the same grammar for the LHS and RHS of assignments, and a second pass was used to rule out invalid target

[issue43996] Doc for mutable sequence pop() method implies argument is a slice or sequence.

2021-04-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: In function signatures, the square brackets do not mean that there is a list. Instead, it is a convention used throughout the docs to mean that an argument is optional. In this case, s.pop([i]) means that both of these are valid calls: # retrieve an

[issue43994] change representation of match as / capture as `Name(..., ctx=Store())`

2021-04-30 Thread Anthony Sottile
Anthony Sottile added the comment: at least for static analysis of other python constructs it's very convenient to know from a `Name` node alone whether it's being used in a read or write context -- without this information an ast traversal needs to maintain more information about whether it

[issue43996] Doc for mutable sequence pop() method implies argument is a slice or sequence.

2021-04-30 Thread Mark Sapiro
Mark Sapiro added the comment: Thank you for the explanation which I understand and accept. I also fully (or maybe not quite fully) understand the use of square brackets to indicate optional arguments. It's just that in the context of the table at https://docs.python.org/3/library/stdtypes.h

[issue43916] Mark static types newly converted to heap types as immutable: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag

2021-04-30 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > Not sure what do you have in mind for the wiki See https://meta.discourse.org/t/what-is-a-wiki-post/30801 -- ___ Python tracker __

[issue43994] change representation of match as / capture as `Name(..., ctx=Store())`

2021-04-30 Thread Adrian Freund
Adrian Freund added the comment: I already brought this up on the main pattern matching issue some time ago (https://bugs.python.org/issue42128#msg388554), where the consensus was that not using a Name is consistent with other parts of the ast, such as `import ... as identifier`, `except ...

<    1   2   3