File tree Expand file tree Collapse file tree 4 files changed +37
-2
lines changed Expand file tree Collapse file tree 4 files changed +37
-2
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,31 @@ installation". In this case:
74
74
* If selected, the install directory will be added to the system :envvar: `PATH `
75
75
* Shortcuts are available for all users
76
76
77
+ .. _max-path :
78
+
79
+ Removing the MAX_PATH Limitation
80
+ --------------------------------
81
+
82
+ Windows historically has limited path lengths to 260 characters. This meant that
83
+ paths longer than this would not resolve and errors would result.
84
+
85
+ In the latest versions of Windows, this limitation can be expanded to
86
+ approximately 32,000 characters. Your administrator will need to activate the
87
+ "Enable Win32 long paths" group policy, or set the registry value
88
+ ``HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem@LongPathsEnabled ``
89
+ to ``1 ``.
90
+
91
+ This allows the :func: `open ` function, the :mod: `os ` module and most other
92
+ path functionality to accept and return paths longer than 260 characters when
93
+ using strings. (Use of bytes as paths is deprecated on Windows, and this feature
94
+ is not available when using bytes.)
95
+
96
+ After changing the above option, no further configuration is required.
97
+
98
+ .. versionchanged :: 3.6
99
+
100
+ Support for long paths was enabled in Python.
101
+
77
102
.. _install-quiet-option :
78
103
79
104
Installing Without UI
Original file line number Diff line number Diff line change @@ -83,6 +83,10 @@ Windows improvements:
83
83
command line arguments or a config file). Handling of shebang lines
84
84
remains unchanged - "python" refers to Python 2 in that case.
85
85
86
+ * ``python.exe `` and ``pythonw.exe `` have been marked as long-path aware,
87
+ which means that when the 260 character path limit may no longer apply.
88
+ See :ref: `removing the MAX_PATH limitation <max-path >` for details.
89
+
86
90
.. PEP-sized items next.
87
91
88
92
.. _pep-4XX :
@@ -507,7 +511,6 @@ The Linux ``getrandom()`` syscall (get random bytes) is now exposed as the new
507
511
:func: `os.getrandom ` function.
508
512
(Contributed by Victor Stinner, part of the :pep: `524 `)
509
513
510
-
511
514
pickle
512
515
------
513
516
Original file line number Diff line number Diff line change @@ -237,6 +237,8 @@ Build
237
237
Windows
238
238
-------
239
239
240
+ - Issue #27731: Opt-out of MAX_PATH on Windows 10
241
+
240
242
- Issue #6135: Adds encoding and errors parameters to subprocess.
241
243
242
244
- Issue #27959: Adds oem encoding, alias ansi to mbcs, move aliasmbcs to
Original file line number Diff line number Diff line change 16
16
<supportedOS Id =" {8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
17
17
</application >
18
18
</compatibility >
19
+ <application xmlns =" urn:schemas-microsoft-com:asm.v3" >
20
+ <windowsSettings >
21
+ <longPathAware xmlns =" http://schemas.microsoft.com/SMI/2016/WindowsSettings" >true</longPathAware >
22
+ </windowsSettings >
23
+ </application >
19
24
<dependency >
20
25
<dependentAssembly >
21
26
<assemblyIdentity type =" win32" name =" Microsoft.Windows.Common-Controls"
22
27
version =" 6.0.0.0" processorArchitecture =" *" publicKeyToken =" 6595b64144ccf1df" language =" *" />
23
28
</dependentAssembly >
24
29
</dependency >
25
- </assembly >
30
+ </assembly >
You can’t perform that action at this time.
0 commit comments