[issue34187] Issues with lazy fd support in _WindowsConsoleIO fileno() and close()

2021-03-15 Thread Eryk Sun
Eryk Sun added the comment: The issues brought up here are addressed in a more direct, comprehensive, and productive way in PR 1927 for bpo-30555. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> _io._WindowsConsoleIO b

[issue43284] Inability to fetch build 20H2

2021-03-16 Thread Eryk Sun
Eryk Sun added the comment: Note that the following recommendation for getting the system version was removed in late 2019 [1][2]: To obtain the full version number for the operating system, call the GetFileVersionInfo function on one of the system DLLs, such as Kernel32.dll

[issue43523] Handling Ctrl+C while waiting on I/O in Windows

2021-03-16 Thread Eryk Sun
Eryk Sun added the comment: winrshost.exe runs Python with its standard I/O redirected to pipes, so sys.stdin.read(1) blocks the main thread while waiting for the synchronous read to complete. If the user types something, then the read completes and the main thread can call the SIGINT

[issue15533] subprocess.Popen(cwd) documentation: Posix vs Windows

2021-03-16 Thread Eryk Sun
Eryk Sun added the comment: > Python is conceptually multi-platform, so its behavior on > Linux and Windows should be as much consistent as possible. It's not expected for the behavior of all Popen() parameters to be the same on all platforms. For example, the behavior and capa

[issue38890] subprocess.Popen should not emit a ResourceWarning for a detached process

2021-03-16 Thread Eryk Sun
Eryk Sun added the comment: I wonder if this should be handled more productively by supporting a `daemon` parameter. In POSIX, use the double fork technique for creating a daemon process. In Windows, use DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP | CREATE_BREAKAWAY_FROM_JOB. For a daemon

[issue32553] Use the py launcher in venv Windows examples

2021-03-16 Thread Eryk Sun
Change by Eryk Sun : -- title: venv says to use python3 which does not exist in 3.6.4 -> Use the py launcher in venv Windows examples versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.6 ___ Python tracker <https://bugs.python.org/issu

[issue27602] Enable py launcher to launch repository Python.

2021-03-16 Thread Eryk Sun
Eryk Sun added the comment: The narrow scope of this issue could be implemented by defining a scheme for local builds in the PythonCore key -- such as "X.Ys[-32]". The build process would create or update the "HKCU\Software\Python\PythonCore\X.Ys[-32]\InstallPat

[issue29688] Add support for Path.absolute()

2021-03-17 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg289517 ___ Python tracker <https://bugs.python.org/issue29688> ___ ___ Python-bugs-list mailin

[issue25012] pathlib should allow converting to absolute paths without resolving symlinks

2021-03-17 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add support for Path.absolute() ___ Python tracker <https://bugs.python

[issue34297] Windows py launcher fails to handle a quoted version argument

2021-03-17 Thread Eryk Sun
Change by Eryk Sun : -- stage: test needed -> needs patch title: Windows py.exe launcher fail to handle quote correctly -> Windows py launcher fails to handle a quoted version argument versions: +Python 3.10, Python 3.9 -Python 3.6, Pyth

[issue35216] misleading error message from shutil.copy()

2021-03-17 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> shutil.copy raises IsADirectoryError when the directory does not actually exist ___ Python tracker <https://bugs.python

[issue43284] Inability to fetch build 20H2

2021-03-17 Thread Eryk Sun
Eryk Sun added the comment: > For the other 10% (diagnostic logging), it would be nice to have a > better option than running "cmd /c ver" CMD's VER command (cmd!eVersion) calls GetVersion(), for which, in its case, the API calls the internal function GetVersion_Curre

[issue34535] queue.Queue(timeout=0.001) avg delay Windows:14.5ms, Ubuntu: 0.063ms

2021-03-17 Thread Eryk Sun
Eryk Sun added the comment: See the related discussion in bpo-41299. The system interrupt period can be lowered to 1 ms with timeBeginPeriod() -- or lower with undocumented NtSetTimerResolution(). This affects the resolution of dispatcher waits such as Sleep() and WaitForSingleObject(), as

