Lysandros Nikolaou added the comment:
Agreed on everything.
One thing I don't really understand is if you propose to also strip trailing
whitespace. Does "limit the offset to just past the end of the source text"
include whitespace or not?
For example, the linked PR does
Lysandros Nikolaou added the comment:
Understood.
--
___
Python tracker
<https://bugs.python.org/issue40612>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Lysandros Nikolaou :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Lysandros Nikolaou :
The new PEG parser fails when a parenthesised expression with a single child (a
group) contains a starred expression. Example:
╰─ ./python.exe
Python 3.9.0a6+ (heads/master-dirty:4a12d12186, May 15 2020, 14:53:45)
[Clang 11.0.0 (clang-1100.0.33.8)] on
Lysandros Nikolaou added the comment:
Whoops, false alarm.
It's just that we moved the check for invalid starred expressions to the
parser, while it previously was in the compiler.
╰─ ./python.exe -X oldparser
Python 3.9.0a6+ (heads/master-dirty:003708bcf8, May 15 2020, 15:08:21)
[
Change by Lysandros Nikolaou :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Lysandros Nikolaou :
--
pull_requests: +19413
pull_request: https://github.com/python/cpython/pull/20106
___
Python tracker
<https://bugs.python.org/issue40
Change by Lysandros Nikolaou :
--
pull_requests: +19454
pull_request: https://github.com/python/cpython/pull/20151
___
Python tracker
<https://bugs.python.org/issue40
Change by Lysandros Nikolaou :
--
pull_requests: +19456
pull_request: https://github.com/python/cpython/pull/20153
___
Python tracker
<https://bugs.python.org/issue40
Change by Lysandros Nikolaou :
--
pull_requests: +19464
pull_request: https://github.com/python/cpython/pull/20165
___
Python tracker
<https://bugs.python.org/issue40
Lysandros Nikolaou added the comment:
I'm not getting any compiler warnings on macOS (clang) and on Ubuntu (gcc) and
I can't find any related warnings on the Windows Github Actions logs either.
Could you maybe post a verbose log of test_peg_generato
New submission from Lysandros Nikolaou :
Running the PEG Parser benchmarks requires having memory_profiler installed.
In Tools/peg_generator:
➜ peg_generator git:(master) make time_stdlib
../../python -m zipfile -e data/xxl.zip data
../../python scripts/benchmark.py --parser=cpython --target
Change by Lysandros Nikolaou :
--
keywords: +patch
pull_requests: +19471
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20172
___
Python tracker
<https://bugs.python.org/issu
Lysandros Nikolaou added the comment:
Because `make time` and all the related Makefile targets use the local built
Python in the cpython parent directory. In order to install it, one would have
to go through various steps, like installing openssl, configuring python with
ssl support
Lysandros Nikolaou added the comment:
> Doc/Makefile uses a virtual environment to install Sphinx and Sphinx
> extensions. I suggest to do something similar.
I like this approach. Let me try it.
--
___
Python tracker
<https://bugs.p
Change by Lysandros Nikolaou :
--
pull_requests: +19484
pull_request: https://github.com/python/cpython/pull/20183
___
Python tracker
<https://bugs.python.org/issue40
Change by Lysandros Nikolaou :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Lysandros Nikolaou added the comment:
Fixed in GH-20072 and bpo-40612.
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Lysandros Nikolaou :
--
nosy: +lys.nikolaou
___
Python tracker
<https://bugs.python.org/issue40614>
___
___
Python-bugs-list mailing list
Unsubscribe:
Lysandros Nikolaou added the comment:
Hi Anthony,
could it be that your 3.9 is not a debug build, while the others are? We only
enable parser debug ouput when Python has been build --with-pydebug.
Building the 3.9.0 tag --with-pydebug works fine for me
Lysandros Nikolaou added the comment:
I like the current error message. What bugs me a little is the position of the
caret, which I think is a bit misleading.
Guido, Pablo, should we move the caret to point at the `=` sign or whatever
comes after it? I think I prefer the former
Lysandros Nikolaou added the comment:
Thanks for opening an issue here, Christoph. This is the right place to discuss
this.
Indeed the parser is pretty dumb when reporting errors. In the technical sense
the colon is the right thing to point to, since it's the first token that&
Lysandros Nikolaou added the comment:
I concur with Guido. I feel that making this an error is the best alternative
we have.
--
___
Python tracker
<https://bugs.python.org/issue42
Lysandros Nikolaou added the comment:
The thing is that the parser itself does not get a stream of tokens as input.
It only accepts either a file or a string and it lazily converts its input to
tokens.
As for the PR attached to this patch, I'm -1 on that. I don't think the u
Lysandros Nikolaou added the comment:
It makes sense to me to be able to do `(*a), b` if I can do `*a, b`, but I
don't really have a strong opinion on it.
--
___
Python tracker
<https://bugs.python.org/is
Lysandros Nikolaou added the comment:
Yup, this all sounds much more reasonable. Thanks for the explanation, Guido.
> Also the current behavior allows `(*x), y = 1` assignment. If `(*x)` is to be
> totally disallowed, `(*x), y = 1` should also be rejected.
This is allowed in 3.9
Change by Lysandros Nikolaou :
--
pull_requests: +22867
pull_request: https://github.com/python/cpython/pull/24027
___
Python tracker
<https://bugs.python.org/issue40
Lysandros Nikolaou added the comment:
New changeset 2ea320553298038bb7d6789e50e199332f66 by Lysandros Nikolaou in
branch 'master':
bpo-40631: Disallow single parenthesized star target (GH-24027)
https://github.com/python/cpython/commit/2ea320553298038bb7d6789e50
Change by Lysandros Nikolaou :
--
pull_requests: +22901
pull_request: https://github.com/python/cpython/pull/24068
___
Python tracker
<https://bugs.python.org/issue40
Lysandros Nikolaou added the comment:
Thanks for letting us know, Julien! I've identified the bug and where it comes
from and I'll probably work on it tomorrow.
--
___
Python tracker
<https://bugs.python.o
Change by Lysandros Nikolaou :
--
pull_requests: +22954
pull_request: https://github.com/python/cpython/pull/24124
___
Python tracker
<https://bugs.python.org/issue42
Change by Lysandros Nikolaou :
--
pull_requests: +22969
pull_request: https://github.com/python/cpython/pull/24140
___
Python tracker
<https://bugs.python.org/issue42
Change by Lysandros Nikolaou :
--
nosy: +lys.nikolaou
___
Python tracker
<https://bugs.python.org/issue42860>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Lysandros Nikolaou :
--
keywords: +patch
pull_requests: +22984
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24156
___
Python tracker
<https://bugs.python.org/issu
Lysandros Nikolaou added the comment:
This is now fixed, Tobias!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Lysandros Nikolaou added the comment:
This is now fixed.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Lysandros Nikolaou added the comment:
I propose to go with the first approach. I really like that and I can see us
using it in various place in the future. It's basically a positive lookahead
with a cut, but the extra feature that it raises a SyntaxError, right?
I'll have a look
Lysandros Nikolaou added the comment:
> Yeah, but the cut is "absolute" (because of the syntax Error). IIRC the
> normal cut only affects that rule, no?
Right.
--
___
Python tracker
<https://bugs.py
Lysandros Nikolaou added the comment:
I can't really understand if this should be considered a bug or not. It's
definitely consistent with 3.8 and my inclination that it is not.
--
nosy: +pablogsal
___
Python tracker
<https://bu
Lysandros Nikolaou added the comment:
Thanks a lot for the report, Xinmeng! This is a bug in how we're checking for
bad single statements in bad_single_statement and it's not trivial to fix due
to the string shenanigans we're doing there in newline_in_string, which does
not a
Lysandros Nikolaou added the comment:
The grammar is indeed auto-generated by reading the actual Grammar file,
python.gram. Here's the lexer Pablo had developed for doing the
syntax-highlighting.
https://github.com/python/cpython/blob/master/Doc/tools/extensions/peg_highlig
Change by Lysandros Nikolaou :
--
nosy: +lys.nikolaou
___
Python tracker
<https://bugs.python.org/issue34013>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Lysandros Nikolaou :
All the scripts in Tools/peg_generator/scripts need to be updated, since they
mostly assume that ast.parse and compile use the old parser. We can use the
_peg_parser extension module instead, but it well need some enhancements so
that it also supports
Change by Lysandros Nikolaou :
--
keywords: +patch
pull_requests: +19522
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20235
___
Python tracker
<https://bugs.python.org/issu
Change by Lysandros Nikolaou :
--
nosy: +gvanrossum, lys.nikolaou, pablogsal
___
Python tracker
<https://bugs.python.org/issue40716>
___
___
Python-bugs-list m
Change by Lysandros Nikolaou :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Lysandros Nikolaou :
--
versions: +Python 3.10 -Python 3.8
___
Python tracker
<https://bugs.python.org/issue38964>
___
___
Python-bugs-list mailin
Change by Lysandros Nikolaou :
--
keywords: +patch
nosy: +lys.nikolaou
nosy_count: 4.0 -> 5.0
pull_requests: +19662
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20399
___
Python tracker
<https://bugs.p
Change by Lysandros Nikolaou :
--
pull_requests: +19664
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/20402
___
Python tracker
<https://bugs.python.org/issu
Change by Lysandros Nikolaou :
--
resolution: -> wont fix
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Lysandros Nikolaou :
--
pull_requests: +19666
pull_request: https://github.com/python/cpython/pull/20404
___
Python tracker
<https://bugs.python.org/issue38
Change by Lysandros Nikolaou :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Lysandros Nikolaou :
--
nosy: +gvanrossum, pablogsal
___
Python tracker
<https://bugs.python.org/issue40880>
___
___
Python-bugs-list mailing list
Unsub
Lysandros Nikolaou added the comment:
This is limited to cases where the line continuation character is on an
otherwise empty line. For example this works correctly:
$ cat t.py
print("hello world")
print("hello world 2") \
print("hello world 3")
$ ./python.exe
Change by Lysandros Nikolaou :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Lysandros Nikolaou added the comment:
Since GH-10367 is now merged, should we close this?
--
___
Python tracker
<https://bugs.python.org/issue22021>
___
___
Change by Lysandros Nikolaou :
--
nosy: -lys.nikolaou
___
Python tracker
<https://bugs.python.org/issue30533>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Lysandros Nikolaou :
--
keywords: +patch
pull_requests: +19967
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20769
___
Python tracker
<https://bugs.python.org/issu
Change by Lysandros Nikolaou :
--
pull_requests: +19996
pull_request: https://github.com/python/cpython/pull/20800
___
Python tracker
<https://bugs.python.org/issue40
Lysandros Nikolaou added the comment:
> Can we rename the keyword to "__peg_parser__"?
I guess we could just remove this, as soon as the old parser is out. We were
only using this to differentiate between the two parsers, when we were testing
enabling/disabling the old one. I c
Lysandros Nikolaou added the comment:
> I would personally would like to keep the easter egg, but I assume is better
> to rename it to "__peg_parser__".
Ok then! On it.
--
___
Python tracker
<https://bugs.py
Change by Lysandros Nikolaou :
--
pull_requests: +19998
pull_request: https://github.com/python/cpython/pull/20802
___
Python tracker
<https://bugs.python.org/issue40
Lysandros Nikolaou added the comment:
> Lysandros can you modify PR 20802 to remove it?
Yup!
--
___
Python tracker
<https://bugs.python.org/issue40939>
___
_
Lysandros Nikolaou added the comment:
> This change broke this buildbot:
GH-20802 fixes this breakage.
--
___
Python tracker
<https://bugs.python.org/issu
Lysandros Nikolaou added the comment:
> Lysandros, could you take a look?
Yup, I'm on it.
--
___
Python tracker
<https://bugs.python.org/issue40958>
___
Lysandros Nikolaou added the comment:
Agreed. For that I'd probably need the input Christian is getting the error
with. I'm currently trying things out, but haven't gotten the error yet.
--
___
Python tracker
<https://bugs.pyt
Lysandros Nikolaou added the comment:
I cannot reproduce this on my Ubuntu 20.04:
➜ cpython git:(master) ✗
LSAN_OPTIONS="suppressions=asan-suppression.txt,print_suppressions=0" ./python
-m test -v test_eof
Modules/posixmodule.c:14682:9: runtime error: left shift of 34 by 26 plac
Lysandros Nikolaou added the comment:
Running Pablo's examples in the REPL does not reproduce the errors either:
➜ cpython git:(master) ✗
LSAN_OPTIONS="suppressions=asan-suppression.txt,print_suppressions=0" ./python
Modules/posixmodule.c:14682:9: runt
Lysandros Nikolaou added the comment:
Let me try that. I'm currently using gcc 9.3.
--
___
Python tracker
<https://bugs.python.org/issue40958>
___
___
Pytho
Lysandros Nikolaou added the comment:
I now configured Python with ./configure --with-pydebug
--with-address-sanitizer --with-undefined-behavior-sanitizer.
--
___
Python tracker
<https://bugs.python.org/issue40
Lysandros Nikolaou added the comment:
> Lysandros, are you using a debug build? The assert() won't trigger if you
> don't have run configure with --with-pydebug.
BTW I'm not talking about the assert not triggering. I'm only saying that
ASAN/UBSAN do not report an
Lysandros Nikolaou added the comment:
Is the only way to get gcc-10.1 to build from source? Because currently my
internet connection is too slow to get all of gcc downloaded and `apt install
gcc-10` installs 10.0.1, which I'm getting totally unrelated erros
Lysandros Nikolaou added the comment:
> Note that although we could just exit if the length of the line is smaller
> than the column offset before calling
> https://github.com/python/cpython/blob/master/Parser/pegen.c#L148 (I assume
> that is the problem) is more important to un
Lysandros Nikolaou added the comment:
> What happens with:
>>> "Ṕýţĥòñ" +
Exact same thing. The offset is 16 at the start and gets decreased to 15 in the
line I linked to in my previous post. And then col_offset gets converted to
col_number which is 9, which seems co
Lysandros Nikolaou added the comment:
I'm guessing that some parts of the conversion code were only there to
circumvent issues in displaying the error messages that weren't pegen's fault.
These were fixed by Guido in GH-20072, so I think we can delete some of them.
For exam
Lysandros Nikolaou added the comment:
> Can you run the test suite before/after of pyflakes to make sure we don't
> introduce any regression to double check? If everything looks fine, open a PR
> :)
The exact same errors before and after! I'll wait on the PR though till s
Lysandros Nikolaou added the comment:
> +Py_ssize_t linesize = PyUnicode_GET_LENGTH(line);
This line is wrong though, since PyUnicode_GET_LENGTH returns the length in
code points and PyUnicode_DecodeUTF8 expects the number of bytes. For non-ascii
input this would push the caret furt
New submission from Lysandros Nikolaou :
While investigating bpo-40958, the following came up:
When a file ends with a line that contains a line continuation character the
text of the emitted SyntaxError is empty, contrary to the old parser, where the
error text contained the text of the
Lysandros Nikolaou added the comment:
Copying and pasting the example messed the formatting up. Here it is again.
[16:49:16] lysnikolaou:cpython git:(master*) $ cat t.py
x = 6\%
[16:49:23
Lysandros Nikolaou added the comment:
I keep doing something wrong. I hope it is clean by now what the difference is.
--
___
Python tracker
<https://bugs.python.org/issue40
Change by Lysandros Nikolaou :
--
nosy: +gvanrossum, pablogsal
___
Python tracker
<https://bugs.python.org/issue40985>
___
___
Python-bugs-list mailing list
Unsub
Change by Lysandros Nikolaou :
--
keywords: +patch
pull_requests: +20071
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20888
___
Python tracker
<https://bugs.python.org/issu
Change by Lysandros Nikolaou :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Lysandros Nikolaou added the comment:
> WIll make a PR soon
No need. Already got something ready.
--
___
Python tracker
<https://bugs.python.org/issu
Change by Lysandros Nikolaou :
--
pull_requests: +20146
pull_request: https://github.com/python/cpython/pull/20968
___
Python tracker
<https://bugs.python.org/issue40
Change by Lysandros Nikolaou :
--
pull_requests: +20148
pull_request: https://github.com/python/cpython/pull/20970
___
Python tracker
<https://bugs.python.org/issue40
Change by Lysandros Nikolaou :
--
pull_requests: +20150
pull_request: https://github.com/python/cpython/pull/20973
___
Python tracker
<https://bugs.python.org/issue40
Lysandros Nikolaou added the comment:
All parts of the implementation are now in. New issues should be opened for any
potential bugs.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracke
Lysandros Nikolaou added the comment:
I'm currently testing a commit that removes all these files on my fork, before
I push it upstream. A question that I'm not 100% sure about is if we can
already remove the symbol module. I guess it's okay since it got deprecated in
3.9
Change by Lysandros Nikolaou :
--
pull_requests: +20179
pull_request: https://github.com/python/cpython/pull/21005
___
Python tracker
<https://bugs.python.org/issue40
Change by Lysandros Nikolaou :
--
pull_requests: +20186
pull_request: https://github.com/python/cpython/pull/21012
___
Python tracker
<https://bugs.python.org/issue40
Change by Lysandros Nikolaou :
--
pull_requests: +20190
pull_request: https://github.com/python/cpython/pull/21016
___
Python tracker
<https://bugs.python.org/issue40
Lysandros Nikolaou added the comment:
On it.
--
___
Python tracker
<https://bugs.python.org/issue41060>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Lysandros Nikolaou :
--
keywords: +patch
pull_requests: +20192
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21020
___
Python tracker
<https://bugs.python.org/issu
Change by Lysandros Nikolaou :
--
assignee: -> lys.nikolaou
___
Python tracker
<https://bugs.python.org/issue41060>
___
___
Python-bugs-list mailing list
Un
Lysandros Nikolaou added the comment:
Thanks for the report, Steve. I've now opened a PR that should fix this.
--
___
Python tracker
<https://bugs.python.org/is
Change by Lysandros Nikolaou :
--
pull_requests: +20196
pull_request: https://github.com/python/cpython/pull/21024
___
Python tracker
<https://bugs.python.org/issue41
Change by Lysandros Nikolaou :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Lysandros Nikolaou :
--
pull_requests: +20207
pull_request: https://github.com/python/cpython/pull/21036
___
Python tracker
<https://bugs.python.org/issue40
Lysandros Nikolaou added the comment:
Thanks Victor for the catch! I've opened a PR that deprecates PyNode_Compile in
3.9.
--
___
Python tracker
<https://bugs.python.org/is
101 - 200 of 352 matches
Mail list logo