GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-108455: Run `mypy` on `Tools/peg_generator` by sobolevn · Pull Request #108456 · python/cpython

Conversation

@sobolevn

@sobolevn sobolevn commented Aug 24, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Notes:

  • all type: ignore[import] will be removed after types-setuptools is installed
  • Incomplete will be removed as well
  • Issue: Run mypy on Tools/peg_generator #108455

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sobolevn
sobolevn requested review from JelleZijlstra and hauntsaninja August 24, 2023 21:17
@sobolevn
sobolevn requested review from ezio-melotti, hugovk, lysnikolaou and pablogsal as code owners August 24, 2023 21:17
@bedevere-bot bedevere-bot mentioned this pull request Aug 24, 2023
Run mypy on Tools/peg_generator #108455
Closed
@bedevere-bot bedevere-bot added the awaiting review label Aug 24, 2023
@sobolevn
pythongh-108455: Run mypy on Tools/peg_generator
c08b596
@sobolevn
sobolevn force-pushed the issue-108455 branch from a33e5a9 to c08b596 Compare August 24, 2023 21:20
@sobolevn sobolevn added the skip news label Aug 24, 2023
@hugovk
Merge branch 'main' into issue-108455
9485707
@hugovk

hugovk commented Aug 25, 2023

Copy link
Copy Markdown
Member

(Resolved conflict)

sobolevn reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sobolevn sobolevn mentioned this pull request Aug 25, 2023
Split long running test suites up into smaller sub suites to reduce our regrtest long tail on multi-core systems. #108388
Closed
@sobolevn
Merge branch 'main' into issue-108455
1f814a2
AlexWaygood
AlexWaygood reviewed Aug 25, 2023
View reviewed changes
Comment thread Tools/peg_generator/pegen/build.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

