Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for Python 3.4 and 3.5 #159

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@ Changelog
=========


.. _changes-2_0_0:

2.0.0 (not yet released)
~~~~~~~~~~~~~~~~~~~~~~~~

Incompatible changes and deprecations
-------------------------------------

+ `#159`_: Drop support for Python 3.4 and Python 3.5.

.. _#159: https://github.com/icatproject/python-icat/pull/159


.. _changes-1_5_0:

1.5.0 (2024-10-11)
Expand Down
2 changes: 1 addition & 1 deletion doc/src/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ System requirements
Python
......

+ 3.4 and newer.
+ 3.6 and newer.

Required library packages
.........................
Expand Down
2 changes: 1 addition & 1 deletion python-icat.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Summary: $description
License: Apache-2.0
Group: Development/Libraries/Python
Source: https://github.com/icatproject/python-icat/releases/download/%{version}/python-icat-%{version}.tar.gz
BuildRequires: python%{pyversfx}-base >= 3.4
BuildRequires: python%{pyversfx}-base >= 3.6
BuildRequires: python%{pyversfx}-setuptools
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,6 @@ def run(self):
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
Expand All @@ -198,7 +196,7 @@ def run(self):
),
packages = ["icat"],
package_dir = {"": "src"},
python_requires = ">=3.4",
python_requires = ">=3.6",
install_requires = requires,
scripts = [
"src/scripts/icatdump.py",
Expand Down
186 changes: 0 additions & 186 deletions src/icat/chunkedhttp.py

This file was deleted.

8 changes: 0 additions & 8 deletions src/icat/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@

__all__ = ['boolean', 'flag', 'Configuration', 'Config']

# Evil hack: Path.expanduser() has been added in Python 3.5.
# Monkeypatch the class for older Python versions.
if not hasattr(Path, "expanduser"):
import os.path
def _expanduser(p):
return Path(os.path.expanduser(str(p)))
Path.expanduser = _expanduser


if sys.platform.startswith("win"):
cfgdirs = [ Path(os.environ['ProgramData'], "ICAT"),
Expand Down
13 changes: 2 additions & 11 deletions src/icat/ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,14 @@
import sys
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import HTTPDefaultErrorHandler, ProxyHandler, Request
from urllib.request import build_opener
from urllib.request import HTTPHandler, HTTPSHandler, HTTPDefaultErrorHandler
from urllib.request import ProxyHandler, Request, build_opener
import zlib

from .entity import Entity
from .exception import *
from .helper import Version

# For Python versions older then 3.6.0b1, the standard library does
# not support sending the body using chunked transfer encoding. Need
# to replace the HTTPHandler with our modified versions from
# icat.chunkedhttp in this case.
if sys.version_info < (3, 6, 0, 'beta'):
from .chunkedhttp import HTTPHandler, HTTPSHandler
else:
from urllib.request import HTTPHandler, HTTPSHandler

__all__ = ['DataSelection', 'IDSClient']


Expand Down