Repository: quora/pyanalyze (language: python)

Issue:
Drop support for Python 2
We don't need the Python 2 support internally. It could be useful for others who are doing a Python 2/3 migration, but I haven't heard of anyone doing that. I'd like to drop Python 2 support so pyanalyze can use type annotations internally and I have to worry less about syntax in test cases.


Discussion / hints:

Fix patch:
diff --git a/setup.py b/setup.py
index bda3cb5a..0e041c98 100644
--- a/setup.py
+++ b/setup.py
@@ -36,11 +36,10 @@
         classifiers=[
             "License :: OSI Approved :: Apache Software License",
             "Programming Language :: Python",
-            "Programming Language :: Python :: 2.7",
-            "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="quora static analysis",
         packages=["pyanalyze"],
@@ -52,12 +51,8 @@
             "qcore>=0.5.1",
             "ast_decompiler>=0.4.0",
             "six>=1.10.0",
-            'futures; python_version < "3.0"',
-            'mock; python_version < "3.3"',
-            'typeshed_client>=0.4.1; python_version >= "3.6"',
-            'enum34; python_version < "3.4"',
+            "typeshed_client>=0.4.1",
             "typing_inspect>=0.5.0",
-            'typing; python_version < "3.5"',
             "typing_extensions",
             "mypy_extensions",
             "aenum>=2.2.3",
diff --git a/tox.ini b/tox.ini
index 81e661b5..87285da7 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
 [tox]
 envlist =
-    py27,py35,py36,py37,py38,black
+    py36,py37,py38,py39,black
 skip_missing_interpreters = True
 
 [testenv]


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 1122bdc6..5ecc9c63 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -16,12 +16,6 @@ jobs:
       fail-fast: false
       matrix:
         include:
-        - name: py27
-          python: '2.7'
-          toxenv: py27
-        - name: py35
-          python: '3.5'
-          toxenv: py35
         - name: py36
           python: '3.6'
           toxenv: py36
@@ -31,6 +25,9 @@ jobs:
         - name: py38
           python: '3.8'
           toxenv: py38
+        - name: py39
+          python: '3.9'
+          toxenv: py39
         - name: black
           python: '3.8'
           toxenv: black