[issue44817] os.path.realpath fails with WinError 161

2021-08-05 Thread Michael Förderer

Michael Förderer  added the comment:

Done.

--

___
Python tracker 

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



[issue44817] os.path.realpath fails with WinError 161

2021-08-04 Thread Eryk Sun


Eryk Sun  added the comment:

ERROR_NETWORK_ACCESS_DENIED (65) should probably be added to the ignore list. I 
don't know whether it occurs in practice, but we have it mapped to EACCES in 
PC/errmap.h. The common access error is ERROR_ACCESS_DENIED (5), even on a UNC 
share with restricted access.

Add ERROR_DEV_NOT_EXIST (55) only if you have a case that fails with this error 
code. It's from the NT status code STATUS_DEVICE_DOES_NOT_EXIST. This might 
occur when trying to automount a device that's pending removal (see the 
implementation in ReactOS IopMountVolume [1]), but I can't create this 
condition. I think a device object would need to be practically stuck in the 
pending removal state for this to be a practical problem.

ERROR_LOCK_VIOLATION (33) isn't relevant. It's an I/O access error for a locked 
range of a file. realpath() doesn't read or write file data.

For the others, I'd wait for an issue to be reported. 

---

[1] 
https://github.com/reactos/reactos/blob/master/ntoskrnl/io/iomgr/volume.c#L457

--

___
Python tracker 

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



[issue44817] os.path.realpath fails with WinError 161

2021-08-04 Thread Michael Förderer

Michael Förderer  added the comment:

Updated with ERROR_BAD_NETPATH (53).
What about following errors:
- ERROR_LOCK_VIOLATION (33)
- ERROR_DEV_NOT_EXIST (52)
- ERROR_BAD_NET_RESP (58)
- ERROR_UNEXP_NET_ERR (59)
- ERROR_NETNAME_DELETED (64)
- ERROR_NETWORK_ACCESS_DENIED (65)
- ERROR_BAD_DEV_TYPE (66)

--

___
Python tracker 

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



[issue44817] os.path.realpath fails with WinError 161

2021-08-03 Thread Eryk Sun


Eryk Sun  added the comment:

It should also ignore ERROR_BAD_NETPATH (53).

--
nosy: +eryksun

___
Python tracker 

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



[issue44817] os.path.realpath fails with WinError 161

2021-08-03 Thread Eryk Sun


Change by Eryk Sun :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
type:  -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8

___
Python tracker 

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



[issue44817] os.path.realpath fails with WinError 161

2021-08-02 Thread Michael Förderer

Change by Michael Förderer :


--
keywords: +patch
pull_requests: +26081
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/27574

___
Python tracker 

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



[issue44817] os.path.realpath fails with WinError 161

2021-08-02 Thread Michael Förderer

New submission from Michael Förderer :

Using os.path.realpath(...) in the MVFS of Clearcase SCM (virtual file system) 
in Windows 10 a exception occures:

X:\my_view\tools\python\3_8>python.exe
Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.path.realpath('.')
Traceback (most recent call last):
  File "X:\my_view\tools\python\3_8\lib\ntpath.py", line 647, in realpath
path = _getfinalpathname(path)
OSError: [WinError 87] Falscher Parameter: 'X:\\my_view\\tools\\python\\3_8\\.'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 1, in 
  File "X:\my_view\tools\python\3_8\lib\ntpath.py", line 651, in realpath
path = _getfinalpathname_nonstrict(path)
  File "X:\my_view\tools\python\3_8\lib\ntpath.py", line 601, in 
_getfinalpathname_nonstrict
path = _getfinalpathname(path)
FileNotFoundError: [WinError 161] Der angegebene Pfadname ist ungültig: 'X:\\'
>>> 

The error 161 (ERROR_BAD_PATHNAME) should also be ignored in 
_getfinalpathname_nonstrict.

--
components: Library (Lib)
messages: 398814
nosy: Spacetown
priority: normal
severity: normal
status: open
title: os.path.realpath fails with WinError 161
versions: Python 3.8

___
Python tracker 

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