[Twisted-Python] Changing procmon.ProcessMonitor.processes

Moshe Zadka zadka.moshe at gmail.com
Wed Sep 20 19:13:20 MDT 2017


OK I opened a ticket with a plan, after discussing with Mark Williams.

1. Make a custom class that implements the Sequence ABC and pretends to be
sized the old size.
2. Internally all access will be moved to attributes
3. All sequence methods will be marked as Deprecated. We'll kill them in a
year.
4. processes will become _processes, with a Deprecated .processes accessor,
again for backwards compatibility.

I am technically changing the class of a thing from a tuple to a different
class, but I don't think that this can be in general relied on. The API
docs do not mention the attribute, much less promise the concrete class of
its contents.

Objections?

Ticket: https://twistedmatrix.com/trac/ticket/9287

On Wed, Sep 20, 2017 at 1:34 AM ex vito <ex.vitorino at gmail.com> wrote:

> On 2017-09-19, at 15:49, Moshe Zadka <zadka.moshe at gmail.com> wrote:
>
> On Tue, Sep 19, 2017 at 3:51 AM ex vito <ex.vitorino at gmail.com> wrote:
>
>
>
>> Other than that, again, per that section's rules, not being a commiter
>> myself, I'm in no position to approve such a change. I wonder, however, how
>> "urgent" such a final change is to you and why a deprecation cycle does not
>> fit your purpose (even though, admittedly, it may represent more effort).
>>
>
> I think that between the low likelihood that someone went crawling over
> the attributes manually, the RoI of having a deprecation cycle with some
> intermediate solution that later needs to be cleaned up, and the fact that
> this would be a clean break (i.e., "AttributeError") rather than some
> obscure error, I am at least interested in opinions about going the
> exception route.
>
> ProcMon is non-trivial to product ionize, and I'm not aware of anyone even
> using it in production, other than me, let alone crawling over its internal
> state.
>
>
> Agreed. For completeness, the code I work with does not make use of
> ProcMon and I don't recall having ever used it.
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20170921/0fb2207b/attachment-0002.html>


More information about the Twisted-Python mailing list