[Py4j-users] New way to pass parameters to JavaGateway and deprecation of old way
Status: Beta
Brought to you by:
barthe
From: Barthelemy D. <bar...@in...> - 2014-10-26 00:52:12
|
Hi, I am receiving many reasonable requests to make JavaGateway and JavaCallbackServer more configurable. Clearly, sending all parameters to the JavaGateway constructor does not scale, so I created two classes, GatewayParameters and CallbackServerParameters. These classes are available in @master and will be the recommended way to configure a gateway in Py4J 0.9. The existing parameters can be set in these two new classes in addition to new parameters. I am deprecating the other JavaGateway constructor parameters (e.g., port, auto_field, start_callback_server), which means that I would like to remove the parameters in two releases. If you use these parameters in 0.9, the behavior of Py4J should not change: if the behavior changes, it's a regression bug and I'll fix it asap. The only difference with 0.8 is that a log statement (level=DEBUG) will tell you that the parameter is deprecated. In Py4J 0.10, the log statement will use the WARNING level. In 0.11, an exception will be raised if you use the deprecated parameters. In 0.12 (or 1.0), these parameters will be completely removed. If there is any concern regarding this deprecation procedure, I'm open to suggestions to improve it. Finally, on the deprecation topic, someone recently asked me if I still planned to support Python 2.6. I had initially planned to stop supporting this old version of Python, but considering that users are still deploying Py4J in environments where Python 2.6 is the default version, and because I do not specifically need any features introduced in later versions, I'll continue to (1) support Python 2.6, and (2) beg users to install virtualenv with a more recent version of Python :-D Barthélémy |