[issue37701] shutil.copyfile raises SpecialFileError for symlink to fifo

2021-12-14 Thread Christopher Hunt
Christopher Hunt added the comment: > I expect it to fail if follow_symlinks is True, which is the default value. I > expect it to succeed with follow_symlinks=False, which should create a > shallow copy of just the symlink, regardless of its target. I agree, thanks for the c

[issue35727] sys.exit() in a multiprocessing.Process does not align with Python behavior

2019-11-17 Thread Christopher Hunt
Christopher Hunt added the comment: Any other concerns here? -- ___ Python tracker <https://bugs.python.org/issue35727> ___ ___ Python-bugs-list mailin

[issue35727] sys.exit() in a multiprocessing.Process does not align with Python behavior

2019-09-13 Thread Christopher Hunt
Christopher Hunt added the comment: > I believe the mentality behind multiprocessing.Process triggering an exit > code of 1 when sys.exit() is invoked inside its process is to indicate a > non-standard exit out of its execution. Can I ask what this is based on? I did a pretty go

[issue37701] shutil.copyfile raises SpecialFileError for symlink to fifo

2019-07-28 Thread Christopher Hunt
Christopher Hunt added the comment: Likewise when the destination is a symlink - though in that case the value of `follow_symlinks` should probably not matter. -- ___ Python tracker <https://bugs.python.org/issue37

[issue37701] shutil.copyfile raises SpecialFileError for symlink to fifo

2019-07-28 Thread Christopher Hunt
New submission from Christopher Hunt : Currently shutil.copyfile raises SpecialFileError when src is a link to a fifo. To reproduce: import os import shutil import tempfile d = tempfile.mkdtemp() fifo = os.path.join(d, 'fifo') link_to_fifo = os.path.join(d

[issue37700] shutil.copyfile does not raise SpecialFileError for socket files

2019-07-28 Thread Christopher Hunt
Christopher Hunt added the comment: See also: the comment from https://github.com/python/cpython/blob/e1b900247227dad49d8231f1d028872412230ab4/Lib/shutil.py#L245: > # XXX What about other special files? (sockets, devices...) -- ___ Python trac

[issue37700] shutil.copyfile does not raise SpecialFileError for socket files

2019-07-28 Thread Christopher Hunt
New submission from Christopher Hunt : Currently shutil.copyfile only raises SpecialFileError for named pipes. When trying to use the function to copy a socket file, the exception raised depends on the platform, for example: macOS: "[Errno 102] Operation not supported on socket: '/

[issue32082] atexit module: allow getting/setting list of handlers directly

2019-07-04 Thread Christopher Hunt
Christopher Hunt added the comment: Updated link to workaround referenced in the original issue: https://github.com/sagemath/sage/blob/b5c9cf037cbce672101725f269470135b9b2c5c4/src/sage/cpython/atexit.pyx -- nosy: +chrahunt ___ Python tracker

[issue35792] Specifying AbstractEventLoop.run_in_executor as a coroutine conflicts with implementation/intent

2019-04-20 Thread Christopher Hunt
Christopher Hunt added the comment: For impl.1: > (very breaking change) should be > (very breaking change, mitigated some by the fact that the implementation > will warn about the unawaited future) -- ___ Python tracke

[issue35792] Specifying AbstractEventLoop.run_in_executor as a coroutine conflicts with implementation/intent

2019-04-19 Thread Christopher Hunt
Christopher Hunt added the comment: My use case is scheduling work against an executor but waiting on the results later (on demand). If converting `BaseEventLoop.run_in_executor(executor, func, *args)` to a coroutine function, I believe there are two possible approaches (the discussion

[issue35960] dataclasses.field does not preserve empty metadata object

2019-02-10 Thread Christopher Hunt
Change by Christopher Hunt : -- keywords: +patch, patch, patch pull_requests: +11831, 11832, 11833 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35960] dataclasses.field does not preserve empty metadata object

2019-02-10 Thread Christopher Hunt
Change by Christopher Hunt : -- keywords: +patch, patch pull_requests: +11831, 11832 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35960] dataclasses.field does not preserve empty metadata object

2019-02-10 Thread Christopher Hunt
Change by Christopher Hunt : -- keywords: +patch pull_requests: +11831 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35960> ___ _

[issue35960] dataclasses.field does not preserve empty metadata object

2019-02-10 Thread Christopher Hunt
New submission from Christopher Hunt : The metadata argument to dataclasses.field is not preserved in the resulting Field.metadata attribute if the argument is a mapping with length 0. The docs for dataclasses.field state: > metadata: This can be a mapping or None. None is treated as an em

[issue27035] Cannot set exit code in atexit callback

2019-01-21 Thread Christopher Hunt
Change by Christopher Hunt : -- nosy: +chrahunt versions: +Python 3.7 ___ Python tracker <https://bugs.python.org/issue27035> ___ ___ Python-bugs-list mailin

[issue35792] Specifying AbstractEventLoop.run_in_executor as a coroutine conflicts with implementation/intent

2019-01-20 Thread Christopher Hunt
New submission from Christopher Hunt : Currently AbstractEventLoop.run_in_executor is specified as a coroutine, while BaseEventLoop.run_in_executor is actually a non-coroutine that returns a Future object. The behavior of BaseEventLoop.run_in_executor would be significantly different

[issue35727] sys.exit() in a multiprocessing.Process does not align with Python behavior

2019-01-12 Thread Christopher Hunt
Change by Christopher Hunt : -- pull_requests: +11143, 11144 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35727> ___ ___ Python-

[issue35727] sys.exit() in a multiprocessing.Process does not align with Python behavior

2019-01-12 Thread Christopher Hunt
Change by Christopher Hunt : -- pull_requests: +11143, 11144, 11145 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35727> ___ ___ Py

[issue35727] sys.exit() in a multiprocessing.Process does not align with Python behavior

2019-01-12 Thread Christopher Hunt
Change by Christopher Hunt : -- pull_requests: +11143 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35727> ___ ___ Python-bugs-lis

[issue35727] sys.exit() in a multiprocessing.Process does not align with Python behavior

2019-01-12 Thread Christopher Hunt
Change by Christopher Hunt : -- versions: -Python 2.7, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker <https://bugs.python.org/issue35727> ___ ___ Pytho

[issue35727] sys.exit() in a multiprocessing.Process does not align with Python behavior

2019-01-12 Thread Christopher Hunt
New submission from Christopher Hunt : When a function is executed by a multiprocessing.Process and uses sys.exit, the actual exit code reported by multiprocessing is different than would be expected given the Python interpreter behavior and documentation. For example, given: from