@HuangLED I think from code-readability standpoint, using `sys.version_info[0]` is a more direct way, since `sys.version_info` is a standard library function whose purpose is to return the version of interpreter. A reader of the code, who is not aware of `assertItemsEqual` deprecation will probably guess that this method is not available on Python 3.x, while `try/except` require a clarifying comment in order for a reader not to wonder why a method sometimes may not be available. Note that https://github.com/apache/beam/pull/6599/files is changing this as well, so consider removing these lies from the PR to avoid a merge conflict.
[ Full content available at: https://github.com/apache/beam/pull/6587 ] This message was relayed via gitbox.apache.org for devnull@infra.apache.org