After spending more time thinking about the implementation I came to a
conclusion that
it's not easy to generalize replacement of classes.
Yes, with some work it's possible to ensure that old name references a new one.
But that's not sufficient. If new class has different interface then user's
co
>> Therefore it's not redundant to subclass *Warning for namespacing alone.
>
> Not redundant? You mean you must subclass? In that case my concern stands.
An unfortunate typo, meant "it's redundant".
> And what does that match against? The module name of the exception type right?
It matches
> If correctly understood your concern, it's about usage of stdlib's *Warning
> classes directly
> that makes all warnings coming from different libraries indistinguishable.
That was my concern yes.
> I think that's not the case, since warnings.filterwarnings allows
> to specify custom filte
Hi Anders,
If correctly understood your concern, it's about usage of stdlib's *Warning
classes directly
that makes all warnings coming from different libraries indistinguishable.
I think that's not the case, since warnings.filterwarnings allows
to specify custom filter using a regular expression
Op vr 14 sep. 2018 om 08:07 schreef Anders Hovmöller :
>
> > I'd like to propose an extension for the warnings module
> > to address this problem.
>
> I like all of that. The only issue I have with it is that the warnings
> module is designed to namespace depredations so you can turn them on per
>
> I'd like to propose an extension for the warnings module
> to address this problem.
I like all of that. The only issue I have with it is that the warnings module
is designed to namespace depredations so you can turn them on per library and
this code doesn’t seem to handle that. We really want
I have to say, this would be amazing! I've basically had to create many of
these by hand over time, and I doubt I'm the only person who's wondered how
this isn't in the stdlib!
On Thu, Sep 13, 2018, 7:18 PM Ilya Kulakov wrote:
> (Apologies if it's a duplicate. I originally posted to
> python-id.
(Apologies if it's a duplicate. I originally posted to
python-id...@googlegroups.com)
I've been recently working on an internal library written
entirely in Python. The library while being under development
was as actively used by other teams. The product was under
pressure and hasty design decisi