GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Opt-out of MAX_PATH on Windows 10 · Issue #71918 · python/cpython

Opt-out of MAX_PATH on Windows 10 #71918

New issue
Copy link
New issue
Copy link
Closed
Closed
Opt-out of MAX_PATH on Windows 10#71918
Copy link
Assignees
zooba
Labels
OS-windowstype-featureA feature request or enhancementA feature request or enhancement

Description

@zooba
zooba
opened on Aug 10, 2016
Issue body actions
BPO 27731
Nosy @brettcannon, @pfmoore, @vsajip, @pitrou, @vstinner, @tjguk, @zware, @eryksun, @zooba

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/zooba'
closed_at = <Date 2016-09-07.05:44:31.528>
created_at = <Date 2016-08-10.23:09:48.215>
labels = ['type-feature', 'OS-windows']
title = 'Opt-out of MAX_PATH on Windows 10'
updated_at = <Date 2016-09-07.05:44:31.527>
user = 'https://github.com/zooba'

bugs.python.org fields:

activity = <Date 2016-09-07.05:44:31.527>
actor = 'steve.dower'
assignee = 'steve.dower'
closed = True
closed_date = <Date 2016-09-07.05:44:31.528>
closer = 'steve.dower'
components = ['Windows']
creation = <Date 2016-08-10.23:09:48.215>
creator = 'steve.dower'
dependencies = []
files = []
hgrepos = []
issue_num = 27731
keywords = []
message_count = 12.0
messages = ['272385', '272939', '272960', '273054', '273060', '273061', '273067', '274312', '274313', '274319', '274631', '274743']
nosy_count = 10.0
nosy_names = ['brett.cannon', 'paul.moore', 'vinay.sajip', 'pitrou', 'vstinner', 'tim.golden', 'python-dev', 'zach.ware', 'eryksun', 'steve.dower']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue27731'
versions = ['Python 3.6']

Activity

  1. zooba commented on Aug 10, 2016

    @zooba
    zooba
    on Aug 10, 2016
    MemberAuthor
    More actions

    According to https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx we can opt-out of MAX_PATH limitations on a selection of functions on the latest version of Windows 10. This will allow unprefixed paths (i.e. no "\\?\") to exceed 260 characters for many common functions.

    I will enable this for Python 3.6.

  2. zooba
    self-assigned this
    on Aug 10, 2016
  3. zooba
    added
    OS-windows
    type-featureA feature request or enhancementA feature request or enhancement
    on Aug 10, 2016
  4. vstinner commented on Aug 17, 2016

    @vstinner
    vstinner
    on Aug 17, 2016
    Member
    More actions

    Hum, but we use the same binary (.exe) for all Windows versions. Does it mean that we drop support for Windows < 10 in Python 3.6?

  5. zooba commented on Aug 17, 2016

    @zooba
    zooba
    on Aug 17, 2016
    MemberAuthor
    More actions

    No, the flag that we add to the binary is backwards compatible. Earlier versions will just ignore it.

  6. pitrou commented on Aug 18, 2016

    @pitrou
    pitrou
    on Aug 18, 2016
    Member
    More actions

    This is great! Will it apply to third-party C extensions loaded into Python?

  7. vstinner commented on Aug 18, 2016

    @vstinner
    vstinner
    on Aug 18, 2016
    Member
    More actions

    Steve Dower added the comment:

    No, the flag that we add to the binary is backwards compatible. Earlier
    versions will just ignore it.

    Cool.

  8. zooba commented on Aug 18, 2016

    @zooba
    zooba
    on Aug 18, 2016
    MemberAuthor
    More actions

    Will it apply to third-party C extensions loaded into Python?

    Yes, anything running under the python.exe will get it for free.

    (Non-standard entry points will need to add the flag themselves.)

  9. eryksun commented on Aug 18, 2016

    @eryksun
    eryksun
    on Aug 18, 2016
    Contributor
    More actions

    anything running under the python.exe will get it for free.

    py.exe may as well get the manifest setting, but it's not critical. It isn't common to store scripts in deeply nested paths. The same goes for the distlib launchers that pip uses for entry points since they have to open themselves.

  10. zooba commented on Sep 3, 2016

    @zooba
    zooba
    on Sep 3, 2016
    MemberAuthor
    More actions

    Just discovered that this actually requires enabling the group policy for long paths - specifically setting HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem@LongPathsEnabled to 1.

    Apparently the manifest is also required, but in my testing the manifest is ignored and we just get long path support for free. So perhaps we should just add a message to file exceptions when the path is >260?

  11. zooba commented on Sep 3, 2016

    @zooba
    zooba
    on Sep 3, 2016
    MemberAuthor
    More actions

    More info at https://blogs.msdn.microsoft.com/jeremykuhne/2016/07/30/net-4-6-2-and-long-paths-on-windows-10/

  12. brettcannon commented on Sep 3, 2016

    @brettcannon
    brettcannon
    on Sep 3, 2016
    Member
    More actions

    SGTM

  13. zooba commented on Sep 6, 2016

    @zooba
    zooba
    on Sep 6, 2016
    MemberAuthor
    More actions

    Just confirmed that the manifest not being required is a bug, so I'll add it, document it and complete this.

  14. python-dev commented on Sep 7, 2016

    @python-dev
    python-devmannequin
    on Sep 7, 2016
    Mannequin
    More actions

    New changeset 26601191b368 by Steve Dower in branch 'default':
    Issue bpo-27731: Opt-out of MAX_PATH on Windows 10
    https://hg.python.org/cpython/rev/26601191b368

  15. zooba
    closed this as completedon Sep 7, 2016
  16. ezio-melotti
    transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @zooba
    zooba

Labels

OS-windowstype-featureA feature request or enhancementA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.