[issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix

2016-09-09 Thread Steve Dower

Steve Dower added the comment:

Given that Windows 10 already supports this without us having to do the 
processing ourselves (see issue27731), I don't see us implementing this.

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix

2016-08-03 Thread Eryk Sun

Eryk Sun added the comment:

Apparently CoreFX adds the \\?\ prefix automatically:

https://blogs.msdn.microsoft.com/jeremykuhne/2016/06/21/more-on-new-net-path-handling

It's great that Windows 10 Anniversary Edition will be getting long path 
support without requiring the extended path prefix, at least for NTFS volumes. 
I assume that includes slash-to-backslash normalization, relative paths, and 
drive-relative paths. I wonder about long drive-relative paths since they 
depend on hidden environment variables such as "=D:". The default environment 
block isn't that big.

Python 3.5 supports back to Vista, so I still think automatically handling long 
Unicode paths, like how CoreFX reportedly works, makes for a more friendly 
cross-platform development experience. There are too many pitfalls with \\?\ 
paths -- they have to be Unicode (except that limitation is removed in Windows 
10), fully qualified, use backslash only, and UNC paths have to be translated 
to use the \\?\UNC DOS device.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix

2016-08-03 Thread Steve Dower

Steve Dower added the comment:

Just as a data point, the .NET Framework's latest version removes all of their 
extra path processing and lets Win32 do the validation/normalization (that is, 
they used to do what we're considering, but now match our behaviour).

https://blogs.msdn.microsoft.com/dotnet/2016/08/02/announcing-net-framework-4-6-2/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix

2016-08-03 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +Aaron.Meurer, Voo, daniel.ugra, eryksun, ezio.melotti, haypo, jens, 
loewis, pitrou, santoso.wijaya, serhiy.storchaka, steve.dower, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix

2016-08-03 Thread Berker Peksag

Changes by Berker Peksag :


--
Removed message: http://bugs.python.org/msg271888

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix

2016-08-03 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy:  -luisa.sam...@gmail.com

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix

2016-08-03 Thread Luisa

Luisa added the comment:

Long Path Tool is the perfect utility that can solve all the long path issues. 
It can help you remove blocked files or too long path files. You can easily fix 
file errors with this software.

--
nosy: +luisa.sam...@gmail.com -Aaron.Meurer, Voo, daniel.ugra, eryksun, 
ezio.melotti, haypo, jens, loewis, pitrou, santoso.wijaya, serhiy.storchaka, 
steve.dower, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix

2016-02-26 Thread Ugra Dániel

Changes by Ugra Dániel :


--
nosy: +daniel.ugra

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix

2016-02-10 Thread Jens Diemer

Jens Diemer added the comment:

I have made https://github.com/jedie/pathlib_revised to address this, see: 
https://github.com/jedie/pathlib_revised#windows-max_path

The idea is to add a property (I call it 'extended_path') and this will add the 
\\?\ prefix on all absolute path under windows. Under non-Windows the property 
will return ".path"
And i patch methods like 'chmod', 'unlink', 'rename' etc. to use the 
'extended_path' property and i add more methods like 'link', 'listdir', 
'copyfile' etc.

The source code is here: 
https://github.com/jedie/pathlib_revised/blob/master/pathlib_revised/pathlib.py

This is another thing: Why are not all filesystem access methods implemented in 
pathlib?!?
e.g.: There is Path.unlink() but no Path.link()
There is Path.rmdir() but no Path.chdir()
and many more.

And the last thing is: Why is pathlib so bad designed? It's ugly to extend it. 
But this address: https://bugs.python.org/issue24132

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix

2016-02-10 Thread Eryk Sun

Eryk Sun added the comment:

> There is a problem with os.chdir(): It doesn't work with
> \\?\ notation.

The process current directory is part of the Windows API, so it's subject to 
the MAX_PATH limit [1]. See SetCurrentDirectory [2]. Python can't do anything 
about this. 

As to shutil.rmtree, I agree it's an example of why the Windows path-length 
problem needs to be addressed more generally. Maybe there could be a __path__ 
special method supported by pathlib paths. On Windows this could resolve to an 
absolute path prefixed with "\\?\".

[1]: Native NT relative paths are relative to a handle in the 
 OBJECT_ATTRIBUTES record that's used to create or open an 
 object. This isn't generally exposed in the Windows API, 
 except in the registry API.
[2]: https://msdn.microsoft.com/en-us/library/aa365530

--
nosy: +eryksun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix

2016-02-05 Thread Jens Diemer

Jens Diemer added the comment:

I also with this problems.

I have made a test script.

There is a problem with os.chdir(): It doesn't work with \\?\ notation.
And there is also a problem, if you use 

```
import os
import pathlib
import tempfile

with tempfile.TemporaryDirectory(prefix="path_test_") as path:
new_path = pathlib.Path(path, "A"*255, "B"*255)
extended_path = "?\\%s" % new_path
os.makedirs(extended_path)
print(len(extended_path), extended_path)
```
os.makedirs() will work, but the cleanup will failed.
Output is:
```
567 
\\?\C:\Users\jens\AppData\Local\Temp\path_test_8fe6utdz\AAA\BBB
Traceback (most recent call last):
  File "D:\test2.py", line 18, in 
print(len(extended_path), extended_path)
  File "C:\Program Files (x86)\Python35-32\lib\tempfile.py", line 807, in 
__exit__
self.cleanup()
  File "C:\Program Files (x86)\Python35-32\lib\tempfile.py", line 811, in 
cleanup
_shutil.rmtree(self.name)
  File "C:\Program Files (x86)\Python35-32\lib\shutil.py", line 488, in rmtree
return _rmtree_unsafe(path, onerror)
  File "C:\Program Files (x86)\Python35-32\lib\shutil.py", line 383, in 
_rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
  File "C:\Program Files (x86)\Python35-32\lib\shutil.py", line 381, in 
_rmtree_unsafe
os.unlink(fullname)
FileNotFoundError: [WinError 3] Das System kann den angegebenen Pfad nicht 
finden: 
'C:\\Users\\jens\\AppData\\Local\\Temp\\path_test_8fe6utdz\\AAA'
```

--
nosy: +jens
Added file: http://bugs.python.org/file41820/test.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18199] Windows: support path longer than 260 bytes using \\?\ prefix

2015-02-25 Thread Aaron Meurer

Changes by Aaron Meurer asmeu...@gmail.com:


--
nosy: +Aaron.Meurer

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18199
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18199] Windows: support path longer than 260 bytes using \\?\ prefix

2014-09-30 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
components:  -Unicode

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18199
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18199] Windows: support path longer than 260 bytes using \\?\ prefix

2014-08-10 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy: +steve.dower, zach.ware -brian.curtin
versions: +Python 3.5 -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18199
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18199] Windows: support path longer than 260 bytes using \\?\ prefix

2013-10-24 Thread Tim Golden

Changes by Tim Golden m...@timgolden.me.uk:


--
nosy:  -tim.golden

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18199
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18199] Windows: support path longer than 260 bytes using \\?\ prefix

2013-10-24 Thread Santoso Wijaya

Changes by Santoso Wijaya santoso.wij...@gmail.com:


--
nosy: +santa4nt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18199
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18199] Windows: support path longer than 260 bytes using \\?\ prefix

2013-06-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Well, the problem, as you point out, is that \\?\ only works with absolute 
paths, but the stdlib currently works with both absolute and relative paths.
The only reasonable solution right now is to prepend the \\?\ prefix yourself 
(after having resolved the path to absolute).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18199
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18199] Windows: support path longer than 260 bytes using \\?\ prefix

2013-06-13 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
title: No long filename support for Windows - Windows: support path longer 
than 260 bytes using \\?\ prefix

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18199
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com