Skip to content

[3.9] bpo-40939: Fix test_keyword for the old parser #20814

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 3 commits into from
Jun 11, 2020

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Jun 11, 2020

@bedevere-bot bedevere-bot added tests Tests in the Lib/test dir awaiting core review labels Jun 11, 2020
@pablogsal pablogsal changed the title bpo-40939: Fix test_keyword for the old parser [3.9] bpo-40939: Fix test_keyword for the old parser Jun 11, 2020
@lysnikolaou
Copy link
Member

You beat me to it!! Should we maybe also rename the easter egg in 3.9 as per @vstinner's suggestion?

@pablogsal
Copy link
Member Author

You beat me to it!!

Remember: fastest gun in the west 🔫 🤠

Should we maybe also rename the easter egg in 3.9 as per @vstinner's suggestion?

¯_(ツ)_/¯ As you prefer: there is no possibility that it needs to be future-proof now :P

@lysnikolaou
Copy link
Member

Remember: fastest gun in the west 🔫 🤠

Time and time again!

Should we maybe also rename the easter egg in 3.9 as per @vstinner's suggestion?

You both know best.

@pablogsal
Copy link
Member Author

You both know best.

Ok, will change it here then

for key in keyword.kwlist:
all_keywords = set(keyword.kwlist)
if use_old_parser():
all_keywords -= {'__new_parser__'}
Copy link
Member

Choose a reason for hiding this comment

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

I would use discard(), but your code is correct ;-)

Suggested change
all_keywords -= {'__new_parser__'}
all_keywords.discard('__new_parser__')

Copy link
Member Author

Choose a reason for hiding this comment

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

I would use discard(), but your code is correct ;-)

I like discard() :)

@pablogsal pablogsal merged commit 3782497 into python:3.9 Jun 11, 2020
@pablogsal pablogsal deleted the bpo-0939 branch June 11, 2020 18:29
@bedevere-bot
Copy link

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

Hi! The buildbot aarch64 RHEL8 3.9 has failed when building commit 3782497.

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/707/builds/78) and take a look at the build logs.
  4. Check if the failure is related to this commit (3782497) 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/707/builds/78

Failed tests:

  • test_asyncio

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

== Tests result: FAILURE then ENV CHANGED ==

411 tests OK.

10 slowest tests:

  • test_peg_generator: 3 min 48 sec
  • test_concurrent_futures: 3 min 27 sec
  • test_capi: 3 min 8 sec
  • test_unparse: 2 min 59 sec
  • test_multiprocessing_spawn: 2 min 35 sec
  • test_tokenize: 2 min 35 sec
  • test_gdb: 2 min 24 sec
  • test_lib2to3: 2 min 8 sec
  • test_multiprocessing_forkserver: 1 min 31 sec
  • test_nntplib: 1 min 21 sec

1 test altered the execution environment:
test_asyncio

13 tests skipped:
test_devpoll test_ioctl test_kqueue test_msilib test_ossaudiodev
test_startfile test_tix test_tk test_ttk_guionly test_winconsoleio
test_winreg test_winsound test_zipfile64

1 re-run test:
test_asyncio

Total duration: 23 min 20 sec

Click to see traceback logs
remote: Enumerating objects: 2        
remote: Enumerating objects: 10, done.        
remote: Counting objects:  10% (1/10)        
remote: Counting objects:  20% (2/10)        
remote: Counting objects:  30% (3/10)        
remote: Counting objects:  40% (4/10)        
remote: Counting objects:  50% (5/10)        
remote: Counting objects:  60% (6/10)        
remote: Counting objects:  70% (7/10)        
remote: Counting objects:  80% (8/10)        
remote: Counting objects:  90% (9/10)        
remote: Counting objects: 100% (10/10)        
remote: Counting objects: 100% (10/10), done.        
remote: Compressing objects:  50% (1/2)        
remote: Compressing objects: 100% (2/2)        
remote: Compressing objects: 100% (2/2), done.        
remote: Total 12 (delta 8), reused 8 (delta 8), pack-reused 2        
From https://github.com/python/cpython
 * branch                  3.9        -> FETCH_HEAD
Reset branch '3.9'

test_winreg skipped -- No module named 'winreg'
test_ioctl skipped -- Unable to open /dev/tty
test_startfile skipped -- object <module 'os' from '/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/os.py'> has no attribute 'startfile'
test_flock (__main__.FNTLEINTRTest) ... ok
test_lockf (__main__.FNTLEINTRTest) ... ok
test_read (__main__.OSEINTRTest) ... ok
test_wait (__main__.OSEINTRTest) ... ok
test_wait3 (__main__.OSEINTRTest) ... ok
test_wait4 (__main__.OSEINTRTest) ... ok
test_waitpid (__main__.OSEINTRTest) ... ok
test_write (__main__.OSEINTRTest) ... ok
test_devpoll (__main__.SelectEINTRTest) ... skipped 'need select.devpoll'
test_epoll (__main__.SelectEINTRTest) ... ok
test_kqueue (__main__.SelectEINTRTest) ... skipped 'need select.kqueue'
test_poll (__main__.SelectEINTRTest) ... ok
test_select (__main__.SelectEINTRTest) ... ok
test_sigtimedwait (__main__.SignalEINTRTest) ... ok
test_sigwaitinfo (__main__.SignalEINTRTest) ... ok
test_accept (__main__.SocketEINTRTest) ... ok
test_open (__main__.SocketEINTRTest) ... ok
test_os_open (__main__.SocketEINTRTest) ... ok
test_recv (__main__.SocketEINTRTest) ... ok
test_recvmsg (__main__.SocketEINTRTest) ... ok
test_send (__main__.SocketEINTRTest) ... ok
test_sendall (__main__.SocketEINTRTest) ... ok
test_sendmsg (__main__.SocketEINTRTest) ... ok
test_sleep (__main__.TimeEINTRTest) ... ok

----------------------------------------------------------------------
Ran 24 tests in 8.488s

OK (skipped=2)
test_tix skipped -- Tk unavailable due to TclError: no display name and no $DISPLAY environment variab [...]
test_winconsoleio skipped -- test only relevant on win32
test_winsound skipped -- No module named 'winsound'
test_devpoll skipped -- test works only on Solaris OS family
test_zipfile64 skipped -- test requires loads of disk-space bytes and a long time to run
test_ossaudiodev skipped -- [Errno 2] No such file or directory: '/dev/dsp'
test_tk skipped -- Tk unavailable due to TclError: no display name and no $DISPLAY environment variab [...]
test_kqueue skipped -- test works only on BSD
test_ttk_guionly skipped -- Tk unavailable due to TclError: no display name and no $DISPLAY environment variab [...]
<string>:2: PendingDeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+
test_msilib skipped -- No module named '_msi'
Timeout (0:15:00)!
Thread 0x0000ffffb18f4970 (most recent call first):
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/selectors.py", line 468 in select
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/asyncio/base_events.py", line 1854 in _run_once
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/asyncio/base_events.py", line 596 in run_forever
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/asyncio/base_events.py", line 629 in run_until_complete
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/test/test_asyncio/test_subprocess.py", line 441 in test_cancel_make_subprocess_transport_exec
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/unittest/case.py", line 550 in _callTestMethod
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/unittest/case.py", line 593 in run
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/unittest/case.py", line 653 in __call__
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/unittest/runner.py", line 176 in run
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/test/support/__init__.py", line 1795 in _run_suite
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/test/support/__init__.py", line 1917 in run_unittest
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/test/libregrtest/runtest.py", line 209 in _test_module
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/test/libregrtest/runtest.py", line 234 in _runtest_inner2
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/test/libregrtest/runtest.py", line 270 in _runtest_inner
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/test/libregrtest/runtest.py", line 140 in _runtest
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/test/libregrtest/runtest.py", line 193 in runtest
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/test/libregrtest/runtest_mp.py", line 80 in run_tests_worker
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/test/libregrtest/main.py", line 657 in _main
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/test/libregrtest/main.py", line 637 in main
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/test/libregrtest/main.py", line 715 in main
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/test/regrtest.py", line 43 in _main
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/test/regrtest.py", line 47 in <module>
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/runpy.py", line 87 in _run_code
  File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64/build/Lib/runpy.py", line 197 in _run_module_as_main
Warning -- Unraisable exception
make: *** [Makefile:1221: buildbottest] Error 3

@pablogsal
Copy link
Member Author

The buildbot failure is unrelated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants