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

7.0.0 #449

Merged
merged 38 commits into from
Apr 8, 2024
Merged

7.0.0 #449

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
fced607
dict key ignore case - fixes #341
seperman Nov 20, 2023
58e6ac9
ignore case for values in a list
seperman Nov 20, 2023
17001c1
significant digits and two numpy array containing strings - fixes #345
seperman Nov 20, 2023
b775e4f
adding test cases for #344
seperman Nov 27, 2023
6abf249
added one more test for #344
seperman Nov 27, 2023
89ab170
fixes #445 because of trying to round the date
seperman Feb 5, 2024
e1fc464
fixing the test that fails on python 3.7
seperman Feb 5, 2024
b057554
adding python 3.12 to the mix
seperman Feb 5, 2024
4f7253d
ci: upgrade setuptools to workaround 3.12
leoslf Feb 21, 2024
53de916
ci: use ~= for numpy
leoslf Feb 21, 2024
ce618ee
ci: change numpy constraints
leoslf Feb 21, 2024
87c9129
Merge pull request #451 from leoslf/dev
seperman Feb 26, 2024
fa1d6a2
Bump orjson from 3.9.7 to 3.9.15
dependabot[bot] Feb 26, 2024
d705a4b
Made change to diff near line 1128 to change evaluations for lengths …
sf-tcalhoun Mar 1, 2024
a08d550
Merge pull request #452 from seperman/dependabot/pip/orjson-3.9.15
seperman Mar 12, 2024
71fde30
Merge pull request #454 from sf-tcalhoun/diff_for_lists_fix
seperman Mar 12, 2024
a9bfc08
Added fix and unit test for (bug) issue 457, https://github.com/seper…
sf-tcalhoun Mar 25, 2024
32e62bf
Merge pull request #458 from sf-tcalhoun/delta_constructor_fix
seperman Mar 26, 2024
373cba1
We keep track of opcodes in delta now. We still need to make it work
seperman Apr 5, 2024
90a4845
Merge branch 'dev' of github.com:seperman/deepdiff into dev
seperman Apr 5, 2024
2d9b70f
Flat row delta. adding type hints.
seperman Apr 5, 2024
b2ad0d1
adding some type annotations. Couldn't make mypy ignore helper.py
seperman Apr 5, 2024
f7f5800
adding docs
seperman Apr 5, 2024
1910fbe
Bump version: 6.7.1 → 6.8.0
seperman Apr 5, 2024
dd0d257
updating docs
seperman Apr 5, 2024
2063331
fix for sort comparison of elements that are not the same type
seperman Apr 5, 2024
dd1846f
try to report the child relationship params properly for both t1 and t2
seperman Apr 5, 2024
19793f0
dropping support for Python 3.7
seperman Apr 5, 2024
d5f23e9
updating reqs
seperman Apr 5, 2024
5182bf8
updating docs
seperman Apr 5, 2024
e559cd3
Bump version: 6.8.0 → 7.0.0
seperman Apr 5, 2024
dfe1ea5
Adding new_path when the old path and new path don't match
seperman Apr 8, 2024
3d3bfd8
fixing more edge cases
seperman Apr 8, 2024
d76e2e2
text view only show new_path for iterable item moved OR if
seperman Apr 8, 2024
f84aaad
finally 7.0.0, all tests passing
seperman Apr 8, 2024
93fd654
fixing final tests
seperman Apr 8, 2024
ae84266
code cov token
seperman Apr 8, 2024
c6ae868
fixing the github action file
seperman Apr 8, 2024
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
12 changes: 7 additions & 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"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
architecture: ["x64"]
include:
- python-version: "3.10"
Expand All @@ -34,11 +34,12 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies py3.7
if: matrix.python-version == 3.7
run: pip install -r requirements-dev-3.7.txt
- name: Upgrade setuptools
if: matrix.python-version == 3.12
run: |
# workaround for 3.12, SEE: https://github.com/pypa/setuptools/issues/3661#issuecomment-1813845177
pip install --upgrade setuptools
- 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 All @@ -63,5 +64,6 @@ jobs:
if: matrix.python-version == 3.11
with:
file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
fail_ci_if_error: true
10 changes: 10 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Dehpour"
given-names: "Sep"
orcid: "https://orcid.org/0009-0009-5828-4345"
title: "DeepDiff"
version: 7.0.0
date-released: 2024
url: "https://github.com/seperman/deepdiff"
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DeepDiff v 6.7.1
# DeepDiff v 7.0.0

