Skip to content

bpo-26806: IDLE should run without docstrings #14657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 9, 2019

Conversation

terryjreedy
Copy link
Member

@terryjreedy terryjreedy commented Jul 9, 2019

After fcf1d00, IDLE startup failed with python compiled without docstrings.

https://bugs.python.org/issue26806

@terryjreedy
Copy link
Member Author

@ZackerySpytz I added if setrecursionlimit.__doc__ is not None: and code still works with normal python. I cannot imagine that it does not work with 'reduced' python, but it would still be nice if you test before I merge.
@taleinat I removed .strip() as it empirically is not needed.

Copy link
Contributor

@taleinat taleinat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

My apologies for this regression; I wasn't aware of the option to build without doc-strings.

@ZackerySpytz
Copy link
Contributor

Thank you for creating this fix so quickly. I have tested this PR locally, and I can confirm that IDLE now runs again when CPython is configured without docstrings.

However, I see the following in the terminal when I close the IDLE shell:

Exception ignored in: <idlelib.run.PseudoInputFile object at 0x7efe0b1a0c30>
Traceback (most recent call last):
  File "/home/lubuntu2/cpython/Lib/idlelib/run.py", line 488, in close
  File "/home/lubuntu2/cpython/Lib/idlelib/pyshell.py", line 1017, in close
  File "/home/lubuntu2/cpython/Lib/idlelib/editor.py", line 1019, in close
  File "/home/lubuntu2/cpython/Lib/idlelib/outwin.py", line 94, in maybesave
  File "/home/lubuntu2/cpython/Lib/idlelib/editor.py", line 952, in get_saved
AttributeError: 'NoneType' object has no attribute 'get_saved'

I don't know much about IDLE's internals, but this seems to be an unrelated issue.

@taleinat
Copy link
Contributor

taleinat commented Jul 9, 2019

However, I see the following in the terminal when I close the IDLE shell:

@ZackerySpytz, indeed that seems like a separate issue. It would be great if you would open a new issue with details how to reproduce it. Feel free to nosy me on the issue and I'll take a look.

@terryjreedy
Copy link
Member Author

Tal, I was not either. Some years ago, the test_calltips then existing were guarded against -OO, but I had not idea that builtins like list and its methods could ever disappear. Hence the failure being fixed in #14592.

After working on that, I want to try a different fix here, adding instead
if sys.setrecursionlimit.__doc__ is None: sys.setrecursionlimit.__doc__ = ''
Then our wrapper will still obviously be a wrapper.

Zachery: I see that newish closing bug also, on Windows, and need to fix it.

@terryjreedy
Copy link
Member Author

I added a test that would have failed, with doc == None, without patch.

@terryjreedy
Copy link
Member Author

I opened bpo 37424 for bad closing and nosied both of you. Zachery, please check if specifc conditions are the same for you.

@terryjreedy terryjreedy changed the title bpo-26806: IDLE should still run without docs bpo-26806: IDLE should run without docstrings Jul 9, 2019
@terryjreedy
Copy link
Member Author

This problem was reported by Zachery Spitz on #13944, the PR with the flawed merge.

@terryjreedy terryjreedy merged commit 6aeb2fe into python:master Jul 9, 2019
@bedevere-bot
Copy link

@terryjreedy: Please replace # with GH- in the commit message next time. Thanks!

@miss-islington
Copy link
Contributor

Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒⛏🤖

@terryjreedy terryjreedy deleted the nodoc branch July 9, 2019 18:37
@bedevere-bot
Copy link

GH-14677 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 9, 2019
After fcf1d00, IDLE startup failed with python compiled without docstrings.
(cherry picked from commit 6aeb2fe)

Co-authored-by: Terry Jan Reedy <[email protected]>
@bedevere-bot
Copy link

GH-14678 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 9, 2019
After fcf1d00, IDLE startup failed with python compiled without docstrings.
(cherry picked from commit 6aeb2fe)

Co-authored-by: Terry Jan Reedy <[email protected]>
terryjreedy added a commit that referenced this pull request Jul 9, 2019
After fcf1d00, IDLE startup failed with python compiled without docstrings.
(cherry picked from commit 6aeb2fe)

Co-authored-by: Terry Jan Reedy <[email protected]>
terryjreedy added a commit that referenced this pull request Jul 9, 2019
After fcf1d00, IDLE startup failed with python compiled without docstrings.
(cherry picked from commit 6aeb2fe)

Co-authored-by: Terry Jan Reedy <[email protected]>
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Windows7 SP1 3.8 has failed when building commit b82188d.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/208/builds/173) and take a look at the build logs.
  4. Check if the failure is related to this commit (b82188d) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/208/builds/173

Failed tests:

  • test_regrtest

Summary of the results of the build (if available):

== Tests result: FAILURE then SUCCESS ==

389 tests OK.

10 slowest tests:

  • test_multiprocessing_spawn: 2 min 23 sec
  • test_tools: 2 min 15 sec
  • test_tokenize: 1 min 46 sec
  • test_concurrent_futures: 1 min 35 sec
  • test_mmap: 1 min 19 sec
  • test_lib2to3: 1 min 8 sec
  • test_io: 1 min 5 sec
  • test_asyncio: 59 sec 390 ms
  • test_socket: 57 sec 987 ms
  • test_largefile: 55 sec 765 ms

34 tests skipped:
test_crypt test_curses test_dbm_gnu test_dbm_ndbm test_devpoll
test_epoll test_fcntl test_fork1 test_gdb test_grp test_ioctl
test_kqueue test_multiprocessing_fork
test_multiprocessing_forkserver test_nis test_openpty
test_ossaudiodev test_pipes test_poll test_posix test_pty test_pwd
test_readline test_resource test_spwd test_syslog
test_threadsignals test_tix test_tk test_ttk_guionly test_wait3
test_wait4 test_xxtestfuzz test_zipfile64

1 re-run test:
test_regrtest

Total duration: 20 min 32 sec

Click to see traceback logs
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\support\__init__.py", line 1005, in temp_dir
    yield path
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\support\__init__.py", line 1057, in temp_cwd
    yield cwd_dir
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\libregrtest\main.py", line 621, in main
    self._main(tests, kwargs)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\libregrtest\main.py", line 682, in _main
    sys.exit(0)
SystemExit: 0


Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\runpy.py", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\__main__.py", line 2, in <module>
    main()
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\libregrtest\main.py", line 687, in main


Traceback (most recent call last):
  File "C:\buildbot.python.org\3.8.kloth-win64\build\lib\test\support\__init__.py", line 328, in _force_run
    return func(*args)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\buildbot.python.org\\3.8.kloth-win64\\build\\build\\test_python_4416\\test_python_worker_1644'

lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
After fcf1d00, IDLE startup failed with python compiled without docstrings.
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
After fcf1d00, IDLE startup failed with python compiled without docstrings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants