Eryk Sun added the comment:
> Is there a way to workaround that?
For Windows, subprocess could have a _read_all(file) method that special cases
a pipe. The read loop for a pipe would check whether the child has exited. Then
call _winapi.PeekNamedPipe on the handle (from get_osfhandle),
Eryk Sun added the comment:
> Should we add a version check as well [1]? I'm not totally comfortable
> with bitmasking a handle here, but if we only do this additional
> check on Win7 then I'm okay with it.
A version check should not be necessary. For file objects, setti
Eryk Sun added the comment:
Alternatively, instead of special casing the file type and spinning on
PeekNamedPipe, the workaround could be based on a multiple-object wait that
includes the child process handle. In this case, communicate() would always
call _communicate in Windows, regardless
Eryk Sun added the comment:
As Karthikeyan noted, in a regular string literal, backslash is an escape
character that's used in the following escape sequences:
\N{name} : named character
\U : 32-bit hexadecimal ordinal (e.g. \U0010)
\u : 16-bit hexade
Eryk Sun added the comment:
>\N{name} : named character
>\U : 32-bit hexadecimal ordinal (e.g. \U0010)
>\u : 16-bit hexadecimal ordinal (e.g. \u)
>\xXX : 8-bit hexadecimal ordinal (e.g. \xff)
>\OOO : 9-bit octal ord
Eryk Sun added the comment:
The function's doc string also needs to be updated to use the correct field
names: "user", "system", "children_user", "children_system", and "elapsed".
> And we can also add a link to MSDN.
os.times calls
Eryk Sun added the comment:
local.normalize is generally wrong in Windows. It's meant for POSIX systems.
Currently "tr_TR" is parsed as follows:
>>> locale._parse_localename('tr_TR')
('tr_TR', 'ISO8859-9')
The encoding "I
Eryk Sun added the comment:
> But my question is, then: why is my machine failing this test [the
> only one which uses this two-part locale] and not the buildbots or
> (presumably) any other Windows developer?
test_getsetlocale_issue1813 fails for me as well. I can't imagine
Eryk Sun added the comment:
We get into trouble with test_getsetlocale_issue1813 because normalize() maps
"tr_TR" (supported) to "tr_TR.ISO8859-9" (not supported).
>>> locale.normalize('tr_TR')
'tr_TR.ISO8859-9'
We should s
Eryk Sun added the comment:
> None of that explains why the test doesn't seem to run at all on the
> buildbots though.
Are the buildbots using an older version of UCRT? BCP 47 locales used to
strictly require a hyphen as the delimiter (e.g. 'tr-TR') instead of und
Eryk Sun added the comment:
> It also seems like at least some of the WSA* constants (e.g.
> WSAEBADF==10009) are the equivalent errno plus 1
> (e.g.EBADF==9). Should we be mapping those back to the
> errno value?
Mapping WSAEINTR (10004) -> EINTR (4) and WSAEACCES (1
Eryk Sun added the comment:
> I have no opinion about "errno 39 (Directory not empty)".
> Is it a "common" error?
Python's code base never specifically handles ENOTEMPTY. On the other hand, in
terms of basic operations on files and directories, I think imple
Eryk Sun added the comment:
Here's some additional background information for work on this issue.
A Unix locale identifier has the following form:
"language[_territory][.codeset][@modifier]"
| "POSIX"
| "C"
| ""
Eryk Sun added the comment:
If normalize() is implemented for Windows, then the tests should be split out
into POSIX and Windows versions. Currently, most of the tests in NormalizeTest
are not checking a result that's properly normalized for ucrt.
A useful implementation of locale.norm
Eryk Sun added the comment:
>>>> sys.executable
>'X:\\Python38\\python.exe'
>>>> os.path.realpath(sys.executable)
>'SERVER\\Programs\\Python38\\python.exe'
Unix Python resolves the executable path with repeated _Py_wr
Eryk Sun added the comment:
>> Unix Python resolves the executable path with repeated _Py_wreadlink
>> calls. Windows Python should do something similar to ensure the
>> consistency of sys.executable with realpath(sys.executable).
>
> I don't think this necessa
New submission from Eryk Sun :
In issue 37834, I posted a suggest implementation of win32_xstat_impl that
included the following snippet of code:
if (!GetFileInformationByHandle(hFile, &fileInfo)) {
error = GetLastError();
if (error != ERROR_INVALID_PARAM
Eryk Sun added the comment:
> When a Popen instance is finalized by the garbage collector, the
> internal handle is also finalized and closed despite the instance
> being put on the active list. This results in _cleanup throwing
> because the handle can no longer be used.
Than
Eryk Sun added the comment:
> It's a few steps deep, but DefineDosDeviceW() [1] specifies that it
> creates junctions, and while it's not necessarily obvious how to get
> from SUBST to that page, Wikipedia managed it [2].
Take care to not conflate device junctions w
Eryk Sun added the comment:
We should allow ERROR_INVALID_FUNCTION (1), ERROR_INVALID_PARAMETER (87), and
ERROR_NOT_SUPPORTED (50) for readlink and _getfinalpathname, which can indicate
a device that does not implement or is not mounted by a file system. We should
also allow
Change by Eryk Sun :
--
status: closed -> open
___
Python tracker
<https://bugs.python.org/issue38081>
___
___
Python-bugs-list mailing list
Unsubscrib
Eryk Sun added the comment:
In addition to ERROR_INVALID_FUNCTION (1), ERROR_INVALID_PARAMETER (87), and
ERROR_NOT_SUPPORTED (50) for an unsupported device, and ERROR_BAD_NET_NAME (67)
for a missing server or share, it should also allow common permission errors:
ERROR_ACCESS_DENIED (5
Eryk Sun added the comment:
> -3.7-32-32 C:\Python37_x86\python.exe
> -3.6-32-32 C:\Python36_x86\python.exe
> -3.5-32-32 C:\Python35_x86\python.exe
MAX_VERSION_SIZE was increased, so the INSTALLED_PYTHON version string is now
the full registry key name with the "-
Eryk Sun added the comment:
Please consult the attached file "splitdrive.py". I redesigned splitdrive() to
support "UNC" and "GLOBAL" junctions in device paths. I relaxed the design to
allow repeated separators everywhere except for the UNC root. IIRC, Window
Eryk Sun added the comment:
> pyreadline (2.1)
The problem is pyreadline. It uses a low-level console read, but it fails to
account for the Alt+Numpad sequence of input records that the console uses for
non-OEM characters. IIRC, the Unicode character is only sent in the final input
rec
Eryk Sun added the comment:
3.9 can drop support for console pseudohandles in set_inheritable in
Python/fileutils.c and Popen._filter_handle_list in Lib/subprocess.py.
Also, _Py_write_impl in Python/fileutils.c can remove the 32767 byte limit for
console files (and other character devices
Eryk Sun added the comment:
Here are a couple more:
* WSA_FLAG_NO_HANDLE_INHERIT is supported. Code related to
`support_wsa_no_inherit` in Modules/socketmodule.c can be removed.
* AddDllDirectory and RemoveDllDirectory are supported.
os__add_dll_directory_impl and
Eryk Sun added the comment:
As far as I can tell, reduction.send_handle isn't used internally in the
Windows implementation, and it's also not a documented API function. However,
it is tested on Windows in test_fd_transfer in
Lib/test/_test_multiprocessing.py. As it turns out, th
Eryk Sun added the comment:
Let's make test_fd_transfer_windows a bit less hangy by polling for up to 60
seconds instead of simply trying to recv() and by terminating before trying to
join().
@unittest.skipUnless(HAS_REDUCTION, "test needs multiprocessing
Eryk Sun added the comment:
Sorry, I mistakenly left out ERROR_BAD_NETPATH (53). It's at least used with
mapped drives. For example, I have drive "M:" mapped to WebDAV
"//live.sysinternals.com/tools", and I see this error if I disconnect the
network:
>>
Eryk Sun added the comment:
The result from strftime is platform dependent. In Windows, the result has a
trailing "." for the abbreviated names that are less than four characters, but
no "de" in either form:
>>> months = [(2019, m) + (0,)*7 for m in range(1,
Eryk Sun added the comment:
> Have you tried this on Windows or macOS?
3.5+ in Windows uses ucrt, which quietly ignores 'E' and 'O' strftime
modifiers. From ucrt\time\wcsftime.cpp:
// Skip ISO E and O alternative representation format modifiers. We
Eryk Sun added the comment:
Only Path.expanduser() special cases tilde as a POSIX shell would. Otherwise
"~" is not a reserved filename character in POSIX. Path('~') is a file named
"~" that's relative to the current working directory. By coincidence the
w
Eryk Sun added the comment:
According to the docs, raising ValueError in this case has been a deprecated
feature since 3.6.2, and the ability to do so no longer exists in 3.8. The
documentation needs to be updated to reflect the new behavior.
https://docs.python.org/3.8/library/ctypes.html
Eryk Sun added the comment:
> Just out of curiosity, where is this data coming from?
In general it's just random data on the stack. It's not worth investigating
where this particular value comes from. It could be the low word of the address
of a stack-allocated buffer, such
Eryk Sun added the comment:
Steve, in PR 15951 you updated Py_WINVER to 0x0602. I think it should be 0x0603
(_WIN32_WINNT_WINBLUE) and
Py_NTDDI should be NTDDI_WINBLUE. Windows 8 hasn't been supported since 2016.
Windows 8.1 is supported until
Eryk Sun added the comment:
> I'm not sure that there is a big benefit for us to drop Windows 8
> support (only Windows 8 but continue to support Windows 8.1),
> compared to the annoyance for users.
According to statcounter.com and netmarketshare.com, Windows 8 still has 1% o
Eryk Sun added the comment:
Apparently handling non-BMP codes is broken in recent builds of the new console
in Windows 10. I see this problem in build 18362 as well. It seems there have
been updates that have changed the naive way the console used to handle
surrogate codes as just regular
Eryk Sun added the comment:
Does test_partial_reads fail for you when run separately? If so, it's for a
different reason. Otherwise, there may have been text left in the input buffer
from test_input that led to the failure, which is a separate problem that needs
to be addresse
Eryk Sun added the comment:
Terry, the test_winconsoleio problem is issue 38325. Test cases with surrogate
pairs that are known to fail in recent builds of Windows 10 have to be split
out.
For the "ps_AF" locale failure that you noted, in my case with Windows 10
18362, I hav
Eryk Sun added the comment:
> Python 2.7 had totally different code, IIRC.
In 2.7 the wait() method of threading._Condition implements the timeout with a
loop the calls time.sleep() with an increasing delay from 500 microseconds up
to 50 ms, and no more than the remaining time.
> B
Eryk Sun added the comment:
Note that the underlying stat call supports file descriptors, which are
non-negative integers. This is a supported and tested capability for
genericpath.exists (see GenericTest.test_exists_fd in
Lib/test/test_genericpath.py).
False and True are integers with the
Eryk Sun added the comment:
> Maybe os.fspath() can be used
I think that would already be the case if genericpath.exists didn't have to
support file descriptors. It's documented that the path argument "refers to an
existing path or an open file descriptor".
Modify
Eryk Sun added the comment:
The test assumes that Unix filesystems store names as arbitrary sequences of
bytes, with only ASCII slash and null reserved. Windows NTFS stores names as
arbitrary sequences of 16-bit words, with many reserved ASCII characters
including \/:*?<>"|
Eryk Sun added the comment:
I tested in Windows 10 with long paths disabled, and the FileNotFoundError
exception showed that the failing .pyc had a numeric suffix appended to the
name.
create_long_path isn't taking into account _write_atomic in
Lib/importlib/_bootstrap_external.py.
Eryk Sun added the comment:
> Let me know if you are unable to reproduce it.
x64 pythonw.exe and pyw.exe (3.7.5, 2019-10-14) work for me in Windows
10.0.18362. I have them installed for all users, respectively in "C:\Program
Files\Python37" and "C:\Windows".
Try
Eryk Sun added the comment:
> At least one package in 3.8 still contained a dependency on the C++
> runtime
FWIW, the very first thing that I checked was the dependencies of pythonw.exe,
in case maybe I had a dependent DLL that's not distributed with Windows.
There's no
Eryk Sun added the comment:
In Windows, dot files cannot be hidden (i.e. set the hidden file attribute),
unlike how they're conventionally hidden in Unix. Doing so breaks normal
access. A directory such as ".venv" can be hidden, but that's still going
against conven
Eryk Sun added the comment:
This should revert to setting `_python_exe = sys.executable` in
Lib/multiprocessing/spawn.py. Then the code in
Lib/multiprocessing/popen_spawn_win32.py will set __PYVENV_LAUNCHER__ in the
spawned process to the virtual environment's sys.executable. Otherwis
Eryk Sun added the comment:
With increasing use of os.access() in shutil and tempfile, it would be nice to
have a real implementation of os.access() for Windows.
Instead of manually evaluating the security of the file/directory, as
issue2528.2.patch attempts to do, I'd rather just ope
Eryk Sun added the comment:
> So, two interesting questions: does this in fact match the behavior of
> os._execvpe, and does it match the behavior of the shell?
I think it's fine. child_exec() tries all paths. It saves the first error
that's not ENOENT or ENOTDIR. The
Change by Eryk Sun :
--
title: Proposed addition to Windows FAQ -> Add an answer to the Windows FAQ
about installing the Universal C Runtime
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5, Python 3.6, Python
3.7
___
Python trac
Eryk Sun added the comment:
I added an updated implementation of windows_helper.py to the dependency
bpo-22080.
--
components: +Windows
nosy: +paul.moore
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5
___
Python tracker
<ht
Change by Eryk Sun :
--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5
___
Python tracker
<https://bugs.python.org/issue24052>
___
___
Python-bug
Eryk Sun added the comment:
I'm closing this issue as out of date. The tutorial now refers to the py
command and also the python3.9 command from the app distribution. The patch's
addition of "followed by Enter" after "Control-Z" is still needed, but i
Eryk Sun added the comment:
Hanging on a synchronous console file during startup shouldn't be an issue in
3.6+, since io._WindowsConsoleIO doesn't support seeking, but it could still be
an issue with legacy mode, which uses io.FileIO. I'm marking this as a
duplicate of bpo-3
Eryk Sun added the comment:
Console input handles pose the same risk of hanging indefinitely when io.FileIO
is used in legacy standard I/O mode (i.e. PYTHONLEGACYWINDOWSSTDIO).
Seeking could simply be disallowed on all files that aren't FILE_TYPE_DISK. For
example, change portable_
Change by Eryk Sun :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> seekable() returns True on pipe objects in Windows
___
Python tracker
<https://bugs.python
Eryk Sun added the comment:
If non-disk files are made non-seekable in Windows, this will also resolve
bpo-42602.
--
___
Python tracker
<https://bugs.python.org/issue34
Change by Eryk Sun :
--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5
___
Python tracker
<https://bugs.python.org/issue11429>
___
___
Python-bug
Eryk Sun added the comment:
"Tools/msi/README.txt" still references "%SystemRoot%\System32" and
"%SystemRoot%\SysWOW64" as the location of "python3[x].dll" for all-users
installs. The containing paragraph can be removed. Move the lines
Change by Eryk Sun :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue22781>
___
___
Python-bugs-list
Change by Eryk Sun :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Ctypes Packing Bitfields Incorrectly - Linux
___
Python tracker
<https://bugs.python
Change by Eryk Sun :
--
components: +Extension Modules, Interpreter Core -Library (Lib)
stage: patch review ->
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5, Python 3.6, Python
3.7
___
Python tracker
<https://bugs.pyth
Change by Eryk Sun :
--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5, Python 3.6, Python
3.7
___
Python tracker
<https://bugs.python.org/issue29
Eryk Sun added the comment:
Deleting a file in Windows 10 has been updated to try a POSIX-style delete. For
a POSIX delete, the filesystem unlinks the file even it's open, whereas a
classic delete only unlinks a 'deleted' file when it's closed. The filesystem
has to s
Change by Eryk Sun :
--
stage: needs patch ->
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5, Python 3.6
___
Python tracker
<https://bugs.python.org/issu
Change by Eryk Sun :
--
components: +Extension Modules -Library (Lib)
versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/issue37
Change by Eryk Sun :
--
components: +Unicode
nosy: +ezio.melotti, vstinner
versions: -Python 3.5, Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/issue35
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg273845
___
Python tracker
<https://bugs.python.org/issue27886>
___
___
Python-bugs-list mailin
Eryk Sun added the comment:
The pathlib documentation of Path.rename() says "[o]n Unix, if target exists
and is a file, it will be replaced silently if the user has permission". This
leaves the behavior on Windows in question. The reader has to scroll down to
the correspondenc
Eryk Sun added the comment:
> The proposal in this issue is to have a public standard library API,
> which I'm calling ‘tempfile.makepath’,
It's a few years later, and tempfile.mktemp() still exists and works without
raising a deprecation warning. Of course it's still ma
Change by Eryk Sun :
--
assignee: -> docs@python
components: +Library (Lib)
type: -> enhancement
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5, Python 3.6, Python
3.7
___
Python tracker
<https://bugs.python.org/i
Eryk Sun added the comment:
I think the documentation of ctypes.PyDLL and ctypes.pythonapi is good enough
as is.
--
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Eryk Sun :
--
type: behavior -> enhancement
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5, Python 3.6, Python
3.7
___
Python tracker
<https://bugs.python.org/issu
Change by Eryk Sun :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue34840>
___
Eryk Sun added the comment:
> So no, while unresolved, this bug report should not be closed.
The implied question was whether you or the core devs on the nosy list, upon
further consideration, wanted to resolve the issue by rejecting the request,
but it had simply been forgotten about fo
Change by Eryk Sun :
--
versions: +Python 3.10, Python 3.9 -Python 3.5, Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/issue36880>
___
___
Eryk Sun added the comment:
The current help text attempts to explain point 2, in terms of an active
virtual environment, shebangs, the PY_PYTHON[2|3] environment variables, and
the py.ini [defaults]. It's a lot to say succinctly in a few lines of text. A
shortened URL that links t
Eryk Sun added the comment:
Maybe it's worth adding a recommendation in the docs to reboot and try to
repair an installation that fails in the final stage due to ucrt not being
fully installed yet, i.e. missing api-ms-win-crt-*.dll. Or maybe this case can
be detected and display a me
Change by Eryk Sun :
--
versions: +Python 3.10, Python 3.9 -Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/issue25166>
___
___
Python-bug
Eryk Sun added the comment:
I tested installing 3.10 in session 0 for the current user, as a user with the
batch logon right. The installation succeeded. If you're running as SYSTEM,
then installing for the current user doesn't see reasonable to me. I won't test
that c
Change by Eryk Sun :
--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5, Python 3.6, Python
3.7
___
Python tracker
<https://bugs.python.org/issue29
Eryk Sun added the comment:
This issue is similar to bpo-25117 in terms of the installer failing to run
Python for post-installation tasks. The complication in this case is that a
subsequent repair doesn't install pip.
--
versions: +Python 3.10, Python 3.8, Python 3.9 -Pytho
Change by Eryk Sun :
--
title: multprocessing errors on Windows: WriteFile() argument 1 must be int,
not None; OSError: handle is closed -> multiprocessing Manager error: send()
called for a closed connection
type: crash -> behavior
versions: +Python 3.10, Python 3.8, Pyth
Eryk Sun added the comment:
"C:\some\path/some/file.txt" is a valid file path. The Windows file API
normalizes most paths, except for verbatim paths that start with exactly
"\\?\". Path normalization includes replacing forward slashes with backslashes.
If you provide th
Eryk Sun added the comment:
PEP 11 says that "[a] new feature release X.Y.0 will support all Windows
releases whose extended support phase is not yet expired". There was no such
thing as Extended Security Updates (ESU) when that provision was accepted. As
defined by PEP 11, extend
Eryk Sun added the comment:
bpo-33016 fixed the problem with the inconsistent dwFlags argument passed to
GetFinalPathNameByHandleW().
We do need the ability to get the NT name in order to implement samefile() and
sameopenfile() reliably in all cases -- i.e. when the volume serial number
Change by Eryk Sun :
--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.6
___
Python tracker
<https://bugs.python.org/issue17620>
___
___
Python-bug
Change by Eryk Sun :
--
dependencies: +Python interactive console doesn't use sys.stdin for input
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.6
___
Python tracker
<https://bugs.python.org/is
Change by Eryk Sun :
--
components: -Windows
title: Pathlib.replace cannot move file to a different drive on Windows if
filename different -> Support moving across filesystems in pathlib.Path, as
shutil.move() does
versions: +Python 3.10, Python 3.8, Python 3.9 -Python
Eryk Sun added the comment:
The need for asynchronous I/O (i.e. FILE_FLAG_OVERLAPPED) with
ReadFileScatter() and WriteFileGather() makes them a poor fit for POSIX
os.readv() and os.writev(), since we can't open the file with open() or
os.open(). Python's socket module opens
Eryk Sun added the comment:
PR 1927 is a definite improvement. By using _get_osfhandle() instead of caching
the handle value, it guarantees that access to the original console file can be
saved and restored via `fd_save = dup(fd)` and `dup2(fd_save, fd)`. It also
allows duping a new open of
Change by Eryk Sun :
--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/issue31665>
___
___
Eryk Sun added the comment:
bpo-38671 has PR 17716 pending approval, which addresses the problem in
msg309102 by ensuring that a non-strict resolve begins by getting the absolute
path via nt._getfullpathname().
--
resolution: -> duplicate
stage: needs patch -> resolved
status
Change by Eryk Sun :
--
status: open -> pending
___
Python tracker
<https://bugs.python.org/issue27346>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Eryk Sun :
--
resolution: -> third party
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue33603>
___
___
Eryk Sun added the comment:
The complexity of mixing standard I/O from the shell and external programs is a
limitation of the Windows command line. Each program could choose to use the
system (or process) ANSI or OEM code page, the console session's input or
output code page, UTF-8, o
Eryk Sun added the comment:
I'm certain this is a third-party problem -- something like AppLocker or an
anti-malware program that's limiting filesystem access. It's not a bug in
Python, which simply uses FindFirstFileW() and FindNextFileW() in the normal
way.
--
Eryk Sun added the comment:
As discussed in msg337357, the Windows API does not support setting the current
working directory to a path that starts with \\?\ or \\.\. It's dysfunctional
in many cases. Anyway, using a \\?\ path does not remove the length limit on
the working directory,
201 - 300 of 2119 matches
Mail list logo