[issue35155] Clarify Protocol Handlers in urllib.request Docs

2019-02-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: unittest is another module with half-fixed and half-variable names. The default (glob) pattern for test module names is given as "test*.py". The fixed pattern for test methods is given as "starts with 'test'". This could have

[issue35927] Intra-package References Documentation Incomplete

2019-02-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: AData> You log and output show that you problem is as described: package 'sound' is in directory "C:/" and "C:/" is not is sys.path. Possible remedies: 1. Add "C:/" to sys.path at the top of each module that impor

[issue35155] Clarify Protocol Handlers in urllib.request Docs

2019-02-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: For file names, the result is in italics. Looking at https://devguide.python.org/exploring/, that seems to work well. Can we just use **? -- ___ Python tracker <https://bugs.python.org/issue35

[issue35689] IDLE: Docstrings and test for colorizer

2019-02-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset ee0f927bd8dba805a04963dbec1ad49fe830b842 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-35689: IDLE: Add docstrings and unittests for colorizer.py (GH-11472) https://github.com/python/cpyt

[issue35689] IDLE: Docstrings and test for colorizer

2019-02-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you for writing this. I was NOT looking forward to tackling tests for this module. I have thought about merging delegator and colorizer into one module, possibly with percolator included, and adding a module docstring that explains how they work

[issue35689] IDLE: Docstrings and test for colorizer

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

[issue18823] Idle: use pipes instead of sockets to talk with user subprocess

2019-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: #34313 reports problems with multiprocessing when using at least some versions of tkinter on some versions of macOS. -- versions: +Python 3.8 -Python 3.4, Python 3.5 ___ Python tracker <https://bugs.python.

[issue13659] Add a help() viewer for IDLE's Shell.

2019-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: #1529353 added squeezer, making this alternative unnecessary. Once squeezed, output can be opened in a text viewer. -- resolution: -> out of date stage: patch review -> resolved status: open -> closed superseder: -> Squeezer - squeeze

[issue36058] Improve file decoding before re.search

2019-02-20 Thread Terry J. Reedy
New submission from Terry J. Reedy : Spin-off from #14929, which fixed crash. From msg161754: "The default extension is .py. The default encoding for .py files is utf-8. I think that is the default for what Idle writes. So I think this should be the default encoding (explicitly give

[issue14929] IDLE crashes on *Edit / Find in files ...* command

2019-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Opened #36058 for followup. -- resolution: -> fixed stage: test needed -> resolved status: open -> closed superseder: -> Improve file decoding before re.search versions: -Python 3.5 ___ Python tra

[issue22704] Review extension enable options

2019-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: #27099 converted extensions to features always enabled for when they apply to. -- resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker <https://bug

[issue22706] Idle extension configuration and key bindings

2019-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: #27099 (converting built-in extensions to features) made this less important. But it is still relevant to actual extensions. There is a dummy extension, zzdummy, for testing. -- stage: needs patch -> patch review versions: +Python 3.8 -Python

[issue22705] Idle extension configuration: add option-help option

2019-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: #27099 (converting built-in extensions to features) made this less important. But it is still relevant to actual extensions. There is a dummy extension, zzdummy, for testing. -- stage: needs patch -> patch review versions: +Python 3.8 -Python

[issue22629] Idle: update htest.py and htests

2019-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: As far as I can tell, the entire diff in @htest-34-2.diff was pushed. My comment about 'up to first line of grep' was correct alphabetically but confusing because files with a '# htest #' section were not completely alphabetical in

[issue22707] Idle: changed options should take effect immediately

2019-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Turning extensions into features #27099 fixed many (all?) unnecessary delays but a few things should be checked, and the help texts reviewed. -- versions: +Python 3.8 -Python 2.7, Python 3.4, Python 3.5 ___ Python

[issue33065] IDLE debugger: failure stepping through module loading

2019-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: A StackOverflow use got the same _ModuleLock message. https://stackoverflow.com/questions/54785596/debugger-in-python-freezes-over-own-built-modules -- ___ Python tracker <https://bugs.python.org/issue33

[issue29706] IDLE needs syntax highlighting for async and await

2017-03-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: David, the easiest thing to do would be to copy and paste the following + ['async', 'await'] into this line of colorizer.py (ColorDelegator.py in 3.5) kw = r"\b" + any("KEYWORD", keyword.kwlist) + r"\b" a

[issue29645] webbrowser module import has heavy side effects

2017-03-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: This will help IDLE startup (though webbrowser should not be imported on windows, where os.startfile is used instead). This is a somewhat separate issue, but should the Windows code be modified for Win10 and Microsoft Edge? -- nosy: +terry.reedy

[issue29649] struct.pack_into check boundary error message ignores offset

2017-03-03 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> patch review title: struct.pack_into check boundary error message didn't respect offset -> struct.pack_into check boundary error message ignores offset type: -> enhancement ___ Python

[issue29651] Inconsistent/undocumented urlsplit/urlparse behavior on invalid inputs

2017-03-03 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +orsenthil stage: -> needs patch versions: -Python 3.3, Python 3.4, Python 3.5 ___ Python tracker <http://bugs.python.org/issu

[issue29656] Change "make patchcheck" to be branch aware

2017-03-03 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> patch review versions: +Python 2.7, Python 3.6, Python 3.7 ___ Python tracker <http://bugs.python.org/issu

[issue29657] os.symlink: FileExistsError shows wrong message

2017-03-03 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> patch review type: -> behavior ___ Python tracker <http://bugs.python.org/issue29657> ___ ___ Python-bugs-list

[issue29659] Expose the `length` arg from shutil.copyfileobj for public use

2017-03-03 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +terry.reedy stage: -> test needed type: -> enhancement ___ Python tracker <http://bugs.python.org/issue29659> ___ ___

[issue29670] argparse: does not respect required args pre-populated into namespace

2017-03-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: Can you test on 3.6? This might have been fixed and not back-ported. -- nosy: +bethard, terry.reedy ___ Python tracker <http://bugs.python.org/issue29

[issue29706] IDLE needs syntax highlighting for async and await

2017-03-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: If 'import test' fails that way, then there is a problem either with Anaconda or your installation. You might try deleting .../Lib/test/__pycache__/__init__*.pyc. -- ___ Python tracker <http://bu

[issue29722] heapq.merge docs are misleading with the "reversed" flag

2017-03-10 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: -Python 3.3, Python 3.4 ___ Python tracker <http://bugs.python.org/issue29722> ___ ___ Python-bugs-list mailin

[issue3353] make built-in tokenizer available via Python C API

2017-03-13 Thread Dustin J. Mitchell
Dustin J. Mitchell added the comment: If the patch still applies cleanly, I have no issues with you or anyone opening a PR. I picked this up several years ago at the PyCon sprints, and don't remember a thing about it, nor have I touched any other bit of the CPython source since then. S

[issue29339] Interactive: Move to same indentation level as previousline

2017-03-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am inclined to close this. Any objection? -- ___ Python tracker <http://bugs.python.org/issue29339> ___ ___ Python-bugs-list m

[issue29826] " don't work on Mac under IDLE

2017-03-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Marco, did you see this message? (r"WARNING: The version of Tcl/Tk ({0}) in use may" r" be unstable.\n" r"Visit http://www.python.org/download/mac/tcltk/"; r" for current information.".format(patchlevel)) Or is it s

[issue29838] Check that sq_length and mq_length return non-negative result

2017-03-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: The changes appear consistent within themselves (ie, no apparent typos), and the one for builtin len appears to fix a bug that would allow negative length. Can tests be written in Python that fail without the patch? Or would mis-behaving classes have to be

[issue29839] Avoid raising OverflowError in len() when __len__() returns negative large value

2017-03-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: https://docs.python.org/3/library/functions.html#len * does not specify the exception. In such cases, we occasionally change exception in x.y.0 releases without prior notice other than News and What's New. Also, I think unnecessarily exposing a co

[issue29841] errors raised by bytes() and bytearray() for invalid size argument

2017-03-24 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- title: errors raised by bytes and bytearray constructors for invalid size argument -> errors raised by bytes() and bytearray() for invalid size argument ___ Python tracker <http://bugs.python.org/issu

[issue29841] errors raised by bytes() and bytearray() for invalid size argument

2017-03-24 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> test needed ___ Python tracker <http://bugs.python.org/issue29841> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue29840] Avoid raising OverflowError in bool()

2017-03-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: https://docs.python.org/3/library/functions.html#bool refers to https://docs.python.org/3/library/stdtypes.html#truth The latter says that values are true ("All other values are considered true") unless one of certain conditions holds. For us

[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2017-03-24 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> test needed versions: +Python 3.7 -Python 3.5 ___ Python tracker <http://bugs.python.org/issue29883> ___ ___ Python-

[issue29887] test_normalization doesn't work

2017-03-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Fetching the file requires '-u urlfetch' or '-u all'. For me, the test 'works' by skipping test_main. Loading www.pythontest.net refers one to https://github.com/python/pythontestdotnet/. Pinging contributors there. -

[issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation

2017-03-24 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +pmoody ___ Python tracker <http://bugs.python.org/issue29890> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29896] ElementTree.fromstring raises undocumented UnicodeError

2017-03-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: I disagree. The docs only sporadically mention specific exceptions for specific functions. UnicodeDecodeError can occur any place bytes are decoded to unicode. I think this should be closed. Builtin exceptions are documented in https://docs.python.org/3

[issue29910] Ctrl-D eats a character on IDLE

2017-03-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Checking, I see that the default ^D binding to DEL is documented in IDLE Help, section 2, Editing and Navigation, along with other Text defaults. (I need to determine if the list is complete. Is it the same on all systems?) I question whether IDLE should

[issue29162] pyshell.py: name 'sys' is not defined

2017-03-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Reopening because I missed file=sys.__stderr__ in the print() above sys.exit ;-(. Reported by JelleZijlstra in PR. I wonder if there is any way to force an import to fail when testing. I could at least partly test by moving the code for import failure and

[issue20552] Use specific asserts in bytes tests

2017-03-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Raymond, Am I correct in thinking that your comment is not specific to bytes but applies to all patches like this? If so, I think I agree because any future changes that break tests will almost certain happen in 3.7+, so that the extra work of backporting

[issue20552] Use specific asserts in bytes tests

2017-03-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Close? -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue29926] time.sleep ignores keyboard interrupt in IDLE

2017-03-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: I verified on Win 10 with 3.6.1. What system are you running on? An automatic unittest test would be nice, but I cannot imagine how to write one. Even a human-verified htest (IDLE private term) would be good. Maybe I should write a live-interaction test

[issue29926] time.sleep ignores _thread.interrupt_main()

2017-03-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Scratch my confusion. I added "print('after')" immediately after _thread.interrupt_main() in idlelib.run.Executor.interrupt_the_server() and 'after' is printed in Shell right after I hit ^C but a time.sleep(10) is no

[issue29926] time.sleep ignores _thread.interrupt_main()

2017-03-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Eryk, would the addition go before or after "trip_signal(SIGINT);" I posted "Issue with _thread.interrupt_main (29926)" on pydev list. Steven D'Aprano verified delayed response on *nix. Martin Panter said "

[issue29926] time.sleep ignores _thread.interrupt_main()

2017-03-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Even is IDLE is started from a console, the user execution process is not attached to one. What I want, from an IDLE perspective, is for ^C in IDLE's shell to work as well as it does in a terminal. That means either fixing _thread.interrupt_main to a

[issue29751] PyLong_FromString documentation wrong on numbers with leading zero and base=0

2017-03-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: String arguments to int are quoted int literals. From https://docs.python.org/3/reference/lexical_analysis.html#literals 'Underscores are ignored for determining the numeric value of the literal. They can be used to group digits for enhanced readability

[issue28415] PyUnicode_FromFormat integer format handling different from printf about zeropad

2017-03-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: *Way* too wordy. In msg278666, I suggested minimal and terse alternatives. a. /exactly/nearly/ b. add "except that a 0 conversion flag is not ignored when a precision is given for d, i, o, u, x and X conversion

[issue25464] Tix HList header_exists should be "exist"

2017-03-31 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: -833 ___ Python tracker <http://bugs.python.org/issue25464> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29944] Argumentless super() fails in classes constructed with type()

2017-03-31 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- title: Argumentless super() calls do not work in classes constructed with type() -> Argumentless super() fails in classes constructed with type() ___ Python tracker <http://bugs.python.org/issu

[issue29952] "keys and values" preferred to "keys and elements" for dict constituent

2017-03-31 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- title: "keys and values" is preferred to "keys and elements" for name of dict constituent -> "keys and values" preferred to "keys and elements" for dict constituent

[issue29339] Interactive: Move to same indentation level as previousline

2017-04-01 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> rejected stage: needs patch -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue29162] pyshell.py: name 'sys' is not defined

2017-04-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: The follow-up tkinter import issue is #29446 -- ___ Python tracker <http://bugs.python.org/issue29162> ___ ___ Python-bugs-list m

[issue29926] time.sleep ignores _thread.interrupt_main()

2017-04-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: A fix for 3.6+ will be better than nothing ;-) -- ___ Python tracker <http://bugs.python.org/issue29926> ___ ___ Python-bug

[issue29981] Update Index set, dict, and generator 'comprehensions'

2017-04-04 Thread Terry J. Reedy
New submission from Terry J. Reedy: The index currently has comprehensions *list* with *list* linked to 6.2.5 List displays. I suggest: 1. Link *comprehensions* to 6.2.4. Displays for lists, sets and dictionaries 2. Add subentries *set*, *dict*, and *generator* linked to 2a. 6.2.6. Set

[issue29981] Update Index for set, dict, and generator 'comprehensions'

2017-04-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: See #29983 for expanding the title of the 'atoms' section containing subsections on comprehensions. -- title: Update Index set, dict, and generator 'comprehensions' -> Update Index for set, dict, and ge

[issue29983] Reference TOC: expand 'Atoms' and 'Primaries'

2017-04-04 Thread Terry J. Reedy
New submission from Terry J. Reedy: Today there is a fairly long python-list thread about the difficult of finding info on 'dict comprehensions' in the doc. Point 1 is missing index entries. I opened #29981 for this. Point 2 is something I have also noticed: the obscurity of &

[issue29983] Reference TOC: expand 'Atoms' and 'Primaries'

2017-04-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: 'displays' is partly redundant with 'comprehensions'. Since many think of other 'displays' as a type of literal, leave 'displays' out. They are well indexed. I think the most likely term people have trouble finding

[issue28415] PyUnicode_FromFormat integer format handling different from printf about zeropad

2017-04-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: (Response to what I believe is latest patch.) In msg278666, my two suggestions were 'either...or', not both. The list came from Antti's msg278528, but the correct list for Python appears to be different, and different for bytes and unicode.

[issue29071] IDLE doesn't highlight f-strings properly

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: #29287 is about syntax highlighting the code within f-strings as code rather than as part of the string. -- ___ Python tracker <http://bugs.python.org/issue29

[issue29956] math.exp documentation is misleading

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Is math.exp(x) always more accurate than math.e ** x? If so, doc could say so. Otherwise, should this be closed? -- nosy: +terry.reedy ___ Python tracker <http://bugs.python.org/issue29

[issue29975] Issue in extending documentation

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree with the rejection on the PR. -- nosy: +terry.reedy resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker <http://bugs.python

[issue29980] OSError: multiple exceptions should preserve the exception type if it is common

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree. And if the sub-exceptions are different, prepend them to the messages in the OSError list. -- nosy: +terry.reedy ___ Python tracker <http://bugs.python.org/issue29

[issue29987] inspect.isgeneratorfunction not working with partial functions

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: A generator function *gf* is a function that contain *yield* in its body. When it is compiled, flag CO_GENERATOR is set in gf.__code__.co_flags. When the function is called, the flag is queried and if set, a special path is taken that attaches the live but

[issue29987] inspect.isgeneratorfunction not working with partial functions

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you want to know if a function returns a generator, you have to call it and pass the result to *isgenerator*, or use type-annotated functions (see the typing module) and static type checkers. -- ___ Python

[issue29989] subprocess.Popen does not handle file-like objects without file descriptors

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: 'crash' means OS message rather than Python exiting with exception traceback and message. Can you post a minimal reproducer? What OS? subprocess.Popen._get_handles is different on POSIX and windows, though both seem to call f.fileno() without

[issue30003] Remove hz codec

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: We seldom just remove things; we usually deprecate in the doc and if possible, issue a runtime warning. This is probably not the only obsolete codec. There should be a uniform policy for deprecation and removal, if ever. But for any codec, there might be

[issue30008] OpenSSL 1.1.0 deprecated functions

2017-04-07 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +alex, christian.heimes, dstufft, janssen ___ Python tracker <http://bugs.python.org/issue30008> ___ ___ Python-bugs-list m

[issue1207613] Idle Editor: Bottom Scroll Bar

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I don't like telling people to hand-edit .idlerc files. It causes too many problems. We added Extensions tab to avoid this. I think all supported options should be on dialog. Windows are resizable and accommodate lines up to current width. Default

[issue30019] IDLE freezes when opening a file with astral characters

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Your report touches on four different issues. 1. IDLE uses tkinter for the GUI and tkinter wraps tcl/tk 8.6 or earlier, which only handles Basic Multilingual Plane chars (codepoints to ). The gun and knife chars are out of that range. I have read

[issue29956] math.exp documentation is misleading

2017-04-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: To include corner cases, I should have asked 'at least as accurate' rather than 'more accurate'. It would be a sad libm that had specialized functions worse than pow, since the specialized functions could, at worse, use pow. For an exper

[issue29956] math.exp documentation is misleading

2017-04-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: Raymond added his comment while I was writing mine. A FAQ with added caveats might be even better, but it will be mostly missed. If we add one, I might add a comment to some of the SO questions. -- ___ Python

[issue29989] subprocess.Popen does not handle file-like objects without file descriptors

2017-04-10 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> not a bug ___ Python tracker <http://bugs.python.org/issue29989> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue30022] Get rid of using EnvironmentError and IOError

2017-04-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: I checked the patch and it appears to be a clean search/replace. I assume that the aliases have the same diff in C as in Python. The only idlelib replacement is in run.py, where I (mistakenly) added IOError in 3.3 and 3.4 as well as in 2.7. This must have

[issue30031] Improve queens demo (use argparse and singular form)

2017-04-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: I prefer use of argparse. Patch *looks* good reading it, but I cannot test yet. -- nosy: +terry.reedy ___ Python tracker <http://bugs.python.org/issue30

[issue30034] csv reader chokes on bad quoting in large files

2017-04-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Keith, while I sympathize with the request, I am going to agree with the others and close this. As I see it, csv exists to solve a particular problem. We want a printable file of records and text fields with visible field and record separators, but we may

[issue30071] Duck-typing inspect.isfunction()

2017-04-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: inspect.isfunction(object) is documented to Return true if the object is a Python function, which includes functions created by a lambda expression. This is currently implemented as "isinstance(object, types.FunctionType)". The docs usuall

[issue30071] Duck-typing inspect.isfunction()

2017-04-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: inspect.getargspec is deprecated in favor of .getfullargspec and .signature and is implemented in with .getfullargspec. This, in turn, calls ._signature_from_callable which ultimately looks for (perhaps after recursive unwrap calls) obj.__signature__. So I

[issue30085] Discourage operator.__dunder__ functions

2017-04-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: My suggestion from the python-ideas thread:: replace the current "The function names are those used for special class methods; variants without leading and trailing __ are also provided for convenience." with ""Many function names are th

[issue30085] Discourage operator.__dunder__ functions

2017-04-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Raymond assigned the PR to himself, so I added him here as nosy and assignee. -- ___ Python tracker <http://bugs.python.org/issue30

[issue30075] Printing ANSI Escape Sequences on Windows 10

2017-04-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is a (duplicate) enhancement request, not a bug report. The superseder field is for when an issue is closed as a duplicate; I decided that this should be. Further discussion should be on python-ideas. -- nosy: +terry.reedy resolution

[issue29059] Windows: Python not using ANSI compatible console

2017-04-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: In #30075, Tithen Firion reports that "subprocess.call('', shell=True)" leaves the console in ANSI mode. In Eryk Sun says that this is likely a bug in cmd.exe and gives improved code for putting the console in VT mode, when this is poss

[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

2017-04-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Has or will builtin classes be modified to follow advice to include a separate __bool__? In 3.6.1, >>> r = range(19**100) >>> bool(r) Traceback (most recent call last): File "", line 1, in bool(r) OverflowError: Python i

[issue30138] Incorrect documentation of replacement of slice of length 0

2017-04-22 Thread Stephen J. Turnbull
New submission from Stephen J. Turnbull: In section 4.6.3. "Mutable Sequence Types" of current documentation, Note 1 to the table says "[iterable] t must have the same length as the slice it is replacing." This is incorrect in the case of extension: s[len(s):] = t accordin

[issue30138] Incorrect documentation of replacement of slice of length 0

2017-04-22 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: Sorry, I just realized this note only applies to slices with a stride (k in i:j:k). Closing. -- stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue29352] provide the authorative source for s[i:j] negative slice indices (<-len(s)) behavior for standard sequences

