[Twisted-Python] Changing procmon.ProcessMonitor.processes

ex vito ex.vitorino at gmail.com
Thu Sep 21 04:11:44 MDT 2017


On 2017-09-21, at 2:13, Moshe Zadka <zadka.moshe at gmail.com> wrote:

> 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.

Walks like a duck, quacks like a duck. Sounds like a clean approach.


> Objections?
> 
> Ticket: https://twistedmatrix.com/trac/ticket/9287

I'd say go for it.
--
exvito

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20170921/bd452057/attachment-0002.html>


More information about the Twisted-Python mailing list