summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-09-07 03:40:11 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2016-09-07 03:40:11 (GMT)
commit19ab0fd456a79fa1fdfdb543ac423723667cb2d0 (patch)
tree9e0ac0a9a9945852948d90a6282f925453448b09 /Doc
parent437df905370b1f49f24c4ebce13db1ff63c3c378 (diff)
downloadcpython-19ab0fd456a79fa1fdfdb543ac423723667cb2d0.zip
cpython-19ab0fd456a79fa1fdfdb543ac423723667cb2d0.tar.gz
cpython-19ab0fd456a79fa1fdfdb543ac423723667cb2d0.tar.bz2
Issue #27731: Opt-out of MAX_PATH on Windows 10
Diffstat (limited to 'Doc')
-rw-r--r--Doc/using/windows.rst25
-rw-r--r--Doc/whatsnew/3.6.rst5
2 files changed, 29 insertions, 1 deletions
diff --git a/Doc/using/windows.rst b/Doc/using/windows.rst
index 3f6b68d..b703f0a 100644
--- a/Doc/using/windows.rst
+++ b/Doc/using/windows.rst
@@ -74,6 +74,31 @@ installation". In this case:
* If selected, the install directory will be added to the system :envvar:`PATH`
* Shortcuts are available for all users
+.. _max-path:
+
+Removing the MAX_PATH Limitation
+--------------------------------
+
+Windows historically has limited path lengths to 260 characters. This meant that
+paths longer than this would not resolve and errors would result.
+
+In the latest versions of Windows, this limitation can be expanded to
+approximately 32,000 characters. Your administrator will need to activate the
+"Enable Win32 long paths" group policy, or set the registry value
+``HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem@LongPathsEnabled``
+to ``1``.
+
+This allows the :func:`open` function, the :mod:`os` module and most other
+path functionality to accept and return paths longer than 260 characters when
+using strings. (Use of bytes as paths is deprecated on Windows, and this feature
+is not available when using bytes.)
+
+After changing the above option, no further configuration is required.
+
+.. versionchanged:: 3.6
+
+ Support for long paths was enabled in Python.
+
.. _install-quiet-option:
Installing Without UI
diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst
index fde5159..6a1eccf 100644
--- a/Doc/whatsnew/3.6.rst
+++ b/Doc/whatsnew/3.6.rst
@@ -83,6 +83,10 @@ Windows improvements:
command line arguments or a config file). Handling of shebang lines
remains unchanged - "python" refers to Python 2 in that case.
+* ``python.exe`` and ``pythonw.exe`` have been marked as long-path aware,
+ which means that when the 260 character path limit may no longer apply.
+ See :ref:`removing the MAX_PATH limitation <max-path>` for details.
+
.. PEP-sized items next.
.. _pep-4XX:
@@ -507,7 +511,6 @@ The Linux ``getrandom()`` syscall (get random bytes) is now exposed as the new
:func:`os.getrandom` function.
(Contributed by Victor Stinner, part of the :pep:`524`)
-
pickle
------