Skip to content

Commit

Permalink
dropping support for Python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
seperman committed Apr 5, 2024
1 parent dd1846f commit 19793f0
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 26 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
architecture: ["x64"]
include:
- python-version: "3.10"
Expand All @@ -39,11 +39,7 @@ jobs:
run: |
# workaround for 3.12, SEE: https://github.com/pypa/setuptools/issues/3661#issuecomment-1813845177
pip install --upgrade setuptools
- name: Install dependencies py3.7
if: matrix.python-version == 3.7
run: pip install -r requirements-dev-3.7.txt
- name: Install dependencies
if: matrix.python-version != 3.7
run: pip install -r requirements-dev.txt
- name: Install Numpy Dev
if: ${{ matrix.numpy-version }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- [Extract](https://zepworks.com/deepdiff/current/extract.html): Extract an item from a nested Python object using its path.
- [commandline](https://zepworks.com/deepdiff/current/commandline.html): Use DeepDiff from commandline.

Tested on Python 3.7+ and PyPy3.
Tested on Python 3.8+ and PyPy3.

- **[Documentation](https://zepworks.com/deepdiff/6.8.0/)**

Expand Down
1 change: 0 additions & 1 deletion deepdiff/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,6 @@ def _diff_ordered_iterable_by_difflib(

opcodes = seq.get_opcodes()
opcodes_with_values = []

for tag, t1_from_index, t1_to_index, t2_from_index, t2_to_index in opcodes:
if tag == 'equal':
opcodes_with_values.append(Opcode(
Expand Down
2 changes: 1 addition & 1 deletion deepdiff/serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
from functools import partial
from collections.abc import Mapping
from deepdiff.helper import (
strings, get_type, TEXT_VIEW, np_float32, np_float64, np_int32, np_int64, np_ndarray, Opcode
strings, get_type, TEXT_VIEW, np_float32, np_float64, np_int32, np_int64, np_ndarray, Opcode, py_current_version
)
from deepdiff.model import DeltaResult

Expand Down
15 changes: 0 additions & 15 deletions requirements-dev-3.7.txt

This file was deleted.

3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def get_reqs(filename):
long_description=long_description,
long_description_content_type='text/markdown',
install_requires=reqs,
python_requires='>=3.7',
python_requires='>=3.8',
extras_require={
"cli": cli_reqs,
"optimize": optimize_reqs,
Expand All @@ -52,7 +52,6 @@ def get_reqs(filename):
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Topic :: Software Development",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
8 changes: 7 additions & 1 deletion tests/test_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from decimal import Decimal
from collections import Counter
from deepdiff import DeepDiff
from deepdiff.helper import pypy3, py_current_version, np_ndarray
from deepdiff.helper import pypy3, py_current_version, np_ndarray, Opcode
from deepdiff.serialization import (
pickle_load, pickle_dump, ForbiddenModule, ModuleNotFoundError,
MODULE_NOT_FOUND_MSG, FORBIDDEN_MODULE_MSG, pretty_print_diff,
Expand Down Expand Up @@ -354,3 +354,9 @@ def test_json_dumps_and_loads(self, test_num, value, func_to_convert_back):
assert np.array_equal(value, back), f"test_json_dumps_and_loads test #{test_num} failed"
else:
assert value == back, f"test_json_dumps_and_loads test #{test_num} failed"

def test_namedtuple_seriazliation(self):
op_code = Opcode(tag="replace", t1_from_index=0, t1_to_index=1, t2_from_index=10, t2_to_index=20)
serialized = json_dumps(op_code)
expected = '{"tag":"replace","t1_from_index":0,"t1_to_index":1,"t2_from_index":10,"t2_to_index":20,"old_values":null,"new_values":null}'
assert serialized == expected

0 comments on commit 19793f0

Please sign in to comment.