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/124227c95f310d2ecd4b567271ab19
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.
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
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 addit
Change by Nick Coghlan :
--
pull_requests: +30342
pull_request: https://github.com/python/cpython/pull/32281
___
Python tracker
<https://bugs.python.org/issue44
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
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.pyth
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 curr
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 tr
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.
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
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
Change by Nick Coghlan :
--
pull_requests: +30113
pull_request: https://github.com/python/cpython/pull/32024
___
Python tracker
<https://bugs.python.org/issue44
Change by Nick Coghlan :
--
pull_requests: +30078
pull_request: https://github.com/python/cpython/pull/31987
___
Python tracker
<https://bugs.python.org/issue44
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:
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 be for a
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
&
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
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
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
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 shou
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
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 ris
Change by Nick Coghlan :
--
pull_requests: +26326
pull_request: https://github.com/python/cpython/pull/3640
___
Python tracker
<https://bugs.python.org/issue44
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 impres
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
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 prov
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
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 distin
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 MappingProx
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 ar
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 m
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 and
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
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
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.
Change by Nick Coghlan :
--
assignee: -> ncoghlan
___
Python tracker
<https://bugs.python.org/issue44800>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Nick Coghlan :
--
dependencies: +Create frame objects lazily when needed
___
Python tracker
<https://bugs.python.org/issue44800>
___
___
Python-bug
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
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 t
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 thou
Change by Nick Coghlan :
--
stage: patch review -> backport needed
___
Python tracker
<https://bugs.python.org/issue44561>
___
___
Python-bugs-list mai
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
-
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.
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
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
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
Change by Nick Coghlan :
--
versions: +Python 3.10, Python 3.11
___
Python tracker
<https://bugs.python.org/issue44515>
___
___
Python-bugs-list mailin
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
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
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/cpyt
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
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
Change by Nick Coghlan :
--
stage: patch review -> needs patch
___
Python tracker
<https://bugs.python.org/issue41682>
___
___
Python-bugs-list mailing list
Un
Change by Nick Coghlan :
--
pull_requests: -24157
___
Python tracker
<https://bugs.python.org/issue41682>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Nick Coghlan :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
type: -> enhancement
___
Python tracker
<https://bugs.python
Change by Nick Coghlan :
--
assignee: ncoghlan -> brandtbucher
___
Python tracker
<https://bugs.python.org/issue43892>
___
___
Python-bugs-list mailing list
Un
Change by Nick Coghlan :
--
stage: patch review -> commit review
___
Python tracker
<https://bugs.python.org/issue43892>
___
___
Python-bugs-list mai
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 pro
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
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
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
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 standard
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 (U
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
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
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 regres
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 th
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.
--
__
Change by Nick Coghlan :
--
nosy: +ncoghlan
___
Python tracker
<https://bugs.python.org/issue43897>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Nick Coghlan :
--
priority: normal -> critical
___
Python tracker
<https://bugs.python.org/issue43897>
___
___
Python-bugs-list mailing list
Un
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 tha
Change by Nick Coghlan :
--
stage: patch review -> needs patch
___
Python tracker
<https://bugs.python.org/issue43892>
___
___
Python-bugs-list mailing list
Un
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
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
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)
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://
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
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 &qu
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
___
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:
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
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
>bet
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
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 WA
Change by Nick Coghlan :
--
nosy: +ncoghlan
___
Python tracker
<https://bugs.python.org/issue42260>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Nick Coghlan :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue42282>
___
___
Python-bugs-list
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
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/8805a4dad201473599416b2c265802
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
Change by Nick Coghlan :
--
assignee: -> ncoghlan
___
Python tracker
<https://bugs.python.org/issue42282>
___
___
Python-bugs-list mailing list
Unsubscrib
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 pick
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:
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
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
Change by Nick Coghlan :
--
superseder: -> unittest overrides more serious warnings filter added before
unittest.main()
___
Python tracker
<https://bugs.python.org/issu
Nick Coghlan added the comment:
Removing issue assignment, as I'm no longer actively investigating this.
--
assignee: ncoghlan ->
___
Python tracker
<https://bugs.python.org
Nick Coghlan added the comment:
Removing issue assignment, as I'm not actively investigating this.
--
assignee: ncoghlan ->
___
Python tracker
<https://bugs.python.org
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 track
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 - 100 of 6301 matches
Mail list logo