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'
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:
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():
""&
Dima Tisnek added the comment:
good enough for me :)
--
___
Python tracker
<http://bugs.python.org/issue12930>
___
___
Python-bugs-list mailing list
Unsubscribe:
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"""
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
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
Change by Dima Tisnek :
--
nosy: +Dima.Tisnek
___
Python tracker
<https://bugs.python.org/issue38342>
___
___
Python-bugs-list mailing list
Unsubscribe:
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 :
--
keywords: +patch
pull_requests: +16225
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/16639
___
Python tracker
<https://bugs.python.org/issu
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
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:
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
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:
Would now, a year later, be a good time to consider io_uring?
--
nosy: +Dima.Tisnek
___
Python tracker
<https://bugs.python.org/issue41
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:
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:
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 volunteer to test the theory that the connection is closed mid-flight.
--
___
Python tracker
<https://bugs.python.org/issue31
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'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
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:
https://github.com/python/cpython/pull/18772 posted
--
___
Python tracker
<https://bugs.python.org/issue31122>
___
___
Python-bug
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
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:
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 :
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
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
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
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
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:
+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
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
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:
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
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:
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:
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
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:
Py3.10: tested on v3.10.0a3:8bae2a958e and v3.10.0a4:445f7f54b1
--
versions: +Python 3.10
___
Python tracker
<https://bugs.python.org/issue36
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:
@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/
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:
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:
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
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:
Then perhaps the issue should be closed đ¤
--
___
Python tracker
<https://bugs.python.org/issue34730>
___
___
Python-bugs-list m
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:
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:
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:
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:
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:
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
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
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,
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
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 :
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
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.
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:
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:
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
Change by Dima Tisnek :
--
nosy: +Dima.Tisnek
___
Python tracker
<https://bugs.python.org/issue31122>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Dima Tisnek added the comment:
Yes that does look suspicious!
--
___
Python tracker
<https://bugs.python.org/issue37399>
___
___
Python-bugs-list mailin
Change by Dima Tisnek :
--
nosy: +Dima.Tisnek
___
Python tracker
<https://bugs.python.org/issue30550>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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:
@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
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:
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()
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:
ping...
--
nosy: +Dima.Tisnek
___
Python tracker
<https://bugs.python.org/issue29406>
___
___
Python-bugs-list mailing list
Unsub
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
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:
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
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
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:
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/
Dima Tisnek added the comment:
ping
--
nosy: +Dima.Tisnek
___
Python tracker
<https://bugs.python.org/issue32528>
___
___
Python-bugs-list mailing list
Unsub
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:
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
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,
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'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:
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:
+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
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.
--
___
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, &
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
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.
--
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
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
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
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
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
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
Changes by Dima Tisnek :
--
nosy: +Dima.Tisnek
___
Python tracker
<http://bugs.python.org/issue20188>
___
___
Python-bugs-list mailing list
Unsubscribe:
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!
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 - 100 of 127 matches
Mail list logo