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-116622: Make test_unzip_zipfile recognize Android error message format by mhsmith · Pull Request #124462 · python/cpython

Conversation

@mhsmith

@mhsmith mhsmith commented Sep 24, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

The test expects the format unrecognized option: t, but the Android message is invalid option -- t.

This only failed in a fairly narrow range of Android versions including API level 30. Older versions didn't include an unzip command at all, and newer versions included a version that supports the -t option.

  • Issue: Add support for Android as a target platform #116622

Sorry, something went wrong.

Uh oh!

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

All reactions
@mhsmith
Make test_unzip_zipfile recognize Android error message format
18656fc
@mhsmith mhsmith added skip news needs backport to 3.13 only security fixes labels Sep 24, 2024
@bedevere-app bedevere-app Bot added awaiting review tests Tests in the Lib/test dir labels Sep 24, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Sep 24, 2024
Add support for Android as a target platform #116622
Closed
@mhsmith
mhsmith requested a review from freakboy3742 September 24, 2024 20:32
freakboy3742
freakboy3742 requested changes Sep 24, 2024
View reviewed changes
Comment thread Lib/test/test_shutil.py Outdated
except subprocess.CalledProcessError as exc:
details = exc.output.decode(errors="replace")
if 'unrecognized option: t' in details:
if re.search(r'(unrecognized|invalid) option(:| --) t', details):

@freakboy3742 freakboy3742 Sep 24, 2024

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.

While this regex works, I think it would be better to be explicit about the 2 forms of the message that we know exist, rather than try to catch all possible variations and combinations. My experience has been that tests that try t be "smart" have a nasty habit of biting you when you least expect it.

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 changes and removed awaiting review labels Sep 24, 2024
@bedevere-app

bedevere-app Bot commented Sep 24, 2024

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

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

@mhsmith
Replace regex with a simple list of strings
54fcccf
@mhsmith

mhsmith commented Sep 25, 2024

Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot added awaiting change review and removed awaiting changes labels Sep 25, 2024
@bedevere-app

bedevere-app Bot commented Sep 25, 2024

Copy link
Copy Markdown

Thanks for making the requested changes!

@freakboy3742: please review the changes made to this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app
bedevere-app Bot requested a review from freakboy3742 September 25, 2024 12:20
@mhsmith
Correct comment
f4e9207
freakboy3742
freakboy3742 approved these changes Sep 25, 2024
View reviewed changes

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

👍

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 change review labels Sep 25, 2024
@freakboy3742
freakboy3742 merged commit 461c12b into python:main Sep 25, 2024
@miss-islington-app

miss-islington-app Bot commented Sep 25, 2024

Copy link
Copy Markdown

Thanks @mhsmith for the PR, and @freakboy3742 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.

@bedevere-app bedevere-app Bot removed the awaiting merge label Sep 25, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 25, 2024
@mhsmith @miss-islington
pythongh-116622: Make test_unzip_zipfile recognize Android error mess…
a553651
…age format (pythonGH-124462)

Make test_unzip_zipfile recognize Android error message format
(cherry picked from commit 461c12b)

Co-authored-by: Malcolm Smith <[email protected]>
@bedevere-app

bedevere-app Bot commented Sep 25, 2024

Copy link
Copy Markdown

GH-124516 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 Sep 25, 2024
Yhg1s pushed a commit that referenced this pull request Sep 30, 2024
@miss-islington @mhsmith
[3.13] gh-116622: Make test_unzip_zipfile recognize Android error mes…
0a57fe3
…sage format (GH-124462) (#124516)

gh-116622: Make test_unzip_zipfile recognize Android error message format (GH-124462)

Make test_unzip_zipfile recognize Android error message format
(cherry picked from commit 461c12b)

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

Reviewers

@freakboy3742 freakboy3742 freakboy3742 approved these changes

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.

2 participants

@mhsmith @freakboy3742
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.