[Python-Dev] Re: Improvement to SimpleNamespace

2020-04-27 Thread Rob Cliffe via Python-Dev
Here's another revolutionary thought:  add a new operator and associated dunder method (to object?) whose meaning is *undefined*.  Its default implementation would do *nothing* useful (raise an error? return None?). E.g. suppose the operator were `..` Then in a specific class you could implement

[Python-Dev] Re: Announcement: pip 20.1b1 beta release

2020-04-27 Thread Miro Hrončok
On 27. 04. 20 20:56, Miro Hrončok wrote: I've also observed that we now have the direct_url.json when we build pip, that leaks the builddir path: {"archive_info": {}, "url": "file:///builddir/build/BUILD/pip-20.1b1/dist/pip-20.1b1-py2.py3-none-any.whl"} I will read PEP 610, but may I safel

[Python-Dev] Re: Adding a "call_once" decorator to functools

2020-04-27 Thread Steve Dower
On 27Apr2020 2311, Tom Forbes wrote: Why not? It's a decorator, isn't it? Just make it check for number of arguments at decoration time and return a different object. It’s not that it’s impossible, but I didn’t think the current implementation doesn’t make it easy This is the line I'd chang

[Python-Dev] Re: Adding a "call_once" decorator to functools

2020-04-27 Thread Tom Forbes
> Why not? It's a decorator, isn't it? Just make it check for number of > arguments at decoration time and return a different object. It’s not that it’s impossible, but I didn’t think the current implementation doesn’t make it easy (https://github.com/python/cpython/blob/cecf049673da6a24435acd1

[Python-Dev] Re: Adding a "call_once" decorator to functools

2020-04-27 Thread Steve Dower
On 27Apr2020 2237, t...@tomforb.es wrote: 2. Special casing "lru_cache" to account for zero arity methods isn't trivial and we shouldn't endorse lru_cache as a way of achieving "call_once" semantics Why not? It's a decorator, isn't it? Just make it check for number of arguments at decoration

[Python-Dev] Adding a "call_once" decorator to functools

2020-04-27 Thread tom
Hello, After a great discussion in python-ideas[1][2] it was suggested that I cross-post this proposal to python-dev to gather more comments from those who don't follow python-ideas. The proposal is to add a "call_once" decorator to the functools module that, as the name suggests, calls a wrapp

[Python-Dev] Re: Announcement: pip 20.1b1 beta release

2020-04-27 Thread Miro Hrončok
On 27. 04. 20 17:17, Miro Hrončok wrote: Basic CI smoke testing with venvs, virtualenvs, tox:   - CPython 3.5-3.8 (will add 3.9) CPython 3.9.0a5 venv, virtualenv, tox OK as well. I've also observed that we now have the direct_url.json when we build pip, that leaks the builddir path: {"ar

python-dev@python.org

2020-04-27 Thread Victor Stinner
Copy of Brett Cannon's message: https://discuss.python.org/t/collecting-questions-for-a-steering-council-q-a/4010 --- As part of PyCon US 2020 (*), we are planning to record a Q&A with the Steering Council. We are using this topic to solicit questions from the community. We plan to leave this open

[Python-Dev] test_ssl.py hangs with SSL 1.1 built with no threads

2020-04-27 Thread mig28suarez
Hello! This is my first time posting to the group. I've been running builds of Python 3.7.x on CentOS Linux release 7.7 (64bit/Intel Core 2 Duo) and I ran into hangs with test_ssl.py when using latest SSL 1.1.1d sources. I've done a full compilation from source for Python 3.7.7 and SSL 1.1 i

[Python-Dev] Re: Announcement: pip 20.1b1 beta release

2020-04-27 Thread Miro Hrončok
On 27. 04. 20 17:31, Paul Moore wrote: On Mon, 27 Apr 2020 at 16:21, Miro Hrončok wrote: On 23. 04. 20 21:36, Sumana Harihareswara wrote: We would be grateful for all the testing that users could do to ensure that, when pip 20.1 is released, it's as solid as we can make it. We are doing so

[Python-Dev] Re: Announcement: pip 20.1b1 beta release

2020-04-27 Thread Paul Moore
On Mon, 27 Apr 2020 at 16:21, Miro Hrončok wrote: > > On 23. 04. 20 21:36, Sumana Harihareswara wrote: > > We would be grateful for all the testing that users could do to ensure > > that, when pip 20.1 is released, it's as solid as we can make it. > > We are doing some basic testing in Fedora. >

[Python-Dev] Re: Announcement: pip 20.1b1 beta release

2020-04-27 Thread Miro Hrončok
On 23. 04. 20 21:36, Sumana Harihareswara wrote: We would be grateful for all the testing that users could do to ensure that, when pip 20.1 is released, it's as solid as we can make it. We are doing some basic testing in Fedora. So far everyhting looks good. We've tested: Basic CI smoke tes

[Python-Dev] Re: Virtual machine bleeds into generator implementation?

2020-04-27 Thread Skip Montanaro
> > I think it's worse that this though, as it seems that in gen_send_ex() > > it actually pushes a value onto the stack. That can't be solved by > > simply adding a state attribute to the generator object struct. > > At the higher level, "it doesn't push value on stack", it "sets value > of the yi

[Python-Dev] Re: Virtual machine bleeds into generator implementation?

2020-04-27 Thread Paul Sokolovsky
Hello, On Sun, 26 Apr 2020 19:51:18 -0700 Skip Montanaro wrote: [] > I think it's worse that this though, as it seems that in gen_send_ex() > it actually pushes a value onto the stack. That can't be solved by > simply adding a state attribute to the generator object struct. At the higher level