[issue45996] Worse error from asynccontextmanager in Python 3.10

2021-12-19 Thread Dima Tisnek
Dima Tisnek added the comment: Andrew, I see that you've closed this issue as "fixed". I'm a little confused by that. If you mean that 3.10 behaviour is better than 3.9, than perhaps "not a bug / rejected / wont fix" would make more sense. Actually I don'

[issue45996] Worse error from asynccontextmanager in Python 3.10

2021-12-19 Thread Dima Tisnek
Dima Tisnek added the comment: I'm fine with guarding both. -- ___ Python tracker <https://bugs.python.org/issue45996> ___ ___ Python-bugs-list m

[issue12930] reindent.py inserts spaces in multiline literals

2011-09-20 Thread Dima Tisnek
Dima Tisnek added the comment: Thanks Caio, your test case covers my issue; seeing these spelt out got me thinking, there are perhaps 3~4 different cases: def f0(): s = """select some sql from somewhere; -- cannot be reindented""" def f1(): ""&

[issue12930] reindent.py inserts spaces in multiline literals

2011-10-22 Thread Dima Tisnek
Dima Tisnek added the comment: good enough for me :) -- ___ Python tracker <http://bugs.python.org/issue12930> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12930] reindent.py inserts spaces in multiline literals

2011-09-07 Thread Dima Tisnek
New submission from Dima Tisnek : Given this as input: #!/usr/bin/python def x(): s = """line one line two line three""" return s reindent.py changes it to: #!/usr/bin/python def x(): s = """line one line two line three"""

[issue37657] ERROR: grip 4.5.2 requires docopt>=0.4.0, which is not installed.

2019-09-17 Thread Dima Tisnek
Dima Tisnek added the comment: I've just got it again, when running `Install Certificates.command` after installing Python 3.8.0b4. Yes I do have Python 3.7 installed and had earlier 3.8 builds installed. Could it be referenced by `pip`? Or `certifi` itself? I can't find any

[issue37657] ERROR: grip 4.5.2 requires docopt>=0.4.0, which is not installed.

2019-09-17 Thread Dima Tisnek
Dima Tisnek added the comment: I've nuked 3.8/.../site-packages and the problem is gone; confirmed by reinstalling 3.8 from scratch. It must've been something in the my environment, if/when I find what it was, I'll open a bug in the respective package. -- stage: -&g

[issue38342] ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata'

2019-10-02 Thread Dima Tisnek
Change by Dima Tisnek : -- nosy: +Dima.Tisnek ___ Python tracker <https://bugs.python.org/issue38342> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38388] Pickle protocol v 5 needs to be documented

2019-10-06 Thread Dima Tisnek
New submission from Dima Tisnek : Python 3.8 brings new pickle protocol, version 5. It's not documented. ``` (venv) â€Ļ ~/m/proj> python Python 3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", &qu

[issue38388] Pickle protocol v 5 needs to be documented

2019-10-07 Thread Dima Tisnek
Change by Dima Tisnek : -- keywords: +patch pull_requests: +16225 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16639 ___ Python tracker <https://bugs.python.org/issu

[issue38413] Remove or change "Multithreading" section

2019-10-09 Thread Dima Tisnek
Dima Tisnek added the comment: That would be nice; someone needs to figure out what exact sqlite version allows safe passing of connection between threads. Ideally other caveats would be covered (is passing open cursors to another thread allowed?, etc...) -- nosy: +Dima.Tisnek

[issue38424] typing.Generator shorthand

2019-10-09 Thread Dima Tisnek
New submission from Dima Tisnek : Currently to annotate a generator, something like `Generator[str, None, None]` is required. Which is a bit confusing and verbose. Can we allow shorthand, like `Generator[str]` for simple cases? I'm not entirely certain what the semantics ought to be...

[issue38424] typing.Generator shorthand

2019-10-09 Thread Dima Tisnek
Dima Tisnek added the comment: Actually yes it is sufficient. I don't know why I didn't think of that! Perhaps some note in the docs could help other lost children of Python :P -- ___ Python tracker <https://bugs.python.o

[issue38424] typing.Generator shorthand