[issue34535] queue.Queue(timeout=0.001) avg delay Windows:14.5ms, Ubuntu: 0.063ms

2021-03-17 Thread Eryk Sun
Eryk Sun added the comment: > Given that extra info, I'd say we're fine to document that our timeouts > can't do any better than the OS, which "for example, is typically > around 15ms on Windows", and recommend using non-blocking calls > instead. The 1

[issue21822] KeyboardInterrupt during Thread.join hangs that Thread

2021-03-17 Thread Eryk Sun
Change by Eryk Sun : -- components: +Extension Modules, Interpreter Core versions: +Python 3.10, Python 3.9 -Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue21

[issue42855] pathlib.exists on Windows raises an exception on URL like/bad input

2021-03-17 Thread Eryk Sun
Change by Eryk Sun : -- components: +Library (Lib) versions: -Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue42855> ___ ___ Python-bug

[issue43395] os.path states that bytes can't represent all MBCS paths under Windows

2021-03-17 Thread Eryk Sun
Change by Eryk Sun : -- versions: -Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue43395> ___ ___ Python-bugs-list mailing list Unsub

[issue32451] venv activate bash script has wrong line endings in Windows

2021-03-17 Thread Eryk Sun
Eryk Sun added the comment: The POSIX "Lib/venv/scripts/common/activate" script needs a line-ending exception in ".gitattributes": https://github.com/python/cpython/blob/master/.gitattributes -- title: python -m venv activation issue when using cygwin on windo

[issue43437] venv activate bash script has wrong line endings on windows

2021-03-17 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> venv activate bash script has wrong line endings in Windows ___ Python tracker <https://bugs.python

[issue39340] shutil.rmtree and write protected files

2021-03-17 Thread Eryk Sun
Eryk Sun added the comment: > What I would expect is a consistent behaviour and as a > user I am not interested in inner guts of differences > between filesystems. It's already consistent. msg360033 contains a misunderstanding about what write permission on a file means in Un

[issue33240] shutil.rmtree fails if inner folder is open in Windows Explorer

2021-03-17 Thread Eryk Sun
Eryk Sun added the comment: > Explorer keeps handles open to directories to get updates via > ReadDirectoryChangesExW. It opens watched directories with > shared delete access, so deleting the child succeeds. But as > discussed above, the directory isn't unlinked from t

[issue33240] shutil.rmtree fails if inner folder is open in Windows Explorer

2021-03-17 Thread Eryk Sun
Change by Eryk Sun : -- components: -IO ___ Python tracker <https://bugs.python.org/issue33240> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch

2021-03-17 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.6 ___ Python tracker <https://bugs.python.org/issue25386> ___ ___ Python-bug

[issue42730] TypeError/hang inside of Time.Sleep() when _thread.interrupt_main()

2021-03-17 Thread Eryk Sun
Eryk Sun added the comment: > Shouldn't the behaviour for _thread.interrupt_main() be always to > interrupt the main thread. The underlying C API function, PyErr_SetInterrupt(), simulates SIGINT without actually sending the signal to the process via kill() or raise(), but the

[issue31103] Windows Installer Product does not include micro version in display name

2021-03-17 Thread Eryk Sun
Eryk Sun added the comment: FYI, the 3rd field is Field3Value, defined in "PCbuild/python.props" as the value `MicroVersionNumber*1000 + ReleaseLevelNumber*10 + ReleaseSerial`. It gets set as the FIELD3 macro in "PCbuild/pyproject.props", which gets used in the definitio

[issue43538] [Windows] support args and cwd in os.startfile()

2021-03-18 Thread Eryk Sun
New submission from Eryk Sun : bpo-8232 has a patch to add an `arguments` parameter to os.startfile(). This improvement is needlessly tied to that issue. It's useful in general as a safer way to execute applications and scripts compared to using subprocess.Popen() with shell=True. It

[issue8232] webbrowser.open incomplete on Windows

