Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-93096: fixtest_mimetypes.test_guess_type_conflicting_with_mimetypes#131408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

picnixz
Copy link
Member

@picnixzpicnixz commentedMar 18, 2025
edited
Loading

Usingrun_python_until_end() ignoressetUpModule(). In particular, mockingmimetypes.knownfiles has no effect for the CLI tests and leads to issues on platforms defining non-standard MIME types such as macOS or openSUSE.

I think this was overlooked in#93097 and this may be the reason why finding the correct extension was tedious. Now, all platforms should support the test correctly (previously, the macOS files were still looked up asmimetypes.knownfiles was not unset for CLI tests).

Using `run_python_until_end()` ignores `setUpModule()`. In particular,mocking `mimetypes.knownfiles` has no effect for the CLI tests andleads to issues on platforms defining non-standard MIME types suchas macOS or openSUSE.
@picnixz
Copy link
MemberAuthor

!buildbot macOS

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@picnixz for commit62863a0 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F131408%2Fmerge

The command will test the builders whose names match following regular expression:macOS

The builders matched are:

  • x86-64 MacOS Intel NoGIL PR
  • x86-64 macOS PR
  • ARM64 MacOS M1 NoGIL PR
  • x86-64 MacOS Intel ASAN NoGIL PR
  • ARM64 MacOS M1 Refleaks NoGIL PR
  • ARM64 macOS PR

@picnixz
Copy link
MemberAuthor

!buildbot macOS

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@picnixz for commit7be23f0 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F131408%2Fmerge

The command will test the builders whose names match following regular expression:macOS

The builders matched are:

  • x86-64 MacOS Intel NoGIL PR
  • x86-64 macOS PR
  • ARM64 MacOS M1 NoGIL PR
  • x86-64 MacOS Intel ASAN NoGIL PR
  • ARM64 MacOS M1 Refleaks NoGIL PR
  • ARM64 macOS PR

@picnixzpicnixz requested a review fromhugovkMarch 23, 2025 13:05
@picnixz
Copy link
MemberAuthor

@hugovk friendly ping (I hope we can ship it before the release as it could affect openSUSE users)

hugovk reacted with eyes emoji

Copy link
Member

@AA-TurnerAA-Turner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

An alternative solution tosys.exit() with a string or the esotericparser.exit() would just be to directly raiseSystemExit, would this work?:

@picnixzpicnixz requested a review fromAA-TurnerApril 8, 2025 08:36
@picnixz
Copy link
MemberAuthor

Mmh the CI seems to hang?

Copy link
Member

@hugovkhugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thank you!

@hugovkhugovkenabled auto-merge (squash)April 8, 2025 09:07
@picnixz
Copy link
MemberAuthor

Ah I wanted to write the commit message :') but you beat me to it

hugovk reacted with rocket emoji

@hugovkhugovk merged commit53908bd intopython:mainApr 8, 2025
42 checks passed
@picnixzpicnixz deleted the fix/test/conflicting-mime-types-93096 branchApril 8, 2025 09:16
@picnixz
Copy link
MemberAuthor

Hum:

FAIL: test_invocation_error (test.test_mimetypes.CommandLineTest.test_invocation_error)----------------------------------------------------------------------Traceback (most recent call last):  File "/Users/buildbot/Library/Developer/XCTestDevices/D0521D50-377E-44CF-8CFA-3BC0FF6BF873/data/Containers/Bundle/Application/F1096A52-2582-4077-A71C-A6AFE9D885CD/iOSTestbed.app/python/lib/python3.14/test/test_mimetypes.py", line 435, in test_invocation_error    with self.assertRaisesRegex(SystemExit, expected):         ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^AssertionError: SystemExit not raised

This is on iOS ARM64. Let's just skip this one on this maybe.

seehwan pushed a commit to seehwan/cpython that referenced this pull requestApr 16, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@hugovkhugovkhugovk approved these changes

@AA-TurnerAA-TurnerAwaiting requested review from AA-Turner

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@picnixz@bedevere-bot@hugovk@AA-Turner

[8]ページ先頭

©2009-2025 Movatter.jp