[issue43884] Cannot cleanly kill a subprocess using high-level asyncio APIs

2021-04-19 Thread Ronal Abraham
Ronal Abraham added the comment: I see this on MacOS and Linux, but I suspect any Unix-like system would have the same behavior. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43884] Cannot cleanly kill a subprocess using high-level asyncio APIs

2021-04-18 Thread Ronal Abraham
Ronal Abraham added the comment: Reproducing the program here: import asyncio async def test(): process = await asyncio.create_subprocess_shell( "sleep 2 && echo done", stdout=asyncio.subprocess.PIPE, ) awa

[issue43884] Cannot cleanly kill a subprocess using high-level asyncio APIs

2021-04-18 Thread Ronal Abraham
New submission from Ronal Abraham : There doesn't appear to be a way to prematurely kill a subprocess using the high-level asyncio subprocess APIs (https://docs.python.org/3.9/library/asyncio-subprocess.html) without getting a traceback on exit. On exit, the attached program write

[issue43626] SIGSEV in PyErr_SetObject

2021-03-26 Thread Abraham Macias
Abraham Macias added the comment: Thank you Victor for your response. I follow your advice but the output was an error in a different point of the code and I couldn't see any information about memory allocations. But, I compiled Python 3.7 from source and modified the "Python/erro

[issue43626] SIGSEV in PyErr_SetObject

2021-03-25 Thread Abraham Macias
New submission from Abraham Macias : Hi, I'm dealing with random crashes when using pymongo in Python 3.7.3 in a Debian Buster. This is the python backtrace: (gdb) thread apply all py-bt Thread 2 (Thread 0x7f9817d95700 (LWP 221)): Traceback (most recent call first): File "/usr

[issue39335] round Decimal edge case

2020-01-14 Thread Hrvoje Abraham
New submission from Hrvoje Abraham : >>> from decimal import Decimal >>> round(Decimal('-123.49')) -124.0 I would expect -123.0, even considering Py2 rounding convention details (away from zero), Decimal rounding

[issue37828] Fix default mock_name in unittest.mock.assert_called error message

2019-09-15 Thread Abraham
Change by Abraham : -- keywords: +patch pull_requests: +15775 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16166 ___ Python tracker <https://bugs.python.org/issu

[issue37139] Inconsistent behavior of email.header.decode_header

2019-06-03 Thread Louis Abraham
Louis Abraham added the comment: Indeed, this is exactly the same (I should have researched more, my bad). The problem is that I'm using mailbox.Maildir which uses the Compat32 API. Do you think I should create an issue for Maildir to support the new EmailMessag

[issue37139] Inconsistent behavior of email.header.decode_header

2019-06-03 Thread Louis Abraham
New submission from Louis Abraham : Hi, (this is my first issue btw) I think <https://docs.python.org/3/library/email.header.html#email.header.decode_header> has a broken behavior. It returns a list of `(decoded_string, charset)` pairs. However, `decoded_string` can be either a str

[issue35332] shutil.rmtree(..., ignore_errors=True) doesn't ignore errors from os.close()

2018-12-01 Thread Ronal Abraham
Ronal Abraham added the comment: I forgot to mention: the exception raised is an OSError and the errno is 52 (ESTALE on AIX). -- ___ Python tracker <https://bugs.python.org/issue35

[issue35332] shutil.rmtree(..., ignore_errors=True) doesn't ignore errors from os.close()

2018-11-27 Thread Ronal Abraham
New submission from Ronal Abraham : These lines throw intermittently for me on AIX when removing a directory on NFS (python version 3.6.6-1), even when "ignore_errors=True": https://github.com/python/cpython/blob/v3.6.6rc1/Lib/shutil.py#L433 https://github.com/python/cpython/blob

[issue26785] repr of -nan value should contain the sign

2016-04-18 Thread Hrvoje Abraham
Hrvoje Abraham added the comment: IEEE & C/C++ standards allow and explicitly mention it, some people and projects are using it, many compilers preserve it... I believe it's reasonable to support it despite the fact it does not have standardized semantic meaning. Mayb

[issue26785] repr of -nan value should contain the sign

2016-04-17 Thread Hrvoje Abraham
Hrvoje Abraham added the comment: Sage: http://doc.sagemath.org/html/en/reference/rings_numerical/sage/rings/complex_number.html >>> log(ComplexNumber(NaN,1)) NaN - NaN*I -- ___ Python tracker <http://bugs.python.or

[issue26785] repr of -nan value should contain the sign