2021-03-18 Thread Eryk Sun
Change by Eryk Sun : -- components: +Windows dependencies: +[Windows] support args and cwd in os.startfile() nosy: +paul.moore, tim.golden, zach.ware versions: +Python 3.10 -Python 3.6 ___ Python tracker <https://bugs.python.org/issue8

[issue8232] webbrowser.open incomplete on Windows

2021-03-18 Thread Eryk Sun
Eryk Sun added the comment: Windows Vista is no longer a concern, so find_windows_browsers() doesn't have to worry about the KEY_WOW64_* flags. IMO, it should get the browser's real name (the default value of the key) and the fully-qualified path of the executable, instead of

[issue21506] [Windows] installations should include pythonX.exe and pythonX.Y.exe executables

2021-03-18 Thread Eryk Sun
Eryk Sun added the comment: One issues with versioned "X.Y" executables is interference with normal handling of the ".exe" extension. For example, in "python3.10" the ".10" counts as an extension, so normally ".exe" won't be appended w

[issue27318] Add support for symlinks to zipfile

2021-03-18 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10 -Python 3.6 ___ Python tracker <https://bugs.python.org/issue27318> ___ ___ Python-bugs-list mailing list Unsub

[issue28708] Low FD_SETSIZE limit on Windows

2021-03-18 Thread Eryk Sun
Change by Eryk Sun : -- components: +Extension Modules -Build versions: +Python 3.10 -Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue28

[issue24823] ctypes.create_string_buffer does not add NUL if len(init) == size

2021-03-18 Thread Eryk Sun
Eryk Sun added the comment: > The Documentation component is for issues that only change the docs That's not clear in the triaging guide for the multi-select component field. (However, it is clearly stated as such for the GitHub PR label "type-documentation".) If that

[issue24823] ctypes.create_string_buffer does not add NUL if len(init) == size

2021-03-18 Thread Eryk Sun
Change by Eryk Sun : -- components: +ctypes ___ Python tracker <https://bugs.python.org/issue24823> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27274] [ctypes] Allow from_pointer creation

2021-03-18 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10 -Python 3.6 ___ Python tracker <https://bugs.python.org/issue27274> ___ ___ Python-bugs-list mailing list Unsub

[issue32745] ctypes string pointer fields should accept embedded null characters

2021-03-18 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10, Python 3.9 -Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue32745> ___ ___ Python-bug

[issue41883] ctypes pointee goes out of scope, then pointer in struct dangles and crashes

2021-03-18 Thread Eryk Sun
Eryk Sun added the comment: The ctypes issue is bpo-12836, which has a suggested solution. This issue is a third-party problem introduced by a workaround, which needs to be addressed at the source, such as with helper functions and subclasses that close the loop. -- resolution

[issue29270] super call in ctypes subclass fails

2021-03-18 Thread Eryk Sun
Change by Eryk Sun : -- stage: patch review -> needs patch title: super call in ctypes sub-class fails in 3.6 -> super call in ctypes subclass fails versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.6, Python 3.7 ___ Python tracker

[issue21130] equivalent functools.partial instances should compare equal

2021-03-18 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.6 ___ Python tracker <https://bugs.python.org/issue21130> ___ ___ Python-bug

[issue33030] GetLastError() may be overwritten by Py_END_ALLOW_THREADS

2021-03-18 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10, Python 3.9 -Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue33030> ___ ___ Python-bug

[issue43175] filecmp is not working for UTF-8 BOM file.

2021-03-18 Thread Eryk Sun
Eryk Sun added the comment: I'm closing this as not a bug. You showed that all of the criteria used in a non-shallow comparison are the same on your end, i.e. they're both regular files with the same reported size and the same contents. Something is going on, which is a mystery

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: > Read the ANSI code page on Windows, I don't see why the Windows implementation is inconsistent with POSIX here. If it were changed to be consistent, the default encoding at startup would remain the same, since setlocale(LC_CTYPE, "") uses the

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: > If Python calls setlocale() per default now, it has served its purpose. Except not for embedding applications if configure_locale [1] isn't set. But in that case determining the default locale isn't Python's problem to solve. > My assumptio

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: > But it is not what I want for now. I want to ignore UTF-8 mode > when `encoding="locale"` is specified. > This is almost "only in Windows" issue, and users can use > `encoding="mbcs"` in Windows-only script. Why is it

[issue43550] pip.exe is missing from the NuGet package

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: I suppose if you really need a plain `pip` command, you could reinstall with `python.exe -m pip install --force-reinstall pip`. -- nosy: +eryksun ___ Python tracker <https://bugs.python.org/issue43

[issue43484] valid datetimes can become invalid if the timezone is changed

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: That it allows creating the datetime instance looks like a bug to me, i.e. a time before 0001-01-01 00:00 UTC is invalid. What am I misunderstanding? -- nosy: +eryksun ___ Python tracker <https://bugs.python.

[issue43484] valid datetimes can become invalid if the timezone is changed

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: Thank you for thoughtful and detailed answer, Paul. -- ___ Python tracker <https://bugs.python.org/issue43484> ___ ___ Python-bug

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: > But please discuss it in another issue. What's returned by locale.get_locale_encoding() and locale.get_current_locale_encoding() is relevant to adding them as new functions and is a chance to implement this correctly in Windows. You're right t

[issue24505] shutil.which wrong result on Windows

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: Regarding Toby's patch: Probably _is_windows_nt_internal_command() isn't needed or desired. It's more of a command-line parsing issue, rather than a file-search issue. For example, CMD will search for an internal name if it's quoted in

[issue37894] [win] shutil.which can not find the path if 'cmd' include directory path and not include extension name

2021-03-19 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> shutil.which wrong result on Windows ___ Python tracker <https://bugs.python

[issue28188] os.putenv should support bytes arguments on Windows

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: I thought this was a good idea at the time, but a core dev never took up the mantle in over 4 years, and no one else showed interest. -- resolution: -> rejected stage: patch review -> resolved status: open -&g

[issue33140] shutil.chown on Windows

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: Apparently there's no one else interested in implementing shutil.chown() in Windows. Okay, but as long as that's the case, the definition should be skipped in Windows, which is an easy problem. -- components: -IO keywords: +easy versions: +P

[issue33140] shutil.chown should not be defined in Windows

2021-03-19 Thread Eryk Sun
Change by Eryk Sun : -- title: shutil.chown on Windows -> shutil.chown should not be defined in Windows ___ Python tracker <https://bugs.python.org/issu

[issue28168] Use _winapi.WaitForMultipleObjects in Popen.wait()

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: I'm no longer interested in solving the SIGINT event problem locally at the wait site. A common implementation of _Py_Sleep, _Py_WaitForSingleObject, and _Py_WaitForMultipleObjects is needed. _winapi.WaitForSingleObject would call _Py_WaitForSingleObjec

[issue26350] [Windows] signal.signal and os.kill doc should better explain what is supported

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: The signal.signal() docs should explain that only SIGINT and SIGBREAK can be signaled from another process, and only if the current process is a console application. A link to os.kill() could be added, which should explain their use as signals in relation to

[issue23948] Deprecate os.kill() on Windows

2021-03-19 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg256166 ___ Python tracker <https://bugs.python.org/issue23948> ___ ___ Python-bugs-list mailin

[issue23948] Deprecate os.kill() on Windows

2021-03-19 Thread Eryk Sun
Eryk Sun added the comment: I'd prefer to change os.kill() to take the code path that generates a console control event only when the pid value is negative (i.e. a process group ID), with -1 reserved to send the event to all processes in the console session (i.e. console process gr

[issue32865] os.pipe creates inheritable FDs with a bad internal state on Windows

2021-03-19 Thread Eryk Sun
Change by Eryk Sun : -- components: +Extension Modules -Library (Lib) versions: +Python 3.10, Python 3.9 -Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue32

[issue32862] os.dup2(fd, fd, inheritable=False) behaves inconsistently

2021-03-19 Thread Eryk Sun
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/issue32862> ___ ___

