Overall looks good to me (2 minor issue, no objections if we keep the code as
it is)
The first phase of python 3 porting is done:
All the tests pass now in python 2.7, 3.6, 3.7 and 3.8.
I plan to push this once we cut python 3.7.3 for EL 7.7.
More work is needed:
- accept only bytes for resource and lockspaces names on python 3
- support both unicode and bytes for paths on python 3, same as posix
module
- add missing tests (request, killpath, xxx_event)
- spec for python 3
The patches are also available in this branch:
https://github.com/nirs/sanlock/commits/py3
commit: 3c03d8672d8589219def0133b188a1ac31d41615
Amit Bawer (18):
readme: Add prerequisites section
tox: Add python version as make argument
tests: Use python3 and python2 compatible socket exception type
tests: Lockspace and resource names should be read as bytes
tests: Enforce absolute import behavior for python2 tests
sanlock: Resource API should only support disks as a tuple
tests: Test parsing a resource which is not a list of tuples
sanlock: Provide internal common module init function
tests: Add util.generate_path for generating file paths by encoding
tests: Add parameterized tests for file paths encodings
sanlock: Add module init for Python 3
python: Add pystring_as_cstring function
python: Provide helper for Py{Int,Long}_AsUnsignedLongLongMask
python: Refactor build of dictionary entries for hosts_to_list
python: Refactor build of dictionary entries for py_get_lockspaces
python: Refactor build of dictionary entries for py_read_lockspace
python: Refactor build of dictionary entries for py_read_resource
python: Use Py_BuildValue("i", ...) to create py integers
Nir Soffer (3):
tests: Update lockspace and resource tests
python: Simplify parse_resource() with PyArg_ParseTuple
travis: Add python 3 builds
Pavel Bar (2):
Fix typos in debug logs and comments.
Adding constants for Kibibyte, Mebibyte, Gibibyte, Tebibyte & Pebibyte
and using them everywhere in tests.
.travis.yml | 8 +-
README.dev | 12 ++
python/Makefile | 6 +-
python/sanlock.c | 409 +++++++++++++++++++++----------------------
sanlock.spec.in | 3 +-
src/direct.c | 2 +-
src/resource.c | 2 +-
tests/conftest.py | 1 +
tests/daemon_test.py | 44 ++---
tests/direct_test.py | 6 +-
tests/python_test.py | 111 ++++++++----
tests/units.py | 9 +
tests/util.py | 21 ++-
tox.ini | 3 +-
14 files changed, 361 insertions(+), 276 deletions(-)
create mode 100644 tests/units.py
--
2.17.2
_______________________________________________
sanlock-devel mailing list -- sanlock-devel(a)lists.fedorahosted.org
To unsubscribe send an email to sanlock-devel-leave(a)lists.fedorahosted.org
Fedora Code of Conduct:
https://getfedora.org/code-of-conduct.html
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedorahosted.org/archives/list/sanlock-devel@lists.fedorahost
ed.org