test_import: test_unwritable_module() fails on AMD64 Fedora Stable Clang Installed 3.x #83640
Copy link
Copy link
Closed
Labels
Description
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = <Date 2020-01-27.23:08:32.899>
created_at = <Date 2020-01-27.09:19:04.597>
labels = ['tests', '3.9']
title = 'test_import: test_unwritable_module() fails on AMD64 Fedora Stable Clang Installed 3.x'
updated_at = <Date 2020-01-28.22:16:12.795>
user = 'https://github.com/vstinner'bugs.python.org fields:
activity = <Date 2020-01-28.22:16:12.795>
actor = 'dino.viehland'
assignee = 'none'
closed = True
closed_date = <Date 2020-01-27.23:08:32.899>
closer = 'dino.viehland'
components = ['Tests']
creation = <Date 2020-01-27.09:19:04.597>
creator = 'vstinner'
dependencies = []
files = []
hgrepos = []
issue_num = 39459
keywords = ['patch']
message_count = 18.0
messages = ['360743', '360744', '360746', '360776', '360778', '360781', '360789', '360792', '360796', '360797', '360820', '360831', '360833', '360891', '360902', '360903', '360904', '360907']
nosy_count = 3.0
nosy_names = ['brett.cannon', 'vstinner', 'dino.viehland']
pr_nums = ['18203', '18211', '18241']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue39459'
versions = ['Python 3.9']Reactions are currently unavailable
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.