[issue36305] Inconsistent behavior of pathlib.WindowsPath with drive paths

2021-03-19 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10, Python 3.9 -Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue36305> ___ ___ Python-bug

[issue29971] Lock.acquire() not interruptible on Windows

2021-03-20 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg291089 ___ Python tracker <https://bugs.python.org/issue29971> ___ ___ Python-bugs-list mailin

[issue29971] Lock.acquire() not interruptible on Windows

2021-03-20 Thread Eryk Sun
Change by Eryk Sun : -- components: +Extension Modules, Interpreter Core versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue29

[issue29178] Adding bytes.frombuffer(byteslike) constructor

2021-03-20 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue29178> ___ ___ Python-bug

[issue30374] Make win_add2path.py take effect without having to log off

2021-03-20 Thread Eryk Sun
Change by Eryk Sun : -- components: -ctypes versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue30

[issue30405] build.bat: register binaries for py launcher

2021-03-20 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg293989 ___ Python tracker <https://bugs.python.org/issue30405> ___ ___ Python-bugs-list mailin

[issue27602] Enable py launcher to launch repository Python.

2021-03-20 Thread Eryk Sun
Eryk Sun added the comment: See also bpo-30405, which has more discussion about supporting PEP 514 in the launcher. -- ___ Python tracker <https://bugs.python.org/issue27

[issue30405] build.bat: register binaries for py launcher

2021-03-20 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue30405> ___ ___ Python-bug

[issue29996] Use terminal width by default in pprint

2021-03-20 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg291198 ___ Python tracker <https://bugs.python.org/issue29996> ___ ___ Python-bugs-list mailin

[issue29996] Use terminal width by default in pprint

2021-03-20 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue29996> ___ ___ Python-bug

[issue28166] WindowsConsoleIO misbehavior when Ctrl+C is ignored

2021-03-20 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg359933 ___ Python tracker <https://bugs.python.org/issue28166> ___ ___ Python-bugs-list mailin

[issue28166] WindowsConsoleIO misbehavior when Ctrl+C is ignored

2021-03-20 Thread Eryk Sun
Change by Eryk Sun : -- components: +Interpreter Core -Library (Lib) versions: +Python 3.10 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue28

[issue37871] Windows: WindowsConsoleIO produces mojibake for strings longer than 32 KiB

2021-03-20 Thread Eryk Sun
Change by Eryk Sun : -- stage: -> needs patch versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7 ___ Python tracker <https://bugs.python.org/issu

