Port to Python 3.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 22 Oct 2019 18:12:28 +0000 (19:12 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 11 Apr 2020 11:44:21 +0000 (12:44 +0100)
commitc80de12d8d0827e0553fed2e4d392cb9bf3a378f
treee5c37925cb8b1d836ebd0be8fcefbd6e23ad9a63
parent83a72c0dad2f0da52131224e9b072ef3490db56f
Port to Python 3.

Most of this is `#ifdef ...' ... `#endif' noise, with a few tweaks
thrown in.

Some notes on specific parts of the port.

  * buffer.c: The Python 3 buffer protocol is completely different.
    Read buffers work differently, but aren't problematic; write buffers
    can now be held open for an extended period, so we need the locking
    machinery that was added recently.

  * catacomb.c: Module initialization has changed, but isn't a great
    deal more difficult.

  * catacomb/__init__.py, catacomb/pwsafe.py, pock, pwsafe: There are a
    number of places which need language-version switches, but none of
    them is especially interesting.  This diff is noisier than it should
    be because I couldn't adjust the indentation in advance.

  * mp.c: With the abolition of a separate fixnum type, `mp_frompylong'
    needed to express the fast path from a fixnum in a different way.

  * pwsafe: The hacking to alter the error-handling behaviour associated
    with the `stdout' stream is deeply unpleasant.  Sorry.

  * pyke/pyke.h: Most of the porting work happens here, with alternative
    definitions for the various macros introduced earlier.

  * .gitignore: Ignore Python 3 `__pycache__/' turds.  Python 3 leaves
    its pre-tokenized files in `__pycache__/' directories, which somehow
    manage to be much more objectionable than the loose Python 2 `*.pyc'
    files.  Ignore these.

  * debian/: Add the necessary things to build a Python 3 extension
    package.
mapping.c
pyke-mLib.c
pyke.c
pyke.h