This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_from_import_missing_attr_has_name_and_so_path fails when select is a builtin instead of an extension
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: barry Nosy List: barry, brett.cannon, doko, eric.snow, ncoghlan, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2018-05-11 16:07 by doko, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 6797 merged barry, 2018-05-14 14:29
PR 6869 merged miss-islington, 2018-05-15 18:42
Messages (6)
msg316403 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2018-05-11 16:07
======================================================================
ERROR: test_from_import_missing_attr_has_name_and_so_path (test.test_import.ImportTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/test/test_import/__init__.py", line 98, in test_from_import_missing_attr_has_name_and_so_path
    self.assertEqual(cm.exception.path, select.__file__)
AttributeError: module 'select' has no attribute '__file__'

----------------------------------------------------------------------
Ran 75 tests in 0.618s

FAILED (errors=1, skipped=1)
test test_import failed
msg316509 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2018-05-14 14:27
It seems pretty easy to use an extension module that's less likely to be built-in.  What about binascii?
msg316514 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2018-05-14 14:57
binascii gets built-in too, so it seems like _hashlib is a good choice.
msg316560 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-05-14 19:36
I think that in any case this test should be marked as CPython-only.
msg316691 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2018-05-15 18:41
New changeset 8709b236fc997077d24b4802320db287640f82e2 by Barry Warsaw in branch 'master':
bpo-33465: Use an unlikely to be built-in C extension in a test (#6797)
https://github.com/python/cpython/commit/8709b236fc997077d24b4802320db287640f82e2
msg316731 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2018-05-15 21:24
New changeset 2cdb70ac5df30db021417ab71a327d9b4322de13 by Barry Warsaw (Miss Islington (bot)) in branch '3.7':
bpo-33465: Use an unlikely to be built-in C extension in a test (GH-6797) (#6869)
https://github.com/python/cpython/commit/2cdb70ac5df30db021417ab71a327d9b4322de13
History
Date User Action Args
2022-04-11 14:59:00adminsetgithub: 77646
2018-05-15 21:24:46barrysetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-05-15 21:24:29barrysetmessages: + msg316731
2018-05-15 18:44:50brett.cannonsetassignee: barry
2018-05-15 18:42:26miss-islingtonsetpull_requests: + pull_request6543
2018-05-15 18:41:16barrysetmessages: + msg316691
2018-05-14 19:36:54serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg316560
2018-05-14 14:57:27barrysetmessages: + msg316514
2018-05-14 14:29:54barrysetkeywords: + patch
stage: patch review
pull_requests: + pull_request6482
2018-05-14 14:27:25barrysetmessages: + msg316509
2018-05-11 16:09:09barrysetnosy: + barry
2018-05-11 16:07:04dokocreate