Comment 4 for bug 684658

Revision history for this message
Dariusz Suchojad (dsuch) wrote :

> Ok. I'm just worried about conflicts. We must just make sure that we do not step
> on each other toes too much or merging will be a pain.

Yea, that's why I'm holding off my stuff until yours gets into trunk, exactly so that we don't make unnecessary conflicts.

> Then - need some advice. Private attributes and methods are generally easy. But public ones are not.

Regardless of whether it's a public attribute or not, let's do it a bit differently, the code would look like below

<code>
class QueueManager:
...
   def connectTCPClient(self, name, cd, channel_name, connect_string):
         ...
         <real connect code goes here>
         ...

   connect_tcp_client = connectTCPClient
...
</code>

It's a bit better because there will be no performance penalty for using either method. As for actually making any deprecation warnings (in the sense of using Python stdlib's warning module for it), let's stick to the following plan:

- right now, for 1.2, I'll update documentation and mention that there's a transition plan for the API. I'll also have all the examples use the new one. I'll also make sure every blog posts, tweet etc. encourages people to use the new API. No warnings will be issued.

- I don't know what PyMQI version it will be at around 18 months after 1.2 will have been released, but whatever version comes out at that time, it will be the first version to issue PendingDeprecationWarning [1] at runtime

- after yet another 18 months (3 years from PyMQI 1.2) PendingDeprecationWarning will be changed into DeprecationWarning [2]

- 18 months from it (4,5 years from PyMQI 1.2) the old API will at runtime yield an exception stating that such and such method has been renamed

- no method will be ever removed

I know it's thinking far into future but you know, people use PyMQI with Python 2.3, others use it with MQ 5.1 released how may year ago? A decade? The old API has been here since the very beginning so I'd like to be extra-cautious here.

What do you think of it?

[1] http://docs.python.org/library/exceptions.html#exceptions.PendingDeprecationWarning
[2] http://docs.python.org/library/exceptions.html#exceptions.DeprecationWarning