Skip to content

Commit 8bdcb0d

Browse files
authored
chore(release): bump to v1.8.0 (#599)
* chore(release): bump to v1.8.0 * chore(release): bump to v1.8.0
1 parent 134be6e commit 8bdcb0d

4 files changed

Lines changed: 82 additions & 19 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ repos:
3737
- id: codespell
3838
additional_dependencies: [tomli]
3939
- repo: https://github.com/sphinx-contrib/sphinx-lint
40-
rev: "v1.0.0"
40+
rev: "v1.0.1"
4141
hooks:
4242
- id: sphinx-lint

docs/changelog.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,67 @@
33
1.x Changelog
44
=============
55

6+
.. changelog:: 1.8.0
7+
:date: 2025-10-28
8+
9+
.. change:: ensure `has_dict_attribute` checks for `__dict__` attribute
10+
:type: bugfix
11+
:pr: 579
12+
13+
The previous implementation used `isinstance` against the `DictProtocol` type returned `True` for any object.
14+
The `isinstance` call is replaced with `hasattr` (which should also be faster). With this change, I believe the `DictProtocol` class could also be removed, but I kept the changes to a minimum.
15+
16+
.. change:: adding string representation to StoredObject
17+
:type: bugfix
18+
:pr: 582
19+
20+
Issues running migration created for `advanced_alchemy.types.FileObject` column on a model.
21+
22+
.. change:: surface FileObject session errors; align commit/rollback semantics
23+
:type: bugfix
24+
:pr: 580
25+
:issue: 543
26+
27+
- Previously save/delete failures were only logged, so callers believed commits succeeded when storage ops had already failed.
28+
- Sync commit: processes saves sequentially, then deletes. Logs failures with tracebacks and re-raises. Ignores FileNotFoundError on delete. Stops on first save error. Clears internal state only on full success.
29+
- Async commit: runs saves and deletes concurrently via asyncio.gather. Logs each failure with exc_info. Raises the first real Exception, and lets BaseException (e.g., CancelledError) bubble. Attempts deletes even if a save fails. Clears state only on full success.
30+
- Rollback (sync/async): deletes only files saved during the current transaction. Ignores FileNotFoundError. Logs and re-raises other errors. Clears state after processing.
31+
- Tracking: records successful saves in _saved_in_transaction for targeted rollback cleanup; state is retained on error to allow inspection/retry.
32+
33+
.. change:: add `sort_order` to mixin columns for consistent table layout
34+
:type: feature
35+
:pr: 581
36+
37+
- Add sort_order=-100 to primary key columns (id) across all mixins
38+
- Add sort_order=3001 to sentinel column
39+
- Add sort_order=3002 to created_at audit column
40+
- Add sort_order=3003 to updated_at audit column
41+
42+
This ensures consistent column ordering in generated tables:
43+
primary keys first, user columns in middle, audit/sentinel columns last.
44+
45+
.. change:: use `property` in `SQLAlchemyDTO` with `MappedAsDataclass`
46+
:type: feature
47+
:pr: 447
48+
49+
Allow better compatibility with `MappedAsDataclass` and the `SQLALchemyDTO`
50+
51+
.. change:: add support for SQLAlchemy func expressions in filter classes
52+
:type: feature
53+
:pr: 585
54+
:issue: 519
55+
56+
Adds support for SQLAlchemy func() expressions in filter classes to eliminate type checker errors when using database functions like `func.random()` or `func.lower()`
57+
58+
**Changes**
59+
60+
- Updated `OrderBy`, `BeforeAfter`, `OnBeforeAfter`, `CollectionFilter`, `NotInCollectionFilter`, `ComparisonFilter`
61+
- Enhanced `_get_instrumented_attr()` to handle new types
62+
- Mock repositories extract field names from `InstrumentedAttribute`, raise helpful error for func expressions (can't execute SQL in-memory)
63+
- Added integration tests for func expressions
64+
65+
Note: Different databases use different function names (PostgreSQL: `func.random()`, MySQL: `func.rand()`, SQL Server: `func.newid()`)
66+
667
.. changelog:: 1.7.0
768
:date: 2025-10-13
869

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ maintainers = [
4545
name = "advanced_alchemy"
4646
readme = "docs/PYPI_README.md"
4747
requires-python = ">=3.9"
48-
version = "1.7.0"
48+
version = "1.8.0"
4949

5050
[project.urls]
5151
Changelog = "https://docs.advanced-alchemy.litestar.dev/latest/changelog"
@@ -174,7 +174,7 @@ test = [
174174
allow_dirty = true
175175
commit = false
176176
commit_args = "--no-verify"
177-
current_version = "1.7.0"
177+
current_version = "1.8.0"
178178
ignore_missing_files = false
179179
ignore_missing_version = false
180180
message = "chore(release): bump to v{new_version}"

uv.lock

Lines changed: 18 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)