Skip to content

Sync python-argparse with the updated tutorial - #921

Merged
realpython-bot merged 1 commit into
masterfrom
maintenance/command-line-interfaces-python-argparse-20261024
Oct 24, 2026
Merged

realpython-bot merged 1 commit into
masterfrom
maintenance/command-line-interfaces-python-argparse-20261024

Conversation

@realpython-bot

Copy link
Copy Markdown
Collaborator

Syncs python-argparse/ with the maintenance update of Build Command-Line Interfaces With Python's argparse.

What changed

  • Renamed days.py to weekdays.py and coordinates.py to point.py, matching the filenames the tutorial saves and now runs in its console examples.
  • Dropped wheel from hello_cli/pyproject.toml build requirements and raised the floor to setuptools>=64.0.0, matching the tutorial (setuptools no longer needs wheel and recommends against listing it).
  • Brought actions.py, cooking.py, custom_action.py, divide.py, files.py, fromfile.py, point.py, and size.py in line with the tutorial's code: the parser variable is parser, as in the tutorial, and divide.py uses type=int, as the tutorial shows.
  • Left the ls_v*.py and calc.py files as they are. The tutorial shows excerpts or differently wrapped versions of them, and the folder's full versions are correct.

Verification

  • Ran every changed script on Python 3.15.1. The outputs match the tutorial, including the quoted invalid choice errors from size.py and weekdays.py.
  • Installed hello_cli from the new pyproject.toml on Python 3.15.1, and it builds without wheel. The package modules are still the tutorial's layout stubs, so the hello_cli entry point doesn't run, and that was already true before this change.
  • ruff@0.14.1 format --check and ruff@0.14.1 check both pass on the folder.

Draft update: https://realpython.com/pbjt/blog/post/2573/change/
Maintenance card: https://trello.com/c/aqRcqOIu

🤖 Generated with Claude Code

…e Interfaces With Python's argparse

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@realpython-bot
realpython-bot merged commit e963c68 into master Oct 24, 2026
1 check passed
@realpython-bot
realpython-bot deleted the maintenance/command-line-interfaces-python-argparse-20261024 branch October 24, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant