Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(86)

#27781: Change sys.getfilesystemencoding() on Windows to UTF-8

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year, 2 months ago by steve.dower
Modified:
1 year, 1 month ago
Reviewers:
eryksun+pybugs
CC:
brett.cannon, pmoore, mark.dickinson, Nick Coghlan, haypo, tim.golden, jkloth, ned.deily, devnull_psf.upfronthosting.co.za, Zach Ware, steve.dower, Chi Hsuan Yen, Decorater
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/sys.rst View 1 1 chunk +12 lines, -0 lines 0 comments Download
Doc/whatsnew/3.6.rst View 1 3 chunks +28 lines, -1 line 0 comments Download
Include/fileobject.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
Include/unicodeobject.h View 1 3 chunks +2 lines, -6 lines 0 comments Download
Lib/os.py View 1 1 chunk +1 line, -4 lines 0 comments Download
Lib/test/test_os.py View 1 12 chunks +22 lines, -91 lines 0 comments Download
Misc/NEWS View 1 3 chunks +4 lines, -2 lines 0 comments Download
Modules/_codecsmodule.c View 1 4 chunks +4 lines, -4 lines 0 comments Download
Modules/clinic/_codecsmodule.c.h View 1 7 chunks +9 lines, -9 lines 0 comments Download
Modules/clinic/posixmodule.c.h View 1 7 chunks +78 lines, -20 lines 0 comments Download
Modules/overlapped.c View 1 1 chunk +5 lines, -5 lines 0 comments Download
Modules/posixmodule.c View 1 81 chunks +301 lines, -656 lines 3 comments Download
Objects/unicodeobject.c View 1 10 chunks +27 lines, -19 lines 0 comments Download
Python/bltinmodule.c View 1 1 chunk +5 lines, -3 lines 0 comments Download
Python/pylifecycle.c View 1 4 chunks +20 lines, -0 lines 0 comments Download
Python/sysmodule.c View 1 5 chunks +48 lines, -2 lines 0 comments Download

Messages

Total messages: 1
eryksun+pybugs_gmail.com
1 year, 1 month ago #1
http://bugs.python.org/review/27781/diff/18372/Modules/posixmodule.c
File Modules/posixmodule.c (right):

http://bugs.python.org/review/27781/diff/18372/Modules/posixmodule.c#newcode7183
Modules/posixmodule.c:7183: if (!check_CreateSymbolicLink()) {
CreateSymbolicLink was added in Vista. You can remove this check and the late
binding of Py_CreateSymbolicLinkW.

http://bugs.python.org/review/27781/diff/18372/Modules/posixmodule.c#newcode7188
Modules/posixmodule.c:7188: if (!win32_can_symlink) {
The enable_symlink() function was never necessary. CreateSymbolicLink is one of
the unusual APIs that automatically enables and disables its gating privilege.
(I don't know why the Windows team at Microsoft didn't make it enabled as the
default for tokens that have the privilege.) 

Also, if the current token doesn't have the required privilege, the default
error message is perfectly fine: "A required privilege is not held by the
client". It doesn't take a rocket scientist to figure out which privilege the
error is talking about.

http://bugs.python.org/review/27781/diff/18372/Modules/posixmodule.c#newcode1...
Modules/posixmodule.c:11400: path = PyUnicode_AsUnicode(self->path);
For self->narrow this needs to call PyUnicode_DecodeFSDefault -- assuming you're
implementing bytes paths for scandir.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7