Skip to content

Commit 19793f0

Browse files
committed
dropping support for Python 3.7
1 parent dd1846f commit 19793f0

File tree

7 files changed

+11
-26
lines changed

7 files changed

+11
-26
lines changed

.github/workflows/main.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
15+
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
1616
architecture: ["x64"]
1717
include:
1818
- python-version: "3.10"
@@ -39,11 +39,7 @@ jobs:
3939
run: |
4040
# workaround for 3.12, SEE: https://github.com/pypa/setuptools/issues/3661#issuecomment-1813845177
4141
pip install --upgrade setuptools
42-
- name: Install dependencies py3.7
43-
if: matrix.python-version == 3.7
44-
run: pip install -r requirements-dev-3.7.txt
4542
- name: Install dependencies
46-
if: matrix.python-version != 3.7
4743
run: pip install -r requirements-dev.txt
4844
- name: Install Numpy Dev
4945
if: ${{ matrix.numpy-version }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
- [Extract](https://zepworks.com/deepdiff/current/extract.html): Extract an item from a nested Python object using its path.
1616
- [commandline](https://zepworks.com/deepdiff/current/commandline.html): Use DeepDiff from commandline.
1717

18-
Tested on Python 3.7+ and PyPy3.
18+
Tested on Python 3.8+ and PyPy3.
1919

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

deepdiff/diff.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,6 @@ def _diff_ordered_iterable_by_difflib(
915915

916916
opcodes = seq.get_opcodes()
917917
opcodes_with_values = []
918-
919918
for tag, t1_from_index, t1_to_index, t2_from_index, t2_to_index in opcodes:
920919
if tag == 'equal':
921920
opcodes_with_values.append(Opcode(

deepdiff/serialization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
from functools import partial
4646
from collections.abc import Mapping
4747
from deepdiff.helper import (
48-
strings, get_type, TEXT_VIEW, np_float32, np_float64, np_int32, np_int64, np_ndarray, Opcode
48+
strings, get_type, TEXT_VIEW, np_float32, np_float64, np_int32, np_int64, np_ndarray, Opcode, py_current_version
4949
)
5050
from deepdiff.model import DeltaResult
5151

requirements-dev-3.7.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def get_reqs(filename):
4343
long_description=long_description,
4444
long_description_content_type='text/markdown',
4545
install_requires=reqs,
46-
python_requires='>=3.7',
46+
python_requires='>=3.8',
4747
extras_require={
4848
"cli": cli_reqs,
4949
"optimize": optimize_reqs,
@@ -52,7 +52,6 @@ def get_reqs(filename):
5252
"Intended Audience :: Developers",
5353
"Operating System :: OS Independent",
5454
"Topic :: Software Development",
55-
"Programming Language :: Python :: 3.7",
5655
"Programming Language :: Python :: 3.8",
5756
"Programming Language :: Python :: 3.9",
5857
"Programming Language :: Python :: 3.10",

tests/test_serialization.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from decimal import Decimal
1111
from collections import Counter
1212
from deepdiff import DeepDiff
13-
from deepdiff.helper import pypy3, py_current_version, np_ndarray
13+
from deepdiff.helper import pypy3, py_current_version, np_ndarray, Opcode
1414
from deepdiff.serialization import (
1515
pickle_load, pickle_dump, ForbiddenModule, ModuleNotFoundError,
1616
MODULE_NOT_FOUND_MSG, FORBIDDEN_MODULE_MSG, pretty_print_diff,
@@ -354,3 +354,9 @@ def test_json_dumps_and_loads(self, test_num, value, func_to_convert_back):
354354
assert np.array_equal(value, back), f"test_json_dumps_and_loads test #{test_num} failed"
355355
else:
356356
assert value == back, f"test_json_dumps_and_loads test #{test_num} failed"
357+
358+
def test_namedtuple_seriazliation(self):
359+
op_code = Opcode(tag="replace", t1_from_index=0, t1_to_index=1, t2_from_index=10, t2_to_index=20)
360+
serialized = json_dumps(op_code)
361+
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}'
362+
assert serialized == expected

0 commit comments

Comments
 (0)