Skip to content
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

fix test_site/test_startup_imports when some of the extensions are built as builtins #65422

Closed
doko42 opened this issue Apr 14, 2014 · 3 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@doko42
Copy link
Member

doko42 commented Apr 14, 2014

BPO 21223
Nosy @brettcannon, @doko42, @ncoghlan, @ericsnowcurrently

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 2014-04-15.18:50:23.090>
created_at = <Date 2014-04-14.20:25:13.763>
labels = ['type-bug', 'tests']
title = 'fix test_site/test_startup_imports when some of the extensions are built as builtins'
updated_at = <Date 2014-04-15.18:50:23.089>
user = 'https://github.com/doko42'

bugs.python.org fields:

activity = <Date 2014-04-15.18:50:23.089>
actor = 'doko'
assignee = 'none'
closed = True
closed_date = <Date 2014-04-15.18:50:23.090>
closer = 'doko'
components = ['Tests']
creation = <Date 2014-04-14.20:25:13.763>
creator = 'doko'
dependencies = []
files = []
hgrepos = []
issue_num = 21223
keywords = ['patch']
message_count = 3.0
messages = ['216200', '216224', '216359']
nosy_count = 5.0
nosy_names = ['brett.cannon', 'doko', 'ncoghlan', 'python-dev', 'eric.snow']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'patch review'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue21223'
versions = ['Python 3.4', 'Python 3.5']

@doko42
Copy link
Member Author

doko42 commented Apr 14, 2014

fix test_site/test_startup_imports when some of the extensions are built as builtins.

--- a/Lib/test/test_site.py	Mon Apr 14 12:24:37 2014 -0400
+++ b/Lib/test/test_site.py	Mon Apr 14 22:17:57 2014 +0200
@@ -459,7 +459,8 @@
         # http://bugs.python.org/issue19218>
         collection_mods = {'_collections', 'collections', 'functools',
                            'heapq', 'itertools', 'keyword', 'operator',
-                           'reprlib', 'types', 'weakref'}
+                           'reprlib', 'types', 'weakref'
+                          }.difference(sys.builtin_module_names)
         self.assertFalse(modules.intersection(collection_mods), stderr)

the test now passes indepedent of the status of _collections (builtin or extension).

@doko42 doko42 added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Apr 14, 2014
@ericsnowcurrently
Copy link
Member

Looks good to me. This should not impact the standard build, but is useful for alternate builds. Does something similar need to happen to also exclude frozen modules?

@python-dev
Copy link
Mannequin

python-dev mannequin commented Apr 15, 2014

New changeset ebb9595af548 by doko in branch '3.4':

@doko42 doko42 closed this as completed Apr 15, 2014
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants