[Python-checkins] bpo-32096: Ensure new embedding test can find the encodings module (GH-4566)

Nick Coghlan webhook-mailer at python.org
Sat Nov 25 23:19:16 EST 2017


https://github.com/python/cpython/commit/4274609e1856facd80b7ee588b0791fe8963b9e0
commit: 4274609e1856facd80b7ee588b0791fe8963b9e0
branch: master
author: Nick Coghlan <ncoghlan at gmail.com>
committer: GitHub <noreply at github.com>
date: 2017-11-26T14:19:13+10:00
summary:

bpo-32096: Ensure new embedding test can find the encodings module (GH-4566)

files:
M Programs/_testembed.c

diff --git a/Programs/_testembed.c b/Programs/_testembed.c
index 52a0b5124a3..21aa76e9de3 100644
--- a/Programs/_testembed.c
+++ b/Programs/_testembed.c
@@ -132,7 +132,8 @@ static int test_forced_io_encoding(void)
 
 static int test_pre_initialization_api(void)
 {
-    wchar_t *program = Py_DecodeLocale("spam", NULL);
+    /* Leading "./" ensures getpath.c can still find the standard library */
+    wchar_t *program = Py_DecodeLocale("./spam", NULL);
     if (program == NULL) {
         fprintf(stderr, "Fatal error: cannot decode program name\n");
         return 1;



More information about the Python-checkins mailing list