[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-20 Thread Eryk Sun
Eryk Sun added the comment: > In my experience, most applications use the ANSI code page because > they use the ANSI flavor of the Windows API. The default encoding at startup and in the "C" locale wouldn't change. It would only differ from the default if setlocale(

[issue37871] Windows: WindowsConsoleIO produces mojibake for strings longer than 32 KiB

2021-03-20 Thread Eryk Sun
Eryk Sun added the comment: > side note: do we need to care about Windows 7 anymore in > 3.10 given that microsoft no longer supports it? If the fix comes in time for Python 3.8, then it needs to support Windows 7. For Python 3.9+, the 32 KiB limit can be removed. The c

[issue33240] shutil.rmtree fails if inner folder is open in Windows Explorer

2021-03-20 Thread Eryk Sun
Eryk Sun added the comment: > Isn't this just "how windows behaves" on some filesystems with > little that we can do about it? The suggestion was to include an error handler that retries unlink() and rmdir() -- particularly rmdir() -- a given number of times, probably

[issue33240] shutil.rmtree fails if inner folder is open in Windows Explorer

2021-03-20 Thread Eryk Sun
Eryk Sun added the comment: > oh, I missed that a notification happens to the other process(es) in a > common case, a bit of retrying with backoff would actually make sense The other common problem with deleting an empty directory is when it's opened as the working directory o

[issue33935] shutil.copyfile throws incorrect SameFileError on Google Drive File Stream

2021-03-20 Thread Eryk Sun
Change by Eryk Sun : -- components: +Extension Modules versions: +Python 3.10, Python 3.9 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue33

[issue4198] os.path.normcase gets fooled on windows with mapped linux network drive

2021-03-20 Thread Eryk Sun
Eryk Sun added the comment: Filesystem paths in Windows are normally opened case insensitive, but a filesystem can choose to ignore this. NTFS does so for directories that flagged as case sensitive [1]. ntpath.normcase() doesn't incorporate this information. It would have to query the

[issue33935] [Windows] samefile() should not use zero-valued st_dev and st_ino

2021-03-20 Thread Eryk Sun
Change by Eryk Sun : -- title: shutil.copyfile throws incorrect SameFileError on Google Drive File Stream -> [Windows] samefile() should not use zero-valued st_dev and st_ino ___ Python tracker <https://bugs.python.org/issu

[issue31863] Inconsistent exitcode for terminated child processes on Windows

2021-03-21 Thread Eryk Sun
Eryk Sun added the comment: > I'm not actually sure what the proposal here is. Are we suggesting > that all Python's means of terminating a process should use the > same exit code? That's how I read it, but I don't agree if it means always pretending that a pr

[issue19124] os.execv executes in background on Windows

2021-03-21 Thread Eryk Sun
Eryk Sun added the comment: > On Windows, the new process is executed in the background but > can send output to a console if the original process was > started in a console. C execv[e]() is a mess for console applications. The child process is competing for console input with an

[issue39484] [time] document that integer nanoseconds may be more precise than float

2021-03-21 Thread Eryk Sun
Change by Eryk Sun : -- assignee: -> docs@python components: +Documentation, Extension Modules -Library (Lib) nosy: +docs@python title: time_ns() and time() cannot be compared on windows -> [time] document that integer nanoseconds may be more precise than float type: be

[issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation

2021-03-21 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg380944 ___ Python tracker <https://bugs.python.org/issue37205> ___ ___ Python-bugs-list mailin

[issue37205] time.perf_counter() is not system-wide on Windows, in disagreement with documentation

2021-03-21 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg380941 ___ Python tracker <https://bugs.python.org/issue37205> ___ ___ Python-bugs-list mailin

[issue43585] perf_counter() returns computers uptime

2021-03-21 Thread Eryk Sun
Eryk Sun added the comment: For Windows, starting with Python 3.10, the value of time.perf_counter[_ns]() is system wide instead of relative to the first time it's accessed in the current process. This allows comparing the counter value across processes. See bpo-37205. --

[issue15286] normpath does not work with local literal paths

2021-03-21 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg338058 ___ Python tracker <https://bugs.python.org/issue15286> ___ ___ Python-bugs-list mailin

[issue15286] normpath does not work with local literal paths

2021-03-21 Thread Eryk Sun
Eryk Sun added the comment: This old issue still needs to be fixed. The check for special_prefixes in ntpath.normpath() must be removed in order to be consistent with WinAPI GetFullPathNameW(). In Windows, one can just call ntpath.abspath() to ensure that nt._getfullpathname() is called

[issue35754] [Windows] I/O on a broken pipe may raise an EINVAL OSError instead of BrokenPipeError

2021-03-21 Thread Eryk Sun
Eryk Sun added the comment: It's still the case that we have to guess that a generic EINVAL (22) is actually EPIPE. Low-level wrapper functions in Python/fileutils.c, such as _Py_read() and _Py_write_impl(), should try to get a better error code by calling Python's custom winerro

[issue38188] Incorrect Argument Order for Calls to _winapi.DuplicateHandle() in multiprocessing.reduction.DupHandle

2021-03-21 Thread Eryk Sun
Change by Eryk Sun : -- components: +Library (Lib) stage: -> needs patch type: -> behavior versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7 ___ Python tracker <https://bugs.python.org/i

[issue39920] os.stat() and os.lstat() fail with Windows device paths

2021-03-21 Thread Eryk Sun
Eryk Sun added the comment: 3.7.8, released on 2020-06-27, was the last bugfix release of Python 3.7, so I'm closing this issue as a duplicate of bpo-33898, which is about supporting device paths correctly in pathlib. -- resolution: -> duplicate stage: -> resolved s

[issue36860] Inconsistent/Undocumented behavior with pathlib resolve and absolute on Windows

2021-03-21 Thread Eryk Sun
Eryk Sun added the comment: The issue with non-strict resolution of relative paths that do not exist is being addressed in bpo-38671. The proposal to support and document the absolute() method is addressed in bpo-29688. -- resolution: -> duplicate stage: -> resolved status

[issue38428] Can't gracefully ctrl+C multiprocessing pool on Python3 & Windows

2021-03-21 Thread Eryk Sun
Eryk Sun added the comment: In bpo-29971 it was suggested to split the PyThread lock API in Windows into an "interruptible lock" API that's based on emulated condition variables and a "fast lock" API that's based on native condition variables and SRW locks. May

[issue43586] sys.path is weird in Windows 10.

2021-03-21 Thread Eryk Sun
Eryk Sun added the comment: > on windows, they print sys.path[0] is python38.zip not "". Isolated mode is probably enabled, i.e. `sys.flags.isolated == 1`. It's enabled by default for the embedded distribution [1], or if a "._pth" file exists beside and wi

[issue23407] os.walk always follows Windows junctions

2021-03-22 Thread Eryk Sun
Eryk Sun added the comment: Python 3.8 introduced some behavior changes to how reparse points are supported, but generalized support for handling name-surrogate reparse points as symlinks was not implemented. Python continues to set S_IFLNK in st_mode only for IO_REPARSE_TAG_SYMLINK reparse

[issue2920] Patch to print symbolic value of errno in OSError.__str__()

2021-03-22 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10 -Python 3.9 ___ Python tracker <https://bugs.python.org/issue2920> ___ ___ Python-bugs-list mailing list Unsub

[issue38905] venv python reports wrong sys.executable in a subprocess on Windows

2021-03-22 Thread Eryk Sun
Eryk Sun added the comment: In some cases, the problem can be worked around by setting the __PYVENV_LAUNCHER__ environment variable and executing the base executable. For example: import os import sys import subprocess def get_python_exe_env(): if sys.executable

[issue43607] urllib's request.pathname2url not compatible with extended-length Windows file paths

2021-03-23 Thread Eryk Sun
Eryk Sun added the comment: RFC8089 doesn't specify "a mechanism for translating namespaced paths ["\\?\" and "\\.\"] to or from file URIs", and the Windows shell doesn't support them. So what's the practical benefit of supporting them in nturl2p

[issue43607] urllib's request.pathname2url not compatible with extended-length Windows file paths

2021-03-23 Thread Eryk Sun
Eryk Sun added the comment: > I suppose the most reasonable behavior is to strip out the "\\?\" before > attempting the conversion as the path is sensible and parsable without Okay, so you're not looking to preserve the fact that it's a \\?\ verbatim path in

[issue43610] Ctrl C makes interpreter exit

2021-03-23 Thread Eryk Sun
Eryk Sun added the comment: > Python interpreter will exit when using Ctrl C to interrupt > some Python module functions with read operations. The REPL exits when stdin is closed. open() allows the filename to be an existing file descriptor without requiring a parameter such as "

[issue43620] os.path.join does not use os.sep as documentation claims

2021-03-24 Thread Eryk Sun
Eryk Sun added the comment: The documentation of os.path.join() uses os.sep because it's written from the perspective of the platform's os.path, which is posixpath on a POSIX system and ntpath on a Windows system. If you need to work with POSIX paths in Windows, then use posixpat

[issue43620] os.path.join does not use os.sep as documentation claims

2021-03-25 Thread Eryk Sun
Eryk Sun added the comment: > certainly you can see this is a doc bug, since the doc clearly > states that os.sep is utilized to join the elements of the path, > when it clearly isn't; right? os.path is ntpath in Windows, which uses backslash as the path separator, which

<    1   2   3   4   5   6   7   8   9   10   >