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

Support the deprecated_parameter decorator for asynchronous functions. #6247

Merged

Conversation

jurruti
Copy link
Contributor

@jurruti jurruti commented Aug 16, 2023

No description provided.

@jurruti jurruti requested review from vtomole, cduck and a team as code owners August 16, 2023 00:51
@jurruti jurruti requested a review from pavoljuhas August 16, 2023 00:51
@CirqBot CirqBot added the size: M 50< lines changed <250 label Aug 16, 2023
@jurruti
Copy link
Contributor Author

jurruti commented Aug 16, 2023

This feature is necessary because I need to deprecate the parameter processor_ids within the EngineClient, EngineProgram and Engine (within cirq-google). The methods it appears in are asynchronous.

@codecov
Copy link

codecov bot commented Aug 16, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (9fbaa05) 97.38% compared to head (0de8f03) 97.38%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6247   +/-   ##
=======================================
  Coverage   97.38%   97.38%           
=======================================
  Files        1116     1116           
  Lines       96076    96100   +24     
=======================================
+ Hits        93564    93588   +24     
  Misses       2512     2512           
Files Changed Coverage Δ
cirq-core/cirq/_compat.py 98.70% <100.00%> (+0.04%) ⬆️
cirq-core/cirq/_compat_test.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@pavoljuhas pavoljuhas left a comment

Choose a reason for hiding this comment

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

Let us require the wrapped function to look like a coroutine.

Otherwise LGTM.

cirq-core/cirq/_compat_test.py Show resolved Hide resolved
@jurruti jurruti requested a review from pavoljuhas August 16, 2023 17:55
cirq-core/cirq/_compat_test.py Show resolved Hide resolved
@pavoljuhas pavoljuhas enabled auto-merge (squash) August 16, 2023 21:59
@pavoljuhas pavoljuhas merged commit 95c672a into quantumlib:master Aug 16, 2023
@jurruti jurruti deleted the u/urruti/async_deprecate_parameter branch August 16, 2023 23:20
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
quantumlib#6247)

* Support the deprecated_parameter decorator for asynchronous functions.
* Add assert iscoroutine to async_deprecated_parameter test

---------

Co-authored-by: Jose Urruticoechea <urruti@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: M 50< lines changed <250
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants