Skip to content

Conversation

@jbarreau
Copy link
Contributor

ATOMIC_REQUESTS setting permit to decorate each http request in a transaction. This setting is incompatible with async views, that the agent use.

async_to_sync permit to run view in a thread where transaction are allowed, whereas for readonly view we prefer to not use transaction (transaction.non_atomic_requests)

@classmethod
def intersect(cls, trees: List[ConditionTree]) -> ConditionTree:
result = ConditionTreeFactory._group(Aggregator.AND, trees)
if isinstance(result, ConditionTreeBranch) and not result.conditions:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbarreau
Copy link
Contributor Author

@jbarreau jbarreau merged commit 3404165 into beta Feb 1, 2024
@jbarreau jbarreau deleted the atomic_request branch February 1, 2024 08:21
forest-bot added a commit that referenced this pull request Feb 1, 2024
# [1.3.0-beta.15](v1.3.0-beta.14...v1.3.0-beta.15) (2024-02-01)

### Bug Fixes

* **django_atomic_requests:** atomic requests can now be enabled ([#179](#179)) ([3404165](3404165))
@forest-bot
Copy link
Member

🎉 This PR is included in version 1.3.0-beta.15 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

forest-bot added a commit that referenced this pull request Feb 5, 2024
# [1.4.0-beta.1](v1.3.1...v1.4.0-beta.1) (2024-02-05)

### Bug Fixes

* **csv:** export fails when there is more fields in data than projection ([#181](#181)) ([2202877](2202877))
* **datasource_django:** inexistant related object does not crash anymore ([#161](#161)) ([53acaad](53acaad))
* **datasource_django:** proxy models are not added to datasource ([#158](#158)) ([157e424](157e424))
* **django:** allow requests during object serialization ([#178](#178)) ([eb7dabf](eb7dabf))
* **django_atomic_requests:** atomic requests can now be enabled ([#179](#179)) ([3404165](3404165))
* **django_datasource:** django datasource now works when model fields use db_column ([#148](#148)) ([4a99e8f](4a99e8f))
* **django_introspection:** collection name is now the db table name ([#150](#150)) ([8378c96](8378c96))
* **django_setup:** wait for all apps to be initialized before creating agent ([#169](#169)) ([99bfaf1](99bfaf1))
* **enum:** force enums to be strings ([#175](#175)) ([c3e546b](c3e546b))
* **enums:** handle not json serializable enum values ([#171](#171)) ([537d25f](537d25f))
* **float_serialization:** float number were serialized as int ([#180](#180)) ([403e2e7](403e2e7))
* **introspection:** editable attribute now determine is_readonly ([#168](#168)) ([09db661](09db661))
* **json_api:** correctly find id before retrieving related_url ([#162](#162)) ([fa5738a](fa5738a))
* **polymorphic:** also ignore polymorphic reverse relations ([#172](#172)) ([ba026cb](ba026cb))
* **relation:** introspection over self many to many works ([#170](#170)) ([83dfdbb](83dfdbb))
* **time_only:** timeonly type was never validated ([#163](#163)) ([4597bac](4597bac))
* foreign keys can be used as primary key ([#159](#159)) ([5f18f73](5f18f73))
* **relations:** gracefully ignore polymorphic relationships ([#157](#157)) ([f1c2d6d](f1c2d6d))

### Features

* **django:** add database operations and routes ([#145](#145)) ([95f3a94](95f3a94))
* **django_5:** support django 5 ([#164](#164)) ([817db77](817db77))
* **django_agent:** agent is ready to onboard on django project ([#147](#147)) ([ac6135d](ac6135d))
* **django_datasource:** add native driver ([#149](#149)) ([5055031](5055031))
* **django_models_inheritance:** support django model inheritance ([#176](#176)) ([6d27929](6d27929))
* support python 3.12 ([#155](#155)) ([93f8374](93f8374))
@forest-bot
Copy link
Member

🎉 This PR is included in version 1.4.0-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

forest-bot added a commit that referenced this pull request Feb 6, 2024
# [1.4.0](v1.3.1...v1.4.0) (2024-02-06)

### Bug Fixes

* **csv:** export fails when there is more fields in data than projection ([#181](#181)) ([2202877](2202877))
* **datasource_django:** inexistant related object does not crash anymore ([#161](#161)) ([53acaad](53acaad))
* **datasource_django:** proxy models are not added to datasource ([#158](#158)) ([157e424](157e424))
* **django:** allow requests during object serialization ([#178](#178)) ([eb7dabf](eb7dabf))
* **django_atomic_requests:** atomic requests can now be enabled ([#179](#179)) ([3404165](3404165))
* **django_datasource:** django datasource now works when model fields use db_column ([#148](#148)) ([4a99e8f](4a99e8f))
* **django_introspection:** collection name is now the db table name ([#150](#150)) ([8378c96](8378c96))
* **django_setup:** wait for all apps to be initialized before creating agent ([#169](#169)) ([99bfaf1](99bfaf1))
* **enum:** force enums to be strings ([#175](#175)) ([c3e546b](c3e546b))
* **enums:** handle not json serializable enum values ([#171](#171)) ([537d25f](537d25f))
* **float_serialization:** float number were serialized as int ([#180](#180)) ([403e2e7](403e2e7))
* **introspection:** editable attribute now determine is_readonly ([#168](#168)) ([09db661](09db661))
* **json_api:** correctly find id before retrieving related_url ([#162](#162)) ([fa5738a](fa5738a))
* **polymorphic:** also ignore polymorphic reverse relations ([#172](#172)) ([ba026cb](ba026cb))
* **relation:** introspection over self many to many works ([#170](#170)) ([83dfdbb](83dfdbb))
* **time_only:** timeonly type was never validated ([#163](#163)) ([4597bac](4597bac))
* foreign keys can be used as primary key ([#159](#159)) ([5f18f73](5f18f73))
* **relations:** gracefully ignore polymorphic relationships ([#157](#157)) ([f1c2d6d](f1c2d6d))

### Features

* **django:** add database operations and routes ([#145](#145)) ([95f3a94](95f3a94))
* **django_5:** support django 5 ([#164](#164)) ([817db77](817db77))
* **django_agent:** agent is ready to onboard on django project ([#147](#147)) ([ac6135d](ac6135d))
* **django_datasource:** add native driver ([#149](#149)) ([5055031](5055031))
* **django_models_inheritance:** support django model inheritance ([#176](#176)) ([6d27929](6d27929))
* **search_hook:** add search hook route to django agent ([#183](#183)) ([edbb1d1](edbb1d1))
* support python 3.12 ([#155](#155)) ([93f8374](93f8374))
@forest-bot
Copy link
Member

🎉 This PR is included in version 1.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants