Skip to content

docs(maintenance): add clarification about async decorators #1778

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

Merged
merged 2 commits into from
Nov 2, 2023

Conversation

dreamorosi
Copy link
Contributor

Description of your changes

The class method decorators offered by the project are currently implemented in a way that fits asynchronous methods. When decorating an asynchronous method everything works as intended. When instead decorating a synchronous method, the decorator replaces its implementation with an asynchronous one causing the caller to have to await the now decorated method.

This was previously not explicitly called out and caused confusion for some customers.

This PR adds a callout in the docs to document this behavior.

Related issues, RFCs

Issue number: closes #1204

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my change is effective and works
  • The PR title follows the conventional commit semantics

Breaking change checklist

Is it a breaking change?: NO

  • I have documented the migration process
  • I have added, implemented necessary warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@dreamorosi dreamorosi self-assigned this Nov 1, 2023
@dreamorosi dreamorosi requested a review from a team November 1, 2023 01:24
@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label Nov 1, 2023
@pull-request-size pull-request-size bot added the size/M PR between 30-99 LOC label Nov 1, 2023
Copy link

sonarqubecloud bot commented Nov 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@am29d am29d merged commit fab6110 into main Nov 2, 2023
@am29d am29d deleted the docs/decorators_clarifications branch November 2, 2023 16:03
dreamorosi added a commit that referenced this pull request Nov 20, 2023
* docs(maintenance): add clarification about async decorators

* docs(maintenance): add clarification about async decorators
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation size/M PR between 30-99 LOC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: captureMethod decorator for sync/async methods
2 participants