Dima Tisnek added the comment:
I'm fine with guarding both.
--
___
Python tracker
<https://bugs.python.org/issue45996>
___
___
Python-bugs-list m
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'
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__
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
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
Dima Tisnek added the comment:
Added 3.10 target.
--
versions: +Python 3.10
___
Python tracker
<https://bugs.python.org/issue39951>
___
___
Python-bugs-list m
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/
Change by Dima Tisnek :
--
title: task.cancel unbound recursion -> task.cancel unbound recursion if task
is deadlocked
___
Python tracker
<https://bugs.python.org/issu
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
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
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
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
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
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
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
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
Dima Tisnek added the comment:
Then perhaps the issue should be closed 🤔
--
___
Python tracker
<https://bugs.python.org/issue34730>
___
___
Python-bugs-list m
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
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
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_
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Dima Tisnek added the comment:
https://github.com/python/cpython/pull/18772 posted
--
___
Python tracker
<https://bugs.python.org/issue31122>
___
___
Python-bug
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
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
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
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
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
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
Dima Tisnek added the comment:
Clearly my attention span does not exceed 5 paragraphs, so sorry!
--
___
Python tracker
<https://bugs.python.org/issue38
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
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...
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
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
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
Change by Dima Tisnek :
--
nosy: +Dima.Tisnek
___
Python tracker
<https://bugs.python.org/issue38342>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
Change by Dima Tisnek :
--
nosy: +Dima.Tisnek
___
Python tracker
<https://bugs.python.org/issue30550>
___
___
Python-bugs-list mailing list
Unsubscribe:
Dima Tisnek added the comment:
Yes that does look suspicious!
--
___
Python tracker
<https://bugs.python.org/issue37399>
___
___
Python-bugs-list mailin
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
Change by Dima Tisnek :
--
nosy: +Dima.Tisnek
___
Python tracker
<https://bugs.python.org/issue31122>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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.
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
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
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
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,
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
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
Dima Tisnek added the comment:
ping
--
nosy: +Dima.Tisnek
___
Python tracker
<https://bugs.python.org/issue32528>
___
___
Python-bugs-list mailing list
Unsub
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/
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
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
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
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
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
Dima Tisnek added the comment:
ping...
--
nosy: +Dima.Tisnek
___
Python tracker
<https://bugs.python.org/issue29406>
___
___
Python-bugs-list mailing list
Unsub
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)
>>
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
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
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()
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
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
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
Dima Tisnek added the comment:
1.1.0d is due today. Who wants to test it? :)
--
nosy: +Dima.Tisnek
___
Python tracker
<http://bugs.python.org/issue28689>
___
___
Dima Tisnek added the comment:
+1, I too would like to see this documented
--
nosy: +Dima.Tisnek
___
Python tracker
<http://bugs.python.org/issue24632>
___
___
Dima Tisnek added the comment:
Your logic is accurate; _started is in fact separate from _limbo.
As such taking a lock for "test-then-set" only would suffice.
Now when you bring the other primitive under this lock in one place, it would
look cleaner if it was also brought in
Dima Tisnek added the comment:
@rooter, if you go this way, you should also `self._started.set()` with lock
held, together with removing thread from `_limbo`
--
___
Python tracker
<http://bugs.python.org/issue27
Dima Tisnek added the comment:
@Serhiy please comment the implications / limitations of the fallback on
Windows.
Is it that scandir cannot handle bytes argument only?
If argument is unicode, but response set contains bytes paths, will that work
Dima Tisnek added the comment:
I meant "the patch makes sense in itself".
--
___
Python tracker
<http://bugs.python.org/issue24139>
___
___
Python-bugs-l
Dima Tisnek added the comment:
Aviv the patch makes in itself.
Are the changes in the other ticket needed to implement new tests?
Or is it possible to include tests here?
--
___
Python tracker
<http://bugs.python.org/issue24
New submission from Dima Tisnek:
To reproduce:
```
import threading
import time
class U(threading.Thread):
def run(self):
time.sleep(1)
if not x.ident:
x.start()
x = U()
for u in [U() for i in range(1)]: u.start()
time.sleep(10)
```
Chance to reproduce
Dima Tisnek added the comment:
Who can review Serhiy's patch?
P.S. core of the patch seems good to me, but I'm not an expert on stdlib.
--
nosy: +Dima.Tisnek
___
Python tracker
<https://bugs.python.o
Dima Tisnek added the comment:
Can someone review Aviv's patch?
--
___
Python tracker
<http://bugs.python.org/issue9303>
___
___
Python-bugs-list m
New submission from Dima Tisnek:
shelve.open("foo.db") creates "foo.db" on Linux and "foo.db.db" on OSX.
Something to that extent is even documented:
"""d = shelve.open(filename) # open, with (g)dbm filename -- no suffix"""
and
"
New submission from Dima Tisnek:
One of my students installed Python 3.5 on Windows 10 to default location where
user name "Łukasz" contains unicode.
Now "-m venv" and "-m ensurepip" do not work:
C:\Users\Łukasz>C:\Users\Łukasz\AppData\Local\Programs\Pytho
Dima Tisnek added the comment:
To clarify, Python language disclaimer can be in the general atomic operations
or multithreading section.
What I'd really like to see is documented, practical CPython and stdlib
behaviour.
I'm under the impression that there's quite a bit of code
Dima Tisnek added the comment:
Ideally I'd like 2 sources:
1. a whole section on atomic operations in language and CPython implementation
2. annotation of standard library methods, e.g.:
set().add(element) [atomic] or [CPython: atomic(*)]
(*) assuming basic types, note about what c
New submission from Dima Tisnek:
Please document what builtin type operations are actually atomic.
For example, what set() operations are atomic?
(There are some blogs / tutorials online, but information is outdated and not
authoritative)
--
messages: 252545
nosy: Dima.Tisnek
priority
Changes by Dima Tisnek :
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@python
type: -> enhancement
___
Python tracker
<http://bugs.python.org/i
Changes by Dima Tisnek :
--
nosy: +Dima.Tisnek
___
Python tracker
<http://bugs.python.org/issue24758>
___
___
Python-bugs-list mailing list
Unsubscribe:
Dima Tisnek added the comment:
What is this **assret** spelling?
I can't a reference to this spelling anywhere else in the codebase, let alone
any docs other that this special kwarg.
It seems intentional.
Was that a joke?
Or something I should know?
--
nosy: +Dima.T
Dima Tisnek added the comment:
beep!
--
nosy: +Dima.Tisnek
___
Python tracker
<http://bugs.python.org/issue18987>
___
___
Python-bugs-list mailing list
Unsub
1 - 100 of 127 matches
Mail list logo