{"push_id":904540949,"size":25,"distinct_size":25,"ref":"refs/heads/python","head":"9eefc080c689f63f2899add7e2c2b70f2de75394","before":"5d6f4f2282e3c125a1491e801043ed972abe5b88","commits":[{"sha":"b3a87ea4c6a19ae56bb34011bd82f1278c36a428","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Set up initial tox test environment.\n\ntox is a tool for running Python tests in virtual Python environments.\nThis initial setup only attempts to install the ovs Python library in\nboth a virtual Python 2.7 environment and a virtual Python 3.4\nenvironment.  We also run the beginning of a test suite, which only\nimports the code.  This quickly reproduces the problem that the library\nfails to install for Python 3.  Future patches will start addressing\nPython 3 compatibility.\n\nWe also generate a code coverage report in the Python 2.7 test\nenvironment.  The result is not very impressive (21%), but that's just\nfrom importing the code in a skeleton test module.\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/b3a87ea4c6a19ae56bb34011bd82f1278c36a428"},{"sha":"337191f1d20481120f9c97d8931dbad43008e16d","author":{"email":"0ef9166ffb07b98b817ea7d6bbe447ae88189dfd@redhat.com","name":"Terry Wilson"},"message":"python: Start fixing some Python 3 issues.\n\nThis patch fixes just the Python 3 problems found by running:\n\n  python3 setup.py install\n\nThere are still many other issues to be fixed, but this is a start.\n\nSigned-off-by: Terry Wilson <twilson@redhat.com>\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/337191f1d20481120f9c97d8931dbad43008e16d"},{"sha":"efd28400f673120201304f3c2c1ea607b08f4a6c","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Remove unused imports and variables.\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/efd28400f673120201304f3c2c1ea607b08f4a6c"},{"sha":"e2aaf11162b6730579070e8452ef79bccf7ec7b1","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Fix invalid variable reference.\n\nThis code referred to \"rows\" where it meant to refer to \"fetched_rows\".\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/e2aaf11162b6730579070e8452ef79bccf7ec7b1"},{"sha":"8c8e7dabc34e2a6431867982103e5040bd5ee6ff","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Add pep8 test environment.\n\nPEP8 is the Python formatting standard.  This test environment catches\ncases where the code deviates from this standard.  We exclude all of the\nrules currently violated so we can start with a passing configuration.\nThey can be removed over time when they get cleaned up.\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/8c8e7dabc34e2a6431867982103e5040bd5ee6ff"},{"sha":"1137b946344fe96c178e069b0b4ecb6d0a1f035a","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Resolve pep8 blank line errors.\n\nResolve pep8 errors E302 and E303:\n\n  E302 expected 2 blank lines, found 1\n  E303 too many blank lines (3)\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/1137b946344fe96c178e069b0b4ecb6d0a1f035a"},{"sha":"92fac0a1a5ca9b2c99e10191b03610f4f94b7661","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Resolve pep8 comparison errors.\n\nResolve pep8 errors:\n\n  E711 comparison to None should be 'if cond is None:'\n\nThe reason comparing against None with \"is None\" is preferred over\n\"== None\" is because a class can define its own equality operator and\nproduce bizarre unexpected behavior.  Using \"is None\" has a very\nexplicit meaning that can not be overridden.\n\n  E721 do not compare types, use 'isinstance()'\n\nThis one is actually a mistake by the tool.  The line of code looks like\nit's using the types module from the Python stdlib, but it's actually\novs.db.types.  Change the import to make this more clear and eliminate\nthe error.\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/92fac0a1a5ca9b2c99e10191b03610f4f94b7661"},{"sha":"97fa5cc8d75999a7a6d588f9a5238e1a2c9857b4","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Restrict line length to 79 chars.\n\nResolve pep8 error:\n\n  E501 line too long (80 > 79 characters)\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/97fa5cc8d75999a7a6d588f9a5238e1a2c9857b4"},{"sha":"2acdc75b5594531b8597a67c32dd3379a906db2a","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Fix several pep8 whitespace errors.\n\nFix the following pep8 errors:\n\n  E201 whitespace after '('\n  E203 whitespace before ','\n  E226 missing whitespace around arithmetic operator\n  E231 missing whitespace after ':'\n  E241 multiple spaces after ':'\n  E251 unexpected spaces around keyword / parameter equals\n  E261 at least two spaces before inline comment\n  E262 inline comment should start with '# '\n  E265 block comment should start with '# '\n  E271 multiple spaces after keyword\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/2acdc75b5594531b8597a67c32dd3379a906db2a"},{"sha":"5642e82db8c4f2578a65a36ae8bc96c18dd60443","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Inherit from object.\n\nclass Vlog now inherits from \"object\".  This is a \"new style\" Python\nclass, which isn't new at all at this point.  This was introduced back\nin Python 2.x, and some Python 2 code won't work as expected without it.\nIn Python 3, this happens implicitly.\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/5642e82db8c4f2578a65a36ae8bc96c18dd60443"},{"sha":"661de498acab188b4ecd86c659ba1ad1d26a9d4a","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Fix print function compatibility.\n\nThe print statement from Python 2 is a function in Python 3.  Enable\nprint function support for Python 2 and convert print statements to\nfunction calls.\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/661de498acab188b4ecd86c659ba1ad1d26a9d4a"},{"sha":"0e2d2d91d44055548ab7862f79d71cbba53cc7e4","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Add missing Apache License headers.\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/0e2d2d91d44055548ab7862f79d71cbba53cc7e4"},{"sha":"11f851f33742782e693b4b41ff37760c2e35bbb6","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Fix xmlrpclib imports.\n\nFix imports of xmlrpclib to be compatible with Python 3.  Python 2 had\nxmlrpclib (client) and SimpleXMLRPCServer (server).  In Python 3, these\nhave been renamed to xmlrpc.client and xmlrpc.server.\n\nThe solution implemented here is to use the six library.  It may seem\nexcessive for this particular issue, but the six library provides\nhelpers for Python 2 and 3 compatibility for many different issues.\nThis is just the first of many uses of the six library.\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/11f851f33742782e693b4b41ff37760c2e35bbb6"},{"sha":"e55653b5be2ec6019449e7fc8b080d928f51dfdc","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Stop use of tuple parameter unpacking\n\nPython 3 removed support for tuple parameter unpacking.\n\nhttps://www.python.org/dev/peps/pep-3113/\n\nInstead of:\n\n    def foo((a, b)):\n        print(a)\n        print(b)\n\nyou should do:\n\n    def foo(a_b):\n        a, b = a_b\n        print(a)\n        print(b)\n\nbut in both uses here, the values were never used so the fix is even\nsimpler.\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/e55653b5be2ec6019449e7fc8b080d928f51dfdc"},{"sha":"c982ceb9da99dc01b1115ce5ced39a21791b4fe5","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Stop using xrange().\n\nPython 2 had range() and xrange().  xrange() is more efficient, but\nbehaves differently so range() was retained for compatibility.  Python 3\nonly has range() and it behaves like Python 2's xrange().\n\nRemove the one explicit use of xrange() and use six.moves.range() to\nmake sure we're using xrange() from Python 2 or range() from Python 3.\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/c982ceb9da99dc01b1115ce5ced39a21791b4fe5"},{"sha":"9c18c37866e70fd54e17b908c71e5d06596b8c78","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Convert dict iterators.\n\nIn Python 2, dict.items(), dict.keys(), and dict.values() returned a\nlist.  dict.iteritems(), dict.iterkeys(), and dict.itervalues() returned\nan iterator.\n\nAs of Python 3, dict.iteritems(), dict.itervalues(), and dict.iterkeys()\nare gone.  items(), keys(), and values() now return an iterator.\n\nIn the case where we want an iterator, we now use the six.iter*()\nhelpers.  If we want a list, we explicitly create a list from the\niterator.\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/9c18c37866e70fd54e17b908c71e5d06596b8c78"},{"sha":"99132908974ce07f685d27a47aa82e55e9f234db","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Drop usage of long type.\n\nPython 2 has both long and int types.  Python 3 only has int, which\nbehaves like long.\n\nIn the case of needing a set of integer types, we can use\nsix.integer_types which includes int and long for Python 2 and just int\nfor Python 3.\n\nWe can convert all cases of long(value) to int(value), because as of\nPython 2.4, when the result of an operation would be too big for an int,\nthe type is automatically converted to a long.\n\nThere were several places in this patch doing type comparisons.  The\npreferred way to do this is using the isinstance() or issubclass()\nbuilt-in functions, so I converted the similar checks nearby while I was\nat it.\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/99132908974ce07f685d27a47aa82e55e9f234db"},{"sha":"25ff5f02a0ac586305eb9c7561e9bf3292bc5035","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Drop unicode type.\n\nPython 2 had str and unicode.  Python 3 only has str, which is always a\nunicode string.  Drop use of unicode with the help of six.text_type\n(unicode in py2 and str in py3) and six.string_types ([str, unicode] in\npy2 and [str] in py3).\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/25ff5f02a0ac586305eb9c7561e9bf3292bc5035"},{"sha":"b61d3b3fd060b931b6bc01c2accf094eebdf6c36","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Drop use of types.StringTypes.\n\ntypes.StringTypes does not exist in Python 3.  We can use\nsix.string_types, instead.\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/b61d3b3fd060b931b6bc01c2accf094eebdf6c36"},{"sha":"422e6d548f06c5e80bf86621c12452741e6d6f8f","author":{"email":"cd5d49e4d71817d0d870f02fc19163fd3c2f6d3a@ovn.org","name":"Russell Bryant"},"message":"python: Drop use of types.FunctionType.\n\nThis code asserted that the callback argument was of type\ntypes.FunctionType.  It's more pythonic to just check that the argument\nis callable, and not specifically that it's a function.  There are other\nways to implement a callback than types.FunctionType.\n\nSigned-off-by: Russell Bryant <russell@ovn.org>","distinct":true,"url":"https://api.github.com/repos/russellb/ovs/commits/422e6d548f06c5e80bf86621c12452741e6d6f8f"}]}