Skip to content

Sync simulation-with-simpy with the updated tutorial - #932

Merged
realpython-bot merged 1 commit into
masterfrom
maintenance/simpy-simulating-with-python-20261101
Nov 1, 2026
Merged

realpython-bot merged 1 commit into
masterfrom
maintenance/simpy-simulating-with-python-20261101

Conversation

@realpython-bot

Copy link
Copy Markdown
Collaborator

Syncs simulation-with-simpy/ with the maintenance update of SimPy: Simulating Real-World Processes With Python.

What changed

  • requirements.txt (new): pins simpy==4.1.2, the same pin as the article's updated dependencies field (it previously pinned simpy==3.0.12).
  • README.md: points at the article's current URL and title, adds a Requirements section (Python 3.8 or later, the floor set by SimPy 4.1.2's Requires-Python), and corrects the sample output to 42 minutes and 53 seconds. That's what the script prints and what the article shows.
  • simulate.py: docstring now has the current URL, title, and tested versions (Python 3.15, SimPy 4.1.2). The fallback message reads "The simulation will use default values", matching the article. The logic is unchanged. The article was fixed to match this file's single get_average_wait_time().

Verification

  • Ran simulate.py on Python 3.15.1 and 3.14.9 with simpy==4.1.2 from requirements.txt. Inputs 1/1/1, 100/100/100, and 9/6/1 print 42 min 53 s, 3 min 29 s, and 9 min 60 s, the same as the article. Invalid input falls back to the defaults.
  • uvx ruff@0.14.1 format --check and uvx ruff@0.14.1 check both pass on the folder.
  • vermin reports a 3.6 syntax floor, so the overall floor is 3.8, set by SimPy.

Links

🤖 Generated with Claude Code

…lating Real-World Processes With Python

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@realpython-bot
realpython-bot merged commit 6770e8f into master Nov 1, 2026
1 check passed
@realpython-bot
realpython-bot deleted the maintenance/simpy-simulating-with-python-20261101 branch November 1, 2026 07:02
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