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-126332: Add tests for _pyrepl.utils by eendebakpt · Pull Request #129325 · python/cpython

Conversation

@eendebakpt

@eendebakpt eendebakpt commented Jan 26, 2025 •
edited by AlexWaygood
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Add unit tests for methods 'wlen and str_width from _pyrepl.utils.

  • Issue: 3.13.0 REPL crashes on double ctrl+z in line overflow #126332

Sorry, something went wrong.

Uh oh!

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

danielhollas reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@eendebakpt
Add tests for _pyrepr.utils
07715bf
@eendebakpt
eendebakpt requested review from ambv, lysnikolaou and pablogsal as code owners January 26, 2025 20:16
@bedevere-app bedevere-app Bot added awaiting review tests Tests in the Lib/test dir labels Jan 26, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Jan 26, 2025
3.13.0 REPL crashes on double ctrl+z in line overflow #126332
Closed
@blurb-it
📜🤖 Added by blurb_it.
3699678
@eendebakpt eendebakpt mentioned this pull request Jan 26, 2025
gh-126332: Fix pyrepl crash for double ctrl-z in line overflow #126650
Merged
@AlexWaygood AlexWaygood changed the title gh-126332: Add tests for _pyrepr.utils gh-126332: Add tests for _pyrepl.utils Jan 26, 2025
@tomasr8 tomasr8 added the skip news label Jan 27, 2025
eendebakpt added 2 commits January 27, 2025 13:32
@eendebakpt
Merge branch 'main' into pyrepl_utils
ab78d05
@eendebakpt
Merge branch 'main' into pyrepl_utils
8596419
vstinner
vstinner reviewed Feb 20, 2025
View reviewed changes
Comment thread Lib/test/test_pyrepl/test_utils.py Outdated

self.assertEqual(wlen('hello'), 5)
self.assertEqual(wlen('hello'+'\x1a'), 7)
self.assertEqual(wlen('hello'+'\0x1B'), 9)

@vstinner vstinner Feb 20, 2025

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.

This test is strange. Are you testing the nul byte and then the string x1B on purpose?

Sorry, something went wrong.

Uh oh!

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

All reactions

@eendebakpt eendebakpt Feb 20, 2025

Copy link
Copy Markdown
Contributor 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.

Good catch. I tried to create a special unicode character to hit one of the paths in wlen, but think I made a typo. I removed this test and added two others.

Sorry, something went wrong.

Uh oh!

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

All reactions
eendebakpt added 2 commits February 20, 2025 19:28
@eendebakpt
improve test
5ce442a
@eendebakpt
Merge branch 'main' into pyrepl_utils
7bd56b9
vstinner
vstinner approved these changes Feb 21, 2025
View reviewed changes

@vstinner vstinner 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.

LGTM

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Feb 21, 2025
@vstinner
vstinner enabled auto-merge (squash) February 21, 2025 14:32
@vstinner
Merge branch 'main' into pyrepl_utils
0782750
@vstinner

vstinner commented Feb 21, 2025

Copy link
Copy Markdown
Member

The Docs CI job fails, I'm not sure why. So I updated the branch to try to fix the issue.

All reactions

Sorry, something went wrong.

Uh oh!

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

eendebakpt added 2 commits February 21, 2025 16:46
@eendebakpt
fix news entry name
b17710e
@eendebakpt
Merge branch 'main' into pyrepl_utils
deda6ad
@vstinner
vstinner merged commit 0c4248f into python:main Feb 21, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Feb 21, 2025
@vstinner vstinner added the needs backport to 3.13 only security fixes label Feb 21, 2025
@miss-islington-app

miss-islington-app Bot commented Feb 21, 2025

Copy link
Copy Markdown

Thanks @eendebakpt for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 21, 2025
@eendebakpt @miss-islington
pythongh-126332: Add tests for _pyrepl.utils (pythonGH-129325)
20e2186
(cherry picked from commit 0c4248f)

Co-authored-by: Pieter Eendebak <[email protected]>
@bedevere-app

bedevere-app Bot commented Feb 21, 2025

Copy link
Copy Markdown

GH-130414 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Feb 21, 2025
vstinner pushed a commit that referenced this pull request Feb 21, 2025
@miss-islington @eendebakpt
[3.13] gh-126332: Add tests for _pyrepl.utils (GH-129325) (#130414)
3d88c18
gh-126332: Add tests for _pyrepl.utils (GH-129325)
(cherry picked from commit 0c4248f)

Co-authored-by: Pieter Eendebak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner approved these changes
@pablogsal pablogsal Awaiting requested review from pablogsal pablogsal is a code owner
@lysnikolaou lysnikolaou Awaiting requested review from lysnikolaou lysnikolaou is a code owner
@ambv ambv Awaiting requested review from ambv ambv is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir

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.

3 participants

@eendebakpt @vstinner @tomasr8
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 01402520 — 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.