Other articles


  1. Updating your setup.py files to the newer format

    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 the versions of imported modules in Python code

    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
  3. Running pip as a Python module

    Since Python 3.4 you have been able to run pip as though it were a Python module, this actually prevents a variety of annoying issues from occurring.


    read more
  4. Getting Altair to render inline in Jupyter

    Run into the issue where Altair won't plot inline in your Jupyter notebooks? Here's a reason why it happens and how to fix it.


    read more
  5. TIL: Install options for pip in requirements.txt

    Some things I learned about pip installs from requirements.txt


    read more