-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-62824: Adjust test_alias_modules_exist test to allow .pyc codec files #134777
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…dec files In Fedora, we install many codecs as .pyc files to save space. This test was failing when running from installed Python: ====================================================================== FAIL: test_alias_modules_exist (test.test_codecs.TransformCodecTest.test_alias_modules_exist) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib64/python3.14/test/test_codecs.py", line 3115, in test_alias_modules_exist self.assertTrue(os.path.isfile(codec_file), ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "Codec file not found: " + codec_file) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: False is not true : Codec file not found: /usr/lib64/python3.14/encodings/cp037.py ----------------------------------------------------------------------
I think it would be better to not go look for module files (they can also be frozen or in a ZIP file), but instead try to import them. |
15dd8af
to
21c1e40
Compare
Indeed. I added a commit to switch to |
Do you want to add a news entry or should we skip this ? |
I assumed this is a skip news material. |
I added the label, but the branch is out of date. Could you please rebase it ? |
Ah, all good now. |
Thanks for the fix, @hroncok |
Can we get a backport for 3.14 please? |
Thanks @hroncok for the PR, and @malemburg for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
…nstead of file checks (pythonGH-134777) (cherry picked from commit 8704d6b) Co-authored-by: Miro Hrončok <miro@hroncok.cz>
GH-134781 is a backport of this pull request to the 3.14 branch. |
In Fedora, we install many codecs as .pyc files to save space.
This test was failing when running from installed Python: