networkx/networkx — pull request #1284 by ysitu (2014-11-04 04:39:08+00:00)
Title: Allow selection of pickling protocol in write_gpickle

After Python 2.7, new pickling protocols were added in Python 3.0 and 3.4. Always using the highest protocol creates problems when one needs to work with multiple Python versions. This PR adds an optional `protocol` parameter to `write_gpickle` which defaults to `pickle.HIGHEST_PROTOCOL` if omitted.