Issue35313
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.
Created on 2018-11-26 07:41 by xtreak, last changed 2022-04-11 14:59 by admin. This issue is now closed.
Pull Requests | |||
---|---|---|---|
URL | Status | Linked | Edit |
PR 10713 | merged | vstinner, 2018-11-26 10:08 | |
PR 10715 | merged | vstinner, 2018-11-26 11:16 | |
PR 10716 | merged | vstinner, 2018-11-26 11:17 |
Messages (5) | |||
---|---|---|---|
msg330406 - (view) | Author: Karthikeyan Singaravelan (xtreak) * | Date: 2018-11-26 07:41 | |
I noticed GCC related test always failing in Travis but it's optional and builds were always green. It's consistent and related to test_embed. It seems that the tests are ran from a virtual environment for GCC that causes some difference in the prefix for the new tests added in test_embed. With virtual environment prefix points to virtual environment path and not to /usr/local. Other tests are ran with built CPython and not with virtual environment hence tests pass. To reproduce this build CPython and activate a virtual environment to run test_embed under the virtual environment. I thought to file it anyway as reference and I don't know if the tests need to be fixed or Travis config. Sample failure in Travis : https://travis-ci.org/tirkarthi/cpython/builds/459615265 cpython git:(test_embed_travis) ./python.exe -m venv test_venv cpython git:(test_embed_travis) ./test_venv/bin/python -m test --fail-env-changed -v test.test_embed == CPython 3.8.0a0 (heads/master:f0e0f2008d, Nov 26 2018, 11:08:07) [Clang 7.0.2 (clang-700.1.81)] == Darwin-14.4.0-x86_64-i386-64bit little-endian == cwd: /Users/karthikeyansingaravelan/stuff/python/cpython/build/test_python_11655 == CPU count: 4 == encodings: locale=UTF-8, FS=utf-8 Run tests sequentially 0:00:00 load avg: 2.40 [1/1] test.test_embed test_bpo20891 (test.test_embed.EmbeddingTests) ... ok test_forced_io_encoding (test.test_embed.EmbeddingTests) ... ok test_initialize_pymain (test.test_embed.EmbeddingTests) ... ok test_initialize_twice (test.test_embed.EmbeddingTests) ... ok test_pre_initialization_api (test.test_embed.EmbeddingTests) ... ok test_pre_initialization_sys_options (test.test_embed.EmbeddingTests) ... ok test_subinterps_different_ids (test.test_embed.EmbeddingTests) ... ok test_subinterps_distinct_state (test.test_embed.EmbeddingTests) ... ok test_subinterps_main (test.test_embed.EmbeddingTests) ... ok test_init_default_config (test.test_embed.InitConfigTests) ... FAIL test_init_dev_mode (test.test_embed.InitConfigTests) ... FAIL test_init_env (test.test_embed.InitConfigTests) ... FAIL test_init_from_config (test.test_embed.InitConfigTests) ... FAIL test_init_global_config (test.test_embed.InitConfigTests) ... FAIL test_init_isolated (test.test_embed.InitConfigTests) ... FAIL ====================================================================== FAIL: test_init_default_config (test.test_embed.InitConfigTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_embed.py", line 488, in test_init_default_config self.check_config("init_default_config", {}) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_embed.py", line 483, in check_config self.check_core_config(config, expected, env) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_embed.py", line 450, in check_core_config self.assertEqual(core_config, expected) AssertionError: {'ins[248 chars] 0, 'coerce_c_locale': 0, 'coerce_c_locale_war[722 chars]': 0} != {'ins[248 chars] 0, 'filesystem_encoding': 'utf-8', 'filesyste[824 chars]': 0} {'_check_hash_pycs_mode': 'default', '_frozen': 0, '_install_importlib': 1, 'allocator': None, 'argv': [], 'base_exec_prefix': '/usr/local', 'base_prefix': '/usr/local', 'buffered_stdio': 1, 'bytes_warning': 0, 'coerce_c_locale': 0, 'coerce_c_locale_warn': 0, 'dev_mode': 0, 'dump_refs': 0, - 'exec_prefix': '/usr/local', + 'exec_prefix': '/Users/karthikeyansingaravelan/stuff/python/cpython/test_venv', 'faulthandler': 0, 'filesystem_encoding': 'utf-8', 'filesystem_errors': 'surrogateescape', 'hash_seed': 0, 'home': None, 'import_time': 0, 'inspect': 0, 'install_signal_handlers': 1, 'interactive': 0, 'isolated': 0, 'malloc_stats': 0, 'module_search_path_env': None, 'optimization_level': 0, 'parser_debug': 0, - 'prefix': '/usr/local', + 'prefix': '/Users/karthikeyansingaravelan/stuff/python/cpython/test_venv', 'program': None, 'program_name': './_testembed', 'pycache_prefix': None, 'quiet': 0, 'show_alloc_count': 0, 'show_ref_count': 0, 'site_import': 1, 'stdio_encoding': 'utf-8', 'stdio_errors': 'strict', 'tracemalloc': 0, 'use_environment': 1, 'use_hash_seed': 0, 'user_site_directory': 1, 'utf8_mode': 0, 'verbose': 0, 'warnoptions': [], 'write_bytecode': 1, 'xoptions': []} ====================================================================== FAIL: test_init_dev_mode (test.test_embed.InitConfigTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_embed.py", line 586, in test_init_dev_mode self.check_config("init_dev_mode", config) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_embed.py", line 483, in check_config self.check_core_config(config, expected, env) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_embed.py", line 450, in check_core_config self.assertEqual(core_config, expected) AssertionError: {'ins[251 chars] 0, 'coerce_c_locale': 0, 'coerce_c_locale_war[722 chars]': 0} != {'ins[251 chars] 0, 'filesystem_encoding': 'utf-8', 'filesyste[824 chars]': 0} {'_check_hash_pycs_mode': 'default', '_frozen': 0, '_install_importlib': 1, 'allocator': 'debug', 'argv': [], 'base_exec_prefix': '/usr/local', 'base_prefix': '/usr/local', 'buffered_stdio': 1, 'bytes_warning': 0, 'coerce_c_locale': 0, 'coerce_c_locale_warn': 0, 'dev_mode': 1, 'dump_refs': 0, - 'exec_prefix': '/usr/local', + 'exec_prefix': '/Users/karthikeyansingaravelan/stuff/python/cpython/test_venv', 'faulthandler': 1, 'filesystem_encoding': 'utf-8', 'filesystem_errors': 'surrogateescape', 'hash_seed': 0, 'home': None, 'import_time': 0, 'inspect': 0, 'install_signal_handlers': 1, 'interactive': 0, 'isolated': 0, 'malloc_stats': 0, 'module_search_path_env': None, 'optimization_level': 0, 'parser_debug': 0, - 'prefix': '/usr/local', + 'prefix': '/Users/karthikeyansingaravelan/stuff/python/cpython/test_venv', 'program': None, 'program_name': './_testembed', 'pycache_prefix': None, 'quiet': 0, 'show_alloc_count': 0, 'show_ref_count': 0, 'site_import': 1, 'stdio_encoding': 'utf-8', 'stdio_errors': 'strict', 'tracemalloc': 0, 'use_environment': 1, 'use_hash_seed': 0, 'user_site_directory': 1, 'utf8_mode': 0, 'verbose': 0, 'warnoptions': [], 'write_bytecode': 1, 'xoptions': []} ====================================================================== FAIL: test_init_env (test.test_embed.InitConfigTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_embed.py", line 578, in test_init_env self.check_config("init_env", config) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_embed.py", line 483, in check_config self.check_core_config(config, expected, env) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_embed.py", line 450, in check_core_config self.assertEqual(core_config, expected) AssertionError: {'ins[259 chars] 1, 'coerce_c_locale': 0, 'coerce_c_locale_war[743 chars]': 0} != {'ins[259 chars] 1, 'filesystem_encoding': 'utf-8', 'filesyste[845 chars]': 0} {'_check_hash_pycs_mode': 'default', '_frozen': 0, '_install_importlib': 1, 'allocator': 'malloc_debug', 'argv': [], 'base_exec_prefix': '/usr/local', 'base_prefix': '/usr/local', 'buffered_stdio': 0, 'bytes_warning': 0, 'coerce_c_locale': 0, 'coerce_c_locale_warn': 0, 'dev_mode': 1, 'dump_refs': 0, - 'exec_prefix': '/usr/local', + 'exec_prefix': '/Users/karthikeyansingaravelan/stuff/python/cpython/test_venv', 'faulthandler': 1, 'filesystem_encoding': 'utf-8', 'filesystem_errors': 'surrogateescape', 'hash_seed': 42, 'home': None, 'import_time': 1, 'inspect': 1, 'install_signal_handlers': 1, 'interactive': 0, 'isolated': 0, 'malloc_stats': 1, 'module_search_path_env': None, 'optimization_level': 2, 'parser_debug': 0, - 'prefix': '/usr/local', + 'prefix': '/Users/karthikeyansingaravelan/stuff/python/cpython/test_venv', 'program': None, 'program_name': './_testembed', 'pycache_prefix': 'env_pycache_prefix', 'quiet': 0, 'show_alloc_count': 0, 'show_ref_count': 0, 'site_import': 1, 'stdio_encoding': 'iso8859-1', 'stdio_errors': 'replace', 'tracemalloc': 2, 'use_environment': 1, 'use_hash_seed': 1, 'user_site_directory': 0, 'utf8_mode': 1, 'verbose': 1, 'warnoptions': [], 'write_bytecode': 0, 'xoptions': []} ====================================================================== FAIL: test_init_from_config (test.test_embed.InitConfigTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_embed.py", line 553, in test_init_from_config self.check_config("init_from_config", config) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_embed.py", line 483, in check_config self.check_core_config(config, expected, env) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_embed.py", line 450, in check_core_config self.assertEqual(core_config, expected) AssertionError: {'ins[260 chars] 1, 'coerce_c_locale': 0, 'coerce_c_locale_war[859 chars]': 1} != {'ins[260 chars] 1, 'filesystem_encoding': 'utf-8', 'filesyste[961 chars]': 1} {'_check_hash_pycs_mode': 'always', '_frozen': 1, '_install_importlib': 1, 'allocator': 'malloc_debug', 'argv': ['-c', 'pass'], 'base_exec_prefix': '/usr/local', 'base_prefix': '/usr/local', 'buffered_stdio': 0, 'bytes_warning': 1, 'coerce_c_locale': 0, 'coerce_c_locale_warn': 0, 'dev_mode': 0, 'dump_refs': 0, - 'exec_prefix': '/usr/local', + 'exec_prefix': '/Users/karthikeyansingaravelan/stuff/python/cpython/test_venv', 'faulthandler': 1, 'filesystem_encoding': 'utf-8', 'filesystem_errors': 'surrogateescape', 'hash_seed': 123, 'home': None, 'import_time': 1, 'inspect': 1, 'install_signal_handlers': 0, 'interactive': 1, 'isolated': 0, 'malloc_stats': 1, 'module_search_path_env': None, 'optimization_level': 2, 'parser_debug': 0, - 'prefix': '/usr/local', + 'prefix': '/Users/karthikeyansingaravelan/stuff/python/cpython/test_venv', 'program': 'conf_program', 'program_name': './conf_program_name', 'pycache_prefix': 'conf_pycache_prefix', 'quiet': 1, 'show_alloc_count': 1, 'show_ref_count': 1, 'site_import': 0, 'stdio_encoding': 'iso8859-1', 'stdio_errors': 'replace', 'tracemalloc': 2, 'use_environment': 1, 'use_hash_seed': 1, 'user_site_directory': 0, 'utf8_mode': 1, 'verbose': 1, 'warnoptions': ['default', 'error::ResourceWarning'], 'write_bytecode': 0, 'xoptions': ['core_xoption1=3', 'core_xoption2=', 'core_xoption3']} ====================================================================== FAIL: test_init_global_config (test.test_embed.InitConfigTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_embed.py", line 511, in test_init_global_config self.check_config("init_global_config", config) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_embed.py", line 483, in check_config self.check_core_config(config, expected, env) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_embed.py", line 450, in check_core_config self.assertEqual(core_config, expected) AssertionError: {'ins[248 chars] 0, 'coerce_c_locale': 0, 'coerce_c_locale_war[730 chars]': 1} != {'ins[248 chars] 0, 'filesystem_encoding': 'utf-8', 'filesyste[832 chars]': 1} {'_check_hash_pycs_mode': 'default', '_frozen': 1, '_install_importlib': 1, 'allocator': None, 'argv': [], 'base_exec_prefix': '/usr/local', 'base_prefix': '/usr/local', 'buffered_stdio': 0, 'bytes_warning': 1, 'coerce_c_locale': 0, 'coerce_c_locale_warn': 0, 'dev_mode': 0, 'dump_refs': 0, - 'exec_prefix': '/usr/local', + 'exec_prefix': '/Users/karthikeyansingaravelan/stuff/python/cpython/test_venv', 'faulthandler': 0, 'filesystem_encoding': 'utf-8', 'filesystem_errors': 'surrogateescape', 'hash_seed': 0, 'home': None, 'import_time': 0, 'inspect': 1, 'install_signal_handlers': 1, 'interactive': 1, 'isolated': 0, 'malloc_stats': 0, 'module_search_path_env': None, 'optimization_level': 2, 'parser_debug': 0, - 'prefix': '/usr/local', + 'prefix': '/Users/karthikeyansingaravelan/stuff/python/cpython/test_venv', 'program': None, 'program_name': './globalvar', 'pycache_prefix': None, 'quiet': 1, 'show_alloc_count': 0, 'show_ref_count': 0, 'site_import': 0, 'stdio_encoding': 'utf-8', 'stdio_errors': 'surrogateescape', 'tracemalloc': 0, 'use_environment': 1, 'use_hash_seed': 0, 'user_site_directory': 0, 'utf8_mode': 1, 'verbose': 1, 'warnoptions': [], 'write_bytecode': 0, 'xoptions': []} ====================================================================== FAIL: test_init_isolated (test.test_embed.InitConfigTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_embed.py", line 594, in test_init_isolated self.check_config("init_isolated", config) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_embed.py", line 483, in check_config self.check_core_config(config, expected, env) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_embed.py", line 450, in check_core_config self.assertEqual(core_config, expected) AssertionError: {'ins[248 chars] 0, 'coerce_c_locale': 0, 'coerce_c_locale_war[722 chars]': 0} != {'ins[248 chars] 0, 'filesystem_encoding': 'utf-8', 'filesyste[824 chars]': 0} {'_check_hash_pycs_mode': 'default', '_frozen': 0, '_install_importlib': 1, 'allocator': None, 'argv': [], 'base_exec_prefix': '/usr/local', 'base_prefix': '/usr/local', 'buffered_stdio': 1, 'bytes_warning': 0, 'coerce_c_locale': 0, 'coerce_c_locale_warn': 0, 'dev_mode': 0, 'dump_refs': 0, - 'exec_prefix': '/usr/local', + 'exec_prefix': '/Users/karthikeyansingaravelan/stuff/python/cpython/test_venv', 'faulthandler': 0, 'filesystem_encoding': 'utf-8', 'filesystem_errors': 'surrogateescape', 'hash_seed': 0, 'home': None, 'import_time': 0, 'inspect': 0, 'install_signal_handlers': 1, 'interactive': 0, 'isolated': 1, 'malloc_stats': 0, 'module_search_path_env': None, 'optimization_level': 0, 'parser_debug': 0, - 'prefix': '/usr/local', + 'prefix': '/Users/karthikeyansingaravelan/stuff/python/cpython/test_venv', 'program': None, 'program_name': './_testembed', 'pycache_prefix': None, 'quiet': 0, 'show_alloc_count': 0, 'show_ref_count': 0, 'site_import': 1, 'stdio_encoding': 'utf-8', 'stdio_errors': 'strict', 'tracemalloc': 0, 'use_environment': 0, 'use_hash_seed': 0, 'user_site_directory': 0, 'utf8_mode': 0, 'verbose': 0, 'warnoptions': [], 'write_bytecode': 1, 'xoptions': []} ---------------------------------------------------------------------- Ran 15 tests in 11.761s FAILED (failures=6) test test.test_embed failed test.test_embed failed == Tests result: FAILURE == 1 test failed: test.test_embed Total duration: 11 sec 931 ms Tests result: FAILURE |
|||
msg330416 - (view) | Author: STINNER Victor (vstinner) * | Date: 2018-11-26 10:54 | |
New changeset a6537fb7c2f7a007b4ab616c4617afd56d18347d by Victor Stinner in branch 'master': bpo-35313: Fix test_embed when run from venv (GH-10713) https://github.com/python/cpython/commit/a6537fb7c2f7a007b4ab616c4617afd56d18347d |
|||
msg330424 - (view) | Author: STINNER Victor (vstinner) * | Date: 2018-11-26 11:37 | |
New changeset f0b366a8d7e0f12d4448f570e990de414f4afca7 by Victor Stinner in branch 'master': bpo-35313: Cleanup test_embed.py (GH-10716) https://github.com/python/cpython/commit/f0b366a8d7e0f12d4448f570e990de414f4afca7 |
|||
msg330425 - (view) | Author: STINNER Victor (vstinner) * | Date: 2018-11-26 11:38 | |
Thanks for the bug report, it should now be fixed :-) |
|||
msg330426 - (view) | Author: STINNER Victor (vstinner) * | Date: 2018-11-26 11:42 | |
New changeset e88553c3742507ba83590ecca44ae7f134f38410 by Victor Stinner in branch '3.7': bpo-35313: Fix test_embed when run from venv (GH-10713) (GH-10715) https://github.com/python/cpython/commit/e88553c3742507ba83590ecca44ae7f134f38410 |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:59:08 | admin | set | github: 79494 |
2018-11-26 11:42:09 | vstinner | set | messages: + msg330426 |
2018-11-26 11:38:04 | vstinner | set | status: open -> closed versions: + Python 3.7 messages: + msg330425 resolution: fixed stage: patch review -> resolved |
2018-11-26 11:37:37 | vstinner | set | messages: + msg330424 |
2018-11-26 11:17:20 | vstinner | set | pull_requests: + pull_request9965 |
2018-11-26 11:16:38 | vstinner | set | pull_requests: + pull_request9964 |
2018-11-26 10:54:16 | vstinner | set | messages: + msg330416 |
2018-11-26 10:08:36 | vstinner | set | keywords:
+ patch stage: patch review pull_requests: + pull_request9962 |
2018-11-26 07:41:08 | xtreak | create |