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')
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
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
Change by Eryk Sun :
--
stage: -> needs patch
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue31842>
___
___
Python-bugs-list
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
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
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
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
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
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
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
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"
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
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
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
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
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
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
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
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
Change by Eryk Sun :
--
versions: +Python 3.11, Python 3.9
___
Python tracker
<https://bugs.python.org/issue45742>
___
___
Python-bugs-list mailing list
Unsub
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
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
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
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
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
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405704
___
Python tracker
<https://bugs.python.org/issue12168>
___
___
Python-bugs-list mailin
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
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405702
___
Python tracker
<https://bugs.python.org/issue17482>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
components: -IO
nosy: -ahmedsayeed1982
versions: -Python 3.9
___
Python tracker
<https://bugs.python.org/issue17482>
___
___
Python-bug
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
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405703
___
Python tracker
<https://bugs.python.org/issue33725>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405700
___
Python tracker
<https://bugs.python.org/issue28524>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
components: +Library (Lib) -Subinterpreters
nosy: -ahmedsayeed1982
versions: +Python 3.7 -Python 3.8
___
Python tracker
<https://bugs.python.org/issue28
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405699
___
Python tracker
<https://bugs.python.org/issue13936>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
components: +Library (Lib) -Tkinter
nosy: -ahmedsayeed1982
___
Python tracker
<https://bugs.python.org/issue13936>
___
___
Python-bug
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405701
___
Python tracker
<https://bugs.python.org/issue21082>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
components: +Library (Lib) -Subinterpreters
nosy: -ahmedsayeed1982
___
Python tracker
<https://bugs.python.org/issue21082>
___
___
Pytho
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405696
___
Python tracker
<https://bugs.python.org/issue38379>
___
___
Python-bugs-list mailin
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
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405694
___
Python tracker
<https://bugs.python.org/issue12782>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
components: +Interpreter Core -IDLE
nosy: -ahmedsayeed1982, terry.reedy
___
Python tracker
<https://bugs.python.org/issue12782>
___
___
Change by Eryk Sun :
--
components: -Argument Clinic
___
Python tracker
<https://bugs.python.org/issue39926>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405697
___
Python tracker
<https://bugs.python.org/issue39926>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
nosy: -ahmedsayeed1982, larry
versions: +Python 3.9 -Python 3.7
___
Python tracker
<https://bugs.python.org/issue39926>
___
___
Pytho
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405695
___
Python tracker
<https://bugs.python.org/issue38692>
___
___
Python-bugs-list mailin
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
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405691
___
Python tracker
<https://bugs.python.org/issue27773>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
nosy: -ahmedsayeed1982, lys.nikolaou, pablogsal
versions: +Python 3.6 -Python 3.11
___
Python tracker
<https://bugs.python.org/issue27
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405692
___
Python tracker
<https://bugs.python.org/issue3262>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
nosy: -ahmedsayeed1982
___
Python tracker
<https://bugs.python.org/issue3262>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405693
___
Python tracker
<https://bugs.python.org/issue38605>
___
___
Python-bugs-list mailin
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
Change by Eryk Sun :
--
nosy: -ahmedsayeed1982
___
Python tracker
<https://bugs.python.org/issue27863>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405690
___
Python tracker
<https://bugs.python.org/issue27863>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
nosy: -ahmedsayeed1982
___
Python tracker
<https://bugs.python.org/issue7673>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405688
___
Python tracker
<https://bugs.python.org/issue7673>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
components: +Library (Lib), XML
versions: +Python 3.7, Python 3.9
___
Python tracker
<https://bugs.python.org/issue17239>
___
___
Pytho
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405689
___
Python tracker
<https://bugs.python.org/issue17239>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405686
___
Python tracker
<https://bugs.python.org/issue17239>
___
___
Python-bugs-list mailin
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
Change by Eryk Sun :
--
nosy: -ahmedsayeed1982
___
Python tracker
<https://bugs.python.org/issue39573>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405687
___
Python tracker
<https://bugs.python.org/issue39573>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
nosy: -Alex.Willmer, ahmedsayeed1982
___
Python tracker
<https://bugs.python.org/issue26903>
___
___
Python-bugs-list mailing list
Unsub
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405712
___
Python tracker
<https://bugs.python.org/issue26903>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
nosy: -gustavoxo, jugnugee2, kevingeller, printerhelpcenter
___
Python tracker
<https://bugs.python.org/issue32545>
___
___
Python-bug
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg368787
___
Python tracker
<https://bugs.python.org/issue32545>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg389658
___
Python tracker
<https://bugs.python.org/issue32545>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
nosy: -emmajohan
___
Python tracker
<https://bugs.python.org/issue32545>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg405432
___
Python tracker
<https://bugs.python.org/issue32545>
___
___
Python-bugs-list mailin
Eryk Sun added the comment:
Here's an example test that calls WinAPI GetConsoleWindow() and
IsWindowVisble() in a child process.
if mswindows:
try:
import ctypes
except ImportError:
ctypes = None
# added in Win32ProcessTestCase
Eryk Sun added the comment:
In theory, a crash could be prevented in most cases by setting a larger stack
guarantee (i.e. region of guard pages) via SetThreadStackGuarantee() [1] and
using a vectored exception handler [2]. The exception handler can set a flag in
the thread state that
Eryk Sun added the comment:
> There's nothing gained by complicating this API with more options.
Yes, both options is too much. I suggested force_hide_console as an alternative
to force_hide, not for both to be implemented. It would be the same as
CreateNoWindow in .NET ProcessStar
Eryk Sun added the comment:
If only force_hide is implemented, based on `wShowWindow=SW_HIDE`, please
ensure that it's clearly documented that this option hides the main window
(i.e. first top-level window) of any application that doesn't bypass the
default behavior of the wind
Eryk Sun added the comment:
> is it feasible to just have one option that handles all cases?
I'm in favor of whatever has broad support and is least surprising for users. I
like CREATE_NO_WINDOW, which is restricted to console applications. The
alternative is hiding the window, like
Eryk Sun added the comment:
> What is the most trivial way to test it's behaviour?
With CREATE_NO_WINDOW, the child process is attached to a console that has no
window. Thus calling GetConsoleWindow() in the child returns NULL without an
error. OTOH, if the child has no cons
Eryk Sun added the comment:
> like those returned by the open() function. Their parameters are
> chosen as follows..."
The `newline` argument for sys.std* isn't documented, but it should be. It
happens to be newline='\n' on every platform except Windows.
> its
Eryk Sun added the comment:
> '\r' is not handled, though it is documented that it
> should be supported.
Where is it documented that sys.stdin uses universal newlines mode? The newline
behavior isn't documented in the sys module [1], though it should be. It's h
Eryk Sun added the comment:
> Alternatively, can't we just os.chdir(self._old_cwd) in __enter__ and
> preemptively fail?
If the context manager isn't going to address the long-path case reliably using
either a file-descriptor approach or repeated relative chdir() call
Eryk Sun added the comment:
> but I'm interrested in knowing more about the issue/original cause.
When the readline module is imported in interactive mode, the
PyOS_ReadlineFunctionPointer function pointer is set to call_readline(), which
uses GNU Readline. Otherwise PyOS_Readline
Eryk Sun added the comment:
The pip package installer is not part of Python's standard library. Issues with
pip should be reported at the following site:
https://github.com/pypa/pip/issues
Note that pip 20.0+ automatically switches to a --user installation if the user
lacks the req
Eryk Sun added the comment:
The os.environ description appears to be worded as the "string environment" in
contrast to the os.environb "environment as byte strings". I like the emphasis
on the "process environment". How about "A mapping object of key an
Eryk Sun added the comment:
This is from checking whether the \\?\ prefix can be stripped. The
_getfinalpathname() call that it makes fails with the initial winerror
(ERROR_PATH_NOT_FOUND), since nt._getfinalpathname() still lacks support for
volume GUID paths. In this case, it assumes the
Eryk Sun added the comment:
Sorry, I seem to have missed your post last month when I scanned over the
thread on python-ideas [1].
In POSIX, it could try to handle ENAMETOOLONG by walking the path forward with
a relative chdir(). This could try to consume as many components as possible in
Eryk Sun added the comment:
> # I thought this would have to be 16, i.e. a path length over 4096, PATH_MAX
> # but seemingly just crossing 1050 is enough to fail
If os.pathconf() and PC_PATH_MAX are supported, the maximum allowed length of
an absolute path is os.pa
Eryk Sun added the comment:
> IMO, this makes it the 'system' Python.
"App Paths" entries can be used like versioned symlinks in POSIX. For example,
an "App Paths" entry for "python3.exe" can refer to a particular installation's
"python.e
Eryk Sun added the comment:
I was intending force_no_window as an alternative to adding force_hide, since
CREATE_NO_WINDOW only affects console applications. Maybe a better name is
force_hide_console.
--
___
Python tracker
<ht
Eryk Sun added the comment:
The force_hide option could also force the use of a new hidden window, even if
the current process has a console. That way the output is always hidden. For
example:
if force_hide or shell:
if force_hide and not (creationflags
Eryk Sun added the comment:
This tracker is for issues with the Python language and standard library. You
can ask for help with configuration problems on the Users discussion forum:
https://discuss.python.org/c/users/7
--
nosy: +eryksun
resolution: -> not a bug
stage: -> re
Eryk Sun added the comment:
It's up to the core devs whether or not Python should try to use a
high-resolution timer, which is currently undocumented in the Windows API and
implemented only in recent releases of Windows 10 and 11. But if this does get
supported, the code should fall ba
Eryk Sun added the comment:
> Absolute timeout using can reduce the overhead time of any variable
> and object intialization cost before the WaitForMultipleObjects()
Again, timer objects store the due time in interrupt time, not system time
(i.e. InterruptTime vs SystemTime
Eryk Sun added the comment:
> Is there any benefit of calling SetWaitableTimer() with an
> absolute timeout
No, the due time of a timer object is stored in absolute interrupt time, not
absolute system time. This has to be calculated either way, and it's actually
more work for th
Eryk Sun added the comment:
> In Python 3.11, time.sleep() is now always implemented with a
> waitable timer.
A regular waitable timer in Windows becomes signaled with the same resolution
as Sleep(). It's based on the current interrupt timer period, which can be
lowered
Eryk Sun added the comment:
> use the build number as reference instead of the major.minor
It could check the (major, minor, build) tuple, which allows reporting 10.1+ as
"post11" and minimizes hard coding of build numbers. For example, given
win32_ver() iterates by (major,
Eryk Sun added the comment:
I left a message on the PR a day ago about a one-off error in the allocation of
`buff`. The size should be `MAXPATHLEN + 1`. That's what's used everywhere else
in PC/getpathp.c and what gets passed in the PathCchCombineEx(buff, MAXPATHLEN
+ 1,
Eryk Sun added the comment:
The _WIN32_CLIENT_RELEASES table based on major.minor version number isn't
helpful since Windows 10 and 11 have the same version number. win32_ver() needs
a workaround to return release "11" if the build number is 22000 or greater. Is
there any
Eryk Sun added the comment:
> This will be the change to make "special" filenames only be
> special when used on their own, and not as part of a path
For some reason, Windows 11 still reserves case-insensitive "nul" in qualified
paths, but none of the other DOS dev
Eryk Sun added the comment:
FYI, waiting for a condition variable can cause a thread to enter a wait state
that's interruptible, in theory, but the mechanism is different since condition
variables and SRW locks are pointer-sized values in user space, instead of NT
objects in kernel
Eryk Sun added the comment:
> IMO it's time to remove _PY_EMULATED_WIN_CV code path from
> pycore_condvar.h.
SleepConditionVariableSRW() can't be interrupted in PyCOND_WAIT() and
PyCOND_TIMEDWAIT(). Maybe a hybrid solution could be adopted. Use native
condition varia
Eryk Sun added the comment:
This is the same as bpo-21822, so I suppose it should be closed as well with a
reference to this issue.
--
___
Python tracker
<https://bugs.python.org/issue45
201 - 300 of 2115 matches
Mail list logo