New submission from Andre Roberge:
There appears to be a bug in code.py in Python 3.0a2/a1.
I believe that the body of
InteractiveConsole().raw_input()
should be changed from
sys.stdout.write(prompt)
sys.stdout.flush()
return sys.stdin.readline()
to
return input
Changes by Andre Roberge:
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1707
__
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python
Andre Roberge added the comment:
I did a quick search on the *.py files in the distribution. I only
found two questionable places.
1. site.py has raw_input (python 2.5, line 311) replaced by the more
complicated 3 lines (python 3.0a2, lines 313-315) rather than the
simpler one-liner
New submission from Andre Roberge:
According to the docs, and consistent with the Python 2.x behavior,
filehandle.write() should return None. However, under 3.0a2 (and
3.0a1), it returns the number of characters written.
Either the documentation
http://docs.python.org/dev/3.0/tutorial
Andre Roberge added the comment:
After doing some more reading, I realize that the current behaviour is
totally consistent with
http://www.python.org/dev/peps/pep-3116/
which I should have consulted first.
So perhaps it should be considered to be simply a case of a
documentation error, as I
New submission from Andre Roberge andre.robe...@gmail.com:
I have a function to replace the content of an ElementTree Element by
that of another one which works using Python 2 but not with Python 3.
I get an assertion error.
It was suggested on the Python list that the problem
Andre Roberge added the comment:
If anyone is still interested in this, I did that today (scratching a personal
itch - not knowing this had been filed before).
What I have done:
1. Moved all the font/color information to a separate css file
2. Used html5 syntax.
3. Recreated a css style
Andre Roberge added the comment:
Rather than creating a new branch, I took another copy of pydoc.py, kept its
name, and only applied the html-related changes in it. (no new -c option, no
unrelated PEP8 changes to the best of my knowledge.) The original pydoc.py
referred to pydoc_data
Andre Roberge added the comment:
I could certainly create a new branch and revert the PEP8 changes and the new
-c option, but before I do this, could you confirm that the new html output
would be deemed to be acceptable?
--
___
Python tracker rep
New submission from Andre Roberge:
The turtle module using screen coordinates such that the vertical coordinate
increases vertically on the screen. This orientation is different from the
traditional orientation for graphics programs.
It is possible to set coordinates with the normal
New submission from Andre Roberge:
The documentation for eval() indicates that it takes keyword arguments:
eval(expression, globals=None, locals=None)
However, that is incorrect, as indicated by the builtin help:
>>> help(eval)
Help on built-in function eval in module builti
Andre Roberge added the comment:
When rhettinger created this issue, the goal was
"Pydoc currently generated 1990's style html which mixes content and
presentation, making it very difficult for users to customize the appearance of
the output. ... Please convert it to simple, validated
Andre Roberge added the comment:
I am sorry to hear that this bug was closed based on the unproven assumption
that this would impact teaching material. I have *never* seen any pedaggical
material for the turtle module where the instructor wrote "use left() to have
the turtle turn
Andre Roberge added the comment:
On Sat, Mar 23, 2019 at 6:27 PM Raymond Hettinger
wrote:
>
> Raymond Hettinger added the comment:
>
> I've found the HTML to be useful (-w mode, not running a server) for
> generating quick documentation (much lighter weight commitment than
Andre Roberge added the comment:
I volunteer to do some testing. In addition to the problem I noted on my
computer where the status bar disappeared behind the task bar, I noticed
that on my secondary 4k monitor (resolution: 3840 x 2160), clicking Zoom
Height resulted in a window stretched
Andre Roberge added the comment:
I have tried on another computer (Windows 10, screen resolution 1920 x 1080,
text scaling 100%) and it works as expected: clicking on Restore Height
restores the window's height to its original value.
Back to the computer where I reported the problem
New submission from Andre Roberge :
On my computer (Windows 10, screen resolution 3000 x 2000, scaling of text and
other elements set at 200% as the recommended value), the path browser is
essentially unusable as the items overlap each other. See the attached image.
I found that changing
Andre Roberge added the comment:
As reported on the idle-dev list, on my system (Windows 10, display resolution
3200 x 200, scaling of text at 200% as recommended), the Zoom Height changes
the height of the window and Idle's status bar is no longer visible. Clicking
on Restore Height does
Andre Roberge added the comment:
I ran the example you gave and it worked perfectly.
--
___
Python tracker
<https://bugs.python.org/issue37041>
___
___
Pytho
Andre Roberge added the comment:
On Sat, May 25, 2019 at 9:49 PM Terry J. Reedy
wrote:
>
> Terry J. Reedy added the comment:
>
> Thank you. Along with your path browser report, things are much
> clearer. With variable pixel densities and custom settings, we cannot
> use f
Andre Roberge added the comment:
Thanks.
I did a quick check. 114 solves the problem of the Restore Height not
working, but the status bar is still hidden. To me, the crucial part of
the problem was the restore height not working, so I'd be happy with this.
At 164, I can see parts
Andre Roberge added the comment:
As I wrote on Github:
On my computer (Windows 10, resolution: 3000 x 2000, scaling of UI elements
set to 200%), clicking on Zoom Height makes Idle go full screen. Clicking
on the same menu (now called Restore Height) does absolutely nothing: Idle
stays in full
Change by Andre Roberge :
--
nosy: +aroberge
___
Python tracker
<https://bugs.python.org/issue33944>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Andre Roberge :
The following code is currently consistent with the type hint syntax but
contains a line that is completely ignored.
>>> d = {}
>>> d['a']: int
>>> d
{}
>>> __annotations__
{}
>>> '_
Andre Roberge added the comment:
I suspect that the Python parser cannot easily be changed to given any other
message. Replace the colon by "else" and add one more closing parenthesis and
you have a valid Python program. So, is it a matter of an unclosed
parenthesis, or not u
Andre Roberge added the comment:
Such a change would be very useful and appreciated by other users as reported
on https://github.com/aroberge/friendly-traceback/issues/167 and asked about on
StackOverflow
https://stackoverflow.com/questions/60986850/why-does-creating-a-list-of-tuples-using
Andre Roberge added the comment:
I do not use IDLE (except for testing) and would not be affected by such a
change.
However, many tutorials and books intended for beginners instruct users to use
IDLE, with the assumption that it is available out of the box. Removing IDLE
would immediately
Change by Andre Roberge :
--
nosy: +aroberge
___
Python tracker
<https://bugs.python.org/issue42997>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Andre Roberge :
--
nosy: +aroberge
___
Python tracker
<https://bugs.python.org/issue42955>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andre Roberge added the comment:
Terry: I will put it on my todo list.
Friendly-traceback can currently work (indirectly) with IDLE; see
https://aroberge.github.io/friendly-traceback-docs/docs/html/editor.html
I am not sure what benefit this patch will yield when it comes to using
New submission from Andre Roberge :
A missing comma between list items results in an incorrect message.
Python 3.10.0a5 (tags/v3.10.0a5:b0478d7, Feb 3 2021, 01:44:54) [MSC v.1928 64
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license"
Andre Roberge added the comment:
Pablo: to run the friendly-traceback test suite is simply a matter of typing
"pytest" from the root directory of the repository (after installing the
dependencies). However, it would not be helpful for the purpose of CPython
development, as l
Andre Roberge added the comment:
Pablo:
The tests are in
https://github.com/aroberge/friendly-traceback/tree/master/tests/syntax
I plan to soon add at least two dozen more based on recent contributions.
The full results can be seen on the documentation site; for example
https
Andre Roberge added the comment:
Pablo: I have almost exactly the same 4 test cases that you added in the test
suite, so it would pass my tests too. I would consider it to be resolved.
(For example:
https://aroberge.github.io/friendly-traceback-docs/docs/html/syntax_tracebacks_en_3.9.html
Andre Roberge added the comment:
Terry: as per your earlier comment, I have tried to use Friendly-traceback with
the latest version. While it does set the exception hook correctly, it is not
useful.
Friendly-traceback (FT) needs to have access to the code that was executed.
FT's REPL
Andre Roberge added the comment:
A similar error exists in the table for the French documentation where
"valeurs" is indicated to be one of the options
https://docs.python.org/fr/3.8/library/tkinter.ttk.html#widget
--
nosy: +aroberge
New submission from Andre Roberge :
When using Python 3.10.0b2 on a line with more than one invalid characters, the
second one is identified as being incorrect, whereas in previous versions the
first such character was identified.
> py -3.8 unicode_quote.py
File "unicode_quote.py&
Change by Andre Roberge :
--
nosy: +aroberge
___
Python tracker
<https://bugs.python.org/issue44324>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Andre Roberge :
Consider the following two examples with the latest beta release:
Python 3.10.0b3 ...
>>> def 3job(x):
File "", line 1
def 3job(x):
^
SyntaxError: invalid imaginary literal
>>> def 3ob(x):
F
Andre Roberge added the comment:
Your example is different than the one in the documentation (What's new).
>>> (x, x for x in range(7)) # Your example
File "", line 1
(x, x for x in range(7))
^^^
SyntaxError: invalid syntax
>>> foo(x, x for x in
Andre Roberge added the comment:
Would it be possible to add a single line of code to idlelib's pyshell.py, as
indicated below:
def showsyntaxerror(self, filename=None):
"""... """
linecache.cache[""] = linecache.cache[filename
Andre Roberge added the comment:
I just thought of making a copy of the file content under a known name as the
least disruptive approach for IDLE's code - even less so than the recent
addition required to support user-defined exception hooks.
For SyntaxErrors and subclasses [1], Friendly
Andre Roberge added the comment:
I can confirm that, if the existing line
type, value, tb = sys.exc_info()
in pyshell.ModifiedInterpreter.showsyntaxerror is replaced by
e_type, value, tb = sys.exc_info()
err = str((type(e_type).__name__, *value)+'\n'
linecache.cache[""] = (len(err
Andre Roberge added the comment:
Having a fake file with a single line containing all the exception information
as described would definitely provide all the required information needed. It
would be much better than what I had suggested previously
Andre Roberge added the comment:
Unless I am mistaken, when compiling the code, both SyntaxError and
OverflowError instances are caught at the same stage, and likely passed on to
showsyntaxerror. For OverflowError, e.args is not normally a tuple but a
string, and *e.args[1] would raise
Andre Roberge added the comment:
I like this. While it would be a bit longer, I'm wondering if the message
should not read instead as follows:
... Did you use the same quotes here as those enclosing the string?
===
I suspect that errors coming from the use of a single quote, as in:
'Don't
Andre Roberge added the comment:
I believe that this is similar to, but not quite as severe as a similar bug in
code.interact() https://bugs.python.org/issue43366 which affects IDLE; perhaps
fixing this might fix the other issue?
--
nosy: +aroberge
New submission from Andre Roberge :
Consider the following in Python 3.10
>>> ... = 1
File "", line 1
... = 1
^^^
SyntaxError: cannot assign to Ellipsis here. Maybe you meant '==' instead of
'='?
>>> __debug__ = 1
File "", line 1
SyntaxError
Andre Roberge added the comment:
I observe something similar, though with different symbols. My Windows
installation uses French (fr-ca) as default language.
===
help> COMPARISON
Comparisons
***
...
Formally, if *a*, *b*, *c*, à, *y*, *z* are expressions and *op1*,
*op2*, à, *
Andre Roberge added the comment:
Up to your best judgment Pablo - and thanks for your ongoing work on improving
error messages.
--
___
Python tracker
<https://bugs.python.org/issue44
Andre Roberge added the comment:
>
> I think that the suggestion to explicitly refer to '...' instead of the
name Ellipsis would be preferable.
Aside: I had not realized that this was done at a different stage for
__debug__ and Ellipsis ("Ignorance is bliss"...
Andre Roberge added the comment:
Terry: I just checked with Idle on Windows with Python 3.9.5 and the display
works perfectly, with no incorrect characters.
--
___
Python tracker
<https://bugs.python.org/issue44
Change by Andre Roberge :
--
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue37041>
___
___
Python-bugs-list mailing list
Unsubscrib
Andre Roberge added the comment:
While I filed the original report, I am in agreement that accurate information
for debugging tools is definitely more important than the quick summary shown
in the traceback, and that the change likely represents an improvement in
situations more realistic
Andre Roberge added the comment:
For information: I created an actual .py file from the last example with 200
parens and got the following error message:
> python example.py
s_push: parser stack overflow
MemoryError
For consistency and greater clarity, I think that having messa
Andre Roberge added the comment:
@pablo: Sincere apologies ... I tested this with the wrong virtual environment
active locally. With 3.10, it is indeed SyntaxError: too many nested
parentheses
--
___
Python tracker
<https://bugs.python.
Change by Andre Roberge :
--
nosy: +aroberge
___
Python tracker
<https://bugs.python.org/issue43950>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andre Roberge added the comment:
I made an error in my previous comment: the code I wrote is obviously incorrect
as it contains a SyntaxError.
--
___
Python tracker
<https://bugs.python.org/issue43
New submission from Andre Roberge :
Consider the following program
# example.py
one = 1
two = "two"
a = [one
.
two]
Running this program with Python versions before 3.10, yields the following
traceback:
Traceback (most recent call last):
File "C:\Users\andre\exam
New submission from Andre Roberge :
When an equal sign is used instead of a colon in creating a dict literal,
depending on the context, either the "bad token" is misidentified OR the
would-be helpful error message is incorrect in this particular case.
1) Example of bad token.
Andre Roberge added the comment:
In the second case, I understand very well that it could have been a set
literal. In my (limited) experience, I have never seen a set literal containing
a single element obtained from an == comparison.
Since dict can be built by using keyword arguments, I
New submission from Andre Roberge :
When forgetting a comma in writing a dict literal spanning multiple lines,
the "bad token" is wrongly idenfied with Python 3.10.0b1.
>>> a = {'a': 1
... 'b': 2
File "", line 1
a = {'a': 1
^
SyntaxError
Change by Andre Roberge :
--
nosy: +aroberge
___
Python tracker
<https://bugs.python.org/issue43914>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Andre Roberge :
--
nosy: +aroberge
___
Python tracker
<https://bugs.python.org/issue44026>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Andre Roberge :
--
nosy: +aroberge
___
Python tracker
<https://bugs.python.org/issue43163>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Andre Roberge :
Python version 3.10.0a7 added a more informative error message for:
>>> f"{**k}"
File "", line 1
(**k)
^
SyntaxError: f-string: can't use double starred expression here
Previously, the message was simply "
Andre Roberge added the comment:
Since all the messages I track so far
(https://github.com/aroberge/friendly/blob/master/friendly/syntax_errors/message_analyzer.py)
had been changed when going from 6.7 to 3.8, I had (incorrectly) assumed that
all such error messages been changed to use
New submission from Andre Roberge :
As a result of https://bugs.python.org/issue43008, IDLE now supports custom
exception hook for almost all cases except for code entered in the interactive
shell that result in SyntaxError. It would be useful for some applications if a
way to replace
New submission from Andre Roberge :
Normally, for SyntaxErrors, the location of the error is indicated by a ^.
There is at least one case where the location is missing for 3.9 and 3.10.0a6
where it was shown before. Using the old parser for 3.9, or with previous
versions of Python
Andre Roberge added the comment:
I understand the challenge of reproducing the behaviour of the Python
interpreter for this case. If it cannot be reproduced, then the documentation
for
https://docs.python.org/3/library/code.html#code.InteractiveConsole.interact
and others on that page
Andre Roberge added the comment:
Thonny has its own discussion site where you can report such problems:
https://groups.google.com/g/thonny
--
nosy: +aroberge
___
Python tracker
<https://bugs.python.org/issue43
Change by Andre Roberge :
--
nosy: +aroberge
___
Python tracker
<https://bugs.python.org/issue43859>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Andre Roberge :
--
nosy: +aroberge
___
Python tracker
<https://bugs.python.org/issue38530>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Andre Roberge :
--
nosy: +aroberge
___
Python tracker
<https://bugs.python.org/issue43797>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Andre Roberge :
The following:
try:
pass
except ValueError, NameError as err:
pass
results in:
except ValueError, NameError as err:
^
SyntaxError: expected ':'
However, what is missing here are some parentheses surrounding the exception
Andre Roberge added the comment:
+1 to the idea of adding something to the grammar, and have a simple error
message:
SyntaxError: Missing parentheses in call to 'print'.
in *all* cases, including the first one that prompted this bug report.
I write that even though I have created a third
Change by Andre Roberge :
--
nosy: +aroberge
___
Python tracker
<https://bugs.python.org/issue18163>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andre Roberge added the comment:
Based on what I just read on
https://github.com/davidhalter/parso/blob/master/parso/python/issue_list.txt
I gather that this exception is only raised in the context of an import
statement with a trailing comma (usually followed by nothing
New submission from Andre Roberge :
Consider the following:
Python 3.10.0rc1 ...
>>> __debug__
True
>>> del __debug__
Traceback (most recent call last):
File "", line 1, in
NameError: name '__debug__' is not defined
>>> __debug__
True
>>> _
New submission from Andre Roberge :
Consider the following four slightly different examples:
Python 3.10.0rc1 ...
>>> from math import sin and cos
File "", line 1
from math import sin and cos
^^^
SyntaxError: invalid syntax
>>&g
Andre Roberge added the comment:
This message is not new to Python 3.10 as it is also shown with Python 3.9.5.
>>> from math import sin, cos, and tan
File "", line 1
from math import sin, cos, and tan
^
SyntaxError: trailing comma
Change by Andre Roberge :
--
nosy: +aroberge
___
Python tracker
<https://bugs.python.org/issue24612>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andre Roberge added the comment:
Here's another related case.
Python 3.9:
>>> a = 1½
File "", line 1
a = 1½
^
SyntaxError: invalid character '½' (U+00BD)
Python 3.10
>>> a = 1½
File "", line 1
a = 1½
Andre Roberge added the comment:
Third case. Showing only the output for Python 3.10
>>> a = 3 ⁄ 7 # entered with a space around ⁄
File "", line 1
a = 3 ⁄ 7
^
SyntaxError: invalid character '⁄' (U+2044)
>>> a = 3⁄7# no added space
Andre Roberge added the comment:
I have no idea how the parser works ... but when you do the test to identify if
an 'else' is missing, could the fact that there is a colon instead of the
expected 'else' be used to avoid misidentifying this case?
Note: I am keenly aware of the difficulties
Andre Roberge added the comment:
Python 3.10.0rc1 ...
>>> print hello world!
File "", line 1
print hello world!
^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
The hint given is not exactly helpful ...
(This example was in a discussio
New submission from Andre Roberge :
Consider the following:
>>> a = (1‚ 2) # not a comma, but unicode character.
Using Python 3.9 (and earlier), we get the following correct information
>>> a = (1‚ 2)
File "", line 1
a = (1‚ 2)
^
SyntaxError: i
Change by Andre Roberge :
--
nosy: +aroberge
___
Python tracker
<https://bugs.python.org/issue44792>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Andre Roberge :
Given the following code containing no if expression (only if statements):
if True:
print('hello'
if 2:
print(123))
The following traceback is generated in Python 3.10.0RC1
File "...\example.py", line 2
pr
Change by Andre Roberge :
--
nosy: +aroberge
___
Python tracker
<https://bugs.python.org/issue45450>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Andre Roberge :
As stated in the documentation, sys.last_type, sys.last_value and
sys.last_traceback ... are set when an exception is not handled and the
interpreter prints an error message and a stack traceback.
This is true whether the exception is a SyntaxError or some
Andre Roberge added the comment:
If this can be implemented, then I believe that
https://bugs.python.org/issue43476 could be closed as well.
--
___
Python tracker
<https://bugs.python.org/issue45
Andre Roberge added the comment:
+1 on adding better error messages for these cases. I also agree with having
different explanations with lambda and def.
Below is what I have with friendly-traceback: perhaps the first line of both of
these might be suitable? (I will likely change
Andre Roberge added the comment:
The last of these three cases (with FRACTION SLASH) is fixed 3.10.1.
The other two are still present in 3.10.1 and in 3.11.0a3
--
versions: +Python 3.11
___
Python tracker
<https://bugs.python.org/issue44
New submission from Andre Roberge :
Given the following code containing an unclosed parenthesis:
a = (1, 2
b = 3
Here is the resulting SyntaxError:
> python ignore.py
File "C:\...\ignore.py", line 1
a = (1, 2
^
SyntaxError: invalid syntax. Perhaps you f
New submission from Andre Roberge :
Python 3.10 and 3.11:
>>> sum[i for i in [1, 2, 3] if i%2==0]
File "", line 1
sum[i for i in [1, 2, 3] if i%2==0]
^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
Furthe
New submission from Andre Roberge :
In the following, I execute a single invalid statement in the Python
interpreter, which gives the correct error message. Afterwards, I repeat this
example using code.interact(), generating a different traceback. This issue
affects IDLE differently as shown
Change by Andre Roberge :
--
nosy: +aroberge
___
Python tracker
<https://bugs.python.org/issue45807>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Andre Roberge :
--
nosy: +aroberge
___
Python tracker
<https://bugs.python.org/issue45811>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andre Roberge added the comment:
I understand.
I reported this issue when one of my newest tests failed with Python 3.10 and
3.11. Actually, using friendly-traceback, using the location of the exception
as indicated by cPython 3.10 and 3.11, here's part of the explanation it gives
1 - 100 of 123 matches
Mail list logo