[Python-ideas] Re: PEP Draft: Power Assertion

2021-09-25 Thread Noam Tenne
Thank you On Sat, Sep 25, 2021, at 18:53, Guido van Rossum wrote: > First you need to fond a core dev to sponsor you (Steven D’A?). That person > will guide you through the process. > > On Sat, Sep 25, 2021 at 08:30 Noam Tenne wrote: >> __ >> So should I just scratch this and rewrite a PEP for

[Python-ideas] Re: PEP Draft: Power Assertion

2021-09-25 Thread Guido van Rossum
First you need to fond a core dev to sponsor you (Steven D’A?). That person will guide you through the process. On Sat, Sep 25, 2021 at 08:30 Noam Tenne wrote: > So should I just scratch this and rewrite a PEP for an extensible > assertion mechanism? > > On Fri, Sep 24, 2021, at 14:04, Noam Tenn

[Python-ideas] Re: PEP Draft: Power Assertion

2021-09-25 Thread Noam Tenne
So should I just scratch this and rewrite a PEP for an extensible assertion mechanism? On Fri, Sep 24, 2021, at 14:04, Noam Tenne wrote: > Hi All, > > Following the discussions on "Power Assertions: Is it PEP-able?", I've > drafted this PEP. > Your comments are most welcome. > > PEP: > Ti

[Python-ideas] Re: PEP Draft: Power Assertion

2021-09-25 Thread Guido van Rossum
On Sat, Sep 25, 2021 at 00:56 Steven D'Aprano wrote: > On Fri, Sep 24, 2021 at 11:23:00PM -0700, Guido van Rossum wrote: > > > > Is there no room for making it easier to do this with less invasive > > > changes to the stdlib, or are Steven d'A's "heroic measures in an > > > import hook" the right

[Python-ideas] Re: PEP Draft: Power Assertion

2021-09-25 Thread Ricky Teachey
My first thought was: it would be very nice, when doing quick and dirty scratch code, to not have to resort to a full fledged test framework to get readable assertions. You could just throw an assert statement in a if __name__ == '__main__' block at the bottom, click the run arrow next to it in pyc

[Python-ideas] Re: PEP Draft: Power Assertion

2021-09-25 Thread Paul Moore
On Sat, 25 Sept 2021 at 06:09, Stephen J. Turnbull wrote: > > Guido van Rossum writes: > > > I think this is by far the best option. Pytest can evolve much faster than > > the stdlib. > > Is there no room for making it easier to do this with less invasive > changes to the stdlib, or are Steven d

[Python-ideas] Re: PEP Draft: Power Assertion

2021-09-25 Thread Steven D'Aprano
On Fri, Sep 24, 2021 at 11:23:00PM -0700, Guido van Rossum wrote: > > Is there no room for making it easier to do this with less invasive > > changes to the stdlib, or are Steven d'A's "heroic measures in an > > import hook" the right way to go? > > > > Other Steve > > > There’s room for that, b

[Python-ideas] Re: PEP Draft: Power Assertion

2021-09-25 Thread Steven D'Aprano
On Fri, Sep 24, 2021 at 10:39:32PM -0700, Christopher Barker wrote: > Now that's a PEP I could get behind. You mean, like this PEP? *wink* > Adding one feature to unittest doesn't seem worth it to me I don't think this PEP directly proposes any new features to unittest. If it is accepted, who

[Python-ideas] Re: PEP Draft: Power Assertion

2021-09-25 Thread Noam Tenne
>Is there no room for making it easier to do this with less invasive changes to the stdlib, or are Steven d'A's "heroic measures in an import hook" the right way to go? I'm not familiar with this, can you please elaborate? >From what I understand we can change stdlib to the point of manipulating

[Python-ideas] Re: PEP Draft: Power Assertion

2021-09-25 Thread Noam Tenne
>So maybe what we should do now, rather than add one feature, is propose a new >test framework/test runner for the stdlib, inspired by pytest. I'd actually avoid reinventing a test framework as I think this has proven to be futile. I'm of the opinion that the language should provide a lean infr

[Python-ideas] Re: PEP Draft: Power Assertion

2021-09-25 Thread Noam Tenne
Will do! On Fri, Sep 24, 2021, at 14:10, Paul Moore wrote: > On Fri, 24 Sept 2021 at 12:05, Noam Tenne wrote: > > > Caveats > > --- > > > > It is important to note that expressions with side effects are affected by > > this feature. This is because in order to display this information, we m