From c9ffd0141154f6ba60ee6f469e6d9a4e880fa1a2 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Sat, 6 Jul 2024 15:43:38 +0200 Subject: [PATCH] Bump required Python version to 3.8 in remaining places. (#969) Co-authored-by: Pieter Marsman --- CHANGELOG.md | 1 + CONTRIBUTING.md | 2 +- docs/source/index.rst | 2 +- pdfminer/pdftypes.py | 2 +- setup.py | 4 +--- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad4282d5..a7c7198d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed - Updated Python 3.7 syntax to 3.8 ([#956](https://github.com/pdfminer/pdfminer.six/pull/956)) +- Updated all Python version specifications to a minimum of 3.8 ([#969](https://github.com/pdfminer/pdfminer.six/pull/969)) ## [20231228] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index daa600c1..898a26fe 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,7 +30,7 @@ Any contribution is appreciated! You might want to: * Pull requests should be merged to master. * Include unit tests when possible. In case of bugs, this will help to prevent the same mistake in the future. In case of features, this will show that your code works correctly. -* Code should work for Python 3.6+. +* Code should work for Python 3.8+. * Test your code by using nox (see below). * New features should be well documented using docstrings. * Check if the [README.md](../README.md) or [readthedocs](../docs/source) documentation needs to be updated. diff --git a/docs/source/index.rst b/docs/source/index.rst index 8650b5d5..5b1a2bf4 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -59,7 +59,7 @@ Features Installation instructions ========================= -* Install Python 3.6 or newer. +* Install Python 3.8 or newer. * Install pdfminer.six. :: diff --git a/pdfminer/pdftypes.py b/pdfminer/pdftypes.py index a2dced55..1fb5be38 100644 --- a/pdfminer/pdftypes.py +++ b/pdfminer/pdftypes.py @@ -1,13 +1,13 @@ import io import logging import zlib -from typing import Protocol from typing import ( TYPE_CHECKING, Any, Dict, Iterable, Optional, + Protocol, Union, List, Tuple, diff --git a/setup.py b/setup.py index d50bc033..5926e91d 100644 --- a/setup.py +++ b/setup.py @@ -28,8 +28,6 @@ install_requires=[ "charset-normalizer >= 2.0.0", "cryptography >= 36.0.0", - 'typing_extensions; python_version < "3.8"', - 'importlib_metadata; python_version < "3.8"', ], extras_require=extras_require, description="PDF parser and analyzer", @@ -49,7 +47,7 @@ "layout analysis", "text mining", ], - python_requires=">=3.6", + python_requires=">=3.8", classifiers=[ "Programming Language :: Python", "Programming Language :: Python :: 3.8",