Eryk Sun added the comment:
> I realize one could interpret the python3 in the shebang as an
> "explicit version specification", but a) that's not on the
> command line, which seems the more natural reading and b) it's
> only a partial specification, since i
Change by Eryk Sun :
--
versions: +Python 3.10 -Python 3.7
___
Python tracker
<https://bugs.python.org/issue37769>
___
___
Python-bugs-list mailing list
Unsub
Change by Eryk Sun :
--
type: behavior -> enhancement
versions: +Python 3.10 -Python 3.7
___
Python tracker
<https://bugs.python.org/issue34142>
___
___
Py
Eryk Sun added the comment:
The suggested documentation change looks good to me.
--
type: behavior -> enhancement
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7
___
Python tracker
<https://bugs.python.org/issu
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg333746
___
Python tracker
<https://bugs.python.org/issue35306>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
title: OSError [WinError 123] when testing if pathlib.Path('*') (asterisks)
exists -> [Windows] OSError when testing whether pathlib.Path('*') exists
type: -> behavior
versions: +Python 3.10 -Python 3.7
Change by Eryk Sun :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> [Windows] OSError when testing whether pathlib.Path('*') exists
___
Python tracker
<https://b
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg361476
___
Python tracker
<https://bugs.python.org/issue36792>
___
___
Python-bugs-list mailin
Eryk Sun added the comment:
ucrt in Windows 10 v2004 uses an internal wide-character version of the
time-zone name, which gets updated by _tzset() and kept in sync with the
_tzname encoded strings. Also, note that the current implementation uses the
locale's ANSI code page for both &
Change by Eryk Sun :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> [Windows] time: crash on formatting time with de_DE locale
___
Python tracker
<https://bugs.python
Change by Eryk Sun :
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue42041>
___
Change by Eryk Sun :
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@python
title: os.path.ismount returns true on nested btrfs subvolumes -> Document that
os.path.ismount() returns true for nested btrfs subvolumes
type: behavior -> enhancement
versions
Eryk Sun added the comment:
Here's a concrete implementation of the above discussion.
_is_windows = (sys.platform == 'win32')
def ismount(path):
"""Test whether a path is a mount point"""
path = os.fspath(path)
if
Change by Eryk Sun :
--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7
___
Python tracker
<https://bugs.python.org/issue35026>
___
___
Python-bug
Eryk Sun added the comment:
> __getattr__ method of LibraryLoader catches the OSError and
> raises an AttributeError
Yes. It seems no one was keen to work on this. I think it's relatively easy, so
I'll add that flag in case someone is looking for an easy issue.
--
Change by Eryk Sun :
--
versions: +Python 3.10 -Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issue33406>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue35440>
___
Change by Eryk Sun :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue37756>
___
Change by Eryk Sun :
--
components: +Library (Lib)
keywords: +3.10regression, 3.6regression, 3.7regression, 3.8regression,
3.9regression -patch
stage: test needed -> needs patch
type: crash -> behavior
versions: +Python 3.10 -Python 3.7
___
Change by Eryk Sun :
--
versions: +Python 3.10, Python 3.9 -Python 3.7
___
Python tracker
<https://bugs.python.org/issue37801>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg359981
___
Python tracker
<https://bugs.python.org/issue39318>
___
___
Python-bugs-list mailin
Change by Eryk Sun :
--
versions: +Python 3.10 -Python 3.7
___
Python tracker
<https://bugs.python.org/issue39318>
___
___
Python-bugs-list mailing list
Unsub
Eryk Sun added the comment:
> if sys.stdout is None and no file in sys.argv
With the app distribution from the Microsoft Store, "idle3.x.exe" is a GUI
executable that runs idlelib. There isn't a console version. Also, GUI scripts
are usually run with the pyw.exe launcher o
Eryk Sun added the comment:
> blacklisting directories
Ensure that filepaths in sys.argv are resolved before changing out of a
blacklisted directory. Also, for file open/save dialogs, as opposed to the
working directory of the Python subprocess (e.g. os.getcwd() in the REPL), it's
Change by Eryk Sun :
--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7
___
Python tracker
<https://bugs.python.org/issue35144>
___
___
Python-bug
Eryk Sun added the comment:
I closed bpo-20010 because the official PSF distributions of Python 3.5+ for
Windows use the Universal CRT (ucrt), the system C runtime library for
applications. ucrt does not have this problem with the "%z" format code. For
example, using ctypes:
Eryk Sun added the comment:
> The doc on rmtree states
> Exceptions raised by onerror will not be caught.
> Does this mean I can't use try/exept inside of onerro
rmtree() does not call onerror() in a try/except statement. An exception raised
in onerror() will propagate to
Eryk Sun added the comment:
> the Store package, which can only be *executed* from outside its
> container (we can't load the DLL directly).
The idea I was pondering was to create "python.exe" in the virtual environment
as an appexec link to "C:\Program Files\Wi
Eryk Sun added the comment:
> "C:\Program Files\WindowsApps\venvlauncher.exe"
The above was supposed to be "C:\Program
Files\WindowsApps\Python...\venvlauncher.exe", where "Python..." is the elided
name of the package directory.
--
_
Eryk Sun added the comment:
Steve, what do you think about os.exec*()? Should it be emulated better or
deprecated?
We can't hide the reality that it's a new process with a different process ID
and parent process ID -- against what POSIX requires. But emulating exec() is
pro
Eryk Sun added the comment:
> I think we should accept `encoding="locale"` even in binary mode.
That's a good idea. It means the same as passing None, except it avoids a
warning.
--
nosy: +eryksun
___
Python tracker
<ht
Eryk Sun added the comment:
spawn_main() could handle a PermissionError by checking the exit code. If the
parent has terminated already, then simply exit quietly.
_winapi.PROCESS_QUERY_LIMITED_INFORMATION would need to be defined. For example:
def spawn_main(pipe_handle, parent_pid=None
Eryk Sun added the comment:
> Even if that's just swapping the execv call for spawnv(_P_WAIT)
> and then exiting, that's fine by me
Maybe call SuspendThread() on other threads, at least the ones that can be
enumerated with the threading module.
> I don't see how it
Change by Eryk Sun :
--
versions: +Python 3.10 -Python 3.7
___
Python tracker
<https://bugs.python.org/issue36534>
___
___
Python-bugs-list mailing list
Unsub
Change by Eryk Sun :
--
title: multiprocessing handle leak on Windows when child process is killed
during startup/unpickling -> [Windows] multiprocessing handle leak when child
process is killed during startup/unpickling
versions: -Python
Change by Eryk Sun :
--
components: +Extension Modules
title: Inconsistent os.stat behavior for directory with Access Denied ->
[Windows] Inconsistent os.stat behavior for directory with Access Denied
versions: +Python 3.10 -Python 3.7
___
Pyt
Change by Eryk Sun :
--
components: +Interpreter Core, Library (Lib) -Extension Modules
title: Can't import extension modules resolved via relative paths in sys.path
on Windows -> [Windows] Can't import extension modules resolved via relative
paths in sys.path
versions:
Change by Eryk Sun :
--
title: Ctypes Packing Bitfields Incorrectly - Linux -> [Linux] ctypes packs
bitfields Incorrectly
versions: +Python 3.10 -Python 3.7
___
Python tracker
<https://bugs.python.org/issu
Change by Eryk Sun :
--
versions: -Python 3.7
___
Python tracker
<https://bugs.python.org/issue43431>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eryk Sun :
--
resolution: -> rejected
stage: test needed -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Eryk Sun added the comment:
> Why is there no 2nd 995 after the recursion error?
print(s) calls sys.stdout.write(s) and sys.stdout.write("\n"). The I/O stack
consists of a text I/O wrapper, buffered writer, and a raw file object. What
happens in this case is that writing &q
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg389828
___
Python tracker
<https://bugs.python.org/issue43510>
___
___
Python-bugs-list mailin
New submission from Eryk Sun :
getenvironment() in Modules/_winapi.c needs to sort variables in the
environment block and remove duplicates case insensitively [1].
The sort order used to matter with SetEnvironmentVairableW(). As soon as it
reached a name in the environment block that
Eryk Sun added the comment:
> It'll still raise, given it's invalid, though not with the
> exception it should be raising with...
onerror() is always called to handle an exception, and `raise` will re-raise
that exception. Is there a specific case where this isn't wor
Eryk Sun added the comment:
> I've got a fairly simple implementation for this using the (new)
> nt._path_splitroot native method
It's for the best to let the system path API handle this, especially if doing
so gets this issue resolved, as well as others like it and those th
Eryk Sun added the comment:
> The 3.8 backport is much more complicated, as we don't have access to
> the PathSkipRoot function there. So we can't use the native function.
I guess you missed the comment that I left on the PR a few days ago. The 3.8
backport can use the old
Eryk Sun added the comment:
For a "~user" path, the value of userhome should always be used if target_user
== current_user. If for some reason the USERPROFILE environment variable isn't
defined, the fallback "%HOMEDRIVE%%HOMEPATH%" does not necessarily end in
Eryk Sun added the comment:
> os.path.expanduser() has many flaws, and it just "guess" the
> home directory for other users.
I'm fine with not guessing another user's profile directory (or home directory)
in some cases, or even always. But the code that got commit
Eryk Sun added the comment:
The limit of 512 characters is not for sys.stdin in general. It's for
io._WindowsConsoleIO, which gets used as the raw file for non-redirected
sys.stdin -- and opening "CON" and "CONIN$" -- if legacy mode isn't enabled.
See bpo-418
Eryk Sun added the comment:
> 3. Worth fixing in `ntpath.expanduser()`
To expand on the suggestion in msg390507, here's a demo that implements getting
the profile path of a local user account, with support for the special profile
directories "Default", "Public&q
Eryk Sun added the comment:
It's not a subprocess bug, per se. It's due to creating the stdout/stderr
worker threads from the __del__ finalizer while the interpreter is shutting
down. Minimal reproducer, confirmed in both Linux and Windows:
import threading
class C:
Change by Eryk Sun :
--
nosy: +pitrou
___
Python tracker
<https://bugs.python.org/issue43784>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eryk Sun added the comment:
> my subrocess code doesn't seem to hang on Linux where the
> thread example code does?
Reader threads for stdout and stderr are only used in Windows, since there's no
equivalent to select/poll for synchronous pipes in Windows.
Without using t
Eryk Sun added the comment:
> the name "address" and "addr" respectively which are misleading
> because it is asking for ctypes.c_char_p or ctypes.c_wchar_p which
> are C pointer types
string_at() and wstring_at() take a c_void_p value. This can be initia
Eryk Sun added the comment:
> My opinion is that no extra flags are necessary. The default of
> deleting on close is fine, unless a context manager is active -- in
> which case delete on CM exit.
There is a use case of needing to let another thread or process open the
temporary f
Eryk Sun added the comment:
In POSIX, os.path.abspath(p) is normpath(join(os.getcwd(), p)). normpath()
doesn't touch the filesystem, and it's documented that its "string manipulation
may change the meaning of a path that contains symbolic links". You can use
os.path.r
Eryk Sun added the comment:
> So we stop passing the O_TEMPORARY flag. If __enter__() is called,
> close() closes the file but doesn't delete anything, and
> __exit__() closes the file (if open) and deletes it (even if it
> wasn't open). If there is no __enter__(), cl
Eryk Sun added the comment:
> If that's the problem then why not change all of them to use the
> name "address" or "addr" to avoid confusion and make it clear
> simple. What is your view?
Change them all to refer to `ptr`. It's
Eryk Sun added the comment:
> So are you telling that we should change the name to "ptr" to
> avoid a breaking change?
The function parameter name is "ptr". Changing that name could break existing
code. I don't think it's likely, but it's not wort
Eryk Sun added the comment:
> P.S. No problems with Python 3.8.5 and Ubuntu 20.04.2 LTS.
The issue is that the line length is limited to BUFSIZ, which ends up splitting
the UTF-8 sequence b'\xe2\x96\x91'. BUFSIZ is only 512 bytes in Windows. It's
8192 bytes in Linux, in w
Change by Eryk Sun :
--
stage: test needed -> needs patch
versions: -Python 3.7
___
Python tracker
<https://bugs.python.org/issue38755>
___
___
Python-
Change by Eryk Sun :
--
versions: +Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python
3.4
___
Python tracker
<https://bugs.python.org/issue14
Eryk Sun added the comment:
> I don't get any error executing the t33a.py script
The second line in t33a.py is 1618 bytes. The standard I/O BUFSIZ in Linux is
8192 bytes, but it's only 512 bytes in Windows. The latest alpha release,
3.10a7, includes your rewrite of the toke
Eryk Sun added the comment:
If realpath() resolves too much, you'll have to resolve manually via
os.path.islink() and os.readlink(). If you need strict resolution, use
pathlib.Path.resolve(). In strict mode it raises FileNotFoundError if a path
component doesn't exist. Also, e
Eryk Sun added the comment:
> So that means we can close the issue, no?
This is a bug in 3.8 and 3.9, which need the fix to keep reading until "\n" is
seen on the line. I arrived at this issue via bpo-38755 if you think it should
be addressed there, but it's the same b
Eryk Sun added the comment:
In ntpath._getfinalpathname_nonstrict(), `tail` should be initialized to
`path[:0]`.
Currently `tail` is initialized to the empty string value ''. If an error
occurs that's allowed and `path` is a root directory that's passed as bytes,
then
Change by Eryk Sun :
--
stage: -> needs patch
title: Inability to fetch build 20H2 ->
sys.getwindowsversion().platform_version is incorrect
versions: +Python 3.10
___
Python tracker
<https://bugs.python.org/i
Change by Eryk Sun :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> sys.getwindowsversion().platform_version is incorrect
___
Python tracker
<https://bugs.python
Eryk Sun added the comment:
> shouldn't the documentation provide the information that
> sys.getwindowsversion().platform_version returns the
> kernel32.dll version?
platform_version is documented as an "accurate major version, minor version and
build number of the curre
Eryk Sun added the comment:
The "CurrentBuild" and "CurrentVersion" values go back to the first release of
Windows NT 3.1 in 1993 (build 511, which was quickly replaced by build 528). In
NT 3.1 (build 528), the "CurrentBuild" value was "1.528.1 () (Ju
Eryk Sun added the comment:
> But kernel32.dll (since it's of a different version) isn't
> accurate at all right?
To clarify, CMD's VER command calls GetVersion(). It has nothing to do with the
file version of any system DLL. Because CMD is a system component, t
Eryk Sun added the comment:
> But isn't calling CMD's VER command risky? A process can overwrite its
> PEB OSMajorVersion, OSMinorVersion, and OSBuildNumber.
As long as VER is executed without quotes, the shell will not search for an
external command. CMD is not going
Eryk Sun added the comment:
> If we're going to launch cmd.exe, I'd prefer to only do that in the
> platform module and not the sys function. Nothing in sys should
> start a subprocess (if we can at all avoid it).
In that case, would you want to deprecate
sy
Eryk Sun added the comment:
Steve, your PR checks `filename[n] == L':'`. I think it should check for a
drive name, i.e. `n == 1 && filename[1] == L':'`. For example, the VirtualBox
shared-folder filesystem allows creating and accessing filenames that contain
and
Eryk Sun added the comment:
> os.path.realpath() normalizes paths before resolving links
> on Windows
Normalizing the input path is required in order to be consistent with the
Windows file API. OTOH, the target path of a relative symlink gets resolved in
a POSIX-ly correct manner
Eryk Sun added the comment:
> If one calls Popen with stdin = stdout = stderr = None,
> the caller's std descriptors are inherited on *x, but
> not on Windows
In the default case, CreateProcessW() is called with bInheritHandles as false
and without explicitly setting the s
Eryk Sun added the comment:
A substitute drive is not a mount point, strictly speaking. It's a symlink in
the object namespace that targets an arbitrary path on a device, or even on
another mapped/substitute drive. A mapped drive is a similar case that targets
an arbitrary path on
Eryk Sun added the comment:
> I don't know enough about when and why CPython decides to
> replace .pyc files
It's straight-forward in the case of py_compile.compile():
>>> pyc = py_compile.compile('test.py')
>>> f = open(p
Eryk Sun added the comment:
> What is the name of the new function introduced in Windows 10 NT API?
> Should we use it if the version is detected as Windows 10 (through a
> callback to a platform function or through GetVersion API)?
No, _bootstrap_external._write_at
Eryk Sun added the comment:
> deleting on CM exit when used as a CM, and no change in behaviour
> otherwise (me, Zachary, Ethan, Jason and Steve). Steve also wants
> O_TEMPORARY to be removed, which doesn't seem controversial among
> this group of people.
Removing O_TE
Eryk Sun added the comment:
I'm changing this issue to a behavior bug. Many issues have the potential to be
exploited as a security vulnerability in some contrived scenario, but the
security issue type is for cases that have provably significant security
implications, such as priv
Eryk Sun added the comment:
> Does it mean, that your suggestion to leave the O_TEMPORARY for
> TemporaryFile means, that NamedTemporaryFile needs to have a
> mechanism to know whether it was called as a TemporaryFile
Just implement a separate function for TemporaryFile() i
Eryk Sun added the comment:
> E.g. if you specify env. var. PYTHON_NTREALPATH_OLD_BEHAVIOR=1,
> it doesn't resolve symlinks and junctions.
I assumed you wanted to resolve symlinks but hadn't considered that substitute
drives are implemented as object symlinks that target
Eryk Sun added the comment:
> In our organization we use substituted drives for development, and
> no other tools (including other programming languages and their IDEs),
> except for Python 3.8+, had any problems with this.
How about keeping a substitute or mapped drive from the i
Eryk Sun added the comment:
> you are proposing some trick with first unlinking the file and
> then employing it as a temporary file using previously known fd.
It doesn't need to unlink the file to make it anonymous. I included that to
highlight that it's possible. Th
Change by Eryk Sun :
--
Removed message: https://bugs.python.org/msg389286
___
Python tracker
<https://bugs.python.org/issue23407>
___
___
Python-bugs-list mailin
Eryk Sun added the comment:
Windows implements filesystem symlinks and mountpoints as name-surrogate
reparse points. Python 3.8 introduced behavior changes to how reparse points
are supported, but the stat st_mode value still sets S_IFLNK only for actual
symlinks, not for mountpoints. This
Change by Eryk Sun :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> os.walk always follows Windows junctions
___
Python tracker
<https://bugs.python
Eryk Sun added the comment:
> There is no reason why a user should be able to write to
> HKCU but not HKLM.
Modifying system keys is limited to SYSTEM, administrators, and various
privileged accounts and services such as TrustedInstaller. Standard users are
not allowed to modify
Eryk Sun added the comment:
> ctypes.windll.kernel32.VirtuAlloc function return by default
> a ctypes.c_long
In Windows, ctypes.c_int is an alias for ctypes.c_long, which is a signed
32-bit integer. This is the default conversion type for the integer parameters
of an FFI (foreign fu
Eryk Sun added the comment:
Your example uses delete=False. In Windows, the provision about reopening the
file while it's open applies to delete=True. With the latter, the file is
opened with the O_TEMPORARY flag. At the OS level, this flag modifies the
CreateFileW() call as fo
Eryk Sun added the comment:
> The whoami process check output shows that my account is in
> BUILTIN\Administrators, which proves that the account I am
> logged in as local Administrator permissions.
Please show the output when whoami.exe is spawned from Python. I never
questione
Eryk Sun added the comment:
Thank you. The output shows that the Python process is using a UAC limited
security context, i.e. the administrators group is enabled only for
access-denied rules, and the integrity level is medium (not elevated to high or
system level).
Group Name: BUILTIN
Eryk Sun added the comment:
> In any case, it should not be necessary to get Python permissions
> to execute write / update methods in Python against HKLM hive
HKEY_LOCAL_MACHINE is a predefined handle for the key "\REGISTRY\MACHINE". This
key is not mounted by a hive. T
Eryk Sun added the comment:
The issue tracker is not a general support forum for software development.
Please ask first on python-list or the users group on discuss.python.org. For
now, I'm changing the status of this issue to pending. If the discussion
determines that there'
Eryk Sun added the comment:
> For this issue, the PATH conflict would be that "pip" and "python"
> refer to different Python installs.
I'm aware of the problem for a per-user installation prior to 3.10. However,
none of the install commands use the &qu
Eryk Sun added the comment:
> There are a few ways to get multiple Python installs that
> could lead to launching the wrong one through PATH.
> --user is one of the least likely.
As far as I was aware, a --user installation prior to Python 3.10 would be the
common way to have
Eryk Sun added the comment:
> The recommendation not to use absolute paths in CDLL is still
> not mentioned in the docs:
It's not generally the case. Load just a base filename only if the shared
library is in the loader's search path. Otherwise use a qualified path that
c
Eryk Sun added the comment:
There's a formatting problem in Doc/library/multiprocessing.rst due to
consumption of the backslashes in multiple steps. The following keeps all of
the required backslashes in the HTML output:
* An ``'AF_PIPE'`` address is a string of the form
Eryk Sun added the comment:
Michael, thank you for the PR, but please associate it with the existing issue
bpo-24505.
--
nosy: +eryksun
resolution: -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder: -> shutil.which wrong result on Wind
401 - 500 of 2115 matches
Mail list logo