2019-10-11 Thread Dima Tisnek
Dima Tisnek added the comment: Clearly my attention span does not exceed 5 paragraphs, so sorry! -- ___ Python tracker <https://bugs.python.org/issue38

[issue41271] Add support for io_uring to cpython

2021-09-26 Thread Dima Tisnek
Dima Tisnek added the comment: Would now, a year later, be a good time to consider io_uring? -- nosy: +Dima.Tisnek ___ Python tracker <https://bugs.python.org/issue41

[issue45996] Worse error from asynccontextmanager in Python 3.10

2021-12-06 Thread Dima Tisnek
New submission from Dima Tisnek : Consider this illegal code: import logging from asyncio import sleep, gather, run from contextlib import asynccontextmanager @asynccontextmanager async def foo(): await sleep(1) yield async def test(): f = foo() await gather(f.__aenter__

[issue38857] AsyncMock issue with awaitable return_value/side_effect/wraps

2020-02-16 Thread Dima Tisnek
Dima Tisnek added the comment: I think this deserves discussion :) On one hand, it's a welcome change, on another it's kind of a regression. Up until 3.8, our tests used to look like this: --- # code under test async def foo(): return await bar() # test async def he

[issue38857] AsyncMock issue with awaitable return_value/side_effect/wraps

2020-02-17 Thread Dima Tisnek
Dima Tisnek added the comment: Thank you for explanation, Jason! I guess that the bug report and the patch were too technical for me to understand 😅 I'm happy with the behaviour in Python 3.8.1 and now I know it's going to stay, I'll just change the tests i