2016-04-17 Thread Hrvoje Abraham
Hrvoje Abraham added the comment: Regarding NaN sign bit, IEEE-754 states: "Note, however, that operations on bit strings—copy, negate, abs, copySign—specify the sign bit of a NaN result, sometimes based upon the sign bit of a NaN operand. The logical predicate totalOrder is also affect

[issue26785] repr of -nan value should contain the sign

2016-04-17 Thread Hrvoje Abraham
Hrvoje Abraham added the comment: Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)] on win32: >>> import struct >>> x=float("-nan") >>> struct.pack

[issue26785] repr of -nan value should contain the sign

2016-04-16 Thread Hrvoje Abraham
Hrvoje Abraham added the comment: Reported issue was created in 64-bit Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32. Now I noticed that in Py 2.7 even copysign part does not work as expected. Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015

[issue26785] repr of -nan value should contain the sign

2016-04-16 Thread Hrvoje Abraham
New submission from Hrvoje Abraham: repr of -nan value should contain the sign so the round-trip could be assured. NaN value sign (bit) could be seen as not relevant or even uninterpretable information, but it is actually used in real-life situations, the fact substantiated by section 6.3 of

[issue24663] ast.literal_eval does not handle empty set literals

2015-11-03 Thread Hrvoje Abraham
Hrvoje Abraham added the comment: For now I'll implement my_literal_eval via AST filtering, reproducing ast.literal_eval + 'set()' functionality. -- ___ Python tracker <http://bugs.pyt

[issue24663] ast.literal_eval does not handle empty set literals

2015-11-03 Thread Hrvoje Abraham
Hrvoje Abraham added the comment: I use communication protocol based on Python literals and ast.literal_eval for deserialization. I'm avoiding sets because empty set value is not supported in a clean consistent manner on language level. If I write repr(set()) i get 'set()', thi

[issue24663] ast.literal_eval does not handle empty set literals

2015-11-03 Thread Hrvoje Abraham
Hrvoje Abraham added the comment: I believe this is the issue. ast.literal_eval sets support can not be considered complete until it also handles empty sets. I do not consider it valid for me to explicitly handle this case in my projects using some weird hacks. Python community settled on

[issue23406] interning and list comprehension leads to unexpected behavior

2015-02-07 Thread Abraham Smith
Abraham Smith added the comment: Thanks for the helpful responses and correcting my misunderstanding. Regarding improved documentation, I see now that the table at https://docs.python.org/2/library/stdtypes.html#id2 indeed says "shallow copies"; however, the footnote seems to bur

[issue23406] interning and list comprehension leads to unexpected behavior

2015-02-07 Thread Abraham Smith
Abraham Smith added the comment: (Obviously, there's a copy/paste mistake in the second case; it should read map(id, M).) -- ___ Python tracker <http://bugs.python.org/is

[issue23406] interning and list comprehension leads to unexpected behavior

2015-02-07 Thread Abraham Smith
New submission from Abraham Smith: Some students were working on matrix routines for practice. The following code: >>> L = [ [0]*3 ]*3 >>> for i in range(3): ...for j in range(3): ...if i==j: L[i][j]=1 was expected to return [[1,0,0],[0,1,0],[0,0,1]] but it return

[issue16582] Tkinter calls SystemExit with string

2012-12-03 Thread Abraham Karplus
Abraham Karplus added the comment: I'd be fine with having it fixed just in 3.4, as it is easy enough to work around for now. (Call deletecommand('exit') and then createcommand('exit', working_exit_function) with working_exit function being the

[issue16583] Tkinter nested SystemExit

2012-11-30 Thread Abraham Karplus
New submission from Abraham Karplus: When a callback function gets called from Tkinter and raises SystemExit (either directly or through sys.exit), a new SystemExit exception is raised with the original exception as its code field, such as SystemExit(SystemExit(),) This is due to a bug in

[issue16582] Tkinter calls SystemExit with string

2012-11-30 Thread Abraham Karplus
New submission from Abraham Karplus: Exiting a Tkinter application normally results in printing '0' and exiting with error code 1. This is a result of Tkinter's _exit function, whose default argument for code is the string '0'. It then calls SystemExit with th

[issue11835] python (x64) ctypes incorrectly pass structures parameter

2011-04-12 Thread Abraham Soedjito
New submission from Abraham Soedjito : void __cdecl foo(unsigned __int32 a, unsigned __int32 b, unsigned __int32 c, unsigned __int32 d, unsigned __int32 e, unsigned __int32 f, unsigned __int32 g

[issue1124] Webchecker not parsing css "@import url"

2007-09-06 Thread Edward Abraham
New submission from Edward Abraham: webchecker and its dependent, websucker, which are distributed with the python tools, are not following references to stylesheets given with the @import url(mystyle.css); declaration ... This means that the websucker isn't copying across styles