[issue41987] singledispatchmethod raises an error when relying on a forward declaration

2022-01-03 Thread Jörn Heissler
Jörn Heissler added the comment: Hello! git-bisect points at https://bugs.python.org/issue41341 https://github.com/python/cpython/pull/21553 It breaks both the examples from https://bugs.python.org/issue41987#msg379896 and https://bugs.python.org/issue41987#msg380803 -- nosy

[issue37773] ValueError: I/O operation on closed file. in ZipFile destructor

2021-03-27 Thread Jörn Heissler
Jörn Heissler added the comment: Thanks Serhiy for the explanation, it's making sense now. Guess whatever I did back then (no idea what I was working on) was basically a mistake; I should have closed my ZipFile properly, e.g. by using context managers. So maybe it's not really a cpython bug

[issue37773] ValueError: I/O operation on closed file. in ZipFile destructor

2021-03-27 Thread Jörn Heissler
Jörn Heissler added the comment: Still reproducible in cpython 3.10.0a3 (debian unstable) and 3.10.0a6 (pyenv). -- versions: +Python 3.10 ___ Python tracker <https://bugs.python.org/issue37

[issue39318] NamedTemporaryFile could cause double-close on an fd if _TemporaryFileWrapper throws

2020-01-13 Thread Jörn Heissler
Change by Jörn Heissler : -- nosy: +joernheissler ___ Python tracker <https://bugs.python.org/issue39318> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31711] ssl.SSLSocket.send(b"") fails

2019-12-23 Thread Jörn Heissler
Jörn Heissler added the comment: Manpage (openssl 1.1.1d) now states: You should not call SSL_write() with num=0, it will return an error. SSL_write_ex() can be called with num=0, but will not send application data to the peer. SSL_write_ex was added in 1.1.1 So it looks like openssl

[issue39124] round Decimal error

2019-12-23 Thread Jörn Heissler
Jörn Heissler added the comment: > round(9.925, 2) => 9.93 9.925 is 9.925710542735760100185871124267578125 on my platform. This is larger than 9.925, so the "round-ties-to-even" rule can't be applied. Instead it is ro

[issue37773] ValueError: I/O operation on closed file. in ZipFile destructor

2019-08-06 Thread Jörn Heissler
New submission from Jörn Heissler : When running this code: from zipfile import ZipFile import io def foo(): pass data = io.BytesIO() zf = ZipFile(data, "w") I get this message: Exception ignored in: Traceback (most recent call last): File "/home/user/git/oss/cpython

[issue37772] zipfile.Path.iterdir() outputs sub directories many times or not at all

2019-08-06 Thread Jörn Heissler
New submission from Jörn Heissler : Hello, #!/usr/bin/python3.8 from zipfile import ZipFile, Path import io def recurse_print(parent): for child in parent.iterdir(): if child.is_file(): print(child, child.read_text()) if child.is_dir

[issue37642] timezone allows no offset from range (23:59, 24:00)

2019-07-21 Thread Jörn Heissler
New submission from Jörn Heissler : https://bugs.python.org/issue5288 changed datetime.timezone to accept sub-minute offsets. The C implementation allows offsets from range (23:59, 24:00) while the python implementation does not: # C >>> timezone(timedelta(seconds=86399)) datetime

[issue35224] PEP 572: Assignment Expressions

2019-06-22 Thread Jörn Heissler
Jörn Heissler added the comment: My working theory: The change modifies the MAP_ADD instruction and also what the instruction expects to find on the stack. When *.pyc files are kept, the code generates the old stack layout (TOS=key, TOS1=value), but cpython will assume it's the other way

[issue35224] PEP 572: Assignment Expressions

2019-06-22 Thread Jörn Heissler
Jörn Heissler added the comment: Sorry, I guess that's something completely different. So maybe the issue is related to my pull request. -- ___ Python tracker <https://bugs.python.org/issue35

[issue35224] PEP 572: Assignment Expressions

2019-06-22 Thread Jörn Heissler
Jörn Heissler added the comment: Pablo, https://bugs.python.org/issue37359 was created yesterday, i.e. before the merge. -- ___ Python tracker <https://bugs.python.org/issue35

[issue35224] PEP 572: Assignment Expressions

2019-06-16 Thread Jörn Heissler
Jörn Heissler added the comment: I tried and it appears to work: https://github.com/python/cpython/pull/14139 As I'm not familiar with cpython code, chances are that I missed something important. -- ___ Python tracker <https://bugs.python.

[issue35224] PEP 572: Assignment Expressions

2019-06-16 Thread Jörn Heissler
Change by Jörn Heissler : -- pull_requests: +13980 pull_request: https://github.com/python/cpython/pull/14139 ___ Python tracker <https://bugs.python.org/issue35

[issue35224] PEP 572: Assignment Expressions

2019-06-16 Thread Jörn Heissler
Jörn Heissler added the comment: Hello, https://www.python.org/dev/peps/pep-0572/#change-to-evaluation-order mentions a change of evaluation order for dict comprehensions. It looks like this is not implemented yet (as of commit 66d47da8). Will this be implemented in this issue, or should I

[issue35784] document that hashlib.new takes kwargs

2019-01-19 Thread Jörn Heissler
New submission from Jörn Heissler : This code works: hashlib.new('blake2b', b'foo', digest_size=7) https://github.com/python/cpython/blob/master/Lib/hashlib.py#L7 documents the function as: new(name, data=b'', **kwargs) But the **kwargs argument is missing in https://docs.python.org/3/library

[issue34465] ipaddress should accept bytearray in addition to bytes

2018-09-11 Thread Jörn Heissler
Jörn Heissler added the comment: > Maybe add a special purposed named constructor IPv4Address.from_bytes() that > will accept any objects supporting the buffer protocol? That would work for me. I wonder if there should be something like ipaddress.ip_address_from_bytes too that can con

[issue34465] ipaddress should accept bytearray in addition to bytes

2018-08-25 Thread Jörn Heissler
Jörn Heissler added the comment: That's what I'm doing now. But it would be more convenient if I could pass a bytearray. -- ___ Python tracker <https://bugs.python.org/issue34

[issue34465] ipaddress should accept bytearray in addition to bytes

2018-08-25 Thread Jörn Heissler
Jörn Heissler added the comment: My use case is parsing binary data. For that I use a bytearray as a buffer. buf[:4] gets me another bytearray which I'd want to convert to an ipaddress. I can't think of a usecase for list-of-int. -- ___ Python

[issue34465] ipaddress should accept bytearray in addition to bytes

2018-08-22 Thread Jörn Heissler
New submission from Jörn Heissler : Hi, the ipaddress module accepts `bytes' objects in the constructors. `bytearray' however is not supported, see paste below. Should this be supported too? >>> import ipaddress >>> ipaddress.IPv4Address(bytes([127, 0, 0, 1])) IPv4

[issue31711] ssl.SSLSocket.send(b"") fails

2017-10-06 Thread Jörn Heissler
New submission from Jörn Heissler <launch...@joern.heissler.de>: Traceback (most recent call last): File "client.py", line 10, in conn.send(b'') File "/usr/lib/python3.6/ssl.py", line 941, in send return self._sslobj.write(data) File "/usr/lib/python