Other articles

  1. Updating your setup.py files to the newer format - 2020 May 11

    One of the not so nice things about legacy installable python packages is the executable nature of setup.py files. This means amongst other things that you can't reliably determine the contents of some setup.py files without arbitrary code execution. This is what led to PEP 518 which specified a declarative metadata format that can be stored in easy to parse file. Updating is a pain though, but thankfully there's some tooling that makes this easier as I found out recently.

    read more
  2. Finding out what a python script imports - 2020 April 16

    Finding out what a Python module imports

    read more
  3. Finding the versions of imported modules in Python code - 2019 December 12

    In many situations you want to be able to find the version of a package that has been imported from your code. This isn't anywhere near as straightforward as it would seem, here's a few options to do this.

    read more