Skip to content

Commit

Permalink
Drop Python 3.6 and Python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Oct 30, 2023
1 parent 05e0f1d commit d0a6cdb
Show file tree
Hide file tree
Showing 56 changed files with 100 additions and 342 deletions.
48 changes: 0 additions & 48 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,32 +119,6 @@ jobs:
command: |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
docker push girder/tox-and-node:latest
py36:
machine:
image: ubuntu-2004:202111-02
steps:
- checkout
- allservices:
version: "3.6"
node: v14
- tox:
env: test-py36
- coverage
- store_artifacts:
path: build/test/artifacts
py37:
machine:
image: ubuntu-2004:202111-02
steps:
- checkout
- allservices:
version: "3.7"
node: v14
- tox:
env: test-py37
- coverage
- store_artifacts:
path: build/test/artifacts
py38:
machine:
image: ubuntu-2004:202111-02
Expand Down Expand Up @@ -289,20 +263,6 @@ workflows:
- master
# Create a branch of this name to push to docker hub
- testdocker
- py36:
filters:
tags:
only: /^v.*/
branches:
ignore:
- gh-pages
- py37:
filters:
tags:
only: /^v.*/
branches:
ignore:
- gh-pages
- py38:
filters:
tags:
Expand Down Expand Up @@ -347,8 +307,6 @@ workflows:
- gh-pages
- wheels:
requires:
- py36
- py37
- py38
- py39
- py310
Expand All @@ -363,8 +321,6 @@ workflows:
- gh-pages
- release:
requires:
- py36
- py37
- py38
- py39
- py310
Expand All @@ -378,8 +334,6 @@ workflows:
only: master
- docs-deploy:
requires:
- py36
- py37
- py38
- py39
- py310
Expand All @@ -403,8 +357,6 @@ workflows:
only:
- master
jobs:
- py36
- py37
- py38
- py39
- py310
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ repos:
hooks:
- id: pyupgrade
args:
- --py36-plus
- --py38-plus
- --keep-percent-format
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- Handle Python 3.12 deprecating utcnow ([#1331](../../pull/1331))
- Turn down logging about annotation ACLs ([#1332](../../pull/1332))
- Add scope to the dicomweb import endpoint access decorator ([#1347](../../pull/1347))
- Drop support for Python 3.6 and Python 3.7 ([#1352](../../pull/1352))

## 1.25.0

Expand Down
8 changes: 2 additions & 6 deletions girder/girder_large_image/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import json
import re
import warnings
from importlib.metadata import PackageNotFoundError
from importlib.metadata import version as _importlib_version

import yaml
from girder_jobs.constants import JobStatus
Expand Down Expand Up @@ -50,12 +52,6 @@
from .rest.large_image_resource import LargeImageResource
from .rest.tiles import TilesItemResource

try:
from importlib.metadata import PackageNotFoundError
from importlib.metadata import version as _importlib_version
except ImportError:
from importlib_metadata import PackageNotFoundError
from importlib_metadata import version as _importlib_version
try:
__version__ = _importlib_version(__name__)
except PackageNotFoundError:
Expand Down
11 changes: 3 additions & 8 deletions girder/girder_large_image/rest/large_image_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ def configValidate(self, config):
paramType='body'),
)
@access.admin(scope=TokenScope.DATA_WRITE)
def configFormat(self, config): # noqa
def configFormat(self, config):
config = config.read().decode('utf8')
if len(self._configValidate(config)):
return config
Expand Down Expand Up @@ -617,13 +617,8 @@ def configFormat(self, config): # noqa
if not key.startswith('__comment__'):
valstr = repr(val)
if len(valstr) + len(key) + 3 >= 79:
try:
valstr = pprint.pformat(
val, width=79, indent=2, compact=True, sort_dicts=False)
except Exception:
# sort_dicts isn't an option before Python 3.8
valstr = pprint.pformat(
val, width=79, indent=2, compact=True)
valstr = pprint.pformat(
val, width=79, indent=2, compact=True, sort_dicts=False)
out.append('%s = %s\n' % (key, valstr))
else:
out.append(val)
Expand Down
5 changes: 1 addition & 4 deletions girder/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ def prerelease_local_scheme(version):
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
Expand All @@ -57,7 +55,6 @@ def prerelease_local_scheme(version):
'girder>=3.1.18',
'girder-jobs>=3.0.3',
f'large_image{limit_version}',
'importlib-metadata<5 ; python_version < "3.8"',
],
extras_require={
'tasks': [
Expand All @@ -68,7 +65,7 @@ def prerelease_local_scheme(version):
include_package_data=True,
keywords='girder-plugin, large_image',
packages=find_packages(exclude=['test', 'test.*', 'test_girder', 'test_girder.*']),
python_requires='>=3.6',
python_requires='>=3.8',
url='https://github.com/girder/large_image',
zip_safe=False,
entry_points={
Expand Down
9 changes: 3 additions & 6 deletions girder_annotation/girder_large_image_annotation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
# limitations under the License.
#############################################################################

from importlib.metadata import PackageNotFoundError
from importlib.metadata import version as _importlib_version

from girder import events
from girder.constants import registerAccessFlag
from girder.exceptions import ValidationException
Expand All @@ -26,12 +29,6 @@
from .models.annotation import Annotation
from .rest.annotation import AnnotationResource

try:
from importlib.metadata import PackageNotFoundError
from importlib.metadata import version as _importlib_version
except ImportError:
from importlib_metadata import PackageNotFoundError
from importlib_metadata import version as _importlib_version
try:
__version__ = _importlib_version(__name__)
except PackageNotFoundError:
Expand Down
5 changes: 1 addition & 4 deletions girder_annotation/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ def prerelease_local_scheme(version):
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
Expand All @@ -57,7 +55,6 @@ def prerelease_local_scheme(version):
'jsonschema>=2.5.1',
f'girder-large-image{limit_version}',
'orjson',
'importlib-metadata<5 ; python_version < "3.8"',
],
extras_require={
'tasks': [
Expand All @@ -67,7 +64,7 @@ def prerelease_local_scheme(version):
include_package_data=True,
keywords='girder-plugin, large_image',
packages=find_packages(exclude=['test', 'test.*', 'test_annotation', 'test_annotation.*']),
python_requires='>=3.6',
python_requires='>=3.8',
url='https://github.com/girder/large_image',
zip_safe=False,
entry_points={
Expand Down
9 changes: 3 additions & 6 deletions large_image/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@
# limitations under the License.
#############################################################################

from importlib.metadata import PackageNotFoundError
from importlib.metadata import version as _importlib_version

from . import tilesource # noqa
from .tilesource import canRead, canReadList, getTileSource, new, open # noqa

try:
from importlib.metadata import PackageNotFoundError
from importlib.metadata import version as _importlib_version
except ImportError:
from importlib_metadata import PackageNotFoundError
from importlib_metadata import version as _importlib_version
try:
__version__ = _importlib_version(__name__)
except PackageNotFoundError:
Expand Down
5 changes: 1 addition & 4 deletions large_image/cache_util/cachefactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@
except ImportError:
psutil = None

try:
from importlib.metadata import entry_points
except ImportError:
from importlib_metadata import entry_points
from importlib.metadata import entry_points

from .. import config
from ..exceptions import TileCacheError
Expand Down
6 changes: 1 addition & 5 deletions large_image/tilesource/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import os
import re
import uuid

try:
from importlib.metadata import entry_points
except ImportError:
from importlib_metadata import entry_points
from importlib.metadata import entry_points

from .. import config
from ..constants import NEW_IMAGE_PATH_FLAG, SourcePriority
Expand Down
8 changes: 4 additions & 4 deletions requirements-test-core.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Top level dependencies
sources/bioformats
sources/deepzoom
sources/dicom ; python_version >= '3.8'
sources/dicom
sources/dummy
sources/gdal
sources/multi
sources/nd2 ; python_version >= '3.7'
sources/nd2
sources/openjpeg
sources/openslide
sources/pil[all]
sources/rasterio[all] ; python_version >= '3.8'
sources/rasterio[all]
sources/test
sources/tiff
sources/tifffile ; python_version >= '3.7'
sources/tifffile
sources/vips
sources/zarr
# must be after sources/tiff
Expand Down
11 changes: 5 additions & 6 deletions requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ girder>=3.1.18
girder-jobs>=3.0.3
sources/bioformats
sources/deepzoom
sources/dicom ; python_version >= '3.8'
sources/dicom
sources/dummy
sources/gdal
sources/multi
sources/nd2 ; python_version >= '3.7'
sources/nd2
sources/openjpeg
sources/openslide
sources/pil[all]
sources/rasterio[all] ; python_version >= '3.8'
sources/rasterio[all]
sources/test
sources/tiff
sources/tifffile ; python_version >= '3.7'
sources/tifffile
sources/vips
sources/zarr
# must be after sources/tiff
Expand All @@ -31,8 +31,7 @@ girder_annotation/.
# Extras from main setup.py
pylibmc>=1.5.1
matplotlib
simplejpeg ; python_version >= "3.7"
simplejpeg<1.6.6 ; python_version < "3.7"
simplejpeg

# External dependencies
pip>=9
Expand Down
Loading

0 comments on commit d0a6cdb

Please sign in to comment.