Repository: popsim-consortium/stdpopsim (language: python)

Issue:
drop support for Python 3.6
Python 3.6 will reach end of life this year. Msprime has just dropped 3.6, and we'll soon be moving to msprime 1.0, so it makes sense for stdpopsim to drop support too.


Discussion / hints:
It's probably not worth doing the attrs -> dataclasses conversion, I think? Not much to be gained and likely quite a bit of work as we're using attrs specific functionality.
Yeah, I don't see any reason to stop using attrs. At least, that change would be orthogonal.

Fix patch:
diff --git a/.circleci/config.yml b/.circleci/config.yml
index b357fc57f..6b8a4f842 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -6,14 +6,14 @@ orbs:
 aliases:
   - &container_config
       docker:
-        - image: circleci/python:3.6-stretch
+        - image: circleci/python:3.7-buster
       working_directory: &working_directory /home/circleci/stdpopsim
   - &set_py_circleci_own
     run:
       name: Set ownership of Python directories
       command: |
         sudo chown -R circleci:circleci /usr/local/bin
-        sudo chown -R circleci:circleci /usr/local/lib/python3.6/site-packages
+        sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages
   - &install_libgsl
     run: sudo apt-get install libgsl-dev
 
@@ -68,7 +68,7 @@ jobs:
       - run: sudo chown -R circleci:circleci .
       - *install_libgsl # Needed for msprime
       - restore_cache:
-          key: stdpopsim-v1-{{ .Branch }}-{{ checksum "requirements/CI/requirements.txt" }}
+          key: stdpopsim-v3-{{ .Branch }}-{{ checksum "requirements/CI/requirements.txt" }}
       - run:
           name: Install Python dependencies
           command: |
@@ -76,15 +76,15 @@ jobs:
             pip install numpy==1.19.2
             pip install -r requirements/CI/requirements.txt
       - save_cache:
-          key: stdpopsim-v1-{{ .Branch }}-{{ checksum "requirements/CI/requirements.txt" }}
+          key: stdpopsim-v3-{{ .Branch }}-{{ checksum "requirements/CI/requirements.txt" }}
           paths:
             - "/usr/local/bin"
-            - "/usr/local/lib/python3.6/site-packages"
+            - "/usr/local/lib/python3.7/site-packages"
       - persist_to_workspace:
           root: /usr/local
           paths:
             - bin/*
-            - lib/python3.6/site-packages/*
+            - lib/python3.7/site-packages/*
 
   build-pkg:
     <<: *container_config
diff --git a/setup.py b/setup.py
index 5b79f60ba..7e543293b 100644
--- a/setup.py
+++ b/setup.py
@@ -19,9 +19,9 @@
         "Topic :: Scientific/Engineering :: Bio-Informatics",
         "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
         "Programming Language :: Python :: 3",
-        "Programming Language :: Python :: 3.5",
-        "Programming Language :: Python :: 3.6",
         "Programming Language :: Python :: 3.7",
+        "Programming Language :: Python :: 3.8",
+        "Programming Language :: Python :: 3.9",
     ],
     keywords="simulations, recombination map, models",
     packages=["stdpopsim"],
@@ -31,6 +31,7 @@
             "stdpopsim=stdpopsim.cli:stdpopsim_main",
         ]
     },
+    python_requires=">=3.7",
     # NOTE: make sure this is the 'attrs' package, not 'attr'!
     install_requires=[
         "msprime>=0.7.1",


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index cf4ad9e70..32f4c501b 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -18,7 +18,7 @@ jobs:
       fail-fast: false
       matrix:
         os: [ubuntu-18.04, windows-2019, macos-10.15]
-        python: [3.6, 3.9]
+        python: [3.7, 3.9]
     env:
       SLIM_TAG: 3.4
       CONDA_ENV_NAME: stdpopsim