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

release: Bump version & update changelog #1005

Merged
merged 1 commit into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
35 changes: 35 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
## 24.4 (2024-04-01)

**Features**

- Add xml and lxml tree serializers ([#975](https://github.com/tefra/xsdata/pull/975))
- Capture namespace prefixes in user dicts
([#978](https://github.com/tefra/xsdata/pull/978))
- Add cli option to generate wrapper fields
([#982](https://github.com/tefra/xsdata/pull/982))
- Support wrapper fields in JSON data bindings
([#982](https://github.com/tefra/xsdata/pull/982))
- Use abstract suffixes to resolve class name conflicts
([#985](https://github.com/tefra/xsdata/pull/985))
- Add the version number in the cli cache key
([#990](https://github.com/tefra/xsdata/pull/990))
- Use unicodedata.name for attrs with only special characters
([#993](https://github.com/tefra/xsdata/pull/993))
- Add src code excerpts on ruff errors
([#996](https://github.com/tefra/xsdata/pull/996))
- Detect circular imports and raise appropriate error
([#999](https://github.com/tefra/xsdata/pull/999))
- Add support for Python 3.13 ([#1001](https://github.com/tefra/xsdata/pull/1001))
- Add cli debug messages with performance stats

**Fixes**

- Use deepcopy to clone codegen models
([#980](https://github.com/tefra/xsdata/pull/980))
- Generate type hints for compound fields with token elements
([#997](https://github.com/tefra/xsdata/pull/997))
- Protect prohibited attrs from turning into lists
([#998](https://github.com/tefra/xsdata/pull/998))
- Convert child attr to list when parent is list
([#998](https://github.com/tefra/xsdata/pull/998))

## 24.3.1 (2024-03-10)

**Fixes**
Expand Down
41 changes: 28 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,22 +82,37 @@ Check the [documentation](https://xsdata.readthedocs.io) for more ✨✨✨
- Unnest class with circular reference
([#974](https://github.com/tefra/xsdata/pull/974))

## Changelog: 24.3 (2024-03-10)
## Changelog: 24.4 (2024-04-01)

**Features**

- Avoid flattening root elements ([#945](https://github.com/tefra/xsdata/pull/945))
- Avoid generating ambiguous choices ([#946](https://github.com/tefra/xsdata/pull/946))
- Added various type reference validations
([#966](https://github.com/tefra/xsdata/pull/966),
[#967](https://github.com/tefra/xsdata/pull/967),
[#968](https://github.com/tefra/xsdata/pull/968))
- Calculate circular references more accurately
([#969](https://github.com/tefra/xsdata/pull/969))
- Prettify codegen errors ([#970](https://github.com/tefra/xsdata/pull/970))
- Use Ruff to sort imports ([#972](https://github.com/tefra/xsdata/pull/972))
- Add xml and lxml tree serializers ([#975](https://github.com/tefra/xsdata/pull/975))
- Capture namespace prefixes in user dicts
([#978](https://github.com/tefra/xsdata/pull/978))
- Add cli option to generate wrapper fields
([#982](https://github.com/tefra/xsdata/pull/982))
- Support wrapper fields in JSON data bindings
([#982](https://github.com/tefra/xsdata/pull/982))
- Use abstract suffixes to resolve class name conflicts
([#985](https://github.com/tefra/xsdata/pull/985))
- Add the version number in the cli cache key
([#990](https://github.com/tefra/xsdata/pull/990))
- Use unicodedata.name for attrs with only special characters
([#993](https://github.com/tefra/xsdata/pull/993))
- Add src code excerpts on ruff errors
([#996](https://github.com/tefra/xsdata/pull/996))
- Detect circular imports and raise appropriate error
([#999](https://github.com/tefra/xsdata/pull/999))
- Add support for Python 3.13 ([#1001](https://github.com/tefra/xsdata/pull/1001))
- Add cli debug messages with performance stats

**Fixes**

- Move ruff format in the code generator
([#964](https://github.com/tefra/xsdata/pull/964))
- Use deepcopy to clone codegen models
([#980](https://github.com/tefra/xsdata/pull/980))
- Generate type hints for compound fields with token elements
([#997](https://github.com/tefra/xsdata/pull/997))
- Protect prohibited attrs from turning into lists
([#998](https://github.com/tefra/xsdata/pull/998))
- Convert child attr to list when parent is list
([#998](https://github.com/tefra/xsdata/pull/998))
14 changes: 7 additions & 7 deletions docs/models/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ collections are also supported.

`typing.Tuple` can be use in `frozen` dataclasses, for immutable instances.

| Case | Example |
| --------------- | ----------------------------------------------------------------------------------- |
| Tuple | `value: Tuple[str] = field(default_factory=list)` |
| Optional Tuple | `value: Optional[Tuple[str]] = field(default=None)` |
| Tuple Union | `value: Tuple[Union[str, int]] = field(default_factory=list)` |
| Tokens Tuple | `value: Tuple[str] = field(default_factory=list, metadata={"tokens": True})` |
| Tuple of Tokens | `value: Tuple[Tuple[str]] = field(default_factory=list, metadata={"tokens": True})` |
| Case | Example |
| --------------- | ---------------------------------------------------------------------------------------------- |
| Tuple | `value: Tuple[str, ...] = field(default_factory=tuple)` |
| Optional Tuple | `value: Optional[Tuple[str, ...]] = field(default=None)` |
| Tuple Union | `value: Tuple[Union[str, int], ...] = field(default_factory=tuple)` |
| Tokens Tuple | `value: Tuple[str, ...] = field(default_factory=tuple, metadata={"tokens": True})` |
| Tuple of Tokens | `value: Tuple[Tuple[str, ...], ...] = field(default_factory=tuple, metadata={"tokens": True})` |

### Dict

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def test_process_symmetrical_sequence(self):
AttrFactory.element(
name="b", namespace="b", restrictions=restrictions.clone()
),
AttrFactory.element(name="b", namespace="b"), # no paths, impossible!
AttrFactory.element(name="c", namespace="b"),
AttrFactory.element(
name="d", namespace="b", restrictions=Restrictions(choice=1)
Expand Down Expand Up @@ -124,3 +123,9 @@ def test_process_enumeration(self):
self.processor.process(target)

self.assertEqual(3, len(target.attrs))

def test_reset_effective_choice_for_coverage(self):
paths = [("g", 0, 1, 1), ("g", 1, 1, 1)]
self.processor.reset_effective_choice(paths, 3, 4)

self.assertEqual([("g", 0, 1, 1), ("g", 1, 1, 1)], paths)
2 changes: 1 addition & 1 deletion xsdata/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "24.3.1"
__version__ = "24.4"
Loading