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 Venenga added the comment:
This script can reproduce the issue.
The computer must be a Windows computer with volume shadow copy service enabled
The computer must have shadow storage added to the drive being used
This script changes the host machine by creating a shadow copy (permissions
New submission from Nick Venenga :
shutil.copy fails to copy a file from a shadow copy back to its original file
since os.path.samefile returns True. os.path.samefile doesn't reliably detect
these files are different since it relies on ino which is the same for both
files
&
Change by Nick Drozd :
--
keywords: +patch
pull_requests: +29267
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31083
___
Python tracker
<https://bugs.python.org/issu
Change by Nick :
--
keywords: +patch
pull_requests: +28330
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30108
___
Python tracker
<https://bugs.python.org/issu
New submission from Nick :
Apparently, CookieJar.extract_cookies doesn't process cookies form local
domains which explicitly set domain in Set-Cookie header. That means that
headers with domain specified, like "Set-Cookie: foo=baz; Domain=localhost;",
are ignored. As far as I
Nick Drozd added the comment:
> Is there any measurable performance benefit from this?
I wouldn't expect any performance changes either way. If it worked out to be
slower, that would an unpleasant surprise and a good reason to reject this
change. If it worked out to be faster, we
New submission from Nick Drozd :
The following pattern occurs a few times in the codebase:
while 1:
data = conn.recv(blocksize)
if not data:
break
...
There is an unbounded while loop in which some kind of input is read. If the
input is there, it is processed
Nick Papior added the comment:
Ok, I can accept a no-fix ;)
I'll close this.
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
Nick Papior added the comment:
Thanks for the discussion.
--
___
Python tracker
<https://bugs.python.org/issue45889>
___
___
Python-bugs-list mailing list
Unsub
Nick Papior added the comment:
It basically checks that some part of the path is the same as some part of a
reference path, they need not have the same complete parent which is why the
resolve command would negate this comparison always.
--
As for your last example, that will be quite
Nick Papior added the comment:
> Because of this I don't agree with your idea that anything that can match a
> path is a sub-path.
Why not? If a match is True, it means that what is matched must be some kind of
valid path matching a glob specification. Whether it is a regular
Nick Papior added the comment:
Ok, I see this a feature. :)
As for why it is desirable.
A part of a path is still a path, and matching for something must mean that you
are matching a partial path.
Even if you use '*.py' as the pattern this would still make sense as a path:
path
New submission from Nick Papior :
The documentation of Path.match only says it will match a pattern.
But quite often this pattern may be desirable to have as a Path as well.
import pathlib as pl
path = pl.Path("foo/bar")
print(path.match("bar"))
print(path.match(pl.Pa
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 Guenther added the comment:
Hello everyone, and thank you as usual for all your hard work keeping the
python ecosystem going.
I saw that the start of this thread said it was going to
> - make ftplib, imaplib, nntplib, pop3lib, smtplib etc. validate certs by
> default.
but this
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 added the comment:
For the visualization I created a PR with a possible fix. (The link is set into
the corresponding field.)
If everything is OK, I will perform all the required things like the CLA, news
entry...
--
___
Python tracker
Change by Nick :
--
keywords: +patch
pull_requests: +26058
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27552
___
Python tracker
<https://bugs.python.org/issu
New submission from Nick :
Due some problem in a third-party package the `url2path` function from
`nturl2path` got `a/"https://b"` (without `, `a`,`b` are just masks ) as the
first and only argument.
In the function there is the following code (
https://github.com/python/cp
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
1 - 100 of 6508 matches
Mail list logo