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.

Author vstinner
Recipients CuriousLearner, serhiy.storchaka, vstinner
Date 2017-12-04.13:06:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1512392761.1.0.213398074469.issue32197@psf.upfronthosting.co.za>
In-reply-to
Content
Oh sorry, I missed the macOS failure and I wasn't available last week-end for quickly fix it. So thanks Serhiy for the revert ;-) I reapplied my changes with the following fix. test_embed randomly failed, but it's unrelated (I was able to reproduce the bug on master, with the revert):
https://bugs.python.org/issue20891#msg307550

The fix:

diff --git a/Modules/main.c b/Modules/main.c
index 84706e1e290..4095259b88c 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -901,8 +901,8 @@ config_get_program_name(_PyMainInterpreterConfig *config)
         size_t len;
         wchar_t* program_name = Py_DecodeLocale(p, &len);
         if (program_name == NULL) {
-            return SET_DECODE_ERROR("PYTHONEXECUTABLE environment "
-                                    "variable", len);
+            return DECODE_LOCALE_ERR("PYTHONEXECUTABLE environment "
+                                     "variable", (Py_ssize_t)len);
         }
         config->program_name = program_name;
     }
@@ -916,8 +916,8 @@ config_get_program_name(_PyMainInterpreterConfig *config)
             size_t len;
             wchar_t* program_name = Py_DecodeLocale(pyvenv_launcher, &len);
             if (program_name == NULL) {
-                return SET_DECODE_ERROR("__PYVENV_LAUNCHER__ environment "
-                                        "variable", len);
+                return DECODE_LOCALE_ERR("__PYVENV_LAUNCHER__ environment "
+                                         "variable", (Py_ssize_t)len);
             }
             config->program_name = program_name;
         }
History
Date User Action Args
2017-12-04 13:06:01vstinnersetrecipients: + vstinner, serhiy.storchaka, CuriousLearner
2017-12-04 13:06:01vstinnersetmessageid: <1512392761.1.0.213398074469.issue32197@psf.upfronthosting.co.za>
2017-12-04 13:06:01vstinnerlinkissue32197 messages
2017-12-04 13:06:01vstinnercreate