Skip to content

Commit

Permalink
Update docs to remove typing.List mentions
Browse files Browse the repository at this point in the history
  • Loading branch information
rnag committed Nov 10, 2024
1 parent 7a0632c commit d5409fa
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
22 changes: 22 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@
History
=======

0.27.0 (2024-11-09)
-------------------

**Features and Improvements**

* This minor release drops support/compatibility for Python 3.6, 3.7, and 3.8 -- all of
which have reached End of Life (EOL). Check out the `Python End of Life Cycle here`_.
Side effects and results of this changes include:
* Fix `pyup` errors - currently pyup shows as "insecure" since we're forced into using old or outdated
pkg versions since most don't support Python 3.8 or earlier.
* Clean up most if not all `TODO`s scattered in code in library, since most of those are python version- specific anyway.
* More cleaner, easier to maintain codebase.
* `Add test case`_ to satisfy :issue:`89`.
* Add support for cyclic or "recursive" dataclasses, first mentioned in :issue:`62` (thanks to :user:`dlenski` in :pr:`138` for finalizing this!)

**Bugfixes**

* :issue:`62`: Cyclic or "recursive" dataclasses no longer raises a :class:`RecursionError`.

.. _Python End of Life Cycle here: https://devguide.python.org/versions/#status-of-python-versions
.. _Add test case: https://github.com/rnag/dataclass-wizard/pull/139/commits/cf2e98cb75c75dc3e566ed0205637dbd4632e159

0.26.1 (2024-11-09)
-------------------

Expand Down
9 changes: 4 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ A brief example of the intended usage is shown below:
from dataclasses import dataclass
from datetime import time, datetime
from typing import Annotated, List
from typing import Annotated
from dataclass_wizard import fromdict, asdict, DatePattern, TimePattern, Pattern
Expand All @@ -643,7 +643,7 @@ A brief example of the intended usage is shown below:
date_field: DatePattern['%m-%Y']
dt_field: Annotated[datetime, Pattern('%m/%d/%y %H.%M.%S')]
time_field1: TimePattern['%H:%M']
time_field2: Annotated[List[time], Pattern('%I:%M %p')]
time_field2: Annotated[list[time], Pattern('%I:%M %p')]
data = {'date_field': '12-2022',
Expand Down Expand Up @@ -831,7 +831,6 @@ result. An example of both these approaches is shown below.
from collections import defaultdict
from dataclasses import field, dataclass
from typing import DefaultDict, List
from dataclass_wizard import JSONWizard
Expand All @@ -845,8 +844,8 @@ result. An example of both these approaches is shown below.
my_str: str
other_str: str = 'any value'
optional_str: str = None
my_list: List[str] = field(default_factory=list)
my_dict: DefaultDict[str, List[float]] = field(
my_list: list[str] = field(default_factory=list)
my_dict: defaultdict[str, list[float]] = field(
default_factory=lambda: defaultdict(list))
Expand Down

0 comments on commit d5409fa

Please sign in to comment.