[issue32837] IDLE: require encoding argument for textview.view_file

2018-02-12 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32755] Several cookies with the same name get intermixed

2018-02-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yes, http.cookies is part of the stdlib. This is why I continued "the relevant question here is whether http.cookies has a bug", verified the cookie behavior you reported, and added information relevant to its possible

[issue32839] Add after_info as a function to tkinter

2018-02-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am in favor of exposing all of tk where it makes sense to do so, and I think it does here. After 'translating' the tk after_info entry into tkinter-ese, I would expect and want that root.after_info(root.after(f, 10))[0] is f be true. t

[issue32846] Deletion of large sets of strings is extra slow

2018-02-14 Thread Terry J. Reedy
New submission from Terry J. Reedy : https://metarabbit.wordpress.com/2018/02/05/pythons-weak-performance-matters/, a blog post on cpython speed, clains "deleting a set of 1 billion strings takes >12 hours". (No other details provided.) I don't have the 100+ gigabyte

[issue32839] Add after_info as a function to tkinter

2018-02-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: A person who can create a tcl callback with tk.call can inquire with tk.call('after', 'info', id). That does not cover callbacks created by tcl or extensions thereof, but references to such callbacks are unlikely to be useful to anyone w

[issue32846] Deletion of large sets of strings is extra slow

2018-02-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Luís, what you really need for the problem you outline is an immutable set with one operation, 'in', aside from create and delete. If specialized to strings only, it could internally stores only character sequences, rather than Python objects.

[issue32825] warn user of creation of multiple Tk instances

2018-02-16 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue32825> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32829] Lib/ be more pythonic

2018-02-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Dilyan, please explain what you believe the problems to be and how the patch solves it. These seem to be 3 separate issues. Do not change idlelib.config. config_main.def contain 'default = True' or 'default = False' and that i

[issue31333] Implement ABCMeta in C

2018-02-18 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +5521 ___ Python tracker <https://bugs.python.org/issue31333> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31333] Implement ABCMeta in C

2018-02-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: PR fixes typo in What's new: rewrittent -- nosy: +terry.reedy ___ Python tracker <https://bugs.python.org/issue31333> ___ ___