AlexWaygood
AlexWaygood reviewed Aug 25, 2023
View reviewed changes
Comment thread Tools/peg_generator/pegen/parser.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Tools/peg_generator/pegen/parser.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sobolevn
Address review
63de329
sobolevn
sobolevn commented Aug 25, 2023
View reviewed changes
Comment thread Tools/peg_generator/pegen/keywordgen.py
issoftkeyword = frozenset(softkwlist).__contains__
'''.lstrip()


@sobolevn sobolevn Aug 25, 2023

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This is black reformat.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

AlexWaygood reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
AlexWaygood
AlexWaygood approved these changes Aug 25, 2023
View reviewed changes

@AlexWaygood AlexWaygood left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM, though I'm slightly unclear on whether this code is upstream to or vendored from https://github.com/we-like-parsers/pegen

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Aug 25, 2023
AlexWaygood
AlexWaygood reviewed Aug 25, 2023
View reviewed changes
Comment thread Tools/peg_generator/pegen/parser.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

sobolevn added 3 commits August 25, 2023 15:41
@sobolevn
Merge branch 'main' into issue-108455
25f3e54
@sobolevn
Fix annotations
0687918
@sobolevn
Fix annotations
7442ff3
@pablogsal

pablogsal commented Aug 25, 2023

Copy link
Copy Markdown
Member

LGTM, though I'm slightly unclear on whether this code is upstream to or vendored from https://github.com/we-like-parsers/pegen

The other way around: that code is adapted from the one in CPython.

AlexWaygood reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AlexWaygood

AlexWaygood commented Aug 28, 2023

Copy link
Copy Markdown
Member

@pablogsal, would you find it helpful to have mypy run on this code in CI at CPython? I'm not generally involved in maintaining Tools/peg_generator/, so I don't want to merge this unless you'd actually find it useful :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pablogsal

pablogsal commented Aug 28, 2023

Copy link
Copy Markdown
Member

@pablogsal, would you find it helpful to have mypy run on this code in CI at CPython? I'm not generally involved in maintaining Tools/peg_generator/, so I don't want to merge this unless you'd actually find it useful :)

I think that would be very helpful, indeed, as these types should be up to date 👍

AlexWaygood and erlend-aasland reacted with hooray emoji AlexWaygood and erlend-aasland reacted with rocket emoji
All reactions
  • 🎉 2 reactions
  • 🚀 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pablogsal
pablogsal merged commit cf7ba83 into python:main Aug 28, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label Aug 28, 2023
@pablogsal

pablogsal commented Aug 28, 2023

Copy link
Copy Markdown
Member

Thanks a lot for the PR @sobolevn and thanks for the review @AlexWaygood

AlexWaygood, sobolevn, and erlend-aasland reacted with heart emoji
All reactions
  • ❤️ 3 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Aug 28, 2023

Copy link
Copy Markdown

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

Hi! The buildbot ARM Raspbian 3.x has failed when building commit cf7ba83.

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

Failed tests:

  • test.test_concurrent_futures.test_shutdown

Failed subtests:

  • test_interpreter_shutdown - test.test_concurrent_futures.test_shutdown.ProcessPoolForkserverProcessPoolShutdownTest.test_interpreter_shutdown

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

== Tests result: FAILURE then FAILURE ==

443 tests OK.

10 slowest tests:

  • test_cppext: 11 min 26 sec
  • test_venv: 10 min 2 sec
  • test_shelve: 9 min 30 sec
  • test_largefile: 9 min 7 sec
  • test_math: 4 min 24 sec
  • test_compileall: 2 min 30 sec
  • test_hashlib: 2 min 13 sec
  • test.test_multiprocessing_spawn.test_processes: 2 min 12 sec
  • test_peg_generator: 2 min 10 sec
  • test_gdb: 1 min 52 sec

1 test failed:
test.test_concurrent_futures.test_shutdown

19 tests skipped:
test.test_asyncio.test_windows_events
test.test_asyncio.test_windows_utils test_devpoll test_idle
test_ioctl test_kqueue test_launcher test_perf_profiler
test_startfile test_tcl test_tkinter test_ttk test_ttk_textonly
test_turtle test_winconsoleio test_winreg test_winsound test_wmi
test_zipfile64

1 re-run test:
test.test_concurrent_futures.test_shutdown

Total duration: 39 min 40 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/Lib/test/test_concurrent_futures/test_shutdown.py", line 49, in test_interpreter_shutdown
    self.assertFalse(err)
AssertionError: b'Exception in thread Thread-1:\nTraceback (most recent call last):\n  File "/var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/Lib/threading.py", line 1059, in _bootstrap_inner\n    self.run()\n  File "/var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/Lib/concurrent/futures/process.py", line 339, in run\n    self.add_call_item_to_queue()\n  File "/var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/Lib/concurrent/futures/process.py", line 394, in add_call_item_to_queue\n    self.call_queue.put(_CallItem(work_id,\n  File "/var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/Lib/multiprocessing/queues.py", line 94, in put\n    self._start_thread()\n  File "/var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/Lib/multiprocessing/queues.py", line 177, in _start_thread\n    self._thread.start()\n  File "/var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/Lib/threading.py", line 978, in start\n    _start_new_thread(self._bootstrap, ())\nRuntimeError: can\'t create new thread at interpreter shutdown\nTraceback (most recent call last):\n  File "/var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/Lib/multiprocessing/forkserver.py", line 274, in main\n    code = _serve_one(child_r, fds,\n           ^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/Lib/multiprocessing/forkserver.py", line 313, in _serve_one\n    code = spawn._main(child_r, parent_sentinel)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/Lib/multiprocessing/spawn.py", line 132, in _main\n    self = reduction.pickle.load(from_parent)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/Lib/multiprocessing/synchronize.py", line 115, in __setstate__\n    self._semlock = _multiprocessing.SemLock._rebuild(*state)\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nFileNotFoundError: [Errno 2] No such file or directory\n' is not false
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@AlexWaygood AlexWaygood AlexWaygood approved these changes
@JelleZijlstra JelleZijlstra Awaiting requested review from JelleZijlstra
@hauntsaninja hauntsaninja Awaiting requested review from hauntsaninja
@pablogsal pablogsal Awaiting requested review from pablogsal pablogsal is a code owner
@lysnikolaou lysnikolaou Awaiting requested review from lysnikolaou lysnikolaou is a code owner
@ezio-melotti ezio-melotti Awaiting requested review from ezio-melotti ezio-melotti is a code owner
@hugovk hugovk Awaiting requested review from hugovk hugovk is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@sobolevn @hugovk @pablogsal @AlexWaygood @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.