anhaidgroup / py_entitymatching

BSD 3-Clause "New" or "Revised" License
183 stars 48 forks source link

Consider developing plan for dropping Python 2 #131

Open christiemj09 opened 4 years ago

christiemj09 commented 4 years ago

Since Python 2 was officially unsupported on Jan 1 2020, more and more high-profile packages are dropping support for Python 2. A notable case is numpy; while there's some effort to "be nice" to Python 2 users, problems are already apparent in cases like the following:

# From py_entitymatching project root

# Default Python is 2.7.16
docker container run -dit --name conda-latest continuumio/miniconda:latest /bin/bash

# Try installing py-entitymatching dependencies in a clean environment
docker cp requirements.txt conda-latest:/
docker container attach conda-latest
apt-get update && apt-get install -y build-essential
pip install -r requirements.txt
# ^^ py-stringmatching tries installing latest version of numpy for build,
#     but latest version of numpy requires Python >= 3.5.

# Dirty fix
pip install numpy==1.16.2
pip install -r requirements.txt

The PyMatcher project should revisit its support for Python 2, possibly developing a plan for dropping support in the future.