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

2021-11-12 Thread Erik Aronesty
Erik Aronesty added the comment: bug is worse than that: perfectly valid redirected paths (winfsp ram drives for example) now break in python 3.9.6 (maybe fixed in later version?) >>> import pathlib >>> p=pathlib.Path('C:\\Users\\erik\\Atakama') >>> p.resolve()

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2020-01-22 Thread Erik Aronesty
Erik Aronesty added the comment: > The Scripts/bin thing is not specific to venv - for whatever reason, the > original Windows implementation chose to use "Scripts" rather than "bin" That's irrelevant to the PR, which solves the problem in a compatible way.

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2020-01-20 Thread Erik Aronesty
Erik Aronesty added the comment: See https://github.com/python/cpython/pull/18083 for an example of a 'simple copy' for shell script compatibility ... rather than trying to make Scripts move around (which it can't trivially). -- ___ Python

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2020-01-20 Thread Erik Aronesty
Change by Erik Aronesty : -- pull_requests: +17474 pull_request: https://github.com/python/cpython/pull/18083 ___ Python tracker <https://bugs.python.org/issue35

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2020-01-20 Thread Erik Aronesty
Erik Aronesty added the comment: the single Scripts/activate tool should be simply copied to bin/activate ... this is what you have to do to write a bash script for python now: source bin/activate || source Scripts/activate we should not assume that all windows users use things like CMD

[issue22107] tempfile module misinterprets access denied error on Windows

2019-11-20 Thread Erik Aronesty
Erik Aronesty added the comment: This is the fist of what I'm using: https://gist.github.com/earonesty/a052ce176e99d5a659472d0dab6ea361 Seems OK for my use cases. There's probably issues with relying on __del__ this way. But it solves the Windows close/reopen problem, too

[issue22107] tempfile module misinterprets access denied error on Windows

2019-09-27 Thread Erik Aronesty
Erik Aronesty added the comment: i would like to point out that the primary reason any of this nonsense exists is because of short filename restrictions. i've replaces nearly all of my temp file creation code in all of my project to `return os.urandom(32).hex()` ... which is reliable

Re: bool(Enum) should raise ValueError

2019-07-28 Thread Erik Aronesty
class Status: valid = 1 invalid = 2 unknown = 3 On Fri, Jul 26, 2019, 3:37 PM Chris Angelico wrote: > On Sat, Jul 27, 2019 at 5:16 AM Erik Aronesty wrote: > > > > I just spend a while tracking down and killing all "if Enum" and "if not > > En

bool(Enum) should raise ValueError

2019-07-26 Thread Erik Aronesty
I just spend a while tracking down and killing all "if Enum" and "if not Enum" bugs in my code. I was frankly shocked that this didn't raise a ValueError to begin with. Apparently all enums are true/false depending on whether the underlying value is truthy or falsy. Which breaks the

[issue22107] tempfile module misinterprets access denied error on Windows

2019-07-01 Thread Erik Aronesty
Erik Aronesty added the comment: Series of operations needed to answer the questions os.access is not answering on windows: bool CanAccessFolder( LPCTSTR folderName, DWORD genericAccessRights ) { bool bRet = false; DWORD length = 0; if (!::GetFileSecurity( folderName

[issue37477] NamedTemporaryFile can hang on windows

2019-07-01 Thread Erik Aronesty
Erik Aronesty added the comment: yes, duplicate of https://bugs.python.org/issue22107 ... tried looking first, sry. -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue37477] NamedTemporaryFile can hang on windows

2019-07-01 Thread Erik Aronesty
Change by Erik Aronesty : -- type: -> crash ___ Python tracker <https://bugs.python.org/issue37477> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue37477] NamedTemporaryFile can hang on windows

2019-07-01 Thread Erik Aronesty
New submission from Erik Aronesty : Depending on the user's permissions, this code can hang, instead of raising an exception: from tempfile import NamedTemporaryFile NamedTemporaryFile(dir="/") The problamatic code is in tempfile.py: When encountering a "[Errno 13] Pe

[issue31853] Use super().method instead of socket.method in SSLSocket

2017-10-23 Thread Erik Aronesty
New submission from Erik Aronesty <e...@q32.com>: I asked on #python-dev and was told that it's most likely due to legacy reasons that the class has things like `socket.__init__` instead of `super().__init__` -- assignee: christian.heimes components: SSL messages: 30483

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

2017-10-22 Thread Erik Aronesty
New submission from Erik Aronesty <earone...@gmail.com>: When strict is "false", pathlib should not fail if the network share is inaccessible. It should, as documented, catch the exception and continue with as much of the path as it has. >>> pathlib.Path("

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

2017-10-22 Thread Erik Aronesty
Change by Erik Aronesty <earone...@gmail.com>: -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker <rep...@bugs.python.org> <https://bugs.python