From 5dad0a0c37096d8e503e0c94c1fac5ebea7f1e4e Mon Sep 17 00:00:00 2001 From: HugoFara Date: Wed, 2 Oct 2024 16:13:07 +0200 Subject: [PATCH] Removes support for Python 3.7 and 3.8. --- CHANGELOG.md | 6 +++++- pylinkage/__init__.py | 3 ++- pylinkage/geometry/__init__.py | 3 ++- pylinkage/geometry/secants.py | 10 ++-------- pyproject.toml | 3 +-- setup.cfg | 5 +++-- tox.ini | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0358977..4e97588 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -71,13 +71,17 @@ iteration. ### Deprecated - Using ``tqdm_verbosity`` is deprecated in favor of using ``disable=True`` in a tqdm object. -- ``movement_bounding_bow`` is replaced by ``movement_bounding_box`` (typo in function name). - The ``Pivot`` class is deprecated in favor of the ``Revolute`` class. The name "Pivot joint" is not standard. Related to [#13](https://github.com/HugoFara/pylinkage/issues/13). - The ``hyperstaticity`` method is renamed ``indeterminacy`` in ``Linkage`` (linkage.py) +### Removed + +- Drops support for Python 3.7 and 3.8 as both versions reached end-of-life. +- ``movement_bounding_bow`` is replaced by ``movement_bounding_box`` (typo in function name). + ## [0.5.3] - 2023-06-23 diff --git a/pylinkage/__init__.py b/pylinkage/__init__.py index 558a81a..79ccd61 100644 --- a/pylinkage/__init__.py +++ b/pylinkage/__init__.py @@ -13,7 +13,6 @@ """ from .geometry import ( - dist, sqr_dist, norm, cyl_to_cart, @@ -51,5 +50,7 @@ show_linkage, swarm_tiled_repr, ) +# For compatibility only, geometry.dist is deprecated +from math import dist __version__ = "0.5.3" diff --git a/pylinkage/geometry/__init__.py b/pylinkage/geometry/__init__.py index fb216d0..c6bc023 100644 --- a/pylinkage/geometry/__init__.py +++ b/pylinkage/geometry/__init__.py @@ -3,7 +3,6 @@ """ from .core import ( - dist, sqr_dist, norm, cyl_to_cart, @@ -14,3 +13,5 @@ circle_line_from_points_intersection, intersection, ) +# For compatibility only, geometry.core.dist is deprecated +from math import dist diff --git a/pylinkage/geometry/secants.py b/pylinkage/geometry/secants.py index fbbdf6b..b2b03f3 100644 --- a/pylinkage/geometry/secants.py +++ b/pylinkage/geometry/secants.py @@ -4,15 +4,9 @@ The geometry module provides general geometry functions. It is used extensively, so each function should be highly optimized. - -Created on Wed May 5, 17:34:45 2021. - -@author: HugoFara """ import math -from .core import dist - def secant_circles_intersections( distance, dist_x, dist_y, mid_dist, radius1, projected @@ -186,7 +180,7 @@ def intersection(obj_1, obj_2, tol=0.0): """ # Two points if len(obj_1) == 2 and len(obj_2) == 2: - if obj_1 == obj_2 or tol and dist(obj_1, obj_2) <= tol: + if obj_1 == obj_2 or tol and math.dist(obj_1, obj_2) <= tol: return obj_1 return # Two circles @@ -194,7 +188,7 @@ def intersection(obj_1, obj_2, tol=0.0): return circle_intersect(obj_1, obj_2)[1:] # Point and circle if len(obj_1) == 2 and len(obj_2) == 3: - if dist(obj_1, obj_2[:2]) - obj_2[2] <= tol: + if math.dist(obj_1, obj_2[:2]) - obj_2[2] <= tol: return obj_1 return # Circle and point diff --git a/pyproject.toml b/pyproject.toml index 1f67632..e42d7bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,11 +21,10 @@ classifiers = [ "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Environment :: Console", "Intended Audience :: Science/Research", "Intended Audience :: Legal Industry", diff --git a/setup.cfg b/setup.cfg index 08e1851..4f0e35e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,9 +21,10 @@ classifiers = Topic :: Scientific/Engineering Topic :: Scientific/Engineering :: Artificial Intelligence Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 Intended Audience :: Science/Research Intended Audience :: Legal Industry Intended Audience :: End Users/Desktop diff --git a/tox.ini b/tox.ini index a086b52..ad6beda 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py37,py38,py39,flake8 +envlist = py39,py310,py311,py312,flake8 [testenv] commands = python -m unittest discover . -p "test_*.py"