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 ncoghlan
Recipients brett.cannon, christian.heimes, eryksun, larry, ncoghlan, nedbat, petr.viktorin, steve.dower
Date 2018-01-20.02:47:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1516416463.36.0.467229070634.issue32551@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks Larry - I've reduced the priority accordingly.

While the NEWS entry sounds a bit complicated, the actual fix is nicely self-contained: it's all within Modules/main.c, and relates to how that manipulates sys.argv[0] during startup.

Historically, the code would put a potentially incorrect entry into sys.path[0], then amend it later (and that amendment step could sometimes do the wrong thing), but after this patch, it stores the candidate entry in a local C variable and adds it to the path only after it knows it's correct to do so.

The backport also comes with test cases to ensure everything's working as we expect, and this is the code that 3.6 has been using since its release.
History
Date User Action Args
2018-01-20 02:47:43ncoghlansetrecipients: + ncoghlan, brett.cannon, larry, christian.heimes, nedbat, petr.viktorin, eryksun, steve.dower
2018-01-20 02:47:43ncoghlansetmessageid: <1516416463.36.0.467229070634.issue32551@psf.upfronthosting.co.za>
2018-01-20 02:47:43ncoghlanlinkissue32551 messages
2018-01-20 02:47:42ncoghlancreate