You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.9/test/test_import/__init__.py", line 1347, in test_unwritable_moduleimport test.test_import.data.unwritable as unwritable
ModuleNotFoundError: No module named 'test.test_import.data.unwritable'
bpo-39336: Allow packages to not let their child modules be set on them (bpo-18006)
* bpo-39336: Allow setattr to fail on modules which aren't assignable
When attaching a child module to a package if the object in sys.modules raises an Attribu
teError (e.g. because it is immutable) it causes the whole import to fail. This now allows i
mmutable packages to exist and an ImportWarning is reported and the AttributeError exception
is ignored.
Maybe this failure comes from the fact that the test suite was run as the root user. I wrote PR 18203 to log the effective uid and gid in pythoninfo, to learn more about this issue.
The Windows installer copies Lib/test/ and subdirectories: see <InstallFiles Include="$(PySourcePath)Lib\test\**\*" ...> in Tools/msi/test/test.wixproj.
Activity
vstinner commentedon Jan 27, 2020
AMD64 Fedora Stable Clang Installed 3.x:
https://buildbot.python.org/all/#/builders/127/builds/212
test_unwritable_module (test.test_import.CircularImportTests) ... ERROR
======================================================================
ERROR: test_unwritable_module (test.test_import.CircularImportTests)
----------------------------------------------------------------------
vstinner commentedon Jan 27, 2020
Test added in bpo-39336 by:
commit 9b6fec4
Author: Dino Viehland <dinoviehland@gmail.com>
Date: Wed Jan 22 16:42:38 2020 -0800
teError (e.g. because it is immutable) it causes the whole import to fail. This now allows i
mmutable packages to exist and an ImportWarning is reported and the AttributeError exception
is ignored.
vstinner commentedon Jan 27, 2020
Same error on x86 Gentoo Installed with X 3.x:
https://buildbot.python.org/all/#/builders/128/builds/204
vstinner commentedon Jan 27, 2020
Issue also seen when building Python 3.9.0a3 on Fedora Rawhide:
https://src.fedoraproject.org/rpms/python39/pull-request/16
Logs: https://jenkins-continuous-infra.apps.ci.centos.org/job/fedora-rawhide-pr-pipeline/2558/artifact/package-tests/logs/console.log
pythoninfo:
vstinner commentedon Jan 27, 2020
Maybe this failure comes from the fact that the test suite was run as the root user. I wrote PR 18203 to log the effective uid and gid in pythoninfo, to learn more about this issue.
vstinner commentedon Jan 27, 2020
New changeset 4a46adc by Victor Stinner in branch 'master':
bpo-39459: test.pythoninfo logs effective uid/gid (GH-18203)
4a46adc
DinoV commentedon Jan 27, 2020
The curious thing about this is other tests in CircularImportTests are importing packages from test.test_import.data in the exact same way.
vstinner commentedon Jan 27, 2020
So, I added effective uid/gid to pythoninfo, here you have:
os.getegid: 1000
os.geteuid: 1000
os.getgid: 1000
os.getgrouplist: 1000
os.getgroups: 1000
os.getresgid: (1000, 1000, 1000)
os.getresuid: (1000, 1000, 1000)
os.getuid: 1000
There is nothing related to root (uid 0).
brettcannon commentedon Jan 27, 2020
Was the Makefile updated to install Lib/test/test_import/date/unwritable?
DinoV commentedon Jan 27, 2020
Ahh, that's probably it Brett, I didn't know that was there, thanks!
DinoV commentedon Jan 27, 2020
I've added the files to the makefile and AMD64 Fedora Stable Clang Installed 3.x was passing.
vstinner commentedon Jan 28, 2020
commit 2528a6c
Author: Dino Viehland <dinoviehland@gmail.com>
Date: Mon Jan 27 14:04:56 2020 -0800
vstinner commentedon Jan 28, 2020
Thanks for the fix! I didn't notice that only "Installed" buildbot workers were impacted.
brettcannon commentedon Jan 28, 2020
Did the Windows-equivalent project files also get updated?
DinoV commentedon Jan 28, 2020
New changeset 0cd5bff by Dino Viehland in branch 'master':
bpo-39459: include missing test files in windows installer
0cd5bff
DinoV commentedon Jan 28, 2020
Nope, thank you for pointing that out. I've updated them now with PR 18241
vstinner commentedon Jan 28, 2020
The Windows installer copies Lib/test/ and subdirectories: see <InstallFiles Include="$(PySourcePath)Lib\test\**\*" ...> in Tools/msi/test/test.wixproj.
DinoV commentedon Jan 28, 2020
I guess the update to lib.pyproj probably just makes the files show up when opening the solution in Visual Studio then.