← Back to team overview

dulwich-users team mailing list archive

Python 3 compatibility

 

Hi all,

I'd like to contribute some time to the Python 3 compatibility effort.

I spent a couple of hours adapting the C submodules to the Py3 API, and the
result is visible in my https://github.com/lelit/dulwich/tree/py3-c-modules
branch [*].

I took the (naive) initial approach of treating all strings as bytes, that I
guess is the right thing to do with the blobs of content, but possibly wrong
when dealing with pathnames.

As expected, this brought out several issues, mainly related to the stricter
distinction between bytes and (unicode) strings under Python 3:

    Ran 1048 tests in 31.677s

    FAILED (failures=57, errors=20, skipped=132)

Some of the issues are within the unit tests, other are at a deeper level.

I know that the topic has been already faced on this ML: since it has been
over a year ago, I would like to recollect the consensum on how this should
proceed. In particular, I need to better understand how pathnames should be
handled.

Since I'm evidently a newcomer here, I'd like to hear your opinions and/or
directions, before going further.

Thank you in advance,
ciao, lele.

[*] I also pushed a tiny fix in my master branch that applies to Py2 as well
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@xxxxxxxxxxxxxxx  |                 -- Fortunato Depero, 1929.


Follow ups