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 — Added doctest tests by terryluan12 · Pull Request #6598 · RustPython/RustPython

Conversation

@terryluan12

@terryluan12 terryluan12 commented Dec 30, 2025 •
edited by coderabbitai Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Improved error message clarity for integer division by zero operations to better inform users about the specific error condition.

✏️ Tip: You can customize this high-level summary in your review settings.

Sorry, something went wrong.

Uh oh!

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

All reactions
terryluan12 added 20 commits December 29, 2025 19:28
@terryluan12
Updated bdb.py + test_bdb.py
b0ec8ee
@terryluan12
Deleted _pycodecs.py
91d4447
@terryluan12
Updated code.py library
ac9bd54
@terryluan12
Updated the _pydatetime.py lib
d5f6198
@terryluan12
Removed distutils package
f585018
@terryluan12
Updated doctest package
da4a841
@terryluan12
* Updated datetimetester.py
d7405c9
* Added back in _pycodecs.py
@terryluan12
Used tool to verify datetimetester + test_code_module
f125d5b
@terryluan12
Merge branch 'add_tests' into update_simple_packages_1
93b6f33
@terryluan12
Initial addition of test_doctest from v13.3.10
8f303e8
@terryluan12 @youknowone
Deleted _pycodecs.py
cd9f500
@terryluan12 @youknowone
Updated code.py library
b4f2341
@terryluan12 @youknowone
Updated the _pydatetime.py lib
c0ee057
@terryluan12 @youknowone
Removed distutils package
2d58985
@terryluan12 @youknowone
Updated doctest package
8d75518
@terryluan12 @youknowone
* Updated datetimetester.py
f44dd1c
* Added back in _pycodecs.py
@terryluan12 @youknowone
Used tool to verify datetimetester + test_code_module
2bfe961
@terryluan12
Merge branch 'update_simple_packages_1' of https://github.com/terrylu…
22256fd
…an12/RustPython into update_simple_packages_1
@terryluan12
Merge remote-tracking branch 'base/main' into update_simple_packages_1
442d260
@terryluan12
* Notated failing tests + updated the zero division message to match …
c32c31f
…CPython
@coderabbitai

coderabbitai Bot commented Dec 30, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The error message in the inner_floordiv function was updated from "integer division by zero" to "integer division or modulo by zero" to more accurately reflect that the error applies to both division and modulo operations. No control flow or logic changes occurred.

Changes

Cohort / File(s) Summary
Error Message Update
crates/vm/src/builtins/int.rs
Updated error message in inner_floordiv from "integer division by zero" to "integer division or modulo by zero" to clarify that the error applies to both division and modulo operations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A message so clear, now updated with care,
Division and modulo, both handled with flair,
No zero allowed in this mathematical dance,
The error now speaks of their shared circumstance!

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'Added doctest tests' is vague and does not reflect the actual change, which is modifying an error message in the integer floor division function. Update the title to accurately describe the main change, such as 'Update floor division error message to include modulo context' or 'Change integer division by zero error message'.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e22091e and c32c31f.

⛔ Files ignored due to path filters (18)
  • Lib/test/test_doctest/__init__.py is excluded by !Lib/**
  • Lib/test/test_doctest/decorator_mod.py is excluded by !Lib/**
  • Lib/test/test_doctest/doctest_aliases.py is excluded by !Lib/**
  • Lib/test/test_doctest/doctest_lineno.py is excluded by !Lib/**
  • Lib/test/test_doctest/sample_doctest.py is excluded by !Lib/**
  • Lib/test/test_doctest/sample_doctest_errors.py is excluded by !Lib/**
  • Lib/test/test_doctest/sample_doctest_no_docstrings.py is excluded by !Lib/**
  • Lib/test/test_doctest/sample_doctest_no_doctests.py is excluded by !Lib/**
  • Lib/test/test_doctest/sample_doctest_skip.py is excluded by !Lib/**
  • Lib/test/test_doctest/test_doctest.py is excluded by !Lib/**
  • Lib/test/test_doctest/test_doctest.txt is excluded by !Lib/**
  • Lib/test/test_doctest/test_doctest2.py is excluded by !Lib/**
  • Lib/test/test_doctest/test_doctest2.txt is excluded by !Lib/**
  • Lib/test/test_doctest/test_doctest3.txt is excluded by !Lib/**
  • Lib/test/test_doctest/test_doctest4.txt is excluded by !Lib/**
  • Lib/test/test_doctest/test_doctest_errors.txt is excluded by !Lib/**
  • Lib/test/test_doctest/test_doctest_skip.txt is excluded by !Lib/**
  • Lib/test/test_doctest/test_doctest_skip2.txt is excluded by !Lib/**
📒 Files selected for processing (1)
  • crates/vm/src/builtins/int.rs
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.rs: Follow the default rustfmt code style by running cargo fmt to format Rust code
Always run clippy to lint code (cargo clippy) before completing tasks and fix any warnings or lints introduced by changes
Follow Rust best practices for error handling and memory management
Use the macro system (pyclass, pymodule, pyfunction, etc.) when implementing Python functionality in Rust

Files:

  • crates/vm/src/builtins/int.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: Run snippets and cpython tests (ubuntu-latest)
  • GitHub Check: Run snippets and cpython tests (macos-latest)
  • GitHub Check: Run snippets and cpython tests (windows-latest)
  • GitHub Check: Run rust tests (ubuntu-latest)
  • GitHub Check: Run rust tests (macos-latest)
  • GitHub Check: Run rust tests (windows-latest)
  • GitHub Check: Run snippets and cpython tests on wasm-wasi
  • GitHub Check: Check Rust code with clippy
  • GitHub Check: Ensure compilation on various targets
  • GitHub Check: Check the WASM package and demo

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands and usage tips.

All reactions

Sorry, something went wrong.

Uh oh!

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

coderabbitai[bot]
coderabbitai Bot reviewed Dec 30, 2025
View reviewed changes

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/vm/src/builtins/int.rs (1)

130-136: Error message in inner_floordiv matches CPython behavior; however, inner_mod has an inconsistent error message.

The error message "integer division or modulo by zero" in inner_floordiv is correct—CPython uses this exact message for both floor division (//) and modulo (%) operations with integers. However, inner_mod (line 124) uses "integer modulo by zero", which differs from CPython's behavior and is inconsistent with inner_floordiv and inner_divmod.

Update inner_mod to use "integer division or modulo by zero" for consistency with CPython and the other integer division-related functions.

Note: The PR title mentions "Added doctest tests" but no doctest additions are visible in this diff.

📜 Review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e22091e and c32c31f.

⛔ Files ignored due to path filters (18)
  • Lib/test/test_doctest/__init__.py is excluded by !Lib/**
  • Lib/test/test_doctest/decorator_mod.py is excluded by !Lib/**
  • Lib/test/test_doctest/doctest_aliases.py is excluded by !Lib/**
  • Lib/test/test_doctest/doctest_lineno.py is excluded by !Lib/**
  • Lib/test/test_doctest/sample_doctest.py is excluded by !Lib/**
  • Lib/test/test_doctest/sample_doctest_errors.py is excluded by !Lib/**
  • Lib/test/test_doctest/sample_doctest_no_docstrings.py is excluded by !Lib/**
  • Lib/test/test_doctest/sample_doctest_no_doctests.py is excluded by !Lib/**
  • Lib/test/test_doctest/sample_doctest_skip.py is excluded by !Lib/**
  • Lib/test/test_doctest/test_doctest.py is excluded by !Lib/**
  • Lib/test/test_doctest/test_doctest.txt is excluded by !Lib/**
  • Lib/test/test_doctest/test_doctest2.py is excluded by !Lib/**
  • Lib/test/test_doctest/test_doctest2.txt is excluded by !Lib/**
  • Lib/test/test_doctest/test_doctest3.txt is excluded by !Lib/**
  • Lib/test/test_doctest/test_doctest4.txt is excluded by !Lib/**
  • Lib/test/test_doctest/test_doctest_errors.txt is excluded by !Lib/**
  • Lib/test/test_doctest/test_doctest_skip.txt is excluded by !Lib/**
  • Lib/test/test_doctest/test_doctest_skip2.txt is excluded by !Lib/**
📒 Files selected for processing (1)
  • crates/vm/src/builtins/int.rs
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.rs: Follow the default rustfmt code style by running cargo fmt to format Rust code
Always run clippy to lint code (cargo clippy) before completing tasks and fix any warnings or lints introduced by changes
Follow Rust best practices for error handling and memory management
Use the macro system (pyclass, pymodule, pyfunction, etc.) when implementing Python functionality in Rust

Files:

  • crates/vm/src/builtins/int.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: Run snippets and cpython tests (ubuntu-latest)
  • GitHub Check: Run snippets and cpython tests (macos-latest)
  • GitHub Check: Run snippets and cpython tests (windows-latest)
  • GitHub Check: Run rust tests (ubuntu-latest)
  • GitHub Check: Run rust tests (macos-latest)
  • GitHub Check: Run rust tests (windows-latest)
  • GitHub Check: Run snippets and cpython tests on wasm-wasi
  • GitHub Check: Check Rust code with clippy
  • GitHub Check: Ensure compilation on various targets
  • GitHub Check: Check the WASM package and demo

Sorry, something went wrong.

Uh oh!

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

All reactions
youknowone
youknowone approved these changes Dec 31, 2025
View reviewed changes

@youknowone youknowone left a comment

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.

👍

Sorry, something went wrong.

Uh oh!

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

All reactions
@youknowone
youknowone merged commit cd012f9 into RustPython:main Dec 31, 2025
13 checks passed

Uh oh!

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

@fanninpm fanninpm mentioned this pull request Jan 2, 2026
Update Python libraries and tests from Python 3.13 #5529
Closed
@terryluan12
terryluan12 deleted the update_simple_packages_1 branch January 5, 2026 19:06
@coderabbitai coderabbitai Bot mentioned this pull request Feb 11, 2026
Update doctest,test_generators from v3.14.2 and fix generator bugs #7067
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] left review comments
@youknowone youknowone youknowone approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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.

2 participants

@terryluan12 @youknowone
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.