[issue32874] IDLE: Add tests for pyparse

2018-03-03 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32874] IDLE: Add tests for pyparse

2018-02-21 Thread miss-islington

miss-islington  added the comment:


New changeset 52064c3d8a62c8c14967ec1e004927e9297bb62c by Miss Islington (bot) 
in branch '3.6':
bpo-32874: IDLE: add tests for pyparse (GH-5755)
https://github.com/python/cpython/commit/52064c3d8a62c8c14967ec1e004927e9297bb62c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32874] IDLE: Add tests for pyparse

2018-02-21 Thread miss-islington

miss-islington  added the comment:


New changeset c59bc98fb26ff1a2361f168a97da4a5f6c1e5b43 by Miss Islington (bot) 
in branch '3.7':
bpo-32874: IDLE: add tests for pyparse (GH-5755)
https://github.com/python/cpython/commit/c59bc98fb26ff1a2361f168a97da4a5f6c1e5b43


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32874] IDLE: Add tests for pyparse

2018-02-21 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5582

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32874] IDLE: Add tests for pyparse

2018-02-21 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5581

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32874] IDLE: Add tests for pyparse

2018-02-21 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset c84cf6c03fce1fb73bfaf91d7909f1c2708f14a2 by Terry Jan Reedy 
(Cheryl Sabella) in branch 'master':
bpo-32874: IDLE: add tests for pyparse (GH-5755)
https://github.com/python/cpython/commit/c84cf6c03fce1fb73bfaf91d7909f1c2708f14a2


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32874] IDLE: Add tests for pyparse

2018-02-20 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Response to msg312428: I would generally prefer to put off using 3.x feature in 
module m until after we think we are done patching m for 3.(x-1), but do so 
before 3.x.0 release.  When 3.x-1 went to security status a week after the 3.x 
release, this was not much an issue.

In this case, we could use 'isascii' freely after
3.7+: isascii = str.isascii
3.6:  def isascii(s): return all(ord(c) < 128 for c in s)

Concrete code change proposals, including in hyperparser, should go on #32880.

In #21765, I mentioned looking at ColorDelegator and UndoDelegator.  I never 
did that, but added this to my list of possible issues.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32874] IDLE: Add tests for pyparse

2018-02-20 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Respone to msg312353: Yes, let us restrict this to testing pyparse code as is.  
I opened issue #32880 for changing the code.  My followup post discusses parse 
variable initialization.

Putting instance variable defaults in class attributes is a known practice.  
But this is usually done when the 'default' is the most common value, not when 
the class attribute is always masked, before access, by an instance attribute 
of the same name.

One could claim that it is buggy to not create a new Parser instance for each 
subtest.  But the class appears to be designed for instance reuse, by having a 
separate set string method and by never looking at string-specific attributes 
until set from the string.

We could instead say that the bug is the test checking an undefined value. I 
rejected the option of not looking when test.lastopenbracketpos is None and 
instead suggest on the new issue that this instance attribute always be freshly 
set, like all the others.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32874] IDLE: Add tests for pyparse

2018-02-20 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Thanks for pointing out #21765 - very interesting reading.  :-)

Would the new str.isascii() be helpful or would it be too early to use 
something only available in 3.7?  It would seem that and combinations of `if 
isascii() and isidentifier()` might be interesting to benchmark against some of 
the current code.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32874] IDLE: Add tests for pyparse

2018-02-19 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

My only contact with pyparse has been #21765, which modified hyperparser and 
pyparse to support unicode identifiers.  It also added tests for hyperparser, 
but not pyparse (msg223150: "it seems to be working as expected").  Thanks for 
filling in this hole.

--
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32874] IDLE: Add tests for pyparse

2018-02-19 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
keywords: +patch
pull_requests: +5533
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32874] IDLE: Add tests for pyparse

2018-02-19 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

I also moved existing comments in pyparse.py to be docstrings.

Adding the tests revealed a bug in the initialization of 
self.lastopenbracketpos, but I didn't make any changes to fix it.  With the 
bug, the tests weren't repeatable, so I modified the tests to work with the bug 
in place.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32874] IDLE: Add tests for pyparse

2018-02-19 Thread Cheryl Sabella

New submission from Cheryl Sabella :

Add unit tests for pyparse.py in IDLE.

--
assignee: terry.reedy
components: IDLE
messages: 312352
nosy: csabella, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: Add tests for pyparse
type: enhancement
versions: Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com