2017-04-22 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: I prefer Josh's wording. The important point to me is that >>> [1, 2][2:0] = "AB" [1, 2, "A", "B"] not an error or ["B", "A"] == [1, 2][2:0:-1]. I think too much talk about the endpoi

[issue26143] Ensure that IDLE's stdlib imports are from the stdlib

2017-04-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: I will make this one of my priority issues once I get up to speed with the new workflow. However, it is not a trivial issue, and I am not sure that all my beliefs of a year ago were correct. What I really do not want to do is break IDLE running when users

[issue26143] Ensure that IDLE's stdlib imports are from the stdlib

2017-04-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: >From the viewpoint of IDLE and masking, the stdlib has three parts: idlelib, >other modules that IDLE imports, and other modules that IDLE does not import. >As I already noted, this division is different for IDLE and user processes. IDLE may delay

[issue27613] Empty iterator with fake __len__ is rendered as a single bracket ] when using json's iterencode

2017-04-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you Raymond. What I missed before is a) the OP's misnamed EmptyIterator is an iterable (possibly non-empty) but not an iterator, empty or otherwise, and b) a sequence __len__ that lies is just a bug. (So is a iterator that does not yield the con

[issue30182] Incorrect in referring to ISO as "International Standards Organization"

2017-04-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since I had the same wrong idea, I dug further into the site. The explanation is at https://www.iso.org/about-us.html ''' It's all in the name Because 'International Organization for Standardization' would have different acronyms

[issue19417] Bdb: add docstrings and a unittest file (test.test_bdb)

2017-04-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: IDLE's debugger needs multiple patches. It is based on bdb. So I want to be able to understand the bdb code and know that it is sound. The file is nearly devoid of docstrings, so I would like to add those first, probably in a separate patch. A first

[issue26143] Ensure that IDLE's stdlib imports are from the stdlib

2017-04-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: I and others constantly tell people to start IDLE from the command line when they have a problem. Today, someone actually followed the advice and the traceback revealed that the problem was a personal tkinter.py masking the stdlib file! Renaming it to

[issue30133] Strings that end with properly escaped backslashes cause error to be thrown in re.search/sub/etc. functions.

2017-04-28 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: +Python 3.6, Python 3.7 -Python 3.4 ___ Python tracker <http://bugs.python.org/issue30133> ___ ___ Python-bugs-list mailin

[issue30152] Reduce the number of imports for argparse

2017-04-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: I believe importing argparse in the __main__ clause (or a main or test function called therein) is common. I prefer it there as it is not germain to the code that is usually imported. I have a similar view on not immediately importing warnings when only

[issue30196] Add __matmul__ to collections.Counter

2017-04-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: The '|' should be '&' to avoid useless summing of 0 products. I think this should be rejected. Python's number and collections classes provide basic operations from which users can build application-specific functions. Or in the

[issue30200] tkinter ListboxSelect

2017-04-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Bug examples should be the bare minimum of code needed to reproduce the problem, not a dump of (failing) application code. See, for instance, https://stackoverflow.com/help/mcve. http://www.tcl.tk/man/tcl8.6/TkCmd/listbox.htm says "Any time the s

[issue19417] Bdb: add docstrings and a unittest file (test.test_bdb)

2017-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: While I have previously done docstrings and tests together, I can see that for this issue, separation might be preferable. Cherl, can you open a new issue and re-title the PR? (I don't know if that will be sufficient to 'move' it,

[issue19417] Bdb: add a unittest file (test.test_bdb)

2017-04-29 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- dependencies: +Bdb: add docstrings title: Bdb: add docstrings and a unittest file (test.test_bdb) -> Bdb: add a unittest file (test.test_bdb) ___ Python tracker <http://bugs.python.org/issu

[issue30208] Small typos in IDLE doc

2017-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 9dc2b3809f38be2e403ee264958106badfda142d by terryjreedy (csabella) in branch 'master': bpo-30208: DOC: fix small typos in IDLE (#1354) https://github.com/python/cpython/commit/9dc2b3809f38be2e403ee264958106badfda142d -

[issue30208] Small typos in IDLE doc

2017-04-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you for the review. These are definitely bugs. Please check IDLE component also for IDLE doc issues. That will auto-assign them to me. Your first merged PR? If so, congrats. Changes should be applied to at least 3.6, if not 3.5 and 2.7. 3.6 doc

<    58   59   60   61   62   63   64   65   66   67   >