[Python-Dev] Re: PEP 674: Disallow using macros as l-value

2022-01-11 Thread Victor Stinner
Hi, The HPy project is great and I'm supporting this cool project! As I wrote, IMO it's the best solution for the long term. My first concern is that right now, HPy is not mature nor widely used, and CPython still has to continue supporting a large amount of C extensions which are not likely to

[Python-Dev] Re: PEP 674: Disallow using macros as l-value

2022-01-11 Thread Victor Stinner
On Tue, Dec 7, 2021 at 7:55 PM Sebastian Berg wrote: > One thing we once did in NumPy (for a runtime problem), was to > intentionally break everyone at pre-release/dev time to point out what > code needed fixing. Then flip the switch back at release time as to > not break production. > After a

[Python-Dev] Re: Minor inconvenience: f-string not recognized as docstring

2022-01-11 Thread Eric V. Smith
On 1/11/2022 3:44 PM, Brett Cannon wrote: On Tue, Jan 11, 2022 at 10:40 AM Gregory P. Smith wrote: On Tue, Jan 11, 2022 at 10:29 AM Guido van Rossum wrote: I personally think F-strings should not be usable as docstrings. If you want a dynamically calculated

[Python-Dev] Re: Minor inconvenience: f-string not recognized as docstring

2022-01-11 Thread Brett Cannon
On Tue, Jan 11, 2022 at 10:40 AM Gregory P. Smith wrote: > > On Tue, Jan 11, 2022 at 10:29 AM Guido van Rossum > wrote: > >> I personally think F-strings should not be usable as docstrings. If you >> want a dynamically calculated docstring you should assign it dynamically, >> not smuggle it in

[Python-Dev] Re: Minor inconvenience: f-string not recognized as docstring

2022-01-11 Thread Gregory P. Smith
On Tue, Jan 11, 2022 at 10:29 AM Guido van Rossum wrote: > I personally think F-strings should not be usable as docstrings. If you > want a dynamically calculated docstring you should assign it dynamically, > not smuggle it in using a string-like expression. We don't allow "blah {x} >

[Python-Dev] Re: Minor inconvenience: f-string not recognized as docstring

2022-01-11 Thread Guido van Rossum
I personally think F-strings should not be usable as docstrings. If you want a dynamically calculated docstring you should assign it dynamically, not smuggle it in using a string-like expression. We don't allow "blah {x} blah".format(x=1) as a docstring either, not "foo %s bar" % x. On Tue, Jan

[Python-Dev] Re: Minor inconvenience: f-string not recognized as docstring

2022-01-11 Thread Antoine Pitrou
On Tue, 11 Jan 2022 10:58:03 -0500 "Eric V. Smith" wrote: > Constant f-strings (those without substitutions) as doc strings used to > work, since the compiler turns them into normal strings. > > I can't find exactly where it was removed, but there was definitely > discussion about it. See

[Python-Dev] Re: Minor inconvenience: f-string not recognized as docstring

2022-01-11 Thread Eric V. Smith
Constant f-strings (those without substitutions) as doc strings used to work, since the compiler turns them into normal strings. I can't find exactly where it was removed, but there was definitely discussion about it. See https://bugs.python.org/issue28739 for at least part of the discussion.

[Python-Dev] Status of Python 3.11.0a4

2022-01-11 Thread Pablo Galindo Salgado
Hi everyone, I want to report on the status of Python 3.11.0a4. We had a ton of release blockers (some extra ones since I reported the last time) and it seems that we managed to fix them all (thanks to Mark Shannon, Christian Heimes, Gregory P. Smith, Neil Schemenauer, Steve Dower and many others

[Python-Dev] Minor inconvenience: f-string not recognized as docstring

2022-01-11 Thread Antoine Pitrou
Hello, Currently, a f-string is not recognized as a docstring: >>> class C: f"foo" >>> C.__doc__ >>> This means you need to use a (admittedly easy) workaround: >>> class C: __doc__ = f"foo" >>> C.__doc__ 'foo' Shouldn't the former be allowed for convenience? Regards Antoine.

[Python-Dev] Re: [PSA] OpenSSL 3.0 support is preliminary and experimental

2022-01-11 Thread Christian Heimes
On 11/01/2022 12.02, Antoine Pitrou wrote: Hi Christian, On Sun, 9 Jan 2022 19:39:06 +0100 Christian Heimes wrote: Hi, I would like to remind everybody that Python's support for OpenSSL 3.0 is preliminary [1]. Python compiles with OpenSSL 3.0.0 and simple code kinda works. However there are

[Python-Dev] Re: [PSA] OpenSSL 3.0 support is preliminary and experimental

2022-01-11 Thread Antoine Pitrou
Hi Christian, On Sun, 9 Jan 2022 19:39:06 +0100 Christian Heimes wrote: > Hi, > > I would like to remind everybody that Python's support for OpenSSL 3.0 > is preliminary [1]. Python compiles with OpenSSL 3.0.0 and simple code > kinda works. However there are known performance regressions,

[Python-Dev] Re: Suggestion: a little language for type definitions

2022-01-11 Thread Paul Moore
On Mon, 10 Jan 2022 at 23:04, Greg Ewing wrote: > > Most of the effort of learning to read type expressions, in any > language, is learning their semantics, which is very different > from value expressions. Whether they happen to superficially > resemble other parts of the language is pretty much