Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: samuelcolvin/dirty-equals
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.9.0
Choose a base ref
...
head repository: samuelcolvin/dirty-equals
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.11.0
Choose a head ref
  • 9 commits
  • 30 files changed
  • 4 contributors

Commits on Jun 30, 2025

  1. fix: IsJson and IsUUID repr (#109)

    # Description
    
    Closes #82 by changing `IsJson` and `IsUUID` repr from `IsJson(*)` and
    `IsUUID(*)` to `IsJson()` and `IsUUID()` respectively.
    
    It does not address the
    [comment](#82 (comment))
    regarding `IsApprox`.
    FBruzzesi authored Jun 30, 2025
    Configuration menu
    Copy the full SHA
    41dd5a4 View commit details
    Browse the repository at this point in the history
  2. chore: use zoneinfo instead of pytz (#107)

    # Description
    
    Closes #98 by preferring ` backports.zoneinfo` to `pytz` for py3.8
    FBruzzesi authored Jun 30, 2025
    Configuration menu
    Copy the full SHA
    31ab5a3 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2025

  1. fix(typing): put EllipsisType in LengthType union (#116)

    ```
    tests/integration_python/test_main_cli.py:1481: error: No overload variant of "IsList" matches argument type "EllipsisType"  [call-overload]
    tests/integration_python/test_main_cli.py:1481: note: Possible overload variants:
    tests/integration_python/test_main_cli.py:1481: note:     def IsList(self, *items: Any, check_order: bool = ..., length: int | tuple[int, int | Any] | None = ...) -> IsList
    tests/integration_python/test_main_cli.py:1481: note:     def IsList(self, positions: dict[int, Any], length: int | tuple[int, int | Any] | None = ...) -> IsList
    ```
    
    An ellipsis is a valid argument, as shown in the docs:
    https://dirty-equals.helpmanual.io/latest/types/sequence/?h=isl#dirty_equals.IsList.
    
    closes gh-110
    
    ---------
    
    Co-authored-by: Francesco Bruzzesi <42817048+FBruzzesi@users.noreply.github.com>
    lucascolley and FBruzzesi authored Sep 17, 2025
    Configuration menu
    Copy the full SHA
    cb52dd2 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2025

  1. switch to uv (#117)

    samuelcolvin authored Sep 19, 2025
    Configuration menu
    Copy the full SHA
    fc76e0a View commit details
    Browse the repository at this point in the history
  2. uprev to 0.10.0 (#118)

    samuelcolvin authored Sep 19, 2025
    Configuration menu
    Copy the full SHA
    32f23d1 View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2025

  1. 🐛 Fix nested dataclass comparison (#120)

    Fix how `IsDataclass` handles nested dataclasses so they can be compared
    successfully. Previously something like the following would not work:
    ```python
    from dataclasses import dataclass
    from dirty_equals import IsDataclass
    
    @DataClass
    class Address:
        street: str
        zip_code: str
    
    @DataClass
    class Person:
        name: str
        address: Address
    
    person = Person(
        name='Alice',
        address=Address(street='123 Main St', zip_code='12345'),
    )
    
    assert person == IsDataclass(
        name='Alice',
        address=IsDataclass(street='123 Main St', zip_code='12345')
    )
    ```
    
    This is a result of `IsDataclass` converting dataclasses to a dictionary
    for comparison using `dataclasses.asdict`, which _recursively_ converts
    dataclasses to plain dictionaries. Thus the inner `IsDataclass` fails,
    because the other side of the comparison is now a dictionary, not a
    dataclass.
    
    These changes fix this by shallowly converting the dataclass to a
    dictionary using [the approach recommended in the dataclasses
    documentation](https://docs.python.org/3/library/dataclasses.html#dataclasses.asdict):
    ```python
    {field.name: getattr(obj, field.name) for field in fields(obj)}
    ```
    
    These changes also include a test for nested dataclass comparisons to
    ensure this works as expected and continues to work in the future.
    connorbrinton authored Nov 17, 2025
    Configuration menu
    Copy the full SHA
    f15a6de View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5203cc9 View commit details
    Browse the repository at this point in the history
  3. Add tests for 3.14 (#123)

    Found a cpython bug along the way,
    python/cpython#141647.
    samuelcolvin authored Nov 17, 2025
    Configuration menu
    Copy the full SHA
    56e8409 View commit details
    Browse the repository at this point in the history
  4. uprev to 0.11

    samuelcolvin committed Nov 17, 2025
    Configuration menu
    Copy the full SHA
    e8cd329 View commit details
    Browse the repository at this point in the history
Loading