[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

[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-19 Thread Terry J. Reedy
New submission from Terry J. Reedy : Pyparse was mostly written in the early 2000s, with the only one code change since 2007 in 2014. #32874 will add tests for pyparse 'as is' (though with some docstring and comment changes). This issue will change pyparse code, and change or a

[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Let's consider the todo questions at the end of the class Parser code. --- # XXX - is this used? lastopenbracketpos = None def get_last_open_bracket_pos(self): "Return index of last open bracket or None."

[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: set_str sets self.str and self.study_level. After the first call, attempts to access unset instance parse attributes from other modules will raise AttributeError. Removing the unneeded class setting will just add 2 more names to the list of things that

[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

[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

[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: StringTranslatePseudoMapping (Mapping) is an awkward and not very descriptive name. It is similar to collections.defaultdict except that it uses a default value rather than a default factory. The latter is so defaults can be mutables. Would a subclass of

[issue32891] Add 'Integer' as synonym for 'Integral' in numbers module.

2018-02-20 Thread Terry J. Reedy
New submission from Terry J. Reedy : Actually, 'replace' 'Integral' with 'Integer' but keep 'Integral' for back compatibility. >From python-ideas, where Guido said "Looking at >https://en.wikipedia.org/wiki/Number it seems that Integer is

[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: In def find_good_parse_start: str, pos = self.str, None Using str as an attribute is ok, but using the bare built-in class name for an instance thereof is annoying. 's' would be better, or even 'sample&#x

[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Is str = str.replace('', 'x') str = str.replace('', 'x') str = str.replace('xx', 'x') str = str.replace('xx', 'x') really faster than

[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: In _study2, let q instead of p be end of last good line and then set p back to beginning. Setting p to end, q to p, and p to start is confusing. -- ___ Python tracker <https://bugs.python.org/issue32

[issue32901] Update Windows 3.7/8 builds to tcl/tk 8.6.8

2018-02-21 Thread Terry J. Reedy
New submission from Terry J. Reedy : This should be done ASAP for most testing. MacOS 64bit 3.7.0b1 links to 8.6.7. Whether that should be upgraded to 8.6.8 is up to Ned. I raised question on #15663. -- messages: 312512 nosy: serhiy.storchaka, terry.reedy, zach.ware priority: normal

[issue15663] Investigate providing Tcl/Tk 8.6 with OS X installers

2018-02-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: Is there anything left to do for this? The new 64 bit MacOS 3.7.0b1 links with 8.6.7. Perhaps that should be updated to 8.6.8. -- ___ Python tracker <https://bugs.python.org/issue15

[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: As noted in the test for find_good_parse_start and PR5755 discussion, a single line header on a line by itself in a multiline comment before a multiline header can prevent recognition of the latter. >>> P.set_str("'somethn

[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: One sub-issue is to expand the current short doc section (2.1. Automatic indentation) the intended smart indenting. There is nothing about open parameter lists, not about multiline tuple/list/dict displays. It should say (IN CAPS?) that an indent that

[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/c84cf6c03fce1fb73bfaf91d7909f1

[issue32891] Add 'Integer' as synonym for 'Integral' in numbers module.

2018-02-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: As things stand, given Serhiy comment, I agree. Like others, I don't like 'Integral', but also I don't like clunky special case code. -- priority: high -> normal versions: -Python 3.7 ___

[issue32905] IDLE pyparse: fix initialization and remove unused code

2018-02-21 Thread Terry J. Reedy
Change by Terry J. Reedy : -- assignee: terry.reedy components: IDLE nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE pyparse: fix initialization and remove unused code type: behavior versions: Python 3.6, Python 3.7, Python 3.8

[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-21 Thread Terry J. Reedy
Change by Terry J. Reedy : -- dependencies: +IDLE pyparse: fix initialization and remove unused code ___ Python tracker <https://bugs.python.org/issue32

[issue32905] IDLE pyparse: fix initialization and remove unused code

2018-02-21 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +5584 stage: test needed -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue32905] IDLE pyparse: fix initialization and remove unused code

2018-02-21 Thread Terry J. Reedy
New submission from Terry J. Reedy : Spinoff from #32880. msg312394: dump duplicates print, except that sys.__stdout__ may be None. msg312395: lastopenbracketpos is now always initialized in _study2, as was stmt_bracketing. get_last_open_bracket_pos is never called. Test are adjusted for

[issue32905] IDLE: remove unused code in pyparse module

2018-02-21 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: IDLE pyparse: fix initialization and remove unused code -> IDLE: remove unused code in pyparse module ___ Python tracker <https://bugs.python.org/issu

[issue32905] IDLE: remove unused code in pyparse module

2018-02-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 451d1edaf4d27c4e632d81246d308e8dd6ea945f by Terry Jan Reedy in branch 'master': bpo-32905: IDLE - remove unused code in pyparse module (GH-5807) https://github.com/python/cpython/commit/451d1edaf4d27c4e632d81246d308e

[issue32905] IDLE: remove unused code in pyparse module

2018-02-22 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: The ()[]{} match manager is in parenmatch.py. It imports Hyperparser, which uses pyparse.Parser. When one types a closer, the corresponding opener is also highlighted and, depending on the configured style, everything in between. Very handy for showing

[issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8

2018-02-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Is "this will only be useful on Windows," in the source-deps readme still true? It appears that the tcl/tk tar.gz source is meant for Mac also. (IE, has Xcode project files.) https://tcl.tk/software/tcltk/download.html Looking ahead, there i

[issue17232] Improve -O docs

2018-02-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Cheryl: yes, with changes in responses to Ezio's review. Nick or Antoine: has there been any change to meaning of -O or -OO that I am not remembering? -- versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.4, Pytho

[issue32916] IDLE: change 'str' to 'code' in idlelib.pyparse.PyParse and users

2018-02-22 Thread Terry J. Reedy
New submission from Terry J. Reedy : Change 'str' to 'code' in pyparse and code that uses it. 'str' conflicts with the built-in name and it too general for 'the block of python code being processed'. 'code' is what the string is. The cha

[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Please go ahead, but coordinate. This issue contains miscellaneous pyparse issues that I thought of while reviewing the tests, plus Serhiy's idea. There should be multiple PRs on dependency issues (which might have more than one closely related PR). #

[issue32918] IDLE: make smart indent after comment line consistent

2018-02-22 Thread Terry J. Reedy
New submission from Terry J. Reedy : https://docs.python.org/3/reference/lexical_analysis.html#blank-lines says "A logical line that contains only spaces, tabs, formfeeds and possibly a comment, is ignored" but notes that REPLs might not ignore them during interactive input. The sa

[issue32918] IDLE: make smart indent after comment line consistent

2018-02-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: So I am proposing _junkre = re.compile(r"(?:[ \t]*|##.*)\n").match with test change to match. -- assignee: -> terry.reedy components: +IDLE stage: patch review -> test needed ___ Python

[issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8

2018-02-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: New build with 8.6.8 seems to work fine on my machine. Thanks. I noticed that 'fetching tcl/tk 8.6.8' downloaded a pre-built binary instead of sources to build on my machine. Nice. -- ___ Python track

[issue32861] urllib.robotparser: incomplete __str__ methods

2018-02-23 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +orsenthil ___ Python tracker <https://bugs.python.org/issue32861> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32867] argparse assertion failure with multiline metavars

2018-02-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: I don't understand the -h (display help part) but pasting code into repository 3.8 IDLE editor and running, I get same traceback. Never having used argparse, I don't know if a multiline metavar is expected to work. Assuming so, can you sug

[issue32875] Add __exit__() method to event loops

2018-02-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Enhancements only go in future releases not yet in beta. Do loops already have an __enter__ method, also required for with? What would you have the close method do? Preemptorially cancel all tasks and close the loop? With statement are usually for

[issue32877] Login to bugs.python.org with Google account NOT working

2018-02-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is similar to #29544. As the reply there indicates, this tracker (for issues with the cpython repository) is the wrong place for issues about the tracker. Click Report Tracker Problem on the left sidebar. -- nosy: +terry.reedy resolution

[issue32893] ast.literal_eval() shouldn't accept booleans as numbers in AST

2018-02-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: It is true that 'True' and 'False' are not literally literals. But as pre- and fixedly bound names, they function for Bool the same as 0 and 1 do for int. Besides this, ast.literal_eval is not now limited to literal evaluation, bu

[issue32893] ast.literal_eval() shouldn't accept booleans as numbers in AST

2018-02-23 Thread Terry J. Reedy
Change by Terry J. Reedy : -- Removed message: https://bugs.python.org/msg312682 ___ Python tracker <https://bugs.python.org/issue32893> ___ ___ Python-bugs-list m

[issue32893] ast.literal_eval() shouldn't accept booleans as numbers in AST

2018-02-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Whoops, my previous response was wrong as written because I wrongly thought that if literal_eval accepts number_literal + imaginary_literal, it would also accept number_literal + number_literal. I am replacing it with the following. The ast.literal_eval doc

[issue32907] pathlib: test_resolve_common fails on Windows w/ longusername

2018-02-23 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: pathlib: test_resolve_common fails on Windows -> pathlib: test_resolve_common fails on Windows w/ longusername ___ Python tracker <https://bugs.python.org/issu

[issue32916] IDLE: change 'str' to 'code' in idlelib.pyparse.PyParse and users

2018-02-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset c29c03a34a9f3c82704b66f323ce5ea9dc89c8af by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-32916: IDLE: Change `str` to `code` in pyparse (GH-5830) https://github.com/python/cpython/commit/c29c03a34a9f3c82704b66f323ce5e

[issue32875] Add __exit__() method to event loops

2018-02-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: A. Svetlov, closing #24795: "Superseded by `asyncio.run()` function." -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <https://bugs

[issue32867] argparse assertion failure with multiline metavars

2018-02-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: If newlines are not permitted in metavars, the user should see ValueError: newline not permitted in metavar -- ___ Python tracker <https://bugs.python.org/issue32

[issue32916] IDLE: change 'str' to 'code' in idlelib.pyparse.PyParse and users

2018-02-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks. It is nice splitting the work this way. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker <https://bugs.python

[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- Removed message: https://bugs.python.org/msg312733 ___ Python tracker <https://bugs.python.org/issue32880> ___ ___ Python-bugs-list m

[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- Removed message: https://bugs.python.org/msg312739 ___ Python tracker <https://bugs.python.org/issue32880> ___ ___ Python-bugs-list m

[issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping

2018-02-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: I forget about this defaultdict behavior: "this value is inserted in the dictionary for the key, and returned." Reason: when default_factory returns a mutable, d[key] must return the same possibly mutated object with each call. I agree that defa

[issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping

2018-02-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: I simplified ParseMap to a dict subclass with one override -- __getitem__ and then the tests. They run faster. I suspect translate is faster. -- stage: patch review -> needs patch ___ Python tracker <

[issue17232] Improve -O docs

2018-02-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 186b606d8a2ea4fd51b7286813302c8e8c7006cc by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-17232: Clarify docs for -O and -OO command line options (#5839) https://github.com/python/cpyt

[issue17232] Improve -O docs

2018-02-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32939] IDLE: self.use_context_ps1 defined in editor, but always False

2018-02-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: #31858 (second link) replaced one (?) use of "if use_context_ps1" ('in Shell') with "if self.last_prompt_line != ''" ("prompt before code on same line"). This can only happen in Shell, and only if the prom

[issue32944] Need Guidance on Solving the Tcl problem

2018-02-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Download and install 8.5.18 as the link says. If you have further questions, try python list or search stackoverflow. This tracker is for patching python, not for user questions. -- assignee: terry.reedy -> components: +Installation -I

[issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping

2018-02-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: To me, it is plausible but not slam-dunk obvious that preloading ascii to 'x' mappings will make ascii lookup faster. On #21765, where the pyparse special translation was a side-issue, Tal Einat claimed that the unpublished regex he tried was 1

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2018-02-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: In msg151730, R. David Murry said "Terry's [first] patch with the ("{}") removed should be committed, though." In msg151738, Eric V. Smith said "I agree with your comment about Terry's patch." My second patch remo

[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you [view] a message, there is an unlink button at the bottom for the author (and believe) and tracker gardeners. I did this for the duplicate and incomplete messages. In the future, lets put timing data for an idea on a separate issue for the idea

[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: As I mentioned before, Parser.set_code strongly suggests that Parser instances were intended to be reused. But you discovered the bug that prevented this, at least for one code result. With that fixed, it should be possible to have one Parser instance per

[issue32880] IDLE: Fix and update and cleanup pyparse

2018-02-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: from idlelib.pyparse import Parser import timeit code='def f():\n' print(timeit.timeit("statement", # for example "p=Parser(4,4)", globals = globals())) statement microseconds Parser

[issue32955] IDLE crashes when trying to save a file

2018-02-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Open IDLE, click Help => About IDLE, look at the tcl/tk version, and report it here. If it is not 8.5.18, follow instructions on https://www.python.org/download/mac/tcltk/ to update. Ask on python-list if you need help doing

[issue32961] namedtuple displaying the internal code

2018-02-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: The behavior of collections.namedtuple has nothing to do with IDLE. I verified the behavior in 2.7. In 3.7, one must group the field names, as in a tuple, and the corrected statement has no output. I had nothing to do with namedtuple development. I

[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2018-02-27 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +5704 ___ Python tracker <https://bugs.python.org/issue30928> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0

2018-02-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: I plan to start a new issue for 3.8.0 when 3.7.0rc1 is released and 'What's new in 3.8.0 (since 3.7.0)' is added to master. IDLE PRs after rc1 that are not an emergency fix will go into 3.7.1 -- title: Copy modified blurbs to idlelib/N

[issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0

2018-02-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 0954c9e9c8fbea452f56120df592f2061d3209c7 by Terry Jan Reedy in branch 'master': bpo-30928: Update idlelib/NEWS.txt, possibly for 3.7.0b2 (GH-5932) https://github.com/python/cpython/commit/0954c9e9c8fbea452f56120df592f2

[issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping

2018-02-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: I settled on the following to compare ParseMap implementations. from idlelib.pyparse import Parser import timeit class ParseGet(dict): def __getitem__(self, key): return self.get(key, ord('x')) class ParseMis(dict): def __missing__(self, ke

[issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping

2018-02-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Replacing an expression with a less clear equivalent expression makes no sense to me. Anyway, having __missing__ return 120 reduces the benchmark miss time from 1.2-1.3 to .93, making ParseMis always faster than ParseGet and reducing the penalty for non

[issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping

2018-02-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: The mapping passed to str.translate must map ints representing codepoints to either either ints or strings. Translate can extract binary codepoints for the new string from either. Ints are slightly faster, so I am inclined not to switch. import timeit

[issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping

2018-02-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset f0daa880a405c8de6743e44fa46006754aa145c9 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-32940: IDLE: Simplify StringTranslatePseudoMapping in pyparse (GH-5862) https://github.com/python/cpyt

[issue32984] IDLE: set and unset __file__ for startup files

2018-03-02 Thread Terry J. Reedy
New submission from Terry J. Reedy : 'python somefile.py' sets main.__file__ to 'somefile.py'. 'python' leaves __file__ unset. If PYTHONSTARTUP is set to somefile.py, 'python' executes somefile.py in main with __file__ set to 'somefile.py',

[issue32986] multiprocessing, default assumption of Pool size unhelpful

2018-03-02 Thread M J Harvey
New submission from M J Harvey : Hi, multiprocessing's default assumption about Pool size is os.cpu_count() ie all the cores visible to the OS. This is tremendously unhelpful when running multiprocessing code inside an HPC batch system (PBS Pro in my case), as there's no way to h

[issue32984] IDLE: set and unset __file__ for startup files

2018-03-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: When the IDLE GUI process is started, its main.__file__ is set to the idlelib .py file used to start the process. If IDLE is started with -n, so that user code is run in the same process (the original mode), the -r or -s startup file and code entered at

[issue32984] IDLE: set and unset __file__ for startup files

2018-03-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Revised, more exact, URL: https://stackoverflow.com/questions/49054093/cannot-use-file-when-running-startup-file-in-idles-normal-mode -- ___ Python tracker <https://bugs.python.org/issue32

[issue32933] mock_open does not support iteration around text files.

2018-03-02 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +ezio.melotti, michael.foord, rbcollins versions: +Python 3.8 -Python 3.4, Python 3.5 ___ Python tracker <https://bugs.python.org/issue32

[issue32955] IDLE crashes when trying to save a file

2018-03-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: What do you mean by crash? An exception from Python (which is not a crash)? or something from MacOS? -- ___ Python tracker <https://bugs.python.org/issue32

[issue32989] IDLE: Incorrect signature in call from editor to pyparse.find_good_parse_start

2018-03-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: To be clear, the signature that got changed in 2005 is the signature for find_good_parse_start ('fgps'), which was previously def find_good_parse_start(self, use_ps1, is_char_in_string=None, _synchre=_synchre) When the use_ps1 parameter was remove

[issue32989] IDLE: Incorrect signature in call from editor to pyparse.find_good_parse_start

2018-03-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: If fgps never returns 0, then returning 0 instead of None would allow simplification of if bod is not None or startat == 1: break parser.set_lo(bod or 0) to if bod or startat == 1

[issue32989] IDLE: Incorrect signature in call from editor to pyparse.find_good_parse_start

2018-03-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since _synchre is never passed, it should not be a parameter either. I think we should either limit this to fixing the call, with no unit test added, or expand to 'fix find_good_parse_start and buggy call', with revised tests. It might be inte

[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 <https://bugs.python.or

[issue31500] IDLE: Tiny font on HiDPI display

2018-03-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: I assume that the 2nd patch, by Serhiy, fixed the issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32989] IDLE: Fix pyparse.find_good_parse_start and its bad editor call

2018-03-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree with limiting the scope to the None bug and the faulty call. However, we should think of the None fix as primary, and the new test thereof as the primary test. Fixing the None check exposes the call bug, which we also fix. I change the title here

[issue31500] IDLE: Tiny font on HiDPI display

2018-03-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: I take it you want this reopened. I have not touched IDLE 2.7 for over a year, but since a) there have been no complaints about the patch in released 3.6.3/4, b) we recommend the same tk 8.5.18 for both 2.7 and 3.6, and c) this is a crippling regression

[issue32984] IDLE: set and unset __file__ for startup files

2018-03-04 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +5747 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue32984] IDLE: set and unset __file__ for startup files

2018-03-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: With the PR, IDLE behaves the same as Python on Windows. .../3x> python -m idlelib -r f:/python/a/tem2.py (see original post for content of tem2.py) prints __file__ instead of raising NameError, while >>> __file__ continues to raise NameErro

[issue32984] IDLE: set and unset __file__ for startup files

2018-03-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 22c82be5df70c3d51e3f89b54fe1d4fb84728c1e by Terry Jan Reedy in branch 'master': bpo-32984: IDLE - set __file__ for startup files (GH-5981) https://github.com/python/cpython/commit/22c82be5df70c3d51e3f89b54fe1d4

[issue33000] IDLEX GUI consumes all RAM for scrollback buffer, uses 161Bytes / character stored

2018-03-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: IDLEX is an independently developed and distributed set of IDLE eXtensions. We have nothing to do with it. IDLE, as the name suggests and the doc spells out, is an Integrated Development and Learning Environment. It is not a production run environment

[issue32984] IDLE: set and unset __file__ for startup files

2018-03-05 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue33000] IDLEX GUI consumes all RAM for scrollback buffer, uses 161Bytes / character stored

2018-03-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: I did not close either window before looking at the Task Manager number. Once your program is debugged, I cannot think of any advantage of running it through IDLE instead of directly with the Python interpreter. Since you repeat 'IDLEX' I still d

[issue33000] IDLE Doc: Text consumes unlimited RAM, consoles likely not

2018-03-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I don't know whether memory difference between us is due to IDLEX or Windows version or something else, but I don't really care. The IDLE doc has a section "IDLE-console differences". It should gain a paragraph explain the difference be

[issue32987] tokenize.py parses unicode identifiers incorrectly

2018-03-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: I verified on Win10 with 3.5 (which cannot be patched) and 3.7.0b2 that ab·cd is accepted as a name and that tokenize fails as described. -- nosy: +terry.reedy stage: -> needs patch versions: +Python 3.7, Python

[issue33007] Objects referencing private-mangled names do not roundtrip properly under pickling.

2018-03-09 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +alexandre.vassalotti ___ Python tracker <https://bugs.python.org/issue33007> ___ ___ Python-bugs-list mailing list Unsub

[issue33014] Clarify doc string for str.isidentifier()

2018-03-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: No new string method ;-). "Call function keyword.iskeyword() ..." should make it clear that iskeyword is not a string method. Samyam, I suggest getting agreement on new wording first. Then do PR that is more or less 'pre-approved

[issue33015] Fix function cast warning in thread_pthread.h

2018-03-09 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +brett.cannon, pitrou ___ Python tracker <https://bugs.python.org/issue33015> ___ ___ Python-bugs-list mailing list Unsub

<    64   65   66   67   68   69   70   71   72   73   >