[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

2022-04-03 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 124227c95f310d2ecd4b567271ab1919fc7000cb by Nick Coghlan in branch 'main': bpo-44800: Document internal frame naming conventions (GH-32281) https://github.com/python/cpython/commit/124227c95f310d2ecd4b567271ab1919fc7000cb

[issue47204] Ensure PyEval_GetGlobals() doesn't set an exception when returning NULL

2022-04-03 Thread Nick Coghlan
Nick Coghlan added the comment: Core dev forum thread for the C API question: https://discuss.python.org/t/subtle-c-api-discrepancy-pyeval-getlocals-vs-pyeval-getglobals-with-no-python-frame/14797 -- ___ Python tracker <https://bugs.python.

[issue47204] Ensure PyEval_GetGlobals() doesn't set an exception when returning NULL

2022-04-03 Thread Nick Coghlan
New submission from Nick Coghlan : While working on the first PR for bpo-44800 I provoked an obscure failure in PyImport_ImportModule by making PyEval_GetGlobals set an exception when returning NULL (as PyEval_GetLocals has done since bpo-18408 was implemented for Python 3.4). This ticket

[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

2022-04-02 Thread Nick Coghlan
Nick Coghlan added the comment: Core dev forum thread: https://discuss.python.org/t/proposal-rename-pyinterpreterframe-struct-as-py-framedata/14213 The conclusion from the forum thread and associated PRs was that any of the further renaming proposed didn't provide sufficient additional

[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

2022-04-02 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: +30342 pull_request: https://github.com/python/cpython/pull/32281 ___ Python tracker <https://bugs.python.org/issue44

[issue47092] [C API] Add PyFrame_GetVar(frame, name) function

2022-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: Mark's suggested frame stack API makes sense to me, but being able to get/set specific values through the full frame API seems like it would be useful even if the lower level API existed - if we don't get one of the proxy PEPs in shape to land in 3.11, trace

[issue36692] Unexpected stderr output from test_sys_settrace

2022-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: I'm not, so I assume this got cleaned up somewhere along the way. -- resolution: -> out of date stage: needs patch -> resolved status: pending -> closed ___ Python tracker <https://bugs.python.or

[issue46964] The global config should not be stored on each interpreter

2022-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: I agree the status quo has its benefits. However, it has the distinct downside that because each interpreter has its own storage for copied settings, other code has to assume the settings *might* be different in each interpreter, even if they're currently

[issue47135] Allow decimal.localcontext to accept keyword arguments to set context attributes

2022-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: Seems reasonable to me, but I think a full implementation would want to throw an error for keyword args that don't already exist as context attributes (otherwise typos would fail silently) -- ___ Python tracker

[issue46964] The global config should not be stored on each interpreter

2022-03-26 Thread Nick Coghlan
Nick Coghlan added the comment: Moving the invariant bits would certainly make sense. As Victor notes, though, some things (like whether to install the signal handlers) should be different. -- ___ Python tracker <https://bugs.python.

[issue46761] functools.update_wrapper breaks the signature of functools.partial objects

2022-03-26 Thread Nick Coghlan
Nick Coghlan added the comment: On the historical front, wraps & update_wrapper were only designed to handle true wrapper functions (i.e. those that don't change the calling signature). For anything else (including partial), I considered it unlikely that the doc string would s

[issue32642] add support for path-like objects in sys.path

2022-03-26 Thread Nick Coghlan
Nick Coghlan added the comment: The import system is already complex, so I think the hesitation about allowing arbitrary Path-like objects is warranted. (For example: are importlib's caching semantics really valid for *arbitrary* path-like objects? An object can be path-like without being

[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

2022-03-21 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: +30113 pull_request: https://github.com/python/cpython/pull/32024 ___ Python tracker <https://bugs.python.org/issue44

[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

2022-03-19 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: +30078 pull_request: https://github.com/python/cpython/pull/31987 ___ Python tracker <https://bugs.python.org/issue44

[issue47065] test_curses fails if terminal defaults to bright white text (15)

2022-03-19 Thread Nick Coghlan
New submission from Nick Coghlan : test_curses fails for me by default (running on Fedora 35 in KDE's Konsole): ``` [ncoghlan@thechalk cpython]$ echo $TERM xterm-256color [ncoghlan@thechalk cpython]$ ./python -m test -u curses test_curses 0:00:00 load avg: 0.88 Run tests sequentially 0:00:00

[issue21436] Consider leaving importlib.abc.Loader.load_module()

2021-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: FWIW, I think it would be desirable to retain/restore some form of API that allows the creation of modules from files without requiring the user to know about module specs (or loaders, or anything else). My current preference would

[issue45155] Add default arguments for int.to_bytes()

2021-09-09 Thread Nick Coghlan
Nick Coghlan added the comment: Never mind, I've forced network byte order in struct strings for so long I had forgotten that native byte order was also the default there. Hence I withdraw that objection. -- ___ Python tracker <ht

[issue45155] Add default arguments for int.to_bytes()

2021-09-09 Thread Nick Coghlan
Nick Coghlan added the comment: Rather than defaulting to sys.byteorder, could the byte order default to None and only be optional when not needed? (input value fits in a single byte, output is a single byte) Otherwise the difference in defaults between this method and the struct module

[issue39452] Improve the __main__ module documentation

2021-09-09 Thread Nick Coghlan
Nick Coghlan added the comment: These changes are excellent - thanks for the patch! Something even the updated version doesn't cover yet is directory and zipfile execution, so I filed bpo-45149 as a follow up ticket for that (the info does exist elsewhere in the documentation, so it's

[issue45149] Cover directory and zipfile execution in __main__ module docs

2021-09-09 Thread Nick Coghlan
New submission from Nick Coghlan : bpo-39452 covered significant improvements to the __main__ module documentation at https://docs.python.org/dev/library/__main__.html, making it a better complement to the CPython CLI documentation at https://docs.python.org/dev/using/cmdline.html#command

[issue45020] Freeze all modules imported during startup.

2021-09-03 Thread Nick Coghlan
Nick Coghlan added the comment: For the module metadata problem: one potential approach to that for "designed to be frozen" stdlib modules is to set the values directly in the module code, rather than trying to set them automatically in the frozen import machinery. It s

[issue42538] AsyncIO strange behaviour

2021-08-23 Thread Nick Coghlan
Change by Nick Coghlan : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> asyncio.create_task() documentation should mention user needs to keep reference to the task ___ Python tra

[issue42538] AsyncIO strange behaviour

2021-08-23 Thread Nick Coghlan
Nick Coghlan added the comment: While filed later, issue44665 correctly describes the problem reported here: asyncio is behaving as expected, but the docs don't make it clear that you need to save a reference to the result of ensure_future()/create_task() if you don't want to risk the task

[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

2021-08-21 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: +26326 pull_request: https://github.com/python/cpython/pull/3640 ___ Python tracker <https://bugs.python.org/issue44

[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

2021-08-13 Thread Nick Coghlan
Nick Coghlan added the comment: >From a naming convention perspective, the code comments and NEWS entry in the >PR now refer to "full frame objects" (``PyFrameObject``) and "frame data >storage structs" (``_Py_framedata``) to avoid giving the misleading im

[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

2021-08-13 Thread Nick Coghlan
Nick Coghlan added the comment: PR has been updated with a new API proposal prompted by Mark's review comments on the original proposal. * Rename "pycore_frame.h" to "pycore_framedata.h" * Rename the _interpreter_frame struct to _Py_execution_frame * Rename the type f

[issue44800] Code readability: rename interpreter frames to execution frames

2021-08-11 Thread Nick Coghlan
Nick Coghlan added the comment: Mark raised some valid concerns with the proposed naming convention over on the PR: * the proposed names make it sound like there are genuinely two kinds of frame, when the actual relationship is between a frame's data storage and a Python object providing

[issue43838] There is a way to access an underlying mapping in MappingProxyType

2021-08-07 Thread Nick Coghlan
Nick Coghlan added the comment: That resolution makes sense to me as well. Should we make a note in the documentation for https://docs.python.org/3/library/types.html#types.MappingProxyType that the "read-only" protection is to guard against *accidental* modification, not agai

[issue37398] contextlib.ContextDecorator decorating async functions

2021-08-01 Thread Nick Coghlan
Nick Coghlan added the comment: You are correct that this proposal is technically rejected, rather than being a true duplicate of the AsyncContextManager addition. The core problem with the automatic inference idea is that it isn't possible for the standard library to reliably distinguish

[issue43838] There is a way to access an underlying mapping in MappingProxyType

2021-08-01 Thread Nick Coghlan
Nick Coghlan added the comment: Ouch, you're right - I forgot that dict just returned NotImplemented from comparisons and unions and made it the other operand's problem: >>> d1 = dict(x=1) >>> d2 = dict(x=1) >>> from types import MappingProxyType as p

[issue22240] argparse support for "python -m module" in help

2021-08-01 Thread Nick Coghlan
Nick Coghlan added the comment: (Note: this is an old enough ticket that it started out with patch files on the tracker rather than PRs on GitHub. That's just a historical artifact, so feel free to open a PR as described in the devguide if you would prefer to work that way) There are two

[issue44590] Create frame objects lazily when needed

2021-08-01 Thread Nick Coghlan
Nick Coghlan added the comment: The newly linked pull request isn't actually for this ticket, it's for bpo-44800, a follow-up refactoring proposal related to the variable, struct field, and API naming schemes used for the new lighter weight execution frames. However, the commit message

[issue44800] Code readability: rename interpreter frames to execution frames

2021-08-01 Thread Nick Coghlan
Nick Coghlan added the comment: PR for this proposed refactoring is now up, with a review requested from Mark: https://github.com/python/cpython/pull/27525/ The PR mostly follows what I originally posted, except that I went with _Py_execution_frame and _PyExecFrame for the struct

[issue44800] Code readability: rename interpreter frames to execution frames

2021-08-01 Thread Nick Coghlan
Change by Nick Coghlan : -- keywords: +patch pull_requests: +26040 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/27525 ___ Python tracker <https://bugs.python.org/issu

[issue44590] Create frame objects lazily when needed

2021-08-01 Thread Nick Coghlan
Change by Nick Coghlan : -- nosy: +ncoghlan nosy_count: 3.0 -> 4.0 pull_requests: +26041 pull_request: https://github.com/python/cpython/pull/27525 ___ Python tracker <https://bugs.python.org/issu

[issue44800] Code readability: rename interpreter frames to execution frames

2021-07-31 Thread Nick Coghlan
Nick Coghlan added the comment: As a side effect of working on this, I noticed some changes that are needed to adapt the GDB integration hooks to the new frame state layout. -- nosy: +pablogsal ___ Python tracker <https://bugs.python.

[issue44800] Code readability: rename interpreter frames to execution frames

2021-07-31 Thread Nick Coghlan
Change by Nick Coghlan : -- assignee: -> ncoghlan ___ Python tracker <https://bugs.python.org/issue44800> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue44800] Code readability: rename interpreter frames to execution frames

2021-07-31 Thread Nick Coghlan
Change by Nick Coghlan : -- dependencies: +Create frame objects lazily when needed ___ Python tracker <https://bugs.python.org/issue44800> ___ ___ Python-bug

[issue44800] Code readability: rename interpreter frames to execution frames

2021-07-31 Thread Nick Coghlan
New submission from Nick Coghlan : When merging the bpo-44590 changes into my PEP 558 implementation branch, I found it very hard to follow when the code was referring to the new interpreter frames rather than the existing Python frame objects that were historically used for both execution

[issue44405] add program passed as string to dis module.

2021-07-23 Thread Nick Coghlan
Nick Coghlan added the comment: I suspect the only reason the dis CLI isn't documented is because it's been around for so long (22 years!) that nobody previously noticed it was missing: https://github.com/python/cpython/commit/1fdae12c93246fcf4abbf882ba08df789070dfcc Folks then either

[issue43838] There is a way to access an underlying mapping in MappingProxyType

2021-07-23 Thread Nick Coghlan
Nick Coghlan added the comment: Delegating operations to the underlying mapping is still OK, all we're wanting to bypass is the operand coercion dances in abstract.c and object.c that may expose the underlying mapping to the *other* operand. We don't want to implicitly copy though

[issue44561] Some expired hyperlinks in Python documentation

2021-07-18 Thread Nick Coghlan
Change by Nick Coghlan : -- stage: patch review -> backport needed ___ Python tracker <https://bugs.python.org/issue44561> ___ ___ Python-bugs-list mai

[issue44561] Some expired hyperlinks in Python documentation

2021-07-18 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset b494685b2548489efcc66993cc6c13b027ce3b26 by Steven Hsu in branch 'main': bpo-44561: Update hyperlinks in Doc/distributing/index.rst (#27032) https://github.com/python/cpython/commit/b494685b2548489efcc66993cc6c13b027ce3b26 -- nosy

[issue43838] There is a way to access an underlying mapping in MappingProxyType

2021-07-10 Thread Nick Coghlan
Nick Coghlan added the comment: I stumbled across this independently in bpo-44596, but missed this existing report due to the specific word I was looking for (encapsulation). In addition to the comparison operand coercion, there's now another access option through the `__ror__` method

[issue44596] Operand coercion breaks MappingProxyType encapsulation

2021-07-10 Thread Nick Coghlan
New submission from Nick Coghlan : The fast locals proxy implementation for PEP 558 used the existing MappingProxyType implementation as a starting point. This meant I noticed the following code in the mapping proxy comparison implementation: == static PyObject

[issue42197] Disable automatic update of frame locals during tracing

2021-06-27 Thread Nick Coghlan
Nick Coghlan added the comment: I've updated PEP 558 with a reference back to this ticket as additional motivation (the update also addresses several of the fragility concerns that Mark raised): https://github.com/python/peps/pull/1787 There's still work to be done to bring the reference

[issue44515] contextlib test incompatibility with non-refcounted GC

2021-06-26 Thread Nick Coghlan
Change by Nick Coghlan : -- keywords: +patch pull_requests: +25486 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/26910 ___ Python tracker <https://bugs.python.org/issu

[issue44515] contextlib test incompatibility with non-refcounted GC

2021-06-26 Thread Nick Coghlan
Change by Nick Coghlan : -- versions: +Python 3.10, Python 3.11 ___ Python tracker <https://bugs.python.org/issue44515> ___ ___ Python-bugs-list mailin

[issue44515] contextlib test incompatibility with non-refcounted GC

2021-06-26 Thread Nick Coghlan
New submission from Nick Coghlan : Backporting the latest contextlib module and test suite to contextlib2, I ran into a couple of CI failures on PyPy3. Investigation showed that a couple of the new test cases were assuming the use of a refcounted GC. One could be fixed by switching to using

[issue37398] contextlib.ContextDecorator decorating async functions

2021-06-26 Thread Nick Coghlan
Nick Coghlan added the comment: bpo-40816 took the much simpler approach of introducing a separate contextlib.AsyncContextDecorator class. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add missed AsyncContextDecorator to context

[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-27 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 59af59c2dfa52dcd5605185263f266a49ced934c by Erlend Egeberg Aasland in branch 'main': bpo-42972: Fully support GC for pyexpat, unicodedata, and dbm/gdbm heap types (GH-26376) https://github.com/python/cpython/commit

[issue43892] Make match patterns explicit in the AST

2021-04-29 Thread Nick Coghlan
Nick Coghlan added the comment: After the next docs build, the documentation for the explicit AST nodes should be available https://docs.python.org/dev/library/ast.html#pattern-matching -- resolution: -> fixed stage: commit review -> resolved status: open -&g

[issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure

2021-04-27 Thread Nick Coghlan
Nick Coghlan added the comment: Another instance at https://github.com/python/cpython/pull/25585/checks?check_run_id=2447701034 I unlinked the previously linked PR, as that looked to be for bpo-43539 rather than this issue. -- nosy: +ncoghlan

[issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure

2021-04-27 Thread Nick Coghlan
Change by Nick Coghlan : -- stage: patch review -> needs patch ___ Python tracker <https://bugs.python.org/issue41682> ___ ___ Python-bugs-list mailing list Un

[issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure

2021-04-27 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: -24157 ___ Python tracker <https://bugs.python.org/issue41682> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment

2021-04-27 Thread Nick Coghlan
Change by Nick Coghlan : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker <https://bugs.python

[issue43892] Make match patterns explicit in the AST

2021-04-26 Thread Nick Coghlan
Change by Nick Coghlan : -- assignee: ncoghlan -> brandtbucher ___ Python tracker <https://bugs.python.org/issue43892> ___ ___ Python-bugs-list mailing list Un

[issue43892] Make match patterns explicit in the AST

2021-04-26 Thread Nick Coghlan
Change by Nick Coghlan : -- stage: patch review -> commit review ___ Python tracker <https://bugs.python.org/issue43892> ___ ___ Python-bugs-list mai

[issue43892] Make match patterns explicit in the AST

2021-04-26 Thread Nick Coghlan
Nick Coghlan added the comment: PR is green now, and I don't have any further changes I want to make, so Brandt, please feel free to merge if you're happy with the proposed AST nodes, and the way I've gone about implementing them. If you'd like some adjustments, it probably makes the most

[issue43892] Make match patterns explicit in the AST

2021-04-25 Thread Nick Coghlan
Nick Coghlan added the comment: PR against the main repo is now up: https://github.com/python/cpython/pull/25585 A couple of things in the unparser tripped me up (ast_unparse.c only handles annotation expressions, the way ast._Unparser.visit() is defined means NodeVisitor.generic_visit

[issue43892] Make match patterns explicit in the AST

2021-04-25 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: +24305 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25585 ___ Python tracker <https://bugs.python.org/issu

[issue43892] Make match patterns explicit in the AST

2021-04-25 Thread Nick Coghlan
Nick Coghlan added the comment: Working on the unparser picked up an inconsistency I had previously missed: aside from named expressions, "target" attributes in the AST are generally full expression subnodes, rather than identifier attributes. Identifier attributes on nodes are

[issue43892] Make match patterns explicit in the AST

2021-04-25 Thread Nick Coghlan
Nick Coghlan added the comment: Interesting idea - I had missed that you were suggested "identifier*" for the cls node. It's simple enough to check for Name-or-Attribute in the AST validator though, and sticking with a standard expr_ty node means getting a lot of standar

[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Nick Coghlan
Nick Coghlan added the comment: Setting clear timing expectations, given beta is so close: I'm not expecting to have time to finish the unparser work over the weekend, but I do expect to have time to finish it on Monday evening my time (UTC+10

[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Nick Coghlan
Nick Coghlan added the comment: https://github.com/ncoghlan/cpython/pull/9/commits/54940a3817df3046da3f9c51d4d426a73b2ec786 implements Brandt's suggestion of disallowing NULL keys in MatchMapping and instead passing in an explicit "rest" identifier to capture the extra keys.

[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Nick Coghlan
Nick Coghlan added the comment: To get the "0+0" matching case rejected again I had to flesh out a bit more of the AST validator. This initial piece of the validator replaces the previously pattern-matching-specific AST optimisation code that refused to fold BinOp expressions th

[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Nick Coghlan
Nick Coghlan added the comment: Segfaults are fixed (I had a couple of cases where I wasn't checking for NULL, and another where I was looking up MatchMapping attributes on a MatchClass node). test_patma passes except for test cases 240, 241, and 242, which look like genuine regressions

[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Nick Coghlan
Nick Coghlan added the comment: My proposed MatchConstant node name was bothering me, as most constants are actually matched by equality in MatchValue, the same way variables are. So I'm switching my proposed name for that node to be MatchSingleton, since that better reflects the key

[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Nick Coghlan
Nick Coghlan added the comment: I've removed the "?" from the end attributes for pattern nodes. The draft PR branch now compiles, but I've clearly made a mistake somewhere as it segfaults when trying to compile test_patma.py. --

[issue43897] Implement support for validation of pattern matching ASTs

2021-04-22 Thread Nick Coghlan
Change by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker <https://bugs.python.org/issue43897> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43897] Implement support for validation of pattern matching ASTs

2021-04-22 Thread Nick Coghlan
Change by Nick Coghlan : -- priority: normal -> critical ___ Python tracker <https://bugs.python.org/issue43897> ___ ___ Python-bugs-list mailing list Un

[issue43892] Make match patterns explicit in the AST

2021-04-22 Thread Nick Coghlan
Nick Coghlan added the comment: The draft PR moved because I messed up the previous branch name: https://github.com/ncoghlan/cpython/pull/9/files It's to the point where everything except symtable.c compiles. I put an initial skeleton of a validator in, but only enough to check

[issue43892] Make match patterns explicit in the AST

2021-04-22 Thread Nick Coghlan
Change by Nick Coghlan : -- stage: patch review -> needs patch ___ Python tracker <https://bugs.python.org/issue43892> ___ ___ Python-bugs-list mailing list Un

[issue43892] Make match patterns explicit in the AST

2021-04-22 Thread Nick Coghlan
Change by Nick Coghlan : -- keywords: +patch pull_requests: +24241 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25521 ___ Python tracker <https://bugs.python.org/issu

[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Nick Coghlan
Nick Coghlan added the comment: https://www.python.org/dev/peps/pep-0642/#representing-patterns-explicitly-in-the-abstract-syntax-tree covers the rationale for why it is potentially problematic to reuse expression nodes for match patterns: it doesn't semantically align with the fact

[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Nick Coghlan
Nick Coghlan added the comment: It's specifically the definition of "match_case" in the AST that is affected: match_case = (pattern pattern, expr? guard, stmt* body) pattern = MatchAlways | MatchValue(expr value) | MatchConstant(constant value) | Mat

[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Nick Coghlan
Nick Coghlan added the comment: Agreed. I had wanted the AST to be part of the PEPs specifically *because* it's a public API, but didn't check until today whether or not the original PEP 634 implementation had been merged as-is, or with a cleaned up AST definition. https://github.com

[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Nick Coghlan
New submission from Nick Coghlan : In the SC submission ticket for PEP 642 (https://github.com/python/steering-council/issues/43 ), Guido indicated he was in favour of the more explicit pattern matching AST changes suggested in that PEP. This ticket covers adapting the pattern matching

[issue43133] Accept file mode "rw" to open-or-create a file and seek to the start

2021-02-04 Thread Nick Coghlan
New submission from Nick Coghlan : After yet again trying to use "rw" to open a file in read/write mode, having it fail, and then having to look up the docs to remind myself that the correct spelling is "r+", I'm finally filing this to suggest we make the obvious "rw

[issue42783] asyncio.sleep(0) idiom is not documented

2021-01-06 Thread Nick Coghlan
Nick Coghlan added the comment: I merged the update to the 3.10 docs, but the automated backport to 3.9 to update the online docs failed. -- resolution: -> fixed stage: patch review -> backport needed versions: +Python 3.10, Python 3.9 ___

[issue42783] asyncio.sleep(0) idiom is not documented

2021-01-06 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 5c30145afb6053998e3518befff638d207047f00 by Simon Willison in branch 'master': bpo-42783: Documentation for asyncio.sleep(0) (#24002) https://github.com/python/cpython/commit/5c30145afb6053998e3518befff638d207047f00 -- nosy: +ncoghlan

[issue42455] Add decorator_factory function to functools module

2021-01-05 Thread Nick Coghlan
Nick Coghlan added the comment: Sorry, I meant to include this comment as well: The other filter I applied here was "Could someone figure out the boilerplate code themselves in less time than it would take them to find, read, and understand the documentation for the new helper fun

[issue42455] Add decorator_factory function to functools module

2021-01-05 Thread Nick Coghlan
Nick Coghlan added the comment: I think the idea is a plausible and well-presented suggestion, but I'm afraid I'm still going to agree with the view that we shouldn't add this. >From a maintainability point of view, *generically* detecting the difference >between "appl

[issue33944] Deprecate and remove code execution in pth files

2020-12-31 Thread Nick Coghlan
Nick Coghlan added the comment: PEP 648 has been posted with a proposal to migrate sitecustomize.py, usersitecustomize.py and arbitrary code execution in pth files to a directory based `__sitecustomize__` structure: https://www.python.org/dev/peps/pep-0648

[issue42642] logging: add high priority log level for warnings being cleared

2020-12-14 Thread Nick Coghlan
New submission from Nick Coghlan : When using the logging module for long running services, there's one limitation of the predefined logging levels that I semi-regularly run into: the only entirely reliable log level for reporting that a WARNING state has been cleared is itself WARNING

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-14 Thread Nick Coghlan
Change by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker <https://bugs.python.org/issue42260> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42282] Constant folding is skipped in named expressions

2020-11-07 Thread Nick Coghlan
Change by Nick Coghlan : -- resolution: -> fixed status: open -> closed ___ Python tracker <https://bugs.python.org/issue42282> ___ ___ Python-bugs-list

[issue42282] Constant folding is skipped in named expressions

2020-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: Since this was only a performance issue, I'm not planning to backport it to earlier releases. -- stage: patch review -> resolved ___ Python tracker <https://bugs.python.org/issu

[issue42282] Constant folding is skipped in named expressions

2020-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 8805a4dad201473599416b2c265802b8885f69b8 by Nick Coghlan in branch 'master': bpo-42282: Fold constants inside named expressions (GH-23190) https://github.com/python/cpython/commit/8805a4dad201473599416b2c265802b8885f69b8

[issue42282] Constant folding is skipped in named expressions

2020-11-07 Thread Nick Coghlan
Change by Nick Coghlan : -- keywords: +patch pull_requests: +22093 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23190 ___ Python tracker <https://bugs.python.org/issu

[issue42282] Constant folding is skipped in named expressions

2020-11-07 Thread Nick Coghlan
Change by Nick Coghlan : -- assignee: -> ncoghlan ___ Python tracker <https://bugs.python.org/issue42282> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue42282] Constant folding is skipped in named expressions

2020-11-06 Thread Nick Coghlan
New submission from Nick Coghlan : While working on the PEP 642 reference implementation I removed the "default:" case from the switch statement in astfold_expr as part of making sure the new SkippedBinding node was being handled everywhere it needed to be. This change

[issue40952] GCC overflow warnings (format-overflow, stringop-overflow)

2020-11-06 Thread Nick Coghlan
Nick Coghlan added the comment: I *think* the lnotab one is the compiler failing to detect that the pointer has been updated to point inside the body of a Python object, but I'm also not 100% sure that it's a false alarm. -- nosy: +ncoghlan

[issue42186] unittest overrides more serious warnings filter added before unittest.main()

2020-10-30 Thread Nick Coghlan
Nick Coghlan added the comment: Closing the old one as partially fixed, and linking here as a superseder makes sense to me, so I went ahead and did that. -- ___ Python tracker <https://bugs.python.org/issue42

[issue15626] unittest.main negates -bb option and programmatic warning configuration

2020-10-30 Thread Nick Coghlan
Nick Coghlan added the comment: Issue #42186 now covers the request to have a way to tell unittest to leave the warnings filter alone even if it's set programmatically rather than by modifying ``sys.warnoptions``. (Changing version to 3.7 to indicate when the interaction with `-bb

[issue15626] unittest.main negates -bb option and programmatic warning configuration

2020-10-30 Thread Nick Coghlan
Change by Nick Coghlan : -- superseder: -> unittest overrides more serious warnings filter added before unittest.main() ___ Python tracker <https://bugs.python.org/issu

[issue32002] test_c_locale_coercion fails when the default LC_CTYPE != "C"

2020-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: Removing issue assignment, as I'm no longer actively investigating this. -- assignee: ncoghlan -> ___ Python tracker <https://bugs.python.org/issu

[issue30672] PEP 538: Unexpected locale behaviour on *BSD (including Mac OS X)

2020-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: Removing issue assignment, as I'm not actively investigating this. -- assignee: ncoghlan -> ___ Python tracker <https://bugs.python.org/issu

[issue34206] Move and clarify Py_Main documentation

2020-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: Added 3.8 back in to the target versions. However, if the automatic backport doesn't work for that branch, I'll probably skip it rather than fixing any conflicts. -- versions: +Python 3.8 ___ Python tracker <ht

[issue34206] Move and clarify Py_Main documentation

2020-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: Adjusted target versions, as I never previously got around to merging this PR. -- versions: +Python 3.10, Python 3.9 -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue34

  1   2   3   4   5   6   7   8   9   10   >