diff --git a/CHANGELOG.md b/CHANGELOG.md index ed337d0..4d0e68c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 1.8.0 (TBD) +- Change: Drop support for Python 2 and remove dependency on future. + ## 1.7.1 (2025-06-24) - New: Track logged in user - Fix: Batch aggregation links updated diff --git a/Dockerfile.dev b/Dockerfile.dev index 4f30053..f618094 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -4,7 +4,7 @@ RUN apk --no-cache add libmagic WORKDIR /usr/src/panoptes-python-client -COPY setup.py . +COPY setup.py README.md . RUN pip install .[testing,docs] diff --git a/Dockerfile.dev2 b/Dockerfile.dev2 deleted file mode 100644 index 6393ca7..0000000 --- a/Dockerfile.dev2 +++ /dev/null @@ -1,13 +0,0 @@ -FROM python:2.7-alpine - -RUN apk --no-cache add libmagic - -WORKDIR /usr/src/panoptes-python-client - -COPY setup.py . - -RUN pip install .[testing,docs] - -COPY . . - -RUN pip install -U .[testing,docs] diff --git a/Dockerfile.stable2 b/Dockerfile.stable2 deleted file mode 100644 index 906d8d1..0000000 --- a/Dockerfile.stable2 +++ /dev/null @@ -1,5 +0,0 @@ -FROM python:2.7-alpine - -RUN apk --no-cache add libmagic - -RUN pip install panoptes-client diff --git a/README.md b/README.md index 1638bf0..201098a 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,7 @@ Upgrade an existing installation: $ pip install -U panoptes-client ``` -The Panoptes Client is supported on all versions of Python 2 and 3, from Python -2.7 onwards. +The Panoptes Client is supported on all versions of Python 3 onwards. ## Usage Examples @@ -61,12 +60,10 @@ for information about how you can get involved. ### Running the Tests -You can run the tests with Docker. This will run them under Python 3 and Python -2: +You can run the tests with Docker. This will run them under Python 3: ``` docker-compose build tests && docker-compose run tests -docker-compose build tests2 && docker-compose run tests2 ``` Or you can run them directly in Python with: diff --git a/docker-compose.yml b/docker-compose.yml index a59f80f..3d08875 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,30 +27,3 @@ services: - ${HOME}/.panoptes/:/root/.panoptes/ - ${HOME}:${HOME} command: python -m unittest discover - - dev2: - build: - context: ./ - dockerfile: Dockerfile.dev2 - volumes: - - ${HOME}/.panoptes/:/root/.panoptes/ - - ${HOME}:${HOME} - environment: - - PANOPTES_DEBUG=true - - tests2: - build: - context: ./ - dockerfile: Dockerfile.dev2 - volumes: - - ${HOME}/.panoptes/:/root/.panoptes/ - - ${HOME}:${HOME} - command: python -m unittest discover - - stable2: - build: - context: ./ - dockerfile: Dockerfile.stable2 - volumes: - - ${HOME}/.panoptes/:/root/.panoptes/ - - ${HOME}:${HOME} diff --git a/panoptes_client/classification.py b/panoptes_client/classification.py index 6bd8a8c..4eca695 100644 --- a/panoptes_client/classification.py +++ b/panoptes_client/classification.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import, division, print_function - from panoptes_client.panoptes import LinkResolver, PanoptesObject diff --git a/panoptes_client/collection.py b/panoptes_client/collection.py index cb26463..91b2ca6 100644 --- a/panoptes_client/collection.py +++ b/panoptes_client/collection.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, division, print_function from builtins import str from panoptes_client.panoptes import ( diff --git a/panoptes_client/collection_role.py b/panoptes_client/collection_role.py index f6ce0b6..82888c4 100644 --- a/panoptes_client/collection_role.py +++ b/panoptes_client/collection_role.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import, division, print_function - from panoptes_client.panoptes import PanoptesObject, LinkResolver diff --git a/panoptes_client/exportable.py b/panoptes_client/exportable.py index 82b7170..3beb94d 100644 --- a/panoptes_client/exportable.py +++ b/panoptes_client/exportable.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import, division, print_function - import csv import datetime import functools diff --git a/panoptes_client/organization.py b/panoptes_client/organization.py index 0590bb9..fffcc8d 100644 --- a/panoptes_client/organization.py +++ b/panoptes_client/organization.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import, division, print_function - from panoptes_client.panoptes import ( LinkResolver, PanoptesObject, diff --git a/panoptes_client/panoptes.py b/panoptes_client/panoptes.py index b525850..1987a91 100644 --- a/panoptes_client/panoptes.py +++ b/panoptes_client/panoptes.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, division, print_function from builtins import str import getpass diff --git a/panoptes_client/project.py b/panoptes_client/project.py index 0b2d81b..3ea18ef 100644 --- a/panoptes_client/project.py +++ b/panoptes_client/project.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, division, print_function from copy import deepcopy from panoptes_client.panoptes import ( diff --git a/panoptes_client/project_preferences.py b/panoptes_client/project_preferences.py index a5b04fd..755b071 100644 --- a/panoptes_client/project_preferences.py +++ b/panoptes_client/project_preferences.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, division, print_function from builtins import str from panoptes_client.panoptes import PanoptesObject, LinkResolver diff --git a/panoptes_client/project_role.py b/panoptes_client/project_role.py index 76e666c..c672bf2 100644 --- a/panoptes_client/project_role.py +++ b/panoptes_client/project_role.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import, division, print_function - from panoptes_client.panoptes import PanoptesObject, LinkResolver diff --git a/panoptes_client/subject.py b/panoptes_client/subject.py index 809c3dd..db15562 100644 --- a/panoptes_client/subject.py +++ b/panoptes_client/subject.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, division, print_function from panoptes_client.subject_workflow_status import SubjectWorkflowStatus _OLD_STR_TYPES = (str,) diff --git a/panoptes_client/subject_set.py b/panoptes_client/subject_set.py index 9aafb77..8e46d88 100644 --- a/panoptes_client/subject_set.py +++ b/panoptes_client/subject_set.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, division, print_function from builtins import str from copy import deepcopy from panoptes_client.subject_workflow_status import SubjectWorkflowStatus diff --git a/panoptes_client/tests/test_inaturalist.py b/panoptes_client/tests/test_inaturalist.py index ad35467..a35465c 100644 --- a/panoptes_client/tests/test_inaturalist.py +++ b/panoptes_client/tests/test_inaturalist.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import, division, print_function - import unittest import sys diff --git a/panoptes_client/tests/test_linkcollection.py b/panoptes_client/tests/test_linkcollection.py index 5b2851b..5307558 100644 --- a/panoptes_client/tests/test_linkcollection.py +++ b/panoptes_client/tests/test_linkcollection.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, division, print_function from builtins import str import unittest diff --git a/panoptes_client/tests/test_linkresolver.py b/panoptes_client/tests/test_linkresolver.py index 72555c6..4e06f0d 100644 --- a/panoptes_client/tests/test_linkresolver.py +++ b/panoptes_client/tests/test_linkresolver.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import, division, print_function - import unittest import sys diff --git a/panoptes_client/tests/test_project.py b/panoptes_client/tests/test_project.py index f6e6188..14effae 100644 --- a/panoptes_client/tests/test_project.py +++ b/panoptes_client/tests/test_project.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import, division, print_function - import unittest from panoptes_client import Project diff --git a/panoptes_client/tests/test_subject_set.py b/panoptes_client/tests/test_subject_set.py index 0893339..685f8e5 100644 --- a/panoptes_client/tests/test_subject_set.py +++ b/panoptes_client/tests/test_subject_set.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import, division, print_function - import unittest import sys diff --git a/panoptes_client/user.py b/panoptes_client/user.py index 3c415fd..eb502e3 100644 --- a/panoptes_client/user.py +++ b/panoptes_client/user.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import, division, print_function - from panoptes_client.panoptes import Panoptes, PanoptesObject, LinkResolver from panoptes_client.utils import isiterable, split diff --git a/panoptes_client/utils.py b/panoptes_client/utils.py index 487bfc4..89ae323 100644 --- a/panoptes_client/utils.py +++ b/panoptes_client/utils.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, division, print_function from builtins import range import functools diff --git a/panoptes_client/workflow.py b/panoptes_client/workflow.py index 4e55d28..d1fdacb 100644 --- a/panoptes_client/workflow.py +++ b/panoptes_client/workflow.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, division, print_function from builtins import str from copy import deepcopy from panoptes_client.set_member_subject import SetMemberSubject diff --git a/panoptes_client/workflow_version.py b/panoptes_client/workflow_version.py index e2494bd..a36ebcf 100644 --- a/panoptes_client/workflow_version.py +++ b/panoptes_client/workflow_version.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import, division, print_function - from panoptes_client.panoptes import ( Panoptes, PanoptesAPIException, diff --git a/setup.py b/setup.py index 3f9fb52..c82948f 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,6 @@ include_package_data=True, install_requires=[ 'requests>=2.4.2', - 'future>=0.16', 'python-magic>=0.4', 'redo>=1.7', 'six>=1.9', @@ -30,6 +29,5 @@ 'docs': [ 'sphinx', ], - ':python_version == "2.7"': ['futures'], } )