[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2021-11-01 Thread Eryk Sun
Change by Eryk Sun : -- nosy: -gustavoxo, jugnugee2, kevingeller, printerhelpcenter ___ Python tracker <https://bugs.python.org/issue32545> ___ ___ Python-bug

[issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405712 ___ Python tracker <https://bugs.python.org/issue26903> ___ ___ Python-bugs-list mailin

[issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- nosy: -Alex.Willmer, ahmedsayeed1982 ___ Python tracker <https://bugs.python.org/issue26903> ___ ___ Python-bugs-list mailing list Unsub

[issue39573] [C API] Avoid accessing PyObject and PyVarObject members directly: add Py_SET_TYPE() and Py_IS_TYPE(), disallow Py_TYPE(obj)=type

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405687 ___ Python tracker <https://bugs.python.org/issue39573> ___ ___ Python-bugs-list mailin

[issue39573] [C API] Avoid accessing PyObject and PyVarObject members directly: add Py_SET_TYPE() and Py_IS_TYPE(), disallow Py_TYPE(obj)=type

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- nosy: -ahmedsayeed1982 ___ Python tracker <https://bugs.python.org/issue39573> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17239] XML vulnerabilities in Python

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- nosy: +Arfrever, barry, benjamin.peterson, christian.heimes, eli.bendersky, ezio.melotti, franck, georg.brandl, jwilk, larry, martin.panter, mcepl, mitar, ned.deily, pitrou, rhettinger, rsandwick3, scoder, serhiy.storchaka, steve.dower, vstinner

[issue17239] XML vulnerabilities in Python

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405686 ___ Python tracker <https://bugs.python.org/issue17239> ___ ___ Python-bugs-list mailin

[issue17239] XML vulnerabilities in Python

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405689 ___ Python tracker <https://bugs.python.org/issue17239> ___ ___ Python-bugs-list mailin

[issue17239] XML vulnerabilities in Python

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- components: +Library (Lib), XML versions: +Python 3.7, Python 3.9 ___ Python tracker <https://bugs.python.org/issue17239> ___ ___ Pytho

[issue7673] audioop: check that length is a multiple of the size

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405688 ___ Python tracker <https://bugs.python.org/issue7673> ___ ___ Python-bugs-list mailin

[issue7673] audioop: check that length is a multiple of the size

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- nosy: -ahmedsayeed1982 ___ Python tracker <https://bugs.python.org/issue7673> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27863] multiple issues in _elementtree module

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405690 ___ Python tracker <https://bugs.python.org/issue27863> ___ ___ Python-bugs-list mailin

[issue27863] multiple issues in _elementtree module

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- nosy: -ahmedsayeed1982 ___ Python tracker <https://bugs.python.org/issue27863> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- nosy: +AlexWaygood, Anthony Sottile, BTaskaya, barry, brett.cannon, eric.smith, gousaiyang, gvanrossum, levkivskyi, lukasz.langa, methane, miss-islington, pablogsal, serhiy.storchaka, steven.daprano, terry.reedy, veky -ahmedsayeed1982, ezio.melotti, vstinner

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405693 ___ Python tracker <https://bugs.python.org/issue38605> ___ ___ Python-bugs-list mailin

[issue3262] re.split doesn't split with zero-width regex

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- nosy: -ahmedsayeed1982 ___ Python tracker <https://bugs.python.org/issue3262> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3262] re.split doesn't split with zero-width regex

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405692 ___ Python tracker <https://bugs.python.org/issue3262> ___ ___ Python-bugs-list mailin

[issue27773] Excessive Py_XDECREF in the ssl module:

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- nosy: -ahmedsayeed1982, lys.nikolaou, pablogsal versions: +Python 3.6 -Python 3.11 ___ Python tracker <https://bugs.python.org/issue27

[issue27773] Excessive Py_XDECREF in the ssl module:

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405691 ___ Python tracker <https://bugs.python.org/issue27773> ___ ___ Python-bugs-list mailin

[issue38692] add a pidfd child process watcher

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- components: +asyncio -Build nosy: +asvetlov, yselivanov -ahmedsayeed1982 versions: +Python 3.9 -Python 3.11 ___ Python tracker <https://bugs.python.org/issue38

[issue38692] add a pidfd child process watcher

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405695 ___ Python tracker <https://bugs.python.org/issue38692> ___ ___ Python-bugs-list mailin

[issue39926] unicodedata for Unicode 13.0.0

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- nosy: -ahmedsayeed1982, larry versions: +Python 3.9 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue39926> ___ ___ Pytho

[issue39926] unicodedata for Unicode 13.0.0

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405697 ___ Python tracker <https://bugs.python.org/issue39926> ___ ___ Python-bugs-list mailin

[issue39926] unicodedata for Unicode 13.0.0

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- components: -Argument Clinic ___ Python tracker <https://bugs.python.org/issue39926> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- components: +Interpreter Core -IDLE nosy: -ahmedsayeed1982, terry.reedy ___ Python tracker <https://bugs.python.org/issue12782> ___ ___

[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405694 ___ Python tracker <https://bugs.python.org/issue12782> ___ ___ Python-bugs-list mailin

[issue38379] finalizer resurrection in gc

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- components: +Interpreter Core -IDLE nosy: -ahmedsayeed1982, terry.reedy versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.6 ___ Python tracker <https://bugs.python.org/issue38

[issue38379] finalizer resurrection in gc

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405696 ___ Python tracker <https://bugs.python.org/issue38379> ___ ___ Python-bugs-list mailin

[issue21082] os.makedirs(exist_ok=True) is not thread-safe: umask is set temporary to 0, serious security problem

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- components: +Library (Lib) -Subinterpreters nosy: -ahmedsayeed1982 ___ Python tracker <https://bugs.python.org/issue21082> ___ ___ Pytho

[issue21082] os.makedirs(exist_ok=True) is not thread-safe: umask is set temporary to 0, serious security problem

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405701 ___ Python tracker <https://bugs.python.org/issue21082> ___ ___ Python-bugs-list mailin

[issue13936] RFE: change bool(datetime.time(0, 0, 0)) to evaluate as True

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- components: +Library (Lib) -Tkinter nosy: -ahmedsayeed1982 ___ Python tracker <https://bugs.python.org/issue13936> ___ ___ Python-bug

[issue13936] RFE: change bool(datetime.time(0, 0, 0)) to evaluate as True

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405699 ___ Python tracker <https://bugs.python.org/issue13936> ___ ___ Python-bugs-list mailin

[issue28524] Set default argument of logging.disable() to logging.CRITICAL

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- components: +Library (Lib) -Subinterpreters nosy: -ahmedsayeed1982 versions: +Python 3.7 -Python 3.8 ___ Python tracker <https://bugs.python.org/issue28

[issue28524] Set default argument of logging.disable() to logging.CRITICAL

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405700 ___ Python tracker <https://bugs.python.org/issue28524> ___ ___ Python-bugs-list mailin

[issue33725] Python crashes on macOS after fork with no exec

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405703 ___ Python tracker <https://bugs.python.org/issue33725> ___ ___ Python-bugs-list mailin

[issue33725] Python crashes on macOS after fork with no exec

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- components: +macOS -Library (Lib) nosy: +ned.deily, ronaldoussoren -ahmedsayeed1982 versions: +Python 3.8 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue33

[issue17482] functools.update_wrapper mishandles __wrapped__

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- components: -IO nosy: -ahmedsayeed1982 versions: -Python 3.9 ___ Python tracker <https://bugs.python.org/issue17482> ___ ___ Python-bug

[issue17482] functools.update_wrapper mishandles __wrapped__

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405702 ___ Python tracker <https://bugs.python.org/issue17482> ___ ___ Python-bugs-list mailin

[issue12168] SysLogHandler incorrectly appends \000 to messages

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- components: +Library (Lib) -Regular Expressions nosy: -ahmedsayeed1982, ezio.melotti, mrabarnett versions: -Python 3.10 ___ Python tracker <https://bugs.python.org/issue12

[issue12168] SysLogHandler incorrectly appends \000 to messages

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405704 ___ Python tracker <https://bugs.python.org/issue12168> ___ ___ Python-bugs-list mailin

[issue45710] Junction/symbolic folder access error on Windows 11

2021-11-04 Thread Eryk Sun
Eryk Sun added the comment: It's not completely surprising that attempting to traverse a name-surrogate reparse point under "%UserProfile%\AppData" fails when using the store app. If you can't or won't move the mountpoint up to %UserProfile%, or anywhere else outsid

[issue45720] Remove shlwapi dependency on Windows

2021-11-05 Thread Eryk Sun
Eryk Sun added the comment: > I also don't actually see gdi32 being transitively loaded as > claimed in the Twitter thread, even back to 3.8. So presumably > there's something else going on to cause that issue. Since Windows XP, shlwapi.dll has increasingly made use of del

[issue45710] Junction/symbolic folder access error on Windows 11

2021-11-05 Thread Eryk Sun
Eryk Sun added the comment: > does this or does this not look to you like a bug in CPython? It's better to leave the detailed explanation of limits up to the document that's referenced for further information [1], but this issue isn't even briefly mentioned there. Maybe

[issue45719] SubProcess stdin.flush freezes when running python interpreter

2021-11-06 Thread Eryk Sun
Eryk Sun added the comment: Interactive mode isn't automatically enabled when stdin isn't a tty, so the interpreter tries to read all of stdin, until the result is empty (i.e. EOF). You can force interactive mode with the -i command-line option. The example would also benefit fr

[issue45742] python -h can't find -R option

2021-11-07 Thread Eryk Sun
Eryk Sun added the comment: Apparently -R is still implemented in Python 3, even though hash randomization is enabled by default now. Unlike Python 2, in Python 3 -R overrides the PYTHONHASHSEED environment variable, making it effectively the same as "PYTHONHASHSEED=random". F

[issue45742] python -h can't find -R option

2021-11-07 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.org/issue45742> ___ ___ Python-bugs-list mailing list Unsub

[issue45742] python -h can't find -R option

2021-11-07 Thread Eryk Sun
Eryk Sun added the comment: Either the documentation [1] or the behavior needs to be fixed. The following statement is false: Turn on hash randomization. This option only has an effect if the PYTHONHASHSEED environment variable is set to 0, since hash randomization is enabled by

[issue45710] Junction/symbolic folder access error on Windows 11

2021-11-07 Thread Eryk Sun
Eryk Sun added the comment: All we can do here is document the store app's limitation on cross-volume reparse points (junctions, symlinks) in "%UserProfile%\AppData". I suppose it's a rare enough problem that it can just be closed as a third-party issue. -- reso

[issue45354] test_winconsoleio fails on Windows 11

2021-11-09 Thread Eryk Sun
Eryk Sun added the comment: The embedded manifest in python[_d].exe is missing, so the process is running with Windows 8 compatibility mode (i.e. 6.2.9200), and thus the check for Windows 11+ (10.0.22000+) is false. It's disappointing that compatibility mode doesn't restore t

[issue45354] test_winconsoleio fails on Windows 11

2021-11-09 Thread Eryk Sun
Eryk Sun added the comment: It would also work to add RT_MANIFEST=24 to the ResourceCompile PreprocessorDefinitions in PCbuild\pyproject.props. Though to me, adding the definition there is obscure compared to including a private header, such as "resourcet

[issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors

2021-11-09 Thread Eryk Sun
Eryk Sun added the comment: Steve, instead of manually defining RT_MANIFEST, try including "winresrc.h" in the resource definition files. This SDK header includes "winuser.rh" (note the ".rh" extension), which, among other things, includes the followin

[issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors

2021-11-09 Thread Eryk Sun
Eryk Sun added the comment: Also, I suggest using CREATEPROCESS_MANIFEST_RESOURCE_ID (1) and ISOLATIONAWARE_MANIFEST_RESOURCE_ID (2) instead of hard-coded resource IDs. -- ___ Python tracker <https://bugs.python.org/issue45

[issue45777] Issue in reading files with a path longer than 256 letters after latest update

2021-11-10 Thread Eryk Sun
Eryk Sun added the comment: Ensure that the system has LongPathsEnabled set to 1. For example, in PowerShell with administrator (elevated) access: PS C:\> $p = "HKLM:\System\CurrentControlSet\Control\Filesystem" PS C:\> get-itempropertyvalue $p LongPathsEnabled 0

[issue45777] Issue in reading files with a path longer than 256 letters after latest update

2021-11-10 Thread Eryk Sun
Eryk Sun added the comment: > Did my accidental breakage of the resource files make it > into the last 3.9 release? Yep, version 3.9.8 of the store app was built last Friday, the day after removing "winuser.h" from the resource definition files. I just installed it and

[issue45777] Issue in reading files with a path longer than 256 letters after latest update

2021-11-10 Thread Eryk Sun
Eryk Sun added the comment: > How are you checking whether it's there or not? The desktop distribution of 3.9.8 is the most obvious case, since it causes sys.getwindowsversion() to report Windows 8.0 (6.2.9200): C:\Temp>"C:\Program Files\Python39\python.exe"

[issue45789] Python execution broken after update via Windows Store

2021-11-11 Thread Eryk Sun
Eryk Sun added the comment: > It fails with "The system cannot find the file > C:\Users\\AppData\Local\Microsoft\WindowsApps\python3.9.exe." The shell's CreateProcessW() call failed with ERROR_FILE_NOT_FOUND (2). The file exists, but it's probably a broken app

[issue45789] Python execution broken after update via Windows Store

2021-11-12 Thread Eryk Sun
Change by Eryk Sun : Removed file: https://bugs.python.org/file50434/read_appexec.py ___ Python tracker <https://bugs.python.org/issue45789> ___ ___ Python-bugs-list m

[issue45789] Python execution broken after update via Windows Store

2021-11-12 Thread Eryk Sun
Eryk Sun added the comment: > Could it be possible that it might not be able to replace that > link when it is currently in use? Appexec links are only used briefly to find the real executable and create the access token that allows executing it. I don't know how your lo

[issue45789] Python execution broken after update via Windows Store

2021-11-12 Thread Eryk Sun
Eryk Sun added the comment: > The python3.9.exe file in the WindowsApps folder looks like > a real executable and not a link. As requested, and as shown in the output, you tested the file in Python 3.9's subdirectory of "WindowsApps", not in "WindowsApps" i

[issue45789] Python execution broken after update via Windows Store

2021-11-12 Thread Eryk Sun
Eryk Sun added the comment: > Also all those files are 0 bytes - even the working ones. The files should have no data, just appexec links. It's just an empty file if there's no link set. > Since I cannot even run the actual executable there seems to be > an issue with

[issue45742] python -h can't find -R option

2021-11-12 Thread Eryk Sun
Eryk Sun added the comment: > Which doc is wrong? Currently -R overrides a non-zero seed value in PYTHONHASHSEED. The behavior changed in 3.7. Either the docs or the behavior need to be fixed. To repeat my previous example (this time in Windows): C:\>set PYTHONHASHSEED=37

[issue31842] pathlib: "Incorrect function" during resolve()

2021-11-13 Thread Eryk Sun
Eryk Sun added the comment: > perfectly valid redirected paths (winfsp ram drives for example) I mounted a WinFsp MEMFS filesystem on a directory, which set a mountpoint that targets the root path of a volume device in the native "\Device" object directory. It didn't cr

[issue31842] pathlib: "Incorrect function" during resolve()

2021-11-13 Thread Eryk Sun
Change by Eryk Sun : -- stage: -> needs patch type: -> behavior ___ Python tracker <https://bugs.python.org/issue31842> ___ ___ Python-bugs-list

[issue45742] python -h can't find -R option

2021-11-14 Thread Eryk Sun
Eryk Sun added the comment: How about this? Enable hash randomization. This option overrides PYTHONHASHSEED to use the default behavior. -- ___ Python tracker <https://bugs.python.org/issue45

[issue15500] Python should support exporting thread names to the OS

2021-11-14 Thread Eryk Sun
Eryk Sun added the comment: Zackery, here's an initial draft implementation for Windows 10+ that's based on the interface you created in PR 14578. It calls WinAPI SetThreadDescription(), which sets the thread's name directly in the kernel thread object (i.e. ETHREAD.Th

[issue21876] os.rename(src, dst) does nothing when src and dst files are hard-linked

2021-11-17 Thread Eryk Sun
Eryk Sun added the comment: > It's nice if os.rename() can be atomic. How about fixing the behavior in shutil.move()? Currently it tries os.rename(src, dst) without checking for this case. For example: >>> os.path.samefile('src', 'dst')

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-22 Thread Eryk Sun
Eryk Sun added the comment: > The Windows cmd implementation clearly uses readline or > some compatible lib under the hood The REPL shell and input() call PyOS_Readline(). If this call isn't hooked (e.g. by the readline module), and stdin is a console file, then it reads a li

[issue45901] store app file type ignores command-line arguments

2021-11-25 Thread Eryk Sun
New submission from Eryk Sun : The file association for the store app uses '"%1"' for the command-line parameters. This ignores the rest of the command-line arguments, i.e. '%*'. In PC/layout/support/appxmanifest.py, the add_application() calls that

[issue44452] Allow paths to be joined without worrying about a leading slash

2021-11-26 Thread Eryk Sun
Eryk Sun added the comment: > and b / a gives me WindowsPath('/a/b'). So I'm like "ok, a seems > like absolute, I will test for that" but on Windows a.is_absolute() > is False. Path.is_absolute() is true if a path has a `root` and, for a Windows path, also

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-27 Thread Eryk Sun
Eryk Sun added the comment: > You can take the view that it's not a bug (with some justification), > but a few lines in the cmd docs would make all the difference in > terms of wasted time. If anything, I think the readline documentation should have a note explaining th

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-27 Thread Eryk Sun
Eryk Sun added the comment: > AFAIK the reason command history works in cmd.py on Windows is > that it's built into the terminal program. Or maybe into the > operating system. As mentioned in msg406800, input editing, history (e.g. up/down arrows, F7 popup, F8 completion), and

[issue45870] There's no readline module on Windows Python (cmd.Cmd)

2021-11-27 Thread Eryk Sun
Eryk Sun added the comment: > What does "the builtin readline support" refer to here? > Presumably not GNU Readline? That's referring to the readline(ish) support that's built into the console host for ReadFile() and ReadConsole() calls when the input stream is

[issue45914] Very first multiprocessing example not working on Windows 11

2021-11-27 Thread Eryk Sun
Eryk Sun added the comment: > AttributeError: Can't get attribute 'f' > on The Windows API only supports the spawn method of process creation. In POSIX (except macOS), the default is the fork method, for which the child inherits the interactive main module of the par

[issue45915] Use fcntl(fd, F_GETFD) to check whether an fd is valid

2021-11-28 Thread Eryk Sun
Eryk Sun added the comment: In Windows, GetFileType((HANDLE)_get_osfhandle(fd)) is several times faster than close(dup(fd)). For example: #if defined(MS_WINDOWS) int type; _Py_BEGIN_SUPPRESS_IPH type = GetFileType((HANDLE)_get_osfhandle(fd)); _Py_END_SUPPRESS_IPH return

[issue45919] Use WinAPI GetFileType() in is_valid_fd()

2021-11-28 Thread Eryk Sun
New submission from Eryk Sun : During startup, is_valid_fd() in Python/pylifecycle.c is called to validate stdin, stdout, and stderr. Performance isn't critical here, but every bit helps in reducing startup time. In my tests, implementing this check in Windows via GetFileType((H

[issue45915] Use fcntl(fd, F_GETFD) to check whether an fd is valid

2021-11-28 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg407216 ___ Python tracker <https://bugs.python.org/issue45915> ___ ___ Python-bugs-list mailin

[issue45915] Use fcntl(fd, F_GETFD) to check whether an fd is valid

2021-11-28 Thread Eryk Sun
Eryk Sun added the comment: I've created bpo-45919 with a suggested enhancement to use GetFileType() in Windows, since the Windows C runtime does not provide fcntl(). -- ___ Python tracker <https://bugs.python.org/is

[issue19941] python -m imports non-ASCII .py file without encoding declaration

2021-11-30 Thread Eryk Sun
Eryk Sun added the comment: test.py is a UTF-8 file, which is the default source encoding in Python 3. It fails as expected if the test script is encoded differently, such as Latin-1, unless the source encoding is declared. -- nosy: +eryksun resolution: -> out of date st

[issue12957] [doc] mmap.resize changes memory address of mmap'd region

2021-12-01 Thread Eryk Sun
Eryk Sun added the comment: mmap no longer allows resizing if the object has buffer exports. For example: >>> m = mmap.mmap(-1, 4096, access=mmap.ACCESS_WRITE) >>> p = (ctypes.c_char * 4096).from_buffer(m) >>> m.resize(8192) Traceback (most re

[issue45944] Avoid calling isatty() for most open() calls

2021-12-01 Thread Eryk Sun
Eryk Sun added the comment: > make it returning False without invoking a system call if the file > size is non-zero it will eliminate the need to expose _size. I suggest using the file type instead of the size. There's no reason to call isatty() if it's not an S_IFCHR file.

[issue24966] shutil.get_terminal_size() throws ValueError if stdout is detached, no fallback

2021-12-02 Thread Eryk Sun
Eryk Sun added the comment: This was fixed in 3.5. -- nosy: +eryksun resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Fix shutil.get_terminal_size() to catch AttributeError ___ Python tra

[issue45914] Very first multiprocessing example not working on Windows 11

2021-12-03 Thread Eryk Sun
Eryk Sun added the comment: > not quite clear to me it this only applies on Windows or is general. macOS defaults to the spawn method (bpo-33725). -- ___ Python tracker <https://bugs.python.org/issu

[issue40467] subprocess: replacement shell on windows with executable="..." arg

2021-12-04 Thread Eryk Sun
Eryk Sun added the comment: > it might be nice if it's possible to give some sort of useful > warning/error when this happens -- perhaps say that specifying > both shell=True and executable="..." isn't supported on Windows? The `shell` parameter is documented as

[issue40467] subprocess: replacement shell on windows with executable="..." arg

2021-12-04 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10, Python 3.11 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue40467> ___ ___ Python-bugs-list mailin

[issue44540] venv: activate.bat fails for venv with special characters in PATH

2021-12-04 Thread Eryk Sun
Change by Eryk Sun : -- stage: -> needs patch versions: +Python 3.10, Python 3.11 ___ Python tracker <https://bugs.python.org/issue44540> ___ ___ Python-

[issue44735] Failed venv Activation With "&" In Folder Name

2021-12-04 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue44735> ___

[issue45987] os.chdir in unittest's test case causes RecursionError on Windows

2021-12-05 Thread Eryk Sun
Eryk Sun added the comment: Windows opens the working directory without delete sharing, so trying to delete it fails with a PermissionError for ERROR_SHARING_VIOLATION (winerror 32). I discussed a modified version of the _rmtree() method in msg377358. The proposed version would try to reset

[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Eryk Sun
Eryk Sun added the comment: The shebang "#!/usr/bin/env python" searches PATH for "python" plus the PATHEXT file extensions. The shebang "#!/usr/bin/env python3" uses the highest version of Python 3 from the registry. It doesn't search PATH because Pytho

[issue8161] inconsistency behavior in ctypes.c_char_p dereferencing

2021-12-06 Thread Eryk Sun
Eryk Sun added the comment: This appears to be misreported. The implementation in 3.1.2rc1 looks correct to me [1]. Either way, it's out of date. That said, the emulation of a simple type in an aggregate type is still incomplete nowadays. It's not implemented when a c_char or c_w

[issue46003] os.replace is not cross-platform: at least improve documentation

2021-12-06 Thread Eryk Sun
Eryk Sun added the comment: The os module tries to avoid documenting low-level OS behaviors. It would be unreliable and difficult to maintain. In the case of os.replace(), in Windows it calls MoveFileExW() with the flag MOVEFILE_REPLACE_EXISTING [1]. The source and destination paths must

[issue31879] Launcher fails on custom command starting with "python"

2021-12-06 Thread Eryk Sun
Eryk Sun added the comment: Whether it should be this way or not, here's how it currently works. The builtin virtual paths all end with "python": static SHEBANG builtin_virtual_paths [] = { { L"/usr/bin/env python", TRUE }, { L"/usr/bin/pyth

[issue36850] shutil.copy2 fails with even with source network filesystem not supporting extended attributes

2021-12-07 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker <https://bugs.python

[issue33411] All console message are in the error output in bash interpretor

2021-12-07 Thread Eryk Sun
Eryk Sun added the comment: PyOS_Readline() calls PyOS_StdioReadline() if sys_stdin or sys_stdout isn't a tty file. This function always writes the prompt to stderr, as follows: if (prompt) { fprintf(stderr, "%s", prompt); } fflush(stderr); Maybe t

[issue46002] py Launcher for Windows with MSYS2

2021-12-07 Thread Eryk Sun
Eryk Sun added the comment: You can use "#!python", or "#!/usr/bin/python", or "#!/usr/local/bin/python". They're all equivalent, and they do not search PATH. Since no wanted version is specified, the launcher will look for a version to run in the

[issue10608] [doc] Add a section to Windows FAQ explaining os.symlink

2021-12-08 Thread Eryk Sun
Eryk Sun added the comment: Ingrid's patch misses the requirement to log off after adding a privilege to the current account. A new access token is required, from a fresh logon. Privileges can also be added to groups, not just to individual user accounts. Thus the symlink privilege c

[issue44540] venv: activate.bat fails for venv with special characters in PATH

2021-12-08 Thread Eryk Sun
Eryk Sun added the comment: There's no parsing problem with delayed expansion (e.g. "!VAR!" instead of %VAR%) and for loop variables (e.g. "%%a"). The solution is thus to execute in a local scope that enables delayed expansion and command extensions [1]. Tha

[issue44540] venv: activate.bat fails for venv with special characters in PATH

2021-12-08 Thread Eryk Sun
Change by Eryk Sun : Added file: https://bugs.python.org/file50484/deactivate.bat ___ Python tracker <https://bugs.python.org/issue44540> ___ ___ Python-bugs-list mailin

[issue23104] [Windows x86-64] ctypes: Incorrect function call

2021-12-09 Thread Eryk Sun
Eryk Sun added the comment: Victor's comment wasn't relevant. objid() stays referenced during the call. Anyway, I just built testlib.c and verified that this ctypes example works correctly in both 64-bit 3.4.4 and 3.10, so the issue is out of date. -- nosy: +eryksun

[issue23104] [Windows x86-64] ctypes: Incorrect function call

2021-12-09 Thread Eryk Sun
Change by Eryk Sun : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue23104> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue12142] Reference cycle when importing ctypes

2021-12-09 Thread Eryk Sun
Eryk Sun added the comment: The _ctypes extension module could have a dict that maps each format code to its (size, alignment), based on `formattable`. Then direct size comparisons wouldn't be limited to types defined by the struct module, and it wouldn't be necessary to create c_

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