[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-03-03 Thread Dima Tisnek
Dima Tisnek added the comment: I volunteer to test the theory that the connection is closed mid-flight. -- ___ Python tracker <https://bugs.python.org/issue31

[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-03-03 Thread Dima Tisnek
Dima Tisnek added the comment: Rejoice: https://github.com/dimaqq/bpo-31122 Short, easy to reproduce :) (I've tested on Mac: 3.7, 3.8, 3.9a from python.org, linked against OpenSSL 1.1.1c/d) Funnily enough, Python 2.7 raises an ssl.SSLEOFError instead đŸ¤ˇâ€â™‚ī¸ -- versions: +Pytho

[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-03-03 Thread Dima Tisnek
Dima Tisnek added the comment: I've traced it down to here: https://github.com/python/cpython/blob/be501ca2419a91546dea85ef4f36945545458589/Modules/_ssl.c#L791-L798 `err.c` (errno) == 0, no error, and `err.ssl` == 5, SSL_ERROR_SYSCALL, helpfully commented "look at error stack/re

[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-03-03 Thread Dima Tisnek
Change by Dima Tisnek : -- keywords: +patch pull_requests: +18130 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/18772 ___ Python tracker <https://bugs.python.org/issu

[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-03-03 Thread Dima Tisnek
Dima Tisnek added the comment: https://github.com/python/cpython/pull/18772 posted -- ___ Python tracker <https://bugs.python.org/issue31122> ___ ___ Python-bug

[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-03-12 Thread Dima Tisnek
Dima Tisnek added the comment: If someone can review https://github.com/python/cpython/pull/18772 then pretty-please review 🙏 -- ___ Python tracker <https://bugs.python.org/issue31

[issue39951] Ignore specific errors when closing ssl connections

2020-03-12 Thread Dima Tisnek
New submission from Dima Tisnek : When a connection wrapped in ssl is closed, sometimes the ssl library reports an error, which I believe should be ignored. The error code is `291` and the name of the error is either SSL_R_KRB5_S_INIT (KRB5_S_INIT) or

[issue39951] Ignore specific errors when closing ssl connections

2020-03-12 Thread Dima Tisnek
Dima Tisnek added the comment: Reproducer: """ Reproducer for BPO-39951 We send some data over ssl and close the connection. The server responds after our openssl considers the connection closed-ish and raises an error. """ import asyncio import ssl h

[issue39953] Let's update ssl error codes

2020-03-12 Thread Dima Tisnek
New submission from Dima Tisnek : Let's consider ssl error `291` (https://bugs.python.org/issue39951): It was introduced into openssl 2 years ago: https://github.com/openssl/openssl/commit/358ffa05cd3a088822c7d06256bc87516d918798 The documentation s

[issue40060] socket.TCP_NOTSENT_LOWAT is missing in official macOS builds

2020-03-25 Thread Dima Tisnek
New submission from Dima Tisnek : Somehow, it turns out that `TCP_NOTSENT_LOWAT` that's available since 3.7.x is not available in the official macOS builds 🙀: > python3.7 Python 3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52) [Clang 6.0 (clang-600.0.57)] on darwin Type "help

[issue39951] Ignore specific errors when closing ssl connections

2020-03-29 Thread Dima Tisnek
Dima Tisnek added the comment: Let's close this in favour of https://bugs.python.org/issue39953 which has a pending pull request https://github.com/python/cpython/pull/19082 -- resolution: -> duplicate stage: -> resolved status: ope

[issue39951] Ignore specific errors when closing ssl connections

2020-03-29 Thread Dima Tisnek
Dima Tisnek added the comment: Sorry I was too fast to close this. 39953 is about error codes. This bug is about having an error at all. I believe that the code in question should pass without error, even in the presence of network delays. -- resolution: duplicate -> sta

[issue40111] Introspect ssl context: read ALPN and NPN protocols

2020-03-29 Thread Dima Tisnek
New submission from Dima Tisnek : It's quite easy to create new or modify existing ssl context: ssl_context = ssl.create_default_context() ssl_context.set_alpn_protocols(["h2"]) I'm writing a library where the context may be passed by the caller (useful if the caller wa

[issue40060] socket.TCP_NOTSENT_LOWAT is missing in official macOS builds

2020-04-06 Thread Dima Tisnek
Dima Tisnek added the comment: +macos team, because I can't for the life of me figure out how official builds are made â˜šī¸ In short: my local build has socket.TCP_NOTSENT_LOWAT but the official build does not. -- nosy: +ned.deily, ronaldous

[issue40060] socket.TCP_NOTSENT_LOWAT is missing in official macOS builds

2020-04-06 Thread Dima Tisnek
Dima Tisnek added the comment: Thank you for the explanation, Ronald. `socket.TCP_NOTSENT_LOWAT` is just a constant though, to be passed to `setsockopt`. What do you think of `ifndef ... define ...` work-around, akin to a few other constants in socket module? https://github.com/python

[issue40060] socket.TCP_NOTSENT_LOWAT is missing in official macOS builds

2020-04-06 Thread Dima Tisnek
Change by Dima Tisnek : -- keywords: +patch pull_requests: +18764 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19402 ___ Python tracker <https://bugs.python.org/issu

[issue40060] socket.TCP_NOTSENT_LOWAT is missing in official macOS builds

2020-04-06 Thread Dima Tisnek
Dima Tisnek added the comment: The constant value is the same for macOS and iOS: iphone, watch, tv: ~ > locate netinet/tcp.h | xargs grep LOWAT /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/netinet/tcp.h:#def

[issue40060] socket.TCP_NOTSENT_LOWAT is missing in official macOS builds

2020-04-07 Thread Dima Tisnek
Dima Tisnek added the comment: Wow, very curious. Yes, it's very much like `socket.TCP_KEEPCNT` in that respect, though, admittedly I don't have a very old Mac to test this right now. I think there were VMs for that maybe? 🤔 I wonder, what failure would be best for a naive cod

[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2020-04-26 Thread Dima Tisnek
Dima Tisnek added the comment: I know Christian is very busy, so what can I do to have this patch reviewed? * it's concise * there's a reproducer -- ___ Python tracker <https://bugs.python.o

[issue39685] Python 3.8 regression Socket operation on non-socket

2020-05-07 Thread Dima Tisnek
Dima Tisnek added the comment: The code in question is interesting... I don't claim to understand it. A pair of file descriptors is passed wrapped in sockets, and the objects are used here: https://github.com/sshuttle/sshuttle/blob/966fd0c5231d56c4f464752865d96f97bd3c0aac/sshuttle/ssn

[issue40590] test_subprocess stuck on Windows, x64

2020-05-10 Thread Dima Tisnek
New submission from Dima Tisnek : The windows test got stuck in my PR, and I'm pretty sure my change is not to blame. The test log looks like this: 0:11:10 load avg: 6.42 [421/423] test_importlib passed 0:11:40 load avg: 5.40 running: test_subprocess (58.5 sec), test_multiprocessing_

[issue36456] task.cancel unbound recursion

2021-01-21 Thread Dima Tisnek
Dima Tisnek added the comment: Py3.10: tested on v3.10.0a3:8bae2a958e and v3.10.0a4:445f7f54b1 -- versions: +Python 3.10 ___ Python tracker <https://bugs.python.org/issue36

[issue36456] task.cancel unbound recursion if task is deadlocked

2021-01-21 Thread Dima Tisnek
Change by Dima Tisnek : -- title: task.cancel unbound recursion -> task.cancel unbound recursion if task is deadlocked ___ Python tracker <https://bugs.python.org/issu

[issue39951] Ignore specific errors when closing ssl connections

2021-02-04 Thread Dima Tisnek
Dima Tisnek added the comment: @fantix alas, no: ~/cpython (asvetlov--new-ssl|✚1) [1] > ./python.exe ~/repro-39951.py Traceback (most recent call last): File "/Users/dima.tisnek/repro-39951.py", line 33, in asyncio.run(test()) File "/Users/dima.tisnek/cpython/Lib/

[issue39951] Ignore specific errors when closing ssl connections

2021-02-04 Thread Dima Tisnek
Dima Tisnek added the comment: Added 3.10 target. -- versions: +Python 3.10 ___ Python tracker <https://bugs.python.org/issue39951> ___ ___ Python-bugs-list m

[issue39951] Ignore specific errors when closing ssl connections

2021-02-05 Thread Dima Tisnek
Dima Tisnek added the comment: Thank you, Christian, for removing 3.7 target, I was not up to date on Python support schedule. Regarding protocol violation, let me explain what I've dug up so far... I am not an expert, please feel free to correct me. TLS up to 1.2 Closing a conne

[issue31861] add aiter() and anext() functions to operator module

2020-08-18 Thread Dima Tisnek
Dima Tisnek added the comment: Might as well re-target for 3.10 as 3.9 seems feature-complete now. -- versions: +Python 3.10 -Python 3.8 ___ Python tracker <https://bugs.python.org/issue31

[issue34730] aclose() doesn't stop raise StopAsyncIteration / GeneratorExit to __anext__()

2020-08-20 Thread Dima Tisnek
Dima Tisnek added the comment: https://github.com/python/cpython/pull/7468 (prohibit asend/etc. reentrance) was merged ~a year ago. Perhaps it's time to restart the original discussion, whether `aclose()` should cancel pending `anext`. -- nosy: +Dima.Tisnek versions: +Python

[issue34730] aclose() doesn't stop raise StopAsyncIteration / GeneratorExit to __anext__()

2020-08-20 Thread Dima Tisnek
Dima Tisnek added the comment: Then perhaps the issue should be closed 🤔 -- ___ Python tracker <https://bugs.python.org/issue34730> ___ ___ Python-bugs-list m

[issue7946] Convoy effect with I/O bound threads and New GIL

2020-10-07 Thread Dima Tisnek
Dima Tisnek added the comment: My 2c as Python user: Back in 2010, I've used multithreading extensively, both for concurrency and performance. Others used multiprocessing or just shelled out. People talked about using **the other** core, or sometimes the other socket on a server. N

[issue42117] asyncio calls from sync/async, better docs or api support

2020-10-22 Thread Dima Tisnek
Dima Tisnek added the comment: Blaze, I think this needs a concrete proposal: either a patch, or at least a formal example how the new API would be used. Note that there's also async-sig mailing list that's less formal, as well as discuss.python.org to bounce ideas

[issue12930] reindent.py inserts spaces in multiline literals

2020-10-25 Thread Dima Tisnek
Dima Tisnek added the comment: Given the trajectory of this bug, would it be easier to remove `reindent.py` from cpython code base entirely? -- ___ Python tracker <https://bugs.python.org/issue12

[issue40060] socket.TCP_NOTSENT_LOWAT is missing in official macOS builds

2020-10-25 Thread Dima Tisnek
Dima Tisnek added the comment: Indeed, this issue can be closed, when the mac build update is confirmed to be included in a specific upcoming Python version. -- ___ Python tracker <https://bugs.python.org/issue40

[issue39951] Ignore specific errors when closing ssl connections

2020-10-29 Thread Dima Tisnek
Dima Tisnek added the comment: https://bugs.python.org/issue39953 has landed and the errors are now more sensible: (that patch was not backported to 3.7, because it's not a security issue). Python 3.7.8 [SSL: KRB5_S_INIT] application data after close notify Python 3.8.5

[issue37355] SSLSocket.read does a GIL round-trip for every 16KB TLS record

2020-10-29 Thread Dima Tisnek
Dima Tisnek added the comment: Amazing! Would you consider making a pull request out of your branch? re: `PyErr_HasSignals` is a notable addition to the cpython API, it may need discussion, and (imo) documentation. -- nosy: +Dima.Tisnek

[issue42200] Support TLS 1.3 half-closed connections

2020-10-29 Thread Dima Tisnek
New submission from Dima Tisnek : (apologies if this was raised before, I couldn't find it in bugs, mailing lists or discourse). (also apologies if I misunderstood something about the protocol) Up to an including TLS 1.2, a single close notify terminates both upstream and downs

[issue13976] threading.local doesn't support super()

2012-02-09 Thread Dima Tisnek
New submission from Dima Tisnek : import threading import pprint class A: def __init__(self, **kw): pprint.pprint("a") super(A, self).__init__() class B(threading.local, A): def __init__(self, **kw): pprint.pprint("b") super(B,

[issue13976] threading.local doesn't support super()

2012-02-09 Thread Dima Tisnek
Dima Tisnek added the comment: ah feeling stupid only minutes later. A has to inherit from object() and then it works fine. -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue37171] Documentation mismatch contextvars module vs PEP-567

2019-06-06 Thread Dima Tisnek
New submission from Dima Tisnek : PEP-567 states that user "must call Context.run()" while `contextvars` docs don't mention `.run()` `contextvars.Context().run(arg)` exists, but there's no documentation, for example what the required argument is. -- componen

[issue37172] Odd error awating a Future

2019-06-06 Thread Dima Tisnek
New submission from Dima Tisnek : Let's start with correct code: import asyncio async def writer(): await asyncio.sleep(1) g1.set_result(41) async def reader(): await g1 async def test(): global g1 g1 = asyncio.Future() await asyncio.gather(reader(), w

[issue37171] Documentation mismatch contextvars module vs PEP-567

2019-06-06 Thread Dima Tisnek
Dima Tisnek added the comment: It seems I have been blind. I'll close this. -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.

[issue37172] Odd error awaiting a Future

2019-06-09 Thread Dima Tisnek
Dima Tisnek added the comment: Hi Terry, Yes, I have a specific suggestion: The error `RuntimeError: await wasn't used with future` is misleading. I'm not sure if changing error text is enough. I think that Future.__await__ should be fixed; I think that `await f` should be idempo

[issue37172] Odd error awaiting a Future

2019-06-10 Thread Dima Tisnek
Dima Tisnek added the comment: I think that if a Future is abused, the following two should return *same* error: async def test(): await asyncio.gather(reader(), writer()) -vs- async def test(): await asyncio.gather(reader(), reader(), writer

[issue37172] Odd error awaiting a Future

2019-06-10 Thread Dima Tisnek
Dima Tisnek added the comment: Yes, I think that would be sufficient! I don't know about implementation though, as there's some magic in the way Future.__await__ tries to guess how it was called. I hope one day that magic could go away, but I neither understand the origin nor the

[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2019-06-19 Thread Dima Tisnek
Change by Dima Tisnek : -- nosy: +Dima.Tisnek ___ Python tracker <https://bugs.python.org/issue31122> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37399] XML text behaviour change if there are comments

2019-06-25 Thread Dima Tisnek
New submission from Dima Tisnek : Example: # mre.py from xml.etree import ElementTree XML = "foobar" a = ElementTree.fromstring(XML) print(list(a.itertext())) # Testing 3.7.3 vs. 3.8.0b1; macOS â€Ļ ~> python3.7 mre.py ['foobar'] â€Ļ ~> python3.8 mre.py ['bar&#x

[issue37399] XML text behaviour change if there are comments

2019-06-27 Thread Dima Tisnek
Dima Tisnek added the comment: Yes that does look suspicious! -- ___ Python tracker <https://bugs.python.org/issue37399> ___ ___ Python-bugs-list mailin

[issue30550] Document order-preserving dictionary output in json

2019-07-10 Thread Dima Tisnek
Change by Dima Tisnek : -- nosy: +Dima.Tisnek ___ Python tracker <https://bugs.python.org/issue30550> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37657] ERROR: grip 4.5.2 requires docopt>=0.4.0, which is not installed.

2019-07-22 Thread Dima Tisnek
New submission from Dima Tisnek : I have Python-3.7.2 installed. I've just installed Python3.8.0b2 on macOS, and ran "Install Certificates.command". The terminal output contained: ERROR: grip 4.5.2 requires docopt>=0.4.0, which is not installed. (certifi-2019.6.16 got instal

[issue30773] async generator receives wrong value when shared between coroutines

2017-06-26 Thread Dima Tisnek
New submission from Dima Tisnek: MRE ``` import asyncio async def generator(): while True: x = yield 42 print("received", x) await asyncio.sleep(0.1) async def user(name, g): print("sending", name) await g.asend(name) async

[issue30773] async generator receives wrong value when shared between coroutines

2017-06-26 Thread Dima Tisnek
Dima Tisnek added the comment: @Yuri, this bug doesn't require `gather`, here's a version with futures and explicit await's instead. It produces same output: ``` import asyncio async def generator(): while True: x = yield 42 print("receive

[issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption

2017-07-05 Thread Dima Tisnek
Dima Tisnek added the comment: My 2c: Pau's concern seems valid, in a sense that stream should work like TCP. That's what most users would assume -- read out data until the end, only then you can see what the actual error was (socket closed, or timeout or hard error) However, I s

[issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption

2017-07-07 Thread Dima Tisnek
Dima Tisnek added the comment: It seems Guido sets a higher bar on the proposed change. @pfreixes, if you can show that this change is needed to implement "TCP half-closed" state (i.e. when remote calls shutdown(SHUT_WR) after it's done sending data but continues to recv()

[issue35415] fileno argument to socket.socket is not validated

2018-12-05 Thread Dima Tisnek
New submission from Dima Tisnek : socket.socket gained a fileno= kwarg the value of which is not checked if address family and socket type are both provided. For example, following is accepted: >>> socket.socket(socket.AF_INET, socket.SOCK_STREAM, fileno=-1234) >>

[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2018-12-17 Thread Dima Tisnek
Dima Tisnek added the comment: ping... -- nosy: +Dima.Tisnek ___ Python tracker <https://bugs.python.org/issue29406> ___ ___ Python-bugs-list mailing list Unsub

[issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE

2018-12-19 Thread Dima Tisnek
Dima Tisnek added the comment: Perhaps https://stackoverflow.com/questions/42332792/chrome-not-firefox-are-not-dumping-to-sslkeylogfile-variable is outdated, but it suggests that: in firefox, this feature os not on by default in chrome, this feature is not available I would be vary of

[issue35600] Expose siphash

2018-12-27 Thread Dima Tisnek
New submission from Dima Tisnek : Just recently, i found rolling my own simple hash for strings. (task was to distribute tests across executors, stably across invocations, no external input, no security) In the old days I'd just `hash(some_variable)` but of course now I cannot. `hashli

[issue35600] Expose siphash

2018-12-27 Thread Dima Tisnek
Dima Tisnek added the comment: Steven, my requirement calls for same hash on multiple machines. Python's hash (for strings) is keyed with a random value. You are correct that `hash(tuple(map(ord, str(something` is stable. In the worst case, I could override `PYTHONHASHSEED` globall

[issue26467] Add async magic method support to unittest.mock.Mock

2019-01-07 Thread Dima Tisnek
Dima Tisnek added the comment: Perhaps it's possible to vendor asynctest mock in the same vein as `mock` found it's way into unittest? The real power of `asynctest` is in constructs like: with asynctest.mock.patch("module.Class", autospec=True): ... Where mock

[issue35856] bundled pip syntaxwarning

2019-01-29 Thread Dima Tisnek
New submission from Dima Tisnek : It seems that `pip` vendored/bundled with Python3.8 doesn't conform to 3.8 syntax: â€Ļ ~> /usr/local/bin/python3.8 -m ensurepip /.../tmp.../pip-18.1-py2.py3-none-any.whl/pip/_vendor/requests/status_codes.py:3: SyntaxWarning: invalid escape sequence \o

[issue31861] add aiter() and anext() functions to operator module

2019-03-03 Thread Dima Tisnek
Dima Tisnek added the comment: https://www.python.org/dev/peps/pep-0525/#aiter-and-anext-builtins kinda promised `aiter` and `anext` built-ins. This ticket seems idle. Perhaps it's time for the decider club to either remove that language from PEP-525 or make a plan for aiter/

[issue32528] Change base class for futures.CancelledError

2019-03-13 Thread Dima Tisnek
Dima Tisnek added the comment: ping -- nosy: +Dima.Tisnek ___ Python tracker <https://bugs.python.org/issue32528> ___ ___ Python-bugs-list mailing list Unsub

[issue36340] 3.7.3rc1 Install Certificates fails on macOS

2019-03-18 Thread Dima Tisnek
New submission from Dima Tisnek : I've just installed Python 3.7.3rc1 for macOS 10.9 or later from the macOS 64-bit installer. I've clicked the `Install Certificates.command`, which opened a Terminal, ran and failed with: ``` Last login: Mon Mar 18 16:36:21 on ttys010 Welcome to

[issue36340] 3.7.3rc1 Install Certificates fails on macOS

2019-03-18 Thread Dima Tisnek
Dima Tisnek added the comment: More system info: I've had 3.7.2 installed from official installer prior to this. Before that, I had 3.7.1 installed from official installer. I also have 3.8a2. 3.6.8, 2.7.15 on the system, as well as an odd version from Homebrew. My system site-package

[issue36340] 3.7.3rc1 Install Certificates fails on macOS

2019-03-18 Thread Dima Tisnek
Dima Tisnek added the comment: I've figured out what's going on: When Installer runs, it asks for user's su passwords, does a bunch of stuff, and then starts "Running package scripts". While it's "running scripts", towards the end of that process,

[issue36456] task.cancel unbound recursion

2019-03-27 Thread Dima Tisnek
New submission from Dima Tisnek : Cancelling a deadlocked group of tasks results in MaximumRecursionError Inspired by https://stackoverflow.com/questions/55341189/handling-asyncio-deadlocks Given the following test-asyncio.py: ``` import asyncio async def test(): async def f

[issue31087] asyncio.create_subprocess_* do not honor `encoding`

2018-01-17 Thread Dima Tisnek
Dima Tisnek added the comment: I'd love to see universal_newlines=True in asyncio.subprocess. -- nosy: +Dima.Tisnek ___ Python tracker <https://bugs.python.org/is

[issue5950] Make zipimport work with zipfile containing comments

2018-09-19 Thread Dima Tisnek
Dima Tisnek added the comment: Very glad to hear! Let's document what Python version(s) are "fixed". Perhaps this issue deserves a test case in issue25711. -- ___ Python tracker <https://bugs.py

[issue5639] Support TLS SNI extension in ssl module

2014-03-20 Thread Dima Tisnek
Dima Tisnek added the comment: +dstufft is absolutely right. SNI needs to be enabled on lower level than "user" python code. if it is, requests and most other http client libs get it for free without dependencies. -- ___ Python trac

[issue5639] Support TLS SNI extension in ssl module

2014-03-20 Thread Dima Tisnek
Dima Tisnek added the comment: Antoine, was Python 2.x a mistake? I don't think so. SNI is not a language feature, it's not even a python extension feature. It's a feature of and existing protocol and the underlying library. -- ___

[issue21191] os.fdopen() may eat file descriptor and still raise exception

2014-04-09 Thread Dima Tisnek
New submission from Dima Tisnek: os.fdopen() should either: * consume file descriptor and return file/io object, or * leave file descriptor alone and raise an exception this invariant is broken in the following test case: fd = os.open("/", os.O_RDONLY) try: obj = os.fdopen(fd, &

[issue21191] os.fdopen() may eat file descriptor and still raise exception

2014-04-09 Thread Dima Tisnek
Dima Tisnek added the comment: Benjamin, I think you missed the key point: file + matching mode -> fd eaten, object created file + mode mismatch -> fd remains, exception raised dir + matching mode -> fd eaten, exception raised The issue is about resouce (fd) management Thus, how can

[issue21191] os.fdopen() may eat file descriptor and still raise exception

2014-04-09 Thread Dima Tisnek
Dima Tisnek added the comment: I don't like proposed patch -- it changes semantics of more (?) common failure modes. I think it's best to keep semantics in line with Python 3.3 -- if fdopen fails, it leaves file descriptor alone. --

[issue21191] os.fdopen() may eat file descriptor and still raise exception

2014-04-09 Thread Dima Tisnek
Dima Tisnek added the comment: Good point. Personally I think it's more pythonic to consume fd only on success. I accept that's just an opinion. In any case, let's keep error semantics in py2.7 and py3.3 same. -- ___ Python

[issue21191] os.fdopen() may eat file descriptor and still raise exception

2014-04-10 Thread Dima Tisnek
Dima Tisnek added the comment: I'm not sure if you are referring to Python's C-level fdopen or GNU libc fdopen. GNU libc fdopen does not consume file descriptor on error: #include #include #include #include #include #include #include int main(int argc, char** argv) { i

[issue5639] Support TLS SNI extension in ssl module

2014-04-11 Thread Dima Tisnek
Dima Tisnek added the comment: Hopefully pep-466 resolves this for 2.x series. -- ___ Python tracker <http://bugs.python.org/issue5639> ___ ___ Python-bugs-list m

[issue21191] os.fdopen() may eat file descriptor and still raise exception

2014-04-11 Thread Dima Tisnek
Dima Tisnek added the comment: I think consistency between Python versions is just as important as consistency between fd types. Here's my hack quickfix outline: fd = os.open(...) try: if not stat.S_ISREG(os.fstat(fd).st_mode): raise OSError(None, "Not a regular file&qu

[issue21191] os.fdopen() may eat file descriptor and still raise exception

2014-04-15 Thread Dima Tisnek
Dima Tisnek added the comment: Banjamin, Your patch looks good to me! I have a small concern regarding "We now know we will succeed..." -- should there be a test case to make sure fstat test here matches whatever test is/was done on a lower level? Or is your code now such th

[issue21548] pydoc -k IndexError on empty docstring

2014-05-21 Thread Dima Tisnek
New submission from Dima Tisnek: While trying to track down another bug, I disabled some packages: [dima@bmg tmp]$ chmod a-x /usr/lib/python3.4/site-packages/speechd* Then ran pydoc -k: [dima@bmg tmp]$ pydoc3.4 -k n688954789 Traceback (most recent call last): File "/usr/bin/pydoc3.4&q

[issue20188] ALPN support for TLS

2014-06-05 Thread Dima Tisnek
Changes by Dima Tisnek : -- nosy: +Dima.Tisnek ___ Python tracker <http://bugs.python.org/issue20188> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5950] Make zipimport work with zipfile containing comments

2012-11-07 Thread Dima Tisnek
Dima Tisnek added the comment: also applies to 2.7 series over a year passed since last comment, any progress on this? I just ran into this issue myself. zipfile module handles commented zip's fine, but zipimport doesn't. I didn't expect a gotcha like this from Python!

[issue5639] Support TLS SNI extension in ssl module

2013-11-25 Thread Dima Tisnek
Dima Tisnek added the comment: Is this really not going into Python2 series? It's not a Python feature or a language feature, it's a matter of exporting OpenSSL feature. Furthermore it's a matter of security, same as support for session tickets is a matter of performance.

  1   2   >