From: Mark Wooding Date: Tue, 22 Oct 2019 18:12:28 +0000 (+0100) Subject: Port to Python 3. X-Git-Url: https://git.distorted.org.uk/~mdw/pyke/commitdiff_plain/c80de12d8d0827e0553fed2e4d392cb9bf3a378f?ds=sidebyside;hp=c80de12d8d0827e0553fed2e4d392cb9bf3a378f 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. ---