![Downloads](https://img.shields.io/pypi/dm/deepdiff.svg?style=flat)
![Python Versions](https://img.shields.io/pypi/pyversions/deepdiff.svg?style=flat)
Expand All @@ -15,9 +15,9 @@
- [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.7.1/)**
- **[Documentation](https://zepworks.com/deepdiff/7.0.0/)**

## What is new?

Expand Down Expand Up @@ -101,16 +101,6 @@ Or to see a more user friendly version, please run: `pytest --cov=deepdiff --cov

Thank you!

# Citing

How to cite this library (APA style):

Dehpour, S. (2023). DeepDiff (Version 6.7.1) [Software]. Available from https://github.com/seperman/deepdiff.

How to cite this library (Chicago style):

Dehpour, Sep. 2023. DeepDiff (version 6.7.1).

# Authors

Please take a look at the [AUTHORS](AUTHORS.md) file.
2 changes: 1 addition & 1 deletion deepdiff/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""This module offers the DeepDiff, DeepSearch, grep, Delta and DeepHash classes."""
# flake8: noqa
__version__ = '6.7.1'
__version__ = '7.0.0'
import logging

if __name__ == '__main__':
Expand Down
3 changes: 2 additions & 1 deletion deepdiff/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def get_ignore_types_in_groups(self, ignore_type_in_groups,
if ignore_numeric_type_changes and self.numbers not in ignore_type_in_groups:
ignore_type_in_groups.append(OrderedSet(self.numbers))

if ignore_type_subclasses:
if not ignore_type_subclasses:
# is_instance method needs tuples. When we look for subclasses, we need them to be tuples
ignore_type_in_groups = list(map(tuple, ignore_type_in_groups))

return ignore_type_in_groups
11 changes: 10 additions & 1 deletion deepdiff/deephash.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python
import inspect
import logging
import datetime
from collections.abc import Iterable, MutableMapping
from collections import defaultdict
from hashlib import sha1, sha256
Expand Down Expand Up @@ -186,7 +187,8 @@ def __init__(self,
# the only time it should be set to False is when
# testing the individual hash functions for different types of objects.
self.apply_hash = apply_hash
self.type_check_func = type_is_subclass_of_type_group if ignore_type_subclasses else type_in_type_group
self.type_check_func = type_in_type_group if ignore_type_subclasses else type_is_subclass_of_type_group
# self.type_check_func = type_is_subclass_of_type_group if ignore_type_subclasses else type_in_type_group
self.number_to_string = number_to_string_func or number_to_string
self.ignore_private_variables = ignore_private_variables
self.encodings = encodings
Expand Down Expand Up @@ -455,6 +457,10 @@ def _prep_datetime(self, obj):
obj = datetime_normalize(self.truncate_datetime, obj)
return KEY_TO_VAL_STR.format(type_, obj)

def _prep_date(self, obj):
type_ = 'datetime' # yes still datetime but it doesn't need normalization
return KEY_TO_VAL_STR.format(type_, obj)

def _prep_tuple(self, obj, parent, parents_ids):
# Checking to see if it has _fields. Which probably means it is a named
# tuple.
Expand Down Expand Up @@ -505,6 +511,9 @@ def _hash(self, obj, parent, parents_ids=EMPTY_FROZENSET):
elif isinstance(obj, times):
result = self._prep_datetime(obj)

elif isinstance(obj, datetime.date):
result = self._prep_date(obj)

elif isinstance(obj, numbers):
result = self._prep_number(obj)

Expand Down
